From bill@twwells.com  Tue Apr  3 08:25:10 2001
Return-Path: <bill@twwells.com>
Received: from smtp.popsite.net (smtp.popsite.net [216.126.128.17])
	by hub.freebsd.org (Postfix) with ESMTP id A3C3F37B71E
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Apr 2001 08:25:10 -0700 (PDT)
	(envelope-from bill@twwells.com)
Received: from twwells.com (02-085.051.popsite.net [64.24.21.85])
	by smtp.popsite.net (Postfix) with ESMTP id 857695089F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Apr 2001 10:24:58 -0500 (CDT)
Received: from bill by twwells.com with local (Exim 3.22 #1)
	id 14kSeC-0006HE-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 03 Apr 2001 11:23:08 -0400
Message-Id: <E14kSeC-0006HE-00@twwells.com>
Date: Tue, 03 Apr 2001 11:23:08 -0400
From: "T. William Wells" <bill@twwells.com>
Reply-To: bill@twwells.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /modules not created by make installkernel
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26317
>Category:       kern
>Synopsis:       /modules not created by make installkernel
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 03 08:30:00 PDT 2001
>Closed-Date:    Mon Sep 24 09:37:12 PDT 2001
>Last-Modified:  Mon Sep 24 09:37:52 PDT 2001
>Originator:     T. William Wells
>Release:        FreeBSD 4.3-BETA i386
>Organization:
>Environment:
System: FreeBSD twwells.com 4.3-BETA FreeBSD 4.3-BETA #2: Mon Mar 19 12:24:00 EST 2001 root@twwells.com:/usr/obj/usr/src/sys/TWWELLS i386


>Description:

	I blew away my /modules (and /modules.old) directory and
	then did a make installkernel. The result was a file where
	/modules should have been.

>How-To-Repeat:

	rm -fr /modules*
	cd /usr/src
	make installkernel KERNCONF=yourkernel

>Fix:

	For a workaround, just don't blow away /modules (delete
	its contents instead) or, having done so, mkdir /modules
	before doing the make installkernel.
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@orbitel.bg>
To: "T. William Wells" <bill@twwells.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/26317: /modules not created by make installkernel
Date: Tue, 3 Apr 2001 18:37:37 +0300

 On Tue, Apr 03, 2001 at 11:23:08AM -0400, T. William Wells wrote:
 > 
 > >Number:         26317
 > >Category:       kern
 > >Synopsis:       /modules not created by make installkernel
 > >Originator:     T. William Wells
 > >Release:        FreeBSD 4.3-BETA i386
 > >Organization:
 > >Environment:
 > System: FreeBSD twwells.com 4.3-BETA FreeBSD 4.3-BETA #2: Mon Mar 19 12:24:00 EST 2001 root@twwells.com:/usr/obj/usr/src/sys/TWWELLS i386
 > 
 > 
 > >Description:
 > 
 > 	I blew away my /modules (and /modules.old) directory and
 > 	then did a make installkernel. The result was a file where
 > 	/modules should have been.
 > 
 > >How-To-Repeat:
 > 
 > 	rm -fr /modules*
 > 	cd /usr/src
 > 	make installkernel KERNCONF=yourkernel
 > 
 > >Fix:
 > 
 > 	For a workaround, just don't blow away /modules (delete
 > 	its contents instead) or, having done so, mkdir /modules
 > 	before doing the make installkernel.
 
 The /modules directory is created in the first stage of the 'make installworld'
 process.  As world and kernel should generally always be rebuild/reinstalled
 in sync, this does not usually arise as a problem :)
 
 As you correctly point out, a workaround is to always have a /modules dir.
 I wonder, though, whether the 'installkernel' target in Makefile.inc1 should
 not, too, invoke a 'make hierarchy', or at least some subset of that, to do
 an mtree from BSD.root.dist; that should ensure that the /modules directory
 is there.
 
 G'luck,
 Peter
 
 -- 
 I am the thought you are now thinking.

From: Johan Karlsson <k@numeri.campus.luth.se>
To: Peter Pentchev <roam@orbitel.bg>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/26317: /modules not created by make installkernel
Date: Tue, 3 Apr 2001 18:10:48 +0200

 On Tue, Apr 03, 2001 at 08:40 (-0700) +0000, Peter Pentchev wrote:
 >  The /modules directory is created in the first stage of the 'make installworld'
 >  process.  As world and kernel should generally always be rebuild/reinstalled
 >  in sync, this does not usually arise as a problem :)
 >  
 >  As you correctly point out, a workaround is to always have a /modules dir.
 >  I wonder, though, whether the 'installkernel' target in Makefile.inc1 should
 >  not, too, invoke a 'make hierarchy', or at least some subset of that, to do
 >  an mtree from BSD.root.dist; that should ensure that the /modules directory
 >  is there.
 
 From /usr/src/UPDATING
         make buildworld
         make buildkernel KERNCONF=YOUR_KERNEL_HERE
         make installkernel KERNCONF=YOUR_KERNEL_HERE
         reboot  (in single user) [1]
         make installworld
         mergemaster
         reboot
 
 
 Hence you are recommended to run installkernel before installworld.
 
 See PR 20326 where the problem is similar.
 
 
 >  
 >  G'luck,
 >  Peter
 >  
 >  -- 
 >  I am the thought you are now thinking.
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-bugs" in the body of the message
 
 -- 
 Johan Karlsson		mailto:k@numeri.campus.luth.se

From: Peter Pentchev <roam@orbitel.bg>
To: Johan Karlsson <k@numeri.campus.luth.se>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/26317: /modules not created by make installkernel
Date: Tue, 3 Apr 2001 19:24:39 +0300

 On Tue, Apr 03, 2001 at 06:10:48PM +0200, Johan Karlsson wrote:
 > On Tue, Apr 03, 2001 at 08:40 (-0700) +0000, Peter Pentchev wrote:
 > >  The /modules directory is created in the first stage of the 'make installworld'
 > >  process.  As world and kernel should generally always be rebuild/reinstalled
 > >  in sync, this does not usually arise as a problem :)
 > >  
 > >  As you correctly point out, a workaround is to always have a /modules dir.
 > >  I wonder, though, whether the 'installkernel' target in Makefile.inc1 should
 > >  not, too, invoke a 'make hierarchy', or at least some subset of that, to do
 > >  an mtree from BSD.root.dist; that should ensure that the /modules directory
 > >  is there.
 > 
 > From /usr/src/UPDATING
 >         make buildworld
 >         make buildkernel KERNCONF=YOUR_KERNEL_HERE
 >         make installkernel KERNCONF=YOUR_KERNEL_HERE
 >         reboot  (in single user) [1]
 >         make installworld
 >         mergemaster
 >         reboot
 > 
 > 
 > Hence you are recommended to run installkernel before installworld.
 > 
 > See PR 20326 where the problem is similar.
 
 I know; this is why I think that a subset of the 'make hierarchy'
 functionality should be added first thing in the 'installkernel' target.
 
 G'luck,
 Peter
 
 -- 
 Thit sentence is not self-referential because "thit" is not a word.

From: "T. William Wells" <bill@twwells.com>
To: roam@orbitel.bg (Peter Pentchev)
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/26317: /modules not created by make installkernel
Date: Tue, 3 Apr 2001 14:01:38 -0400 (EDT)

 > The /modules directory is created in the first stage of the 'make installworld'
 > process.  As world and kernel should generally always be rebuild/reinstalled
 > in sync, this does not usually arise as a problem :)
 
 Ideally, yes. Actually, what happened is that I was under the
 misapprehension that specifying NO_MODULES meant that one didn't
 get -- or need -- kernel modules. So I blew away that directory
 after I had built and installed my kernel, only to discover that
 I really did need some kernel modules. (For Linux compatibility
 and for a screensaver; evidently, those can't be compiled into
 the kernel nowadays.)
 
 So, I did another make buildkernel (the easy to fix my blunder, I
 thought), and found that it didn't work as expected.
 
 > As you correctly point out, a workaround is to always have a /modules dir.
 > I wonder, though, whether the 'installkernel' target in Makefile.inc1 should
 > not, too, invoke a 'make hierarchy', or at least some subset of that, to do
 > an mtree from BSD.root.dist; that should ensure that the /modules directory
 > is there.
 
 It would. OTOH, installation of the kernel really doesn't need
 anything other than / and /modules, right? So maybe it should just
 do a mkdir /modules and not worry about the rest.
 

From: Gregory Bond <gnb@itga.com.au>
To: David Taylor <davidt@yadt.co.uk>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/26317: /modules not created by make installkernel 
Date: Mon, 09 Apr 2001 10:03:24 +1000

 This is a multipart MIME message.
 
 --==_Exmh_8133331360
 Content-Type: text/plain; charset=us-ascii
 
 > It should at least bomb out with an error message, instead of pretending it
 > succesfully installed your kernel and modules, even though what it
 > _actually_ did was install one module as '/modules'...
 
 A simple patch to achieve this is attached. (I.e. install into /modules/ 
 rather than /modules to force the error to be trapped.)
 
 
 
 --==_Exmh_8133331360
 Content-Type: text/plain ; name="patch"; charset=us-ascii
 Content-Description: patch
 Content-Disposition: attachment; filename="patch"
 
 Index: kmod.mk
 ===================================================================
 RCS file: /usr/ncvs/src/sys/conf/kmod.mk,v
 retrieving revision 1.82.2.5
 diff -u -r1.82.2.5 kmod.mk
 --- kmod.mk	2001/03/05 06:14:21	1.82.2.5
 +++ kmod.mk	2001/04/08 23:59:26
 @@ -217,7 +217,7 @@
  
  realinstall: _SUBDIR
  	${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
 -	    ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
 +	    ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/
  .if defined(LINKS) && !empty(LINKS)
  	@set ${LINKS}; \
  	while test $$# -ge 2; do \
 
 --==_Exmh_8133331360--
 
 
State-Changed-From-To: open->analyzed 
State-Changed-By: roam 
State-Changed-When: Fri Jul 6 01:56:28 PDT 2001 
State-Changed-Why:  
Let's see if the FreeBSD community likes the proposed trailing-slash 
patch. 


Responsible-Changed-From-To: freebsd-bugs->roam 
Responsible-Changed-By: roam 
Responsible-Changed-When: Fri Jul 6 01:56:28 PDT 2001 
Responsible-Changed-Why:  
I'll take care of the responses in -arch and -audit. 

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

From: Peter Pentchev <roam@orbitel.bg>
To: Gregory Bond <gnb@itga.com.au>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/26317: /modules not created by make installkernel
Date: Wed, 18 Jul 2001 13:05:47 +0300

 On Sun, Apr 08, 2001 at 05:10:02PM -0700, Gregory Bond wrote:
 > The following reply was made to PR kern/26317; it has been noted by GNATS.
 > 
 > From: Gregory Bond <gnb@itga.com.au>
 > To: David Taylor <davidt@yadt.co.uk>
 > Cc: freebsd-gnats-submit@FreeBSD.ORG
 > Subject: Re: kern/26317: /modules not created by make installkernel 
 > Date: Mon, 09 Apr 2001 10:03:24 +1000
 > 
 >  This is a multipart MIME message.
 >  
 >  --==_Exmh_8133331360
 >  Content-Type: text/plain; charset=us-ascii
 >  
 >  > It should at least bomb out with an error message, instead of pretending it
 >  > succesfully installed your kernel and modules, even though what it
 >  > _actually_ did was install one module as '/modules'...
 >  
 >  A simple patch to achieve this is attached. (I.e. install into /modules/ 
 >  rather than /modules to force the error to be trapped.)
 
 This patch was committed into -current, and if no serious beatings occur,
 it shall be MFC'd in two weeks.
 
 Thanks!
 
 G'luck,
 Peter
 
 -- 
 When you are not looking at it, this sentence is in Spanish.
State-Changed-From-To: analyzed->closed 
State-Changed-By: roam 
State-Changed-When: Mon Sep 24 09:37:12 PDT 2001 
State-Changed-Why:  
Eep; I actually MFC'd this patch about two months ago.. 
Thanks for the problem report! 

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