From owner-freebsd-current@FreeBSD.ORG Tue Dec 16 05:47:47 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1DBA106564A for ; Tue, 16 Dec 2008 05:47:47 +0000 (UTC) (envelope-from ato@amp2.iem.pw.edu.pl) Received: from amp2.iem.pw.edu.pl (amp2.iem.pw.edu.pl [194.29.146.27]) by mx1.freebsd.org (Postfix) with ESMTP id 830D08FC13 for ; Tue, 16 Dec 2008 05:47:47 +0000 (UTC) (envelope-from ato@amp2.iem.pw.edu.pl) Received: by amp2.iem.pw.edu.pl (Postfix, from userid 700) id 2A9D112D31; Tue, 16 Dec 2008 06:30:58 +0100 (CET) Date: Tue, 16 Dec 2008 06:30:58 +0100 From: Andrzej Tobola To: freebsd-current@freebsd.org Message-ID: <20081216053058.GA37217@amp2.iem.pw.edu.pl> References: <20081215220539.W97918@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081215220539.W97918@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Mailman-Approved-At: Tue, 16 Dec 2008 15:45:27 +0000 Subject: Re: need conf/kern.post.mk review X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 05:47:47 -0000 On Mon, Dec 15, 2008 at 10:07:20PM +0000, Bjoern A. Zeeb wrote: > I lately tried to install a kernel as user to get a boot dir seeded. I > found I can set KMODOWN and KMODGRP for installing modules but not the > kernel. Is there a reason for this or does this patch look ok? > > http://people.freebsd.org/~bz/20081215-02-conf-kern.port.mk-ugio.diff +1 If we are already on kern.port.mk what about the following patch which gives the posibility to instal to fs without chflags (e.g. nfs) ? I am using it from a long time as can be seen from time-stamps. --- /usr/src/sys/conf/kern.post.mk-OLD 2007-03-24 06:35:08.000000000 +0100 +++ /usr/src/sys/conf/kern.post.mk 2007-11-24 23:52:03.000000000 +0100 @@ -14,6 +14,12 @@ .endif MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" +.if defined(NO_FSCHG) +CHFLAGS= echo +.else +CHFLAGS= chflags -R noschg +.endif + .MAIN: all .for target in all clean cleandepend cleandir clobber depend install \ @@ -208,11 +214,11 @@ .if exists(${DESTDIR}${KODIR}) -thiskernel=`sysctl -n kern.bootfile` ; \ if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \ - chflags -R noschg ${DESTDIR}${KODIR} ; \ + ${CHFLAGS} ${DESTDIR}${KODIR} ; \ rm -rf ${DESTDIR}${KODIR} ; \ else \ if [ -d ${DESTDIR}${KODIR}.old ] ; then \ - chflags -R noschg ${DESTDIR}${KODIR}.old ; \ + ${CHFLAGS} ${DESTDIR}${KODIR}.old ; \ rm -rf ${DESTDIR}${KODIR}.old ; \ fi ; \ mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \ @@ -231,7 +237,7 @@ kernel-reinstall: - @-chflags -R noschg ${DESTDIR}${KODIR} + @-${CHFLAGS} ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} cheers, -at