From nobody@FreeBSD.org  Fri Sep  7 11:36:30 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id AB12137B405
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Sep 2001 11:36:30 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f87IaUZ18556;
	Fri, 7 Sep 2001 11:36:30 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109071836.f87IaUZ18556@freefall.freebsd.org>
Date: Fri, 7 Sep 2001 11:36:30 -0700 (PDT)
From: David Wolfskill <david@catwhisker.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "make install" for stallion tries to write to /usr/src
X-Send-Pr-Version: www-1.0

>Number:         30420
>Category:       bin
>Synopsis:       "make install" for stallion tries to write to /usr/src
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 07 11:40:01 PDT 2001
>Closed-Date:    Sat Sep 8 18:42:06 PDT 2001
>Last-Modified:  Sat Sep 08 18:42:24 PDT 2001
>Originator:     David Wolfskill
>Release:        4.4-RC
>Organization:
>Environment:
FreeBSD dhcp-140.catwhisker.org 4.4-RC FreeBSD 4.4-RC #143: Fri Sep  7 07:03:41 PDT 2001     root@dhcp-140.catwhisker.org:/common/S2/obj/usr/src/sys/LAPTOP_30W  i386
>Description:
Using the above machine as source./NFS server, a colleague was doing an
NFS-based install.  During the "make installworld" phase, he started
getting "permission denied" messages for installing into /usr/libdata/stallion.

Examination shows that usr.sbin/stallion/bootcode/Makefile is apparently
trying to do uudecode and gzip operations in place.  Since /usr/src is
exported read-only, that poses a challenge or two.  :-}
>How-To-Repeat:
On a machine with recent sources, do the usual source upgrade (per
UPDATING) -- "make buildworld", "make buildkernel", "make installkernel", "make installworld", "mergemaster" (with a re-boot to
single-user mode after the installkernel if necessary or (otherwise) desired).  Verify that the resulting system  boots & runs.

NFS-export /usr/src and /usr/obj (read-only).

On a suitable victi^Wclient machine, mount the server's /usr/src and
/usr/obj appropriately, ensure that /etc/make.conf is compatible with
the one on the server, then "make installkernel" and "make installworld".

That last step should fail, whining about "permission denied" errors in usr.sbin/stallion/bootcode.
>Fix:
As a circumvention, it can (in some cases) suffice to mount /usr/src read-write.  Alternatively, copy /usr/src from the server to the client.

I suspect that the Makefile(s?) will need to be made a bit cleverer,
probably involving another level of indirection.
>Release-Note:
>Audit-Trail:

From: David Wolfskill <david@catwhisker.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/30420: "make install" for stallion tries to write to /usr/src
Date: Fri, 7 Sep 2001 20:37:52 -0700 (PDT)

 Further analysis (catalyzed by others' reports of failures at the same
 place) shows that my earlier assertions about trying to write to
 /usr/src are likely wildly inaccurate.
 
 Rather, the problem seem to be the mode of the created files:
 
 dhcp-140[1] cd /usr/src/usr.sbin/stallion
 dhcp-140[2] ls -la {,/usr/obj/`pwd`/}bootcode
 /usr/obj//usr/src/usr.sbin/stallion/bootcode:
 total 79
 drwxrwxr-x  2 root  wheel    512 Sep  7 06:57 .
 drwxrwxr-x  6 root  wheel    512 Sep  7 05:50 ..
 -r--r-----  1 root  wheel  31056 Sep  7 06:57 2681.sys
 -r--r-----  1 root  wheel  41760 Sep  7 06:57 cdk.sys
 -rw-rw-r--  1 root  wheel   4233 Sep  7 06:57 stl.4.gz
 
 bootcode:
 total 116
 drwxrwxr-x  3 david  wheel    512 Sep  7 10:57 .
 drwxrwxr-x  7 david  wheel    512 Aug 31 05:26 ..
 -rw-rw-r--  1 david  wheel  42912 Aug 31 05:26 2681.sys.uu
 drwxrwxr-x  2 david  wheel    512 Aug 31 05:26 CVS
 -rw-rw-r--  1 david  wheel    401 Sep  7 10:57 Makefile
 -rw-rw-r--  1 david  wheel  57657 Aug 31 05:26 cdk.sys.uu
 -rw-rw-r--  1 david  wheel  12475 Aug 31 05:26 stl.4
 dhcp-140[3] 
 
 
 Since "root" on the client machine is treated as neither the root
 user nor a member of the wheel group (by default), the attempt
 to read the generated files fails, thus causing the install to fail.
 
 Sorry for the confusion; it still seems that there's a problem, though.
 Perhaps the "make buildworld" step could cause the generated files to
 have a less-restrictive mode...?
 
 david
 -- 
 David H. Wolfskill				david@catwhisker.org
 As a computing professional, I believe it would be unethical for me to
 advise, recommend, or support the use (save possibly for personal
 amusement) of any product that is or depends on any Microsoft product.
Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Sep 8 01:25:58 PDT 2001 
Responsible-Changed-Why:  
This problem was apparently introduced by murray's recent import into RELENG_4 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30420 

From: David Wolfskill <david@catwhisker.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/30420: "make install" for stallion tries to write to /usr/src
Date: Sat, 8 Sep 2001 07:10:26 -0700 (PDT)

 I think this shows what needs to be fixed:
 
 dhcp-140[1] cd /usr/src/usr.sbin/stallion/bootcode/
 dhcp-140[2] grep '^begin' *.uu
 2681.sys.uu:begin 440 2681.sys
 cdk.sys.uu:begin 440 cdk.sys
 dhcp-140[3] 
 
 
 I rather suspect that changing those "440"s to "444"s would adress the
 issue nicely.
 
 Cheers,
 david
 -- 
 David H. Wolfskill				david@catwhisker.org
 As a computing professional, I believe it would be unethical for me to
 advise, recommend, or support the use (save possibly for personal
 amusement) of any product that is or depends on any Microsoft product.
State-Changed-From-To: open->closed 
State-Changed-By: murray 
State-Changed-When: Sat Sep 8 18:42:06 PDT 2001 
State-Changed-Why:  
The file mode has been changed, thanks! 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30420 
>Unformatted:
