ports/166693: [PATCH] security/gnutls: Respect NOPORTEXAMPLES
Michael Scheidell
scheidell at FreeBSD.org
Fri Apr 6 15:40:06 UTC 2012
>Number: 166693
>Category: ports
>Synopsis: [PATCH] security/gnutls: Respect NOPORTEXAMPLES
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 06 15:40:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Michael Scheidell
>Release: FreeBSD 7.4-RELEASE-p3 i386
>Organization:
SECNAP Network Security
>Environment:
Not a cloud in the sky today
>Description:
currently, if you build gnutls with NOPORTDOCS, it respects this and does not install portdocs.
However, if you define NOPORTEXAMPLES (make.conf, env, cli), it still installs 100K of examples:
>How-To-Repeat:
before patch:
make -DNOPORTEXAMPLES install
du -ch /usr/local/share/examples/gnutls
100K /usr/loca/share/examples/gnutls
100K total
>Fix:
This patch:
After patch:
make deinstall
make -DNOPORTEXAMPLES reinstall
du -ch /usr/local/share/examples/gnutls
du: /usr/local/share/examples/gnutls: No such file or directory
0B total
logs:
NOPORTEXAMPLES:
http://people.freebsd.org/~scheidell/gnutls-2.12.18.NOPORTEXAMPLES.log
W PORTEXAMPLES:
http://people.freebsd.org/~scheidell/gnutls-2.12.18.PORTEXAMPLES.log
Question of phylophsy or style: no PORTREVISION bump? or bump?
Yes, this changes package, but I think PORTREVISION bump is important only if you want to force end user to rebuild.
This saves 100k on target system, but if OP really was concerned, could have done an rm -rd /usr/local/share
- Respect NOPORTEXAMPLES flag
- No PORTREVISION bump
--- gnutls.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/security/gnutls/Makefile,v
retrieving revision 1.100
diff -u -r1.100 Makefile
--- Makefile 25 Mar 2012 15:24:23 -0000 1.100
+++ Makefile 6 Apr 2012 15:22:57 -0000
@@ -67,11 +67,14 @@
.if !defined(NOPORTDOCS)
PORTDOCS= AUTHORS NEWS README THANKS
.endif
+.if !defined(NOPORTEXAMPLES)
EXAMPLES= doc/examples/*.c
-
+.endif
post-install:
+.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
+.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/security/gnutls/pkg-plist,v
retrieving revision 1.26
diff -u -r1.26 pkg-plist
--- pkg-plist 5 Jun 2011 18:34:23 -0000 1.26
+++ pkg-plist 6 Apr 2012 15:22:57 -0000
@@ -48,26 +48,26 @@
lib/libgnutls.so.47
libdata/pkgconfig/gnutls-extra.pc
libdata/pkgconfig/gnutls.pc
-%%EXAMPLESDIR%%/ex-alert.c
-%%EXAMPLESDIR%%/ex-cert-select-pkcs11.c
-%%EXAMPLESDIR%%/ex-cert-select.c
-%%EXAMPLESDIR%%/ex-client-psk.c
-%%EXAMPLESDIR%%/ex-client-resume.c
-%%EXAMPLESDIR%%/ex-client-srp.c
-%%EXAMPLESDIR%%/ex-client1.c
-%%EXAMPLESDIR%%/ex-client2.c
-%%EXAMPLESDIR%%/ex-crq.c
-%%EXAMPLESDIR%%/ex-pkcs12.c
-%%EXAMPLESDIR%%/ex-rfc2818.c
-%%EXAMPLESDIR%%/ex-serv-anon.c
-%%EXAMPLESDIR%%/ex-serv-pgp.c
-%%EXAMPLESDIR%%/ex-serv-psk.c
-%%EXAMPLESDIR%%/ex-serv-srp.c
-%%EXAMPLESDIR%%/ex-serv1.c
-%%EXAMPLESDIR%%/ex-session-info.c
-%%EXAMPLESDIR%%/ex-verify.c
-%%EXAMPLESDIR%%/ex-x509-info.c
-%%EXAMPLESDIR%%/tcp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-alert.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-cert-select-pkcs11.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-cert-select.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-client-psk.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-client-resume.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-client-srp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-client1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-client2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-crq.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-pkcs12.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-rfc2818.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-serv-anon.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-serv-pgp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-serv-psk.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-serv-srp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-serv1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-session-info.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-verify.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex-x509-info.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp.c
%%NLS%%share/locale/cs/LC_MESSAGES/libgnutls.mo
%%NLS%%share/locale/de/LC_MESSAGES/libgnutls.mo
%%NLS%%share/locale/en at boldquot/LC_MESSAGES/libgnutls.mo
@@ -80,5 +80,5 @@
%%NLS%%share/locale/sv/LC_MESSAGES/libgnutls.mo
%%NLS%%share/locale/vi/LC_MESSAGES/libgnutls.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/libgnutls.mo
- at dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
@dirrm include/gnutls
--- gnutls.patch ends here ---
______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.spammertrap.com/
______________________________________________________________________
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list