NetBSD Problem Report #32230

From mjl@luckie.org.nz  Sun Dec  4 00:22:04 2005
Return-Path: <mjl@luckie.org.nz>
Received: from grunt11.ihug.co.nz (grunt11.ihug.co.nz [203.109.254.54])
	by narn.netbsd.org (Postfix) with ESMTP id C758563B86F
	for <gnats-bugs@gnats.netbsd.org>; Sun,  4 Dec 2005 00:22:03 +0000 (UTC)
Message-Id: <E1Eihdc-0002br-B1@spandex.plunket.luckie.org.nz>
Date: Sun, 04 Dec 2005 13:21:56 +1300
From: mjl@luckie.org.nz
Sender: Matthew Luckie <mjl@luckie.org.nz>
Reply-To: mjl@luckie.org.nz
To: gnats-bugs@netbsd.org
Subject: [patch] devel/nspr devel/nss build tweaks
X-Send-Pr-Version: 3.95

>Number:         32230
>Category:       pkg
>Synopsis:       [patch] devel/nspr devel/nss build tweaks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 04 00:25:00 +0000 2005
>Last-Modified:  Sun Jan 15 16:10:01 +0000 2006
>Originator:     Matthew Luckie
>Release:        NetBSD 2.0.2
>Organization:

>Environment:


System: NetBSD spandex.plunket.luckie.org.nz 2.0.2 NetBSD 2.0.2 (spandex) #4: Mon Aug 29 20:11:26 NZST 2005 root@spandex.plunket.luckie.org.nz:/usr/src/sys/arch/i386/compile/spandex i386
Architecture: i386
Machine: i386
>Description:
There are two minor issues in nss and nspr addressed by these patches.

The first is that the Makefiles for both nss and nspr are passing -pe to pax,
which causes the uid of the builder to be preserved in installation.  If built
by a non-root user, the owner is not updated to root.  This was reported to me
in private mail by Philipp Lay.

The second is that nss won't install on FreeBSD.  This is because the
build procedure by nss strips everything after the hyphen in uname -r
out in nss-3.9.2/mozilla/nsprpub/config/arch.mk

  #
  # Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
  #

  ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
  OS_RELEASE	:= $(shell echo "$(OS_RELEASE)" | sed 's/-.*//')
  endif

The fix was provided in private mail by Anders Nor Berle.

Finally, pkglint complains about the use of echo in nss/Makefile.  this
change was committed by reed@

[mjl@spandex nss]$ pkglint
WARN: Makefile:50: Possible direct use of "echo" in variable _NSS_SHORT_OS_VERSION. Please use ${ECHO} instead.
0 errors and 1 warnings found.
>How-To-Repeat:
issue 1: build as normal user, install as root.
issue 2: build on FreeBSD.
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/nss/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile    16 Oct 2005 11:15:10 -0000      1.10
+++ Makefile    4 Dec 2005 00:05:37 -0000
@@ -42,8 +42,10 @@ PLIST_SUBST+=                SO_SUFFIX=${SO_SUFFIX}
 MAKEFLAGS+=    NS_USE_GCC=YES
 .endif

-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly"
 NSS_OBJ_DIR=   ${OPSYS}${OS_VERSION}_OPT.OBJ
+.elif ${OPSYS} == "FreeBSD"
+NSS_OBJ_DIR=   ${OPSYS}${OS_VERSION:C/[-].*//}_OPT.OBJ
 .elif ${OPSYS} == "Linux"
 _NSS_SHORT_OS_VERSION!=        echo ${OS_VERSION} | ${SED} -e 's/^\([[:digit:]]\.[[:digit:]]\)\..*$$/\1/'
 .if ${MACHINE_ARCH} == "i386"
@@ -65,9 +67,9 @@ pre-configure:
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/include/nss
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/nss
-       (cd ${DIST}/public && ${PAX} -Lrwpe . ${PREFIX}/include/nss/ )
+       (cd ${DIST}/public && ${PAX} -Lrwpp . ${PREFIX}/include/nss/ )
        (cd ${DIST}/${NSS_OBJ_DIR}/lib && \
-               ${PAX} -Lrwpe *.${SO_SUFFIX} ${PREFIX}/lib/nss/ )
+               ${PAX} -Lrwpp *.${SO_SUFFIX} ${PREFIX}/lib/nss/ )
        { ${ECHO} "Name: NSS"; \
          ${ECHO} "Description: Mozilla Network Security Services"; \
          ${ECHO} "Version: ${PKGVERSION}"; \
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/nspr/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    16 Oct 2005 11:15:10 -0000      1.9
+++ Makefile    4 Dec 2005 00:14:55 -0000
@@ -39,8 +39,8 @@ pre-configure:
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/include/nspr
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/nspr
-       (cd ${WRKSRC}/dist/include && ${PAX} -Lrwpe . ${PREFIX}/include/ )
-       (cd ${WRKSRC}/dist/lib && ${PAX} -Lrwpe . ${PREFIX}/lib/nspr/ )
+       (cd ${WRKSRC}/dist/include && ${PAX} -Lrwpp . ${PREFIX}/include/ )
+       (cd ${WRKSRC}/dist/lib && ${PAX} -Lrwpp . ${PREFIX}/lib/nspr/ )
        ${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${PREFIX}/bin
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/pkgconfig
        { ${ECHO} "Name: NSPR"; \

>Audit-Trail:
From: Matthew Luckie <mjl@luckie.org.nz>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/32230: [patch] devel/nspr devel/nss build tweaks
Date: Sun, 4 Dec 2005 22:13:37 +1300

 On Sun, Dec 04, 2005 at 09:53:57AM +0100, Thomas Klausner wrote:
 > On Sun, Dec 04, 2005 at 12:25:00AM +0000, mjl@luckie.org.nz wrote:
 > > >Number:         32230
 > > >Category:       pkg
 > > >Synopsis:       [patch] devel/nspr devel/nss build tweaks
 > 
 > Patch doesn't apply. Whitespace problem? Please send it again.
 > 
 > Thanks,
 >  Thomas

 Index: nspr/Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/nspr/Makefile,v
 retrieving revision 1.9
 diff -u -p -r1.9 Makefile
 --- nspr/Makefile	16 Oct 2005 11:15:10 -0000	1.9
 +++ nspr/Makefile	4 Dec 2005 09:10:39 -0000
 @@ -39,8 +39,8 @@ pre-configure:
  do-install:
  	${INSTALL_DATA_DIR} ${PREFIX}/include/nspr
  	${INSTALL_DATA_DIR} ${PREFIX}/lib/nspr
 -	(cd ${WRKSRC}/dist/include && ${PAX} -Lrwpe . ${PREFIX}/include/ )
 -	(cd ${WRKSRC}/dist/lib && ${PAX} -Lrwpe . ${PREFIX}/lib/nspr/ )
 +	(cd ${WRKSRC}/dist/include && ${PAX} -Lrwpp . ${PREFIX}/include/ )
 +	(cd ${WRKSRC}/dist/lib && ${PAX} -Lrwpp . ${PREFIX}/lib/nspr/ )
  	${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${PREFIX}/bin
  	${INSTALL_DATA_DIR} ${PREFIX}/lib/pkgconfig
  	{ ${ECHO} "Name: NSPR"; \
 Index: nss/Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/nss/Makefile,v
 retrieving revision 1.10
 diff -u -p -r1.10 Makefile
 --- nss/Makefile	16 Oct 2005 11:15:10 -0000	1.10
 +++ nss/Makefile	4 Dec 2005 09:10:39 -0000
 @@ -42,10 +42,12 @@ PLIST_SUBST+=		SO_SUFFIX=${SO_SUFFIX}
  MAKEFLAGS+=	NS_USE_GCC=YES
  .endif

 -.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
 +.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly"
  NSS_OBJ_DIR=	${OPSYS}${OS_VERSION}_OPT.OBJ
 +.elif ${OPSYS} == "FreeBSD"
 +NSS_OBJ_DIR=	${OPSYS}${OS_VERSION:C/[-].*//}_OPT.OBJ
  .elif ${OPSYS} == "Linux"
 -_NSS_SHORT_OS_VERSION!=	echo ${OS_VERSION} | ${SED} -e 's/^\([[:digit:]]\.[[:digit:]]\)\..*$$/\1/'
 +_NSS_SHORT_OS_VERSION!=	${ECHO} ${OS_VERSION} | ${SED} -e 's/^\([[:digit:]]\.[[:digit:]]\)\..*$$/\1/'
  .if ${MACHINE_ARCH} == "i386"
  _NSS_MACHINE_ARCH=	_x86
  .elif ${MACHINE_ARCH} == "parisc" || ${MACHINE_ARCH} == "parisc64"
 @@ -65,9 +67,9 @@ pre-configure:
  do-install:
  	${INSTALL_DATA_DIR} ${PREFIX}/include/nss
  	${INSTALL_DATA_DIR} ${PREFIX}/lib/nss
 -	(cd ${DIST}/public && ${PAX} -Lrwpe . ${PREFIX}/include/nss/ )
 +	(cd ${DIST}/public && ${PAX} -Lrwpp . ${PREFIX}/include/nss/ )
  	(cd ${DIST}/${NSS_OBJ_DIR}/lib && \
 -		${PAX} -Lrwpe *.${SO_SUFFIX} ${PREFIX}/lib/nss/ )
 +		${PAX} -Lrwpp *.${SO_SUFFIX} ${PREFIX}/lib/nss/ )
  	{ ${ECHO} "Name: NSS"; \
  	  ${ECHO} "Description: Mozilla Network Security Services"; \
  	  ${ECHO} "Version: ${PKGVERSION}"; \

From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/32230 CVS commit: pkgsrc/devel/nss
Date: Sun, 15 Jan 2006 16:09:21 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	joerg
 Date:		Sun Jan 15 16:09:21 UTC 2006

 Modified Files:
 	pkgsrc/devel/nss: distinfo
 Added Files:
 	pkgsrc/devel/nss/patches: patch-aj patch-ak

 Log Message:
 Strip everything after the first hyphen to match OS_VERSION in
 pkgsrc for DragonFly. Inspired by PR 32230.


 To generate a diff of this commit:
 cvs rdiff -r1.6 -r1.7 pkgsrc/devel/nss/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/devel/nss/patches/patch-aj \
     pkgsrc/devel/nss/patches/patch-ak

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.