From owner-freebsd-ports Sat Mar 16 6:10:15 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8919E37B416 for ; Sat, 16 Mar 2002 06:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2GEA2c79737; Sat, 16 Mar 2002 06:10:02 -0800 (PST) (envelope-from gnats) Received: from wwweasel.geeksrus.net (wwweasel.geeksrus.net [64.8.210.226]) by hub.freebsd.org (Postfix) with ESMTP id 04B3937B400; Sat, 16 Mar 2002 06:06:10 -0800 (PST) Received: (from alane@localhost) by wwweasel.geeksrus.net (8.11.6/8.11.6) id g2GE5hU15481; Sat, 16 Mar 2002 09:05:43 -0500 (EST) (envelope-from alane) Message-Id: <200203161405.g2GE5hU15481@wwweasel.geeksrus.net> Date: Sat, 16 Mar 2002 09:05:43 -0500 (EST) From: Alan Eldridge Reply-To: Alan Eldridge To: FreeBSD-gnats-submit@FreeBSD.org Cc: sobomax@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/35980: www/mozilla{,-headers}: installs incorrectly if *built* as non-root Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35980 >Category: ports >Synopsis: www/mozilla{,-headers}: installs incorrectly if *built* as non-root >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 16 06:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Alan Eldridge >Release: FreeBSD 4.5-STABLE i386 >Organization: Geeksrus.NET >Environment: System: FreeBSD wwweasel.geeksrus.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Mon Mar 11 00:59:22 EST 2002 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386 >Description: I do ports builds as myself, then use sudo to do the 'make install'. The mozilla and mozilla-headers ports do not install correctly when the 'build' step is executed as non-root: the installed files have the build owner and group. This is not a new bug. I just happened to notice it this morning. [alane ~/FreeBSD/ports/www/mozilla]$ ls -l /usr/X11R6/lib/mozilla/ total 5554 -rwxr-xr-x 1 alane alane 4272 Mar 16 01:58 DocStream -rwxr-xr-x 1 alane alane 4272 Mar 16 01:58 HelloWorld -rw-r--r-- 1 alane alane 3078 Mar 21 2000 INSTALL.xmlterm -rwxr-xr-x 1 alane alane 20368 Mar 16 02:15 TestGtkEmbed -rwxr-xr-x 1 alane alane 7216 Mar 16 02:15 TestGtkEmbedChild -rwxr-xr-x 1 alane alane 5096 Mar 16 02:15 TestGtkEmbedNotebook -rwxr-xr-x 1 alane alane 5636 Mar 16 02:15 TestGtkEmbedSocket -rw-r--r-- 1 alane alane 217 Feb 5 02:16 bloaturls.txt drwxr-xr-x 3 alane alane 1024 Mar 16 02:16 chrome [...] [alane ~/FreeBSD/ports/www/mozilla-headers]$ ls -l /usr/X11R6/include/mozilla/ total 290 drwxr-xr-x 2 alane alane 512 Mar 16 08:43 absyncsvc drwxr-xr-x 2 alane alane 512 Mar 16 08:43 accessibility drwxr-xr-x 2 alane alane 2048 Mar 16 08:43 addrbook drwxr-xr-x 2 alane alane 1024 Mar 16 08:43 appcomps drwxr-xr-x 2 alane alane 512 Mar 16 08:43 appshell drwxr-xr-x 2 alane alane 512 Mar 16 08:43 autoconfig [...] Note: Very few ports, if any, truly need to have the build step executed as root; these two certainly do not. >How-To-Repeat: See above. >Fix: Use find|cpio instead of tar|tar to install. These installs were verified to have the same effect as the original tar|tar installations. Notes: 1. The mozilla install uses GNU tar's -h option to dereference symlinks. This behavior is maintained by using the -L option to cpio. 2. The mozilla-headers install also uses the --unlink option to tar. Since there is no equivalent option to cpio, and since no other port writes to this installation directory (${PREFIX}/include/mozilla), the installation step now removes the existing directory first. --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- Index: www/mozilla/Makefile =================================================================== RCS file: /home/alane/cvsroot/ports/www/mozilla/Makefile,v retrieving revision 1.86 diff -u -3 -r1.86 Makefile --- www/mozilla/Makefile 14 Mar 2002 20:21:05 -0000 1.86 +++ www/mozilla/Makefile 16 Mar 2002 13:18:27 -0000 @@ -87,8 +87,8 @@ do-install: ${MKDIR} ${PREFIX}/lib/mozilla ${CHMOD} 755 ${PREFIX}/lib/mozilla - cd ${WRKSRC}/dist/bin && ${TAR} -chf - . | \ - ${TAR} -xf - -C ${PREFIX}/lib/mozilla + cd ${WRKSRC}/dist/bin && ${FIND} . | \ + cpio -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/mozilla ${INSTALL_SCRIPT} ${WRKSRC}/mozilla ${PREFIX}/bin ${LN} -sf ${LOCALBASE}/jdk1.3.1/jre/plugin/i386/ns600/libjavaplugin_oji.so \ ${PREFIX}/lib/mozilla/plugins/libjavaplugin_oji.so Index: www/mozilla-headers/Makefile =================================================================== RCS file: /home/alane/cvsroot/ports/www/mozilla-headers/Makefile,v retrieving revision 1.4 diff -u -3 -r1.4 Makefile --- www/mozilla-headers/Makefile 13 Jun 2001 09:15:59 -0000 1.4 +++ www/mozilla-headers/Makefile 16 Mar 2002 13:53:16 -0000 @@ -27,9 +27,10 @@ ALL_TARGET= export do-install: + -${RM} -fr ${PREFIX}/include/mozilla ${MKDIR} ${PREFIX}/include/mozilla ${CHMOD} 755 ${PREFIX}/include/mozilla - ${TAR} -C ${WRKSRC}/dist/include -chf - . | \ - ${TAR} -C ${PREFIX}/include/mozilla --unlink -xf - + cd ${WRKSRC}/dist/include && ${FIND} . | \ + cpio -pdm -L -R ${INCOWN}:${INCGRP} ${PREFIX}/include/mozilla .include --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message