From alane@geeksrus.net  Wed Mar 27 23:37:00 2002
Return-Path: <alane@geeksrus.net>
Received: from wwweasel.geeksrus.net (wwweasel.geeksrus.net [64.8.210.226])
	by hub.freebsd.org (Postfix) with ESMTP
	id 6D87837B41D; Wed, 27 Mar 2002 23:36:59 -0800 (PST)
Received: (from alane@localhost)
	by wwweasel.geeksrus.net (8.11.6/8.11.6) id g2S6KAV04380;
	Thu, 28 Mar 2002 01:20:10 -0500 (EST)
	(envelope-from alane)
Message-Id: <200203280620.g2S6KAV04380@wwweasel.geeksrus.net>
Date: Thu, 28 Mar 2002 01:20:10 -0500 (EST)
From: Alan Eldridge <ports@geeksrus.net>
Reply-To: Alan Eldridge <ports@geeksrus.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: java@freebsd.org
Subject: java/jdk13
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36411
>Category:       java
>Synopsis:       java/jdk13 not owner/group safe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    glewis
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 27 23:40:00 PST 2002
>Closed-Date:    Wed Apr 30 08:46:41 PDT 2003
>Last-Modified:  Wed Apr 30 08:46:41 PDT 2003
>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:

When built as non-root, install by root leaves files owned by non-root
builder. This is a serious problem, as files in /usr/local should not be
owned by random users.

The following ports all have the same error in the Makefile:

java/gnu-regexp/Makefile
java/jakarta-oro/Makefile
java/jakarta-regexp/Makefile
java/jce-aba/Makefile
java/jdk-tutorial/Makefile
java/jdk/Makefile
java/jdk12-beta/Makefile
java/jdk13/Makefile
java/jre/Makefile
java/jsdk/Makefile
java/linux-ibm-jdk13/Makefile
java/linux-jdk/Makefile
java/linux-jdk13/Makefile
java/linux-jdk14/Makefile

To java@, how do you want the other 13 ports reported?  One big PR? 13
individual PRs? Do you want to extend this PR to conver the other 13?

>How-To-Repeat:

Build as non-root. Install as root. This *should* work correctly,
but does not.

>Fix:

Do *not* use tar|tar to install ports. Or do a massive "chown -Rh ..."
afterwards.

==8<====8<====8<====8<====8<====8<====8<====8<====8<====8<==
Index: java/jdk13/Makefile
===================================================================
RCS file: /home/alane/cvsup-ports/cvsroot/ports/java/jdk13/Makefile,v
retrieving revision 1.18
diff -u -3 -r1.18 Makefile
--- java/jdk13/Makefile	13 Mar 2002 15:06:15 -0000	1.18
+++ java/jdk13/Makefile	28 Mar 2002 05:57:13 -0000
@@ -126,11 +126,11 @@
 
 do-install:
 	${MKDIR} ${PREFIX}/jdk${JDK_VERSION}
-	(cd ${JDKIMAGEDIR} && ${BSD_TAR} -c -f - .) \
-		| (cd ${PREFIX}/jdk${JDK_VERSION} && ${BSD_TAR} --unlink -x -f -)
+	cd ${JDKIMAGEDIR} && find . \
+	  | cpio -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION}
 .if !defined(NODEBUG)
-	(cd ${JDKIMAGEDIR_G} && ${BSD_TAR} -c -f - .) \
-		| (cd ${PREFIX}/jdk${JDK_VERSION} && ${BSD_TAR} --unlink -x -f -)
+	cd ${JDKIMAGEDIR_G} && find . \
+	  | cpio -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION}
 .endif
 
 post-install:
==8<====8<====8<====8<====8<====8<====8<====8<====8<====8<==



>Release-Note:
>Audit-Trail:

From: Alan E <alane@geeksrus.net>
To: freebsd-gnats-submit@FreeBSD.org, ports@geeksrus.net
Cc:  
Subject: Re: ports/36411: java/jdk13 not owner/group safe
Date: Fri, 29 Mar 2002 01:52:35 -0500

 I did some preliminary looking around. There's too much stuff that isn't 
 owner and group safe. I feel like Don Quixote... I'm not going to follow with 
 PRs for the other ports. <sigh/>
 -- 
 AlanE
 "When the going gets weird, the weird turn pro." - HST
 
Responsible-Changed-From-To: freebsd-ports->java 
Responsible-Changed-By: znerd 
Responsible-Changed-When: Mon Apr 1 13:36:37 PST 2002 
Responsible-Changed-Why:  
The Java mailing list should handle this. Greg? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36411 
Responsible-Changed-From-To: java->glewis 
Responsible-Changed-By: glewis 
Responsible-Changed-When: Mon Apr 8 11:12:44 PDT 2002 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36411 
State-Changed-From-To: open->closed 
State-Changed-By: glewis 
State-Changed-When: Wed Apr 30 08:45:58 PDT 2003 
State-Changed-Why:  
All these ports are fixed (which isn't to say there aren't others 
in the ports tree with similar problems). 

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