From scheidell@secnap.net  Tue Mar  6 19:35:43 2012
Return-Path: <scheidell@secnap.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C69B1106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Mar 2012 19:35:43 +0000 (UTC)
	(envelope-from scheidell@secnap.net)
Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [204.89.241.253])
	by mx1.freebsd.org (Postfix) with ESMTP id 8622A8FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Mar 2012 19:35:43 +0000 (UTC)
Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [10.70.1.253])
	by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id F3EC2621C06
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Mar 2012 14:35:42 -0500 (EST)
Received: from scanner.secnap.net (unknown [10.70.1.4])
	by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id 16EFF621C03
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Mar 2012 14:35:42 -0500 (EST)
Received: by scanner.secnap.net (Postfix, from userid 1001)
	id 05B281D410; Tue,  6 Mar 2012 14:35:42 -0500 (EST)
Message-Id: <20120306193542.05B281D410@scanner.secnap.net>
Date: Tue,  6 Mar 2012 14:35:42 -0500 (EST)
From: Michael Scheidell <scheidell@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] net/libnet Honor NOPORTEXAMPLES env var
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         165786
>Category:       ports
>Synopsis:       [PATCH] net/libnet Honor NOPORTEXAMPLES env var
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 06 19:40:11 UTC 2012
>Closed-Date:    Mon Mar 19 19:34:50 CET 2012
>Last-Modified:  Mon Mar 19 19:34:50 CET 2012
>Originator:     Michael Scheidell
>Release:        FreeBSD 7.4-RELEASE-p3 i386
>Organization:
SECNAP Network Security
>Environment:

>Description:

if an OP devines NOPORTEXAMPLES in env (cmdline, make.etc), port should not install examples.

>How-To-Repeat:

make -DNOPORTEXAMPLES install
cd /usr/local/share/examples/libnet11
du -ch
350K	./libnet11

port installs 350K of examples.

>Fix:

patch for Makefile and pkg-plist.
since this isn't really broken, there is no need to force clusters to rebuild.
next upgrade for the OP, pkg-plist will automatically deinstall old examples, and (not) install new ones, so, no 
portrevision bump needed.

- Honor NOPORTEXAMPLES env var
- No PORTREVISION bump

--- libnet.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net/libnet/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile	22 Feb 2012 04:49:08 -0000	1.25
+++ Makefile	6 Mar 2012 19:31:19 -0000
@@ -34,8 +34,10 @@
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/libnet-config \
 		${PREFIX}/bin/libnet${PKGNAMESUFFIX}-config
+.if !defined(NOPORTEXAMPLES)
 	@${MKDIR} ${EXAMPLESDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
+.endif
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/net/libnet/pkg-plist,v
retrieving revision 1.11
diff -u -r1.11 pkg-plist
--- pkg-plist	31 Jan 2007 14:09:48 -0000	1.11
+++ pkg-plist	6 Mar 2012 19:31:19 -0000
@@ -50,51 +50,51 @@
 %%PORTDOCS%%%%DOCSDIR%%/libnet_8h.html
 %%PORTDOCS%%%%DOCSDIR%%/structlibnet__802__1q__hdr.html
 %%PORTDOCS%%%%DOCSDIR%%/structlibnet__802__1x__hdr.html
-%%EXAMPLESDIR%%/arp-new.c
-%%EXAMPLESDIR%%/arp.c
-%%EXAMPLESDIR%%/bgp4_hdr.c
-%%EXAMPLESDIR%%/bgp4_notification.c
-%%EXAMPLESDIR%%/bgp4_open.c
-%%EXAMPLESDIR%%/bgp4_update.c
-%%EXAMPLESDIR%%/cdp.c
-%%EXAMPLESDIR%%/dhcp_discover.c
-%%EXAMPLESDIR%%/dns.c
-%%EXAMPLESDIR%%/dot1x.c
-%%EXAMPLESDIR%%/fddi_tcp1.c
-%%EXAMPLESDIR%%/fddi_tcp2.c
-%%EXAMPLESDIR%%/get_addr.c
-%%EXAMPLESDIR%%/gre.c
-%%EXAMPLESDIR%%/icmp6_echoreq.c
-%%EXAMPLESDIR%%/icmp_echo_cq.c
-%%EXAMPLESDIR%%/icmp_redirect.c
-%%EXAMPLESDIR%%/icmp_timeexceed.c
-%%EXAMPLESDIR%%/icmp_timestamp.c
-%%EXAMPLESDIR%%/icmp_unreach.c
-%%EXAMPLESDIR%%/ieee.c
-%%EXAMPLESDIR%%/ip_link.c
-%%EXAMPLESDIR%%/ip_raw.c
-%%EXAMPLESDIR%%/isl.c
-%%EXAMPLESDIR%%/mpls.c
-%%EXAMPLESDIR%%/ntp.c
-%%EXAMPLESDIR%%/ospf_hello.c
-%%EXAMPLESDIR%%/ospf_lsa.c
-%%EXAMPLESDIR%%/ping_of_death.c
-%%EXAMPLESDIR%%/rpc_tcp.c
-%%EXAMPLESDIR%%/rpc_udp.c
-%%EXAMPLESDIR%%/sebek.c
-%%EXAMPLESDIR%%/smurf.c
-%%EXAMPLESDIR%%/stp.c
-%%EXAMPLESDIR%%/synflood.c
-%%EXAMPLESDIR%%/synflood6.c
-%%EXAMPLESDIR%%/synflood6_frag.c
-%%EXAMPLESDIR%%/tcp1.c
-%%EXAMPLESDIR%%/tcp2.c
-%%EXAMPLESDIR%%/tftp.c
-%%EXAMPLESDIR%%/tring_tcp1.c
-%%EXAMPLESDIR%%/tring_tcp2.c
-%%EXAMPLESDIR%%/udp1.c
-%%EXAMPLESDIR%%/udp2.c
-@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arp-new.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_hdr.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_notification.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_open.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_update.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cdp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dhcp_discover.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dns.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dot1x.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fddi_tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fddi_tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/get_addr.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gre.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp6_echoreq.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_echo_cq.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_redirect.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_timeexceed.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_timestamp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_unreach.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ieee.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ip_link.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ip_raw.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/isl.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mpls.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ntp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ospf_hello.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ospf_lsa.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping_of_death.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rpc_tcp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rpc_udp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sebek.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smurf.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood6.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood6_frag.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tftp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tring_tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tring_tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udp2.c
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/libnet11
 @dirrm include/libnet11/libnet
--- libnet.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:
Responsible-Changed-From-To: freebsd-ports-bugs->dinoex 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Mar 6 19:40:54 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165786 
State-Changed-From-To: open->feedback 
State-Changed-By: scheidell 
State-Changed-When: Mon Mar 19 09:33:08 UTC 2012 
State-Changed-Why:  
Ask for maintainer approval. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165786 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/165786: commit references a PR
Date: Mon, 19 Mar 2012 18:25:50 +0000 (UTC)

 dinoex      2012-03-19 18:25:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/libnet           Makefile pkg-plist 
   Log:
   - honor NOPORTEXAMPLES
   PR:             165786
   Submitted by:   Michael Scheidell
   Feature safe:   yes
   
   Revision  Changes    Path
   1.26      +2 -0      ports/net/libnet/Makefile
   1.12      +45 -45    ports/net/libnet/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"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: dinoex 
State-Changed-When: Mon Mar 19 19:34:27 CET 2012 
State-Changed-Why:  
committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165786 
>Unformatted:
