From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 12 07:11:09 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 598E316A4DF for ; Fri, 12 Mar 2004 07:11:09 -0800 (PST) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9318843D41 for ; Fri, 12 Mar 2004 07:11:08 -0800 (PST) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i2CF8eKt046728 for hackers@FreeBSD.org.checked; (8.12.8/vak/2.1) Fri, 12 Mar 2004 18:08:40 +0300 (MSK) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i2CF2Tc2046424; (8.12.8/vak/2.1) Fri, 12 Mar 2004 18:02:29 +0300 (MSK) (envelope-from rik@cronyx.ru) Message-ID: <4051D266.7010403@cronyx.ru> Date: Fri, 12 Mar 2004 18:08:22 +0300 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ruslan Ermilov References: <4051BE3B.2090500@cronyx.ru> <20040312142538.GA1537@ip.net.ua> In-Reply-To: <20040312142538.GA1537@ip.net.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit 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 15:11:09 -0000 Ruslan Ermilov wrote: >Roman Kurakin wrote: > > >>I forget to say that this problem is for 4. branch >> >>Roman Kurakin wrote: >> >> >> >>>Hi, >>> >>> It seems that I've found another problem. If /modules dir would be >>>removed, >>>make install (of kernel and kernel modules) will not create modules >>>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 >>>explicitly: >>> >>> misprint: -d flag should be -D flag I forgot to check that this is only linux's install behavior. >>>--- 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). > > If our install was like linux one which have -D flag, we could solve our problem by setting it globaly to install in sys.mk: -INSTALL ?= install -D +INSTALL ?= install -D This flag dictates to create all necessary dirs if needed. It would be nice to have such option, not -D of course. My FreeBSD 3.4 machine tolds me that -D is debug flag. Roman > >Cheers, > >