From njm@njm.f2s.com  Thu Sep 18 13:16:09 2008
Return-Path: <njm@njm.f2s.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86818106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Sep 2008 13:16:09 +0000 (UTC)
	(envelope-from njm@njm.f2s.com)
Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16])
	by mx1.freebsd.org (Postfix) with ESMTP id 125A08FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Sep 2008 13:16:08 +0000 (UTC)
	(envelope-from njm@njm.f2s.com)
Received: from i-195-137-21-170.freedom2surf.net (HELO oberon.njm.f2s.com) ([195.137.21.170])
  by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2008 13:46:44 +0100
Received: from oberon.njm.f2s.com (localhost.njm.f2s.com [127.0.0.1])
	by oberon.njm.f2s.com (8.14.3/8.14.3) with ESMTP id m8ICkixX051401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Sep 2008 13:46:44 +0100 (BST)
	(envelope-from njm@oberon.njm.f2s.com)
Received: (from njm@localhost)
	by oberon.njm.f2s.com (8.14.3/8.14.3/Submit) id m8ICkiwo051400;
	Thu, 18 Sep 2008 13:46:44 +0100 (BST)
	(envelope-from njm)
Message-Id: <200809181246.m8ICkiwo051400@oberon.njm.f2s.com>
Date: Thu, 18 Sep 2008 13:46:44 +0100 (BST)
From: "N.J. Mann" <njm@njm.me.uk>
Reply-To: "N.J. Mann" <njm@njm.me.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ports system does not honour NO_MANCOMPRESS directive (PATCH included)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         127469
>Category:       ports
>Synopsis:       bsd.port.mk - ports system does not honour NO_MANCOMPRESS directive (PATCH included)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 18 13:20:00 UTC 2008
>Closed-Date:    Tue Dec 29 10:29:04 UTC 2009
>Last-Modified:  Tue Dec 29 10:30:13 UTC 2009
>Originator:     N.J. Mann
>Release:        FreeBSD 7.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD oberon.njm.f2s.com 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #3: Mon Sep 15 13:57:57 BST 2008 njm@oberon.njm.f2s.com:/usr/obj/usr/src7/sys/Oberon i386

	Up-to-date ports system (mine is updated nightly at 4 am UTC) and
recent 7-STABLE (mine was updated on Monday morning at 4 am UTC).

>Description:
	Back in 2004 the FreeBSD Project decided to rename all user
settable NOxxx make directives to NO_xxx.  In December of that year ru@
added /usr/src/share/mk/bsd.compat.mk to the system as an aid to that
change.  The new NO_xxx syntax has been shipped in all 6.x and 7.x
releases.  However, there is one part of the system which seems to have
been overlooked: /usr/ports/Mk/bsd.port.mk.  This file still expects
NOMANCOMPRESS rather than NO_MANCOMPRESS.  Thus, the base OS and the ports
system are out of sync.  The effect of this is that if you define
NO_MANCOMPRESS in /etc/make.conf (_and_ not NOMANCOMPRESS) the base OS
installs uncompressed manual pages and the ports system compressed ones.

With the patch included below installed and NO_MANCOMPRESS (only) defined
in /etc/make.conf, everything works as expected, i.e. manual pages for
ports are not compressed.  (And if NO_MANCOMPRESS is not defined they are
installed compressed.)

>How-To-Repeat:
	Add NO_MANCOMPRESS to /etc/make.conf
>Fix:

	To fix this problem it is necessary to change all occurrences of
NOMANCOMPRESS to NO_MANCOMPRESS in /usr/ports/Mk/bsd.port.mk (a patch
follows).  The only other occurrence of NOMANCOMPRESS is in the porters
handbook.  I include a patch for the American English version of such, but
the same change ought to be made to the various translations.

--- NOMANCOMPRESS.bsd.port.mk.patch.txt begins here ---
--- Mk/bsd.port.mk~	2008-09-06 05:12:13.000000000 +0100
+++ Mk/bsd.port.mk	2008-09-12 10:24:56.000000000 +0100
@@ -614,7 +614,7 @@
 #
 # Set the following to specify all manpages that your port installs.
 # These manpages will be automatically listed in ${PLIST}.  Depending
-# on the setting of NOMANCOMPRESS, the make rules will compress the
+# on the setting of NO_MANCOMPRESS, the make rules will compress the
 # manpages for you.
 #
 # MAN<sect>		- A list of manpages, categorized by section.  For
@@ -647,7 +647,7 @@
 # MANCOMPRESSED	- This variable can take values "yes", "no" or
 #				  "maybe".  "yes" means manpages are installed
 #				  compressed; "no" means they are not; "maybe" means
-#				  it changes depending on the value of NOMANCOMPRESS.
+#				  it changes depending on the value of NO_MANCOMPRESS.
 #				  Default: "yes" if USE_IMAKE is set and NO_INSTALL_MANPAGES
 #				  is not set, and "no" otherwise.
 #
@@ -2901,7 +2901,7 @@
 
 MANLANG?=	""	# english only by default
 
-.if !defined(NOMANCOMPRESS)
+.if !defined(NO_MANCOMPRESS)
 MANEXT=	.gz
 .endif
 
@@ -2985,7 +2985,7 @@
 
 .if defined(_MANPAGES)
 
-.if defined(NOMANCOMPRESS)
+.if defined(NO_MANCOMPRESS)
 __MANPAGES:=	${_MANPAGES:S%^${PREFIX}/%%}
 .else
 __MANPAGES:=	${_MANPAGES:S%^${PREFIX}/%%:S%$%.gz%}
@@ -5733,10 +5733,10 @@
 .if !target(compress-man)
 compress-man:
 .if defined(_MANPAGES) || defined(_MLINKS)
-.if ${MANCOMPRESSED} == yes && defined(NOMANCOMPRESS)
+.if ${MANCOMPRESSED} == yes && defined(NO_MANCOMPRESS)
 	@${ECHO_MSG} "===>   Uncompressing manual pages for ${PKGNAME}"
 	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE}
-.elif ${MANCOMPRESSED} == no && !defined(NOMANCOMPRESS)
+.elif ${MANCOMPRESSED} == no && !defined(NO_MANCOMPRESS)
 	@${ECHO_MSG} "===>   Compressing manual pages for ${PKGNAME}"
 	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE}
 .endif
--- NOMANCOMPRESS.bsd.port.mk.patch.txt ends here ---

--- NOMANCOMPRESS.doc_patch.txt begins here ---
--- doc/en_US.ISO8859-1/books/porters-handbook/book.sgml~	2008-09-10 14:18:52.000000000 +0100
+++ doc/en_US.ISO8859-1/books/porters-handbook/book.sgml	2008-09-16 13:15:08.000000000 +0100
@@ -3600,7 +3600,7 @@
 	<filename>pkg-plist</filename>&mdash;see <link
 	  linkend="plist-sub">generating PLIST</link> for more).  It also
 	makes the install stage automatically compress or uncompress manpages
-	depending on the setting of <makevar>NOMANCOMPRESS</makevar> in
+	depending on the setting of <makevar>NO_MANCOMPRESS</makevar> in
 	<filename>/etc/make.conf</filename>.</para>
 
       <para>If your port tries to install multiple names for manpages using
@@ -3617,7 +3617,7 @@
 	<literal>maybe</literal>. <literal>yes</literal> means manpages are
 	already installed compressed, <literal>no</literal> means they are
 	not, and <literal>maybe</literal> means the software already respects
-	the value of <makevar>NOMANCOMPRESS</makevar> so
+	the value of <makevar>NO_MANCOMPRESS</makevar> so
 	<filename>bsd.port.mk</filename> does not have to do anything
 	special.</para>
 
--- NOMANCOMPRESS.doc_patch.txt ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Sep 18 15:33:41 UTC 2008 
Responsible-Changed-Why:  
portmgr territory. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127469 
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Tue Jan 6 21:28:16 UTC 2009 
State-Changed-Why:  
This patch looks correct. 

But, there is a screenfull of ports, who abuse this user-settable variable. 
Are you willing to help fix these ports? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127469 
State-Changed-From-To: feedback->suspended 
State-Changed-By: pav 
State-Changed-When: Wed Mar 25 17:11:50 UTC 2009 
State-Changed-Why:  
Suspend until we have a volunteer to fix individual offending ports 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127469 
State-Changed-From-To: suspended->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Dec 29 10:29:03 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/127469: commit references a PR
Date: Tue, 29 Dec 2009 10:26:11 +0000 (UTC)

 miwi        2009-12-29 10:25:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.port.mk 
     devel/bcc            Makefile 
     devel/error          Makefile 
     devel/linux_kdump    Makefile 
     devel/plan9port      Makefile 
     dns/ldns             Makefile 
     editors/mined        Makefile 
     games/wesnoth        Makefile 
     games/wesnoth-devel  Makefile 
     games/xmulti         Makefile 
     games/xscorch        Makefile 
     german/manpages      Makefile 
     lang/erlang          Makefile 
     lang/gcc34           Makefile 
     lang/gnat-gcc41      Makefile 
     lang/gnat-gcc42      Makefile 
     lang/gnat-gcc43      Makefile 
     lang/gnat-gcc44      Makefile 
     misc/freedialog/files patch-aa 
     misc/shuffle         Makefile 
     net/htpdate          Makefile 
     net/mopd             Makefile 
     net/v6eval           Makefile 
     palm/p5-Palm         Makefile 
     ports-mgmt/portbrowser Makefile 
     print/enscriptfonts  Makefile 
     print/perlftlib      Makefile 
     security/qident      Makefile 
     sysutils/dc42wrap    Makefile 
     sysutils/heirloom    Makefile 
     sysutils/readlink    Makefile 
     sysutils/wmpccard    Makefile 
     textproc/freegrep/files patch-aa 
     www/p5-AMF-Perl      Makefile 
     x11/chameleon/files  Makefile 
     x11-toolkits/p5-Prima Makefile 
   Log:
   - Convert NOMANCOMPRESS to NO_MANCOMPRESS to sync with src
   
   PR:     ports/136065 ports/127469
   Submitted by:   N.J. Mann <njm@njm.me.uk> and Aldis Berjoza <killasmurf86@gmail.com>
   
   - Early identify port CONFLICTS
   
   PR:     137855
   Submitted by:           Piotr Smyrak <smyru@heron.pl>
   
   - Add --no-same-permissions to the EXTRACT_AFTER_ARGS command.
   
   Tijl Coosemans has been reported an issue that when root is extracting from the
   tarball, and the tarball contains world writable files
   (sysutils/policykit as an example), there is a chance that the files
   gets changed by malicious third parties right after the extraction,
   which makes it possible to inject code into the package thus compromise
   the system.
   
   Submitted by:   Tijl Coosemans <tijl@coosemans.org> Xin LI (delphij@)
   
   - Fix some whitespaces
   
   Tested with:    exp-run
   
   Revision  Changes    Path
   1.632     +15 -16    ports/Mk/bsd.port.mk
   1.13      +1 -1      ports/devel/bcc/Makefile
   1.5       +1 -1      ports/devel/error/Makefile
   1.31      +1 -1      ports/devel/linux_kdump/Makefile
   1.29      +1 -1      ports/devel/plan9port/Makefile
   1.15      +1 -1      ports/dns/ldns/Makefile
   1.18      +1 -1      ports/editors/mined/Makefile
   1.78      +2 -2      ports/games/wesnoth-devel/Makefile
   1.75      +2 -2      ports/games/wesnoth/Makefile
   1.9       +1 -1      ports/games/xmulti/Makefile
   1.25      +1 -1      ports/games/xscorch/Makefile
   1.24      +1 -1      ports/german/manpages/Makefile
   1.145     +1 -1      ports/lang/erlang/Makefile
   1.252     +1 -1      ports/lang/gcc34/Makefile
   1.13      +1 -1      ports/lang/gnat-gcc41/Makefile
   1.16      +1 -1      ports/lang/gnat-gcc42/Makefile
   1.19      +1 -1      ports/lang/gnat-gcc43/Makefile
   1.3       +1 -1      ports/lang/gnat-gcc44/Makefile
   1.2       +1 -1      ports/misc/freedialog/files/patch-aa
   1.7       +1 -1      ports/misc/shuffle/Makefile
   1.19      +1 -1      ports/net/htpdate/Makefile
   1.17      +1 -1      ports/net/mopd/Makefile
   1.20      +1 -1      ports/net/v6eval/Makefile
   1.9       +1 -1      ports/palm/p5-Palm/Makefile
   1.13      +1 -1      ports/ports-mgmt/portbrowser/Makefile
   1.15      +1 -1      ports/print/enscriptfonts/Makefile
   1.28      +1 -1      ports/print/perlftlib/Makefile
   1.11      +1 -1      ports/security/qident/Makefile
   1.3       +1 -1      ports/sysutils/dc42wrap/Makefile
   1.16      +1 -1      ports/sysutils/heirloom/Makefile
   1.7       +1 -1      ports/sysutils/readlink/Makefile
   1.14      +1 -1      ports/sysutils/wmpccard/Makefile
   1.4       +1 -1      ports/textproc/freegrep/files/patch-aa
   1.9       +1 -1      ports/www/p5-AMF-Perl/Makefile
   1.19      +1 -1      ports/x11-toolkits/p5-Prima/Makefile
   1.2       +1 -1      ports/x11/chameleon/files/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"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/127469: commit references a PR
Date: Tue, 29 Dec 2009 10:27:33 +0000 (UTC)

 miwi        2009-12-29 10:27:15 UTC
 
   FreeBSD doc repository
 
   Modified files:
     en_US.ISO8859-1/books/porters-handbook book.sgml 
   Log:
   - Convert NOMANCOMPRESS to NO_MANCOMPRESS to sync with src
   
   PR:             ports/136065 ports/127469
   Submitted by:   N.J. Mann <njm@njm.me.uk> and Aldis Berjoza <killasmurf86@gmail.com>
   
   Revision  Changes    Path
   1.1042    +2 -2      doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
 _______________________________________________
 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"
 
>Unformatted:
