Bug 165800 - [PATCH] security/snort Honor NOPORTEXAMPLES env var
Summary: [PATCH] security/snort Honor NOPORTEXAMPLES env var
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: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 02:20 UTC by Michael Scheidell
Modified: 2012-03-11 19:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scheidell freebsd_committer freebsd_triage 2012-03-07 02:20:10 UTC
I appoligize for not seeing this earlier when I send in the patches for noportdocs.
I had assumed noportdocs also kept examples out.  I guess it didn't.

anyway, this patch to Makefile and pkg-plist eliminates 270K of examples if OP defines noportexamples in env.
it uses the pre-defined %%PORTEXAMPLES%% plist sub from ../Mk/* to help keep the plist_files in order.

Fix: logs:
with patch, and portexamples:
http://lorie.secnap.net/tb/logs/7-scheidell_I386/snort-2.9.2.1_2.log
with patch and noportexamples:
http://lorie.secnap.net/tb/logs/7-SECNAP_AMD64/snort-2.9.2.1_2.log

- Honor NOPORTEXAMPLES env var
- No PORTREVISION bump



______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com/
______________________________________________________________________--iua8qlJ6tZ9aI1tYiU90kDXWgYa32lNRnfIw8f74nkp2uzIH
Content-Type: text/plain; name="snort.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="snort.patch"

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/security/snort/Makefile,v
retrieving revision 1.148
diff -u -r1.148 Makefile
--- Makefile	14 Feb 2012 12:45:29 -0000	1.148
+++ Makefile	7 Mar 2012 02:11:30 -0000
@@ -227,17 +227,23 @@
 post-install:
 	@${LIBTOOL} --finish ${LOCALBASE}/lib/snort/dynamicpreprocessor
 	[ -d ${CONFIG_DIR} ] || ${MKDIR} ${CONFIG_DIR}
+.if !defined(NOPORTEXAMPLES)
 	[ -d ${EXAMPLESDIR} ] || ${MKDIR} ${EXAMPLESDIR}
+.endif
 	[ -d ${RULES_DIR} ] || ${MKDIR} ${RULES_DIR}
 	[ -d ${LOGS_DIR} ] || ${MKDIR} ${LOGS_DIR}
 .for f in ${CONFIG_FILES}
 	${INSTALL_DATA} ${WRKSRC}/etc/${f} ${CONFIG_DIR}/${f}-sample
+.if !defined(NOPORTEXAMPLES)
 	${INSTALL_DATA} ${WRKSRC}/etc/${f} ${EXAMPLESDIR}/${f}-sample
+.endif
 	@if [ ! -f ${CONFIG_DIR}/${f} ]; then \
 		${CP} -p ${CONFIG_DIR}/${f}-sample ${CONFIG_DIR}/${f} ; \
 	fi
 .endfor
+.if !defined(NOPORTEXAMPLES)
 	${INSTALL_DATA} ${WRKSRC}/schemas/create* ${EXAMPLESDIR}
+.endif
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/security/snort/pkg-plist,v
retrieving revision 1.40
diff -u -r1.40 pkg-plist
--- pkg-plist	15 Dec 2011 00:50:34 -0000	1.40
+++ pkg-plist	7 Mar 2012 02:11:30 -0000
@@ -175,18 +175,18 @@
 %%DYNAMIC%%lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example.la
 %%DYNAMIC%%@dirrmtry lib/snort/dynamicpreprocessor
 %%DYNAMIC%%@dirrmtry lib/snort
-%%EXAMPLESDIR%%/classification.config-sample
-%%EXAMPLESDIR%%/create_db2
-%%EXAMPLESDIR%%/create_mssql
-%%EXAMPLESDIR%%/create_mysql
-%%EXAMPLESDIR%%/create_oracle.sql
-%%EXAMPLESDIR%%/create_postgresql
-%%EXAMPLESDIR%%/gen-msg.map-sample
-%%EXAMPLESDIR%%/reference.config-sample
-%%EXAMPLESDIR%%/snort.conf-sample
-%%EXAMPLESDIR%%/threshold.conf-sample
-%%EXAMPLESDIR%%/unicode.map-sample
-@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/classification.config-sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/create_db2
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/create_mssql
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/create_mysql
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/create_oracle.sql
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/create_postgresql
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gen-msg.map-sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reference.config-sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/snort.conf-sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/threshold.conf-sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/unicode.map-sample
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/BUGS
 %%PORTDOCS%%%%DOCSDIR%%/CREDITS
How-To-Repeat: 
make -DNOPORTEXAMPLES install
du -ch /usr/local/share/examples/snort
270K	/usr/local/share/examples/snort
270K	total
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-03-07 02:20:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->zi

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-03-10 16:48:35 UTC
zi          2012-03-10 16:48:22 UTC

  FreeBSD ports repository

  Modified files:
    security/snort       Makefile 
  Log:
  - Do not install examples whenever NOPORTEXAMPLES is defined [1]
  - Do not install duplicate sample config files
  - Do not bump PORTREVISION
  
  PR:             ports/165800 [1]
  Submitted by:   Michael Scheidell <scheidell@FreeBSD.org> [1]
  Feature safe:   yes
  
  Revision  Changes    Path
  1.149     +4 -3      ports/security/snort/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Ryan Steinmetz freebsd_committer freebsd_triage 2012-03-10 16:48:36 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-03-11 19:26:54 UTC
zi          2012-03-11 19:26:45 UTC

  FreeBSD ports repository

  Modified files:
    security/snort       pkg-plist 
  Log:
  - Do not install examples whenever NOPORTEXAMPLES is defined [1]
  - Do not install duplicate sample config files
  - Do not bump PORTREVISION
  
  PR:             ports/165800 [1]
  Submitted by:   Michael Scheidell <scheidell@FreeBSD.org> [1]
  Feature safe:   yes
  
  Revision  Changes    Path
  1.41      +7 -13     ports/security/snort/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"