Bug 187669 - [MAINTAINER] security/pecl-scrypt: security improvements
Summary: [MAINTAINER] security/pecl-scrypt: security improvements
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 18:10 UTC by Horia Racoviceanu
Modified: 2014-03-18 14:40 UTC (History)
0 users

See Also:


Attachments
file.diff (1.37 KB, patch)
2014-03-17 18:10 UTC, Horia Racoviceanu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Horia Racoviceanu 2014-03-17 18:10:02 UTC

Fix: - Bump PORTREVISION
- Change License from BSD to BSD2CLAUSE
- Add USES=compiler, REINPLACE is only needed for gcc
- Add DOCS to Options
- Add DOCSDIR
- Add BUFFER_OVERFLOW_PROTECTION to Options
- Strip library

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2014-03-17 18:10:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2014-03-18 14:32:22 UTC
Author: swills
Date: Tue Mar 18 14:32:15 2014
New Revision: 348554
URL: http://svnweb.freebsd.org/changeset/ports/348554
QAT: https://qat.redports.org/buildarchive/r348554/

Log:
  - Change License from BSD to BSD2CLAUSE
  - Add USES=compiler, REINPLACE is only needed for gcc
  - Add DOCS to Options
  - Add DOCSDIR
  - Add BUFFER_OVERFLOW_PROTECTION to Options
  - Strip library
  - Bump PORTREVISION
  
  PR:		ports/187669
  Submitted by:	Horia Racoviceanu <horia@racoviceanu.com> (maintainer)

Modified:
  head/security/pecl-scrypt/Makefile

Modified: head/security/pecl-scrypt/Makefile
==============================================================================
--- head/security/pecl-scrypt/Makefile	Tue Mar 18 14:30:52 2014	(r348553)
+++ head/security/pecl-scrypt/Makefile	Tue Mar 18 14:32:15 2014	(r348554)
@@ -3,6 +3,7 @@
 
 PORTNAME=	scrypt
 PORTVERSION=	1.2
+PORTREVISION=	1
 CATEGORIES=	security pear
 MASTER_SITES=	http://pecl.php.net/get/
 PKGNAMEPREFIX=	pecl-
@@ -11,17 +12,39 @@ EXTRACT_SUFX=	.tgz
 MAINTAINER=	horia@racoviceanu.com
 COMMENT=	PHP wrapper to Colin Percival's scrypt implementation
 
-LICENSE=	BSD
+LICENSE=	BSD2CLAUSE
 
+USES=		compiler
 USE_PHP=	hash
 USE_PHPEXT=	yes
 USE_PHP_BUILD=	yes
 
+DOCSDIR=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
+PORTDOCS=	README.md
+
+OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFAULT=STACKPROTECTOR
+
+OPTIONS_RADIO=	BUFFER_OVERFLOW_PROTECTION
+OPTIONS_RADIO_BUFFER_OVERFLOW_PROTECTION=	STACKPROTECTOR STACKPROTECTORALL
+
+STACKPROTECTOR_DESC=	Protect functions with vulnerable objects
+STACKPROTECTORALL_DESC=	Protect all functions
+
+STACKPROTECTOR_CFLAGS=	-fstack-protector
+STACKPROTECTORALL_CFLAGS=	-fstack-protector-all
+
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} != amd64
+.if ${ARCH} != amd64 && ${COMPILER_TYPE} == gcc
 post-patch:
 	${REINPLACE_CMD} '/emmintrin.h/d' ${WRKSRC}/config.m4
 .endif
 
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/${PORTNAME}.so
+
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
 .include <bsd.port.post.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steve Wills freebsd_committer 2014-03-18 14:32:26 UTC
State Changed
From-To: open->closed

Committed. Thanks!