From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 12 06:26:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7507C16A4CE for ; Fri, 12 Mar 2004 06:26:00 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CB4443D48 for ; Fri, 12 Mar 2004 06:25:59 -0800 (PST) (envelope-from ru@ip.net.ua) Received: from heffalump.office.ipnet (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.10/8.12.9) with ESMTP id i2CETfee056646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Mar 2004 16:29:42 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.office.ipnet (8.12.11/8.12.11) id i2CEPgpK001600; Fri, 12 Mar 2004 16:25:42 +0200 (EET) (envelope-from ru) Date: Fri, 12 Mar 2004 16:25:38 +0200 From: Ruslan Ermilov To: Roman Kurakin Message-ID: <20040312142538.GA1537@ip.net.ua> References: <4051BE3B.2090500@cronyx.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <4051BE3B.2090500@cronyx.ru> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@FreeBSD.org Subject: Re: make install (kernel) without /modules dir X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 14:26:00 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Roman Kurakin wrote: > I forget to say that this problem is for 4. branch >=20 > Roman Kurakin wrote: >=20 > >Hi, > > > > It seems that I've found another problem. If /modules dir would be=20 > >removed, > >make install (of kernel and kernel modules) will not create modules=20 > >dir and you'll > >get /modules file with one of the modules inside. > > > >One of the variants is to add flag -d to install or other to mkdir -p=20 > >explicitly: > > > >--- Makefile.old Fri Mar 12 00:13:45 2004 > >+++ Makefile Fri Mar 12 00:15:03 2004 > >@@ -626,6 +626,7 @@ > > cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \ > > fi; > >.endif > >+ mkdir -p ${DESTDIR}/modules > > cd $S/modules ; env ${MKMODULESENV} ${MAKE} install > > > >modules-reinstall modules-reinstall.debug: An old problem. 5.x is only partly affected by this, because of a side effect of kern.post.mk creating the necessary directory, but if you attempt to install from src/sys/modules/ when /boot/kernel doesn't exist, it exhibits the same behavior. In RELENG_4 the situation is worse, as even "make installkernel" can exhibit such behavior. I once had a patch locally that adds "make hierarchy" to the installkernel path, similar to how this is done for installworld. The problem is not unique to just kernel modules; if you attempt to install "src/bin/" when /bin doesn't exist you'll see the same behavior, that's why I think the below change is not quite incorrect. I believe there's a PR open on this (probably even assigned to myself), but I just don't have a clever idea of how to fix it properly, sorry -- generally, standard directories are created with mtree(8), and not with mkdir(1). Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAUchiUkv4P6juNwoRAs3NAJ9g/Ba1G54IALMORlnvMjFtmohQ9gCaA4VT EuePOen75Umz/dMBdqB0SvA= =fPBs -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--