ports/127469: ports system does not honour NO_MANCOMPRESS directive (PATCH included)

N.J. Mann njm at njm.me.uk
Thu Sep 18 13:20:01 UTC 2008


>Number:         127469
>Category:       ports
>Synopsis:       ports system does not honour NO_MANCOMPRESS directive (PATCH included)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 18 13:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>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 at 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>—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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list