From eugen@grosbein.pp.ru  Sun Jun 20 17:38:32 2004
Return-Path: <eugen@grosbein.pp.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 45CF916A4CE; Sun, 20 Jun 2004 17:38:32 +0000 (GMT)
Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.130])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 4EAF243D5D; Sun, 20 Jun 2004 17:38:31 +0000 (GMT)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1])
	by grosbein.pp.ru (8.12.11/8.12.11) with ESMTP id i5KHcS1f000665;
	Mon, 21 Jun 2004 01:38:28 +0800 (KRAST)
	(envelope-from eugen@grosbein.pp.ru)
Received: (from eugen@localhost)
	by grosbein.pp.ru (8.12.11/8.12.11/Submit) id i5KHcSeD000664;
	Mon, 21 Jun 2004 01:38:28 +0800 (KRAST)
	(envelope-from eugen)
Message-Id: <200406201738.i5KHcSeD000664@grosbein.pp.ru>
Date: Mon, 21 Jun 2004 01:38:28 +0800 (KRAST)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
Reply-To: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ru@freebsd.org
Subject: make installkernel fails when /usr is mounted read-only
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68150
>Category:       misc
>Synopsis:       make installkernel fails when /usr is mounted read-only
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 20 17:40:19 GMT 2004
>Closed-Date:    Mon Aug 09 10:37:06 GMT 2004
>Last-Modified:  Mon Aug 09 10:37:06 GMT 2004
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 4.10-STABLE FreeBSD 4.10-STABLE #3: Mon Jun 21 01:10:56 KRAST 2004 eu@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386

>Description:
	make installkernel tries to write to /usr, it did not in 4.9-RELEASE.
	The change occured in revision 1.416 (and MFC 1.141.2.66)
	of src/Makefile.inc1. 

	The installkernel target is distinct target, not just a part
	of 'global system upgrade' and in my humble opinion there should
	be a way to install a kernel from /usr/obj/... without
	'make hierarchy' overhead. Think of read-only /usr. Think of
	installing a kernel over NFS. Think of very slow channels and
	of amount of transfered data.

	This change is some kind of regression.

>How-To-Repeat:

	With /usr mounted read-only:

# make installkernel
--------------------------------------------------------------
>Fix:

	Make an option allowing to install a kernel only - especially
	when MODULES_WITH_WORLD is defined.
>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eugene Grosbein <eugen@grosbein.pp.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/68150: make installkernel fails when /usr is mounted read-only
Date: Mon, 21 Jun 2004 15:04:04 +0300

 On Mon, Jun 21, 2004 at 01:38:28AM +0800, Eugene Grosbein wrote:
 > 
 > make installkernel tries to write to /usr, it did not in 4.9-RELEASE.
 > The change occured in revision 1.416 (and MFC 1.141.2.66)
 > of src/Makefile.inc1. 
 > 
 > The installkernel target is distinct target, not just a part
 > of 'global system upgrade' and in my humble opinion there should
 > be a way to install a kernel from /usr/obj/... without
 > 'make hierarchy' overhead. Think of read-only /usr. Think of
 > installing a kernel over NFS. Think of very slow channels and
 > of amount of transfered data.
 > 
 > This change is some kind of regression.
 > 
 The change is here in the first place to aid those pour souls
 who ``mv /modules /modules.old'' before doing installkernel.
 ``make hierarchy'' just ensures that /modules exists.  Also,
 in 4.x, at least five modules install stuff under /usr/bin.
 
 > >Fix:
 > 
 > Make an option allowing to install a kernel only - especially
 > when MODULES_WITH_WORLD is defined.
 > 
 Would you be happy with the following change (for RELENG_4):
 
 %%%
 Index: Makefile.inc1
 ===================================================================
 RCS file: /home/ncvs/src/Makefile.inc1,v
 retrieving revision 1.141.2.67
 diff -u -p -u -r1.141.2.67 Makefile.inc1
 --- Makefile.inc1	16 Mar 2004 17:55:57 -0000	1.141.2.67
 +++ Makefile.inc1	21 Jun 2004 12:01:11 -0000
 @@ -508,11 +508,14 @@ buildkernel:
  # Install the kernel defined by INSTALLKERNEL
  #
  installkernel reinstallkernel:
 +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules)
 +	@echo
  	@echo "--------------------------------------------------------------"
  	@echo ">>> Making hierarchy"
  	@echo "--------------------------------------------------------------"
  	cd ${.CURDIR}; \
  	    ${CROSSENV} PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 hierarchy
 +.endif
  	@echo
  	@echo "--------------------------------------------------------------"
  	@echo ">>> Installing kernel"
 %%%
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer

From: Eugene Grosbein <eugen@kuzbass.ru>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: Eugene Grosbein <eugen@grosbein.pp.ru>, bug-followup@FreeBSD.org
Subject: Re: misc/68150: make installkernel fails when /usr is mounted read-only
Date: Tue, 22 Jun 2004 10:40:47 +0800

 Ruslan Ermilov wrote:
 
 > > The installkernel target is distinct target, not just a part
 > > of 'global system upgrade' and in my humble opinion there should
 > > be a way to install a kernel from /usr/obj/... without
 > > 'make hierarchy' overhead. Think of read-only /usr. Think of
 > > installing a kernel over NFS. Think of very slow channels and
 > > of amount of transfered data.
 > >
 > > This change is some kind of regression.
 > >
 > The change is here in the first place to aid those pour souls
 > who ``mv /modules /modules.old'' before doing installkernel.
 > ``make hierarchy'' just ensures that /modules exists.  Also,
 > in 4.x, at least five modules install stuff under /usr/bin.
 > 
 > > >Fix:
 > >
 > > Make an option allowing to install a kernel only - especially
 > > when MODULES_WITH_WORLD is defined.
 > >
 > Would you be happy with the following change (for RELENG_4):
 > 
 > %%%
 > Index: Makefile.inc1
 > ===================================================================
 > RCS file: /home/ncvs/src/Makefile.inc1,v
 > retrieving revision 1.141.2.67
 > diff -u -p -u -r1.141.2.67 Makefile.inc1
 > --- Makefile.inc1       16 Mar 2004 17:55:57 -0000      1.141.2.67
 > +++ Makefile.inc1       21 Jun 2004 12:01:11 -0000
 > @@ -508,11 +508,14 @@ buildkernel:
 >  # Install the kernel defined by INSTALLKERNEL
 >  #
 >  installkernel reinstallkernel:
 > +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules)
 > +       @echo
 >         @echo "--------------------------------------------------------------"
 >         @echo ">>> Making hierarchy"
 >         @echo "--------------------------------------------------------------"
 
 That would be nice, thanks!
 
 Eugene

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: bug-followup@freebsd.org
Cc: ru@freebsd.org
Subject: Re: misc/68150: make installkernel fails when /usr is mounted read-only
Date: Sun, 8 Aug 2004 21:48:35 +0800

 Hi!
 
 Would you like to commit your patch please?
 
 Eugene Grosbein
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Aug 9 10:36:22 GMT 2004 
State-Changed-Why:  
Originator agreed to the proposed patch for RELENG_4. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Aug 9 10:36:22 GMT 2004 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=68150 
>Unformatted:
 >>> Making hierarchy
 --------------------------------------------------------------
 cd /usr/local/src;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=i386  MACHINE=i386  OBJFORMAT_PATH=/usr/obj/usr/local/src/i386/usr/libexec  GROFF_BIN_PATH=/usr/obj/usr/local/src/i386/usr/bin  GROFF_FONT_PATH=/usr/obj/usr/local/src/i386/usr/share/groff_font   GROFF_TMAC_PATH=/usr/obj/usr/local/src/i386/usr/share/tmac PERL5LIB=/usr/obj/usr/local/src/i386/usr/libdata/perl/5.00503 PATH=/usr/obj/usr/local/src/i386/usr/sbin:/usr/obj/usr/local/src/i386/usr/bin:/usr/obj/usr/local/src/i386/usr/games:/sbin:/bin:/usr/s bin:/usr/bin make -f Makefile.inc1 hierarchy
 cd /usr/local/src/etc;		make distrib-dirs
 set - `grep "^[a-zA-Z]" /usr/local/src/etc/locale.deprecated`;  while [ $# -gt 0 ] ;  do  for dir in /usr/share/locale  /usr/share/nls  /usr/local/share/nls;  do  test -d /${dir} && cd /${dir};  test -L "$2" && rm -rf "$2";  test \! -L "$1" && test -d "$ 1" && mv "$1" "$2";  done;  shift; shift;  done
 mtree -deU -f /usr/local/src/etc/mtree/BSD.root.dist -p /
 etc/X11 changed
 	type expected dir found link
 mtree -deU -f /usr/local/src/etc/mtree/BSD.var.dist -p /var
 tmp changed
 	type expected dir found link
 crash changed
 	type expected dir found link
 ./tmp/vi.recover missing (directory not created: File exists)
 mtree -deU -f /usr/local/src/etc/mtree/BSD.usr.dist -p /usr
 mtree -deU -f /usr/local/src/etc/mtree/BSD.include.dist  -p /usr/include
 mtree -deU -f /usr/local/src/etc/mtree/BSD.include.dist  -p /usr/libdata/perl/5.00503/mach
 mtree -deU -f /usr/local/src/etc/mtree/BSD.sendmail.dist -p /
 cd /; rm -f /sys; ln -s usr/src/sys sys
 cd /usr/share/man/en.ISO8859-1; ln -sf ../man* .
 ln: ./man1: Read-only file system
 ln: ./man1aout: Read-only file system
 ln: ./man2: Read-only file system
 ln: ./man3: Read-only file system
 ln: ./man4: Read-only file system
 ln: ./man5: Read-only file system
 ln: ./man6: Read-only file system
 ln: ./man7: Read-only file system
 ln: ./man8: Read-only file system
 ln: ./man9: Read-only file system
 ln: ./mann: Read-only file system
 *** Error code 1
 
 Stop in /usr/local/src/etc.
 *** Error code 1
 
 Stop in /usr/local/src.
 *** Error code 1
 
 Stop in /usr/local/src.
 *** Error code 1
 
 Stop in /usr/local/src.
 
 Script done on Mon Jun 21 01:19:28 2004
 
