tlaronde | 14 Apr 17:16 2005

Unprivilege build creates MAKEDEV in /usr/src/etc

Hello,

I'm compiling NetBSD 2.0.2 userland in the unprivilege case (and outside
/usr/src by the way).
Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
created in /usr/src/etc where my unprivilege user has nothing to do.

Here is the relevant part of the log:

--------------
(cd /usr/src/etc &&
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmake
INSTALL_DONE=1
distribution)
STRIP=/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/i386--netbsdelf-strip
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbinstall
-U -M
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386/METALOG
-D
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386
-h sha1 -N /usr/src/etc -d -o root -g wheel -m 755 -T base_pkg
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmtree
-def /usr/src/etc/mtree/NetBSD.dist -N /usr/src/etc  -p
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386/
-U -W
(cd /usr/src/etc;
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmake install-etc-files)
#    create  etc//usr/src/etc/MAKEDEV
MACHINE=i386 MACHINE_ARCH=i386  NETBSDSRCDIR=/usr/src  awk -f /usr/src/etc/MAKEDEV.awk
(Continue reading)

tlaronde | 15 Apr 14:23 2005

[PATCH] Unprivilege build creates MAKEDEV in /usr/src/etc

On Thu, Apr 14, 2005 at 05:16:30PM +0200, tlaronde <at> polynum.com wrote:
> Hello,
> 
> I'm compiling NetBSD 2.0.2 userland in the unprivilege case (and outside
> /usr/src by the way).
> Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
> created in /usr/src/etc where my unprivilege user has nothing to do.

I don't understand our this has worked before (since revision has not
changed between 2.0 branch and 2.0.2 RELEASE), but obviously, since
MAKEDEV is installed via ETC_INSTALL_OBJ_FILE this was missing:

(patch attached).

--

-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/  |  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
--- /usr/src/etc/Makefile.orig	2005-04-15 14:11:42.000000000 +0200
+++ /usr/src/etc/Makefile	2005-04-15 14:15:15.000000000 +0200
 <at>  <at>  -155,7 +155,8  <at>  <at> 
 	${_MKTARGET_CREATE}
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	    NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
-	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
+	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
+		> ${.OBJDIR}/${.TARGET}

(Continue reading)

tlaronde | 15 Apr 19:55 2005

Re: [NEW PATCH] Unprivilege build creates MAKEDEV in /usr/src/etc


The previous patch didn't do the trick since ${.TARGET} is expanded
to /usr/src/etc/MAKEDEV i.e ${.CURDIR} is prepended. Is this the
intended behavior? It seems it doesn't make sense. Does this only happen
because the target is UPPERCASE? 

So one needs to prepend ${MAKEOBJDIRPREFIX} instead of ${.OBJDIR}.

- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/  |  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
--- /usr/src/etc/Makefile.orig	2005-04-15 14:11:42.000000000 +0200
+++ /usr/src/etc/Makefile	2005-04-15 16:53:36.000000000 +0200
 <at>  <at>  -155,7 +155,8  <at>  <at> 
 	${_MKTARGET_CREATE}
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	    NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
-	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
+	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
+		> ${MAKEOBJDIRPREFIX}/${.TARGET}

 
 RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID \
tlaronde | 15 Apr 20:16 2005

Missing files in netbsd-2-0-2-RELEASE

Hello,

The files netbsd-msp.cf and netbsd-proto.cf are present in netbsd-2-0
branch but missing in netbsd-2-0-2-RELEASE under
gnu/usr.sbin/sendmail/cf/cf.

They should be generated from .mc files using Makefile.sendmail but are
not. I'm not accustomed to bmake syntax, but it seems __makemc should
be called.

Any clue?
--

-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/  |  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

James Chacon | 15 Apr 21:14 2005
Picon

Re: Unprivilege build creates MAKEDEV in /usr/src/etc

On Thu, Apr 14, 2005 at 05:16:30PM +0200, tlaronde <at> polynum.com wrote:
> Hello,
> 
> I'm compiling NetBSD 2.0.2 userland in the unprivilege case (and outside
> /usr/src by the way).
> Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
> created in /usr/src/etc where my unprivilege user has nothing to do.
> 
> Here is the relevant part of the log:

What are your options to build.sh?

James

tlaronde | 15 Apr 21:36 2005

Re: Unprivilege build creates MAKEDEV in /usr/src/etc

On Fri, Apr 15, 2005 at 02:14:04PM -0500, James Chacon wrote:
> On Thu, Apr 14, 2005 at 05:16:30PM +0200, tlaronde <at> polynum.com wrote:
> > Hello,
> > 
> > I'm compiling NetBSD 2.0.2 userland in the unprivilege case (and outside
> > /usr/src by the way).
> > Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
> > created in /usr/src/etc where my unprivilege user has nothing to do.
> > 
> > Here is the relevant part of the log:
> 
> What are your options to build.sh?

distribution:
	cd $(NETBSDSRCDIR); \
	NOCLEANDIR=yes sh $(NETBSDSRCDIR)/build.sh -M $(OBJDIR) -a $(TARGET_ARCH) -X $(X11SRCDIR) -x -U distribution;\
	sh $(NETBSDSRCDIR)/build.sh -M $(OBJDIR) -a $(TARGET_ARCH) -X $(X11SRCDIR) -x -U sets	 

--

-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/  |  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Frederick Bruckman | 15 Apr 22:21 2005
Picon

Re: Missing files in netbsd-2-0-2-RELEASE

In article <20050415181624.GA17184 <at> polynum.com>,
	tlaronde <at> polynum.com writes:
> 
> The files netbsd-msp.cf and netbsd-proto.cf are present in netbsd-2-0
> branch but missing in netbsd-2-0-2-RELEASE under
> gnu/usr.sbin/sendmail/cf/cf.

Those files are supposed to be generated at "make distribution" time. I
don't believe they were ever checked into the tree. There was a bug, where
the generated files were deposited into the source tree somehow, and never
cleaned, but that's evidently been fixed.

> They should be generated from .mc files using Makefile.sendmail but are
> not. I'm not accustomed to bmake syntax, but it seems __makemc should
> be called.

I don't follow you.  My 2.0.2 build has them in "/usr/share/sendmail/cf",
as expected.

Frederick

Valeriy E. Ushakov | 15 Apr 23:09 2005
Picon

Re: [PATCH] Unprivilege build creates MAKEDEV in /usr/src/etc

On Fri, Apr 15, 2005 at 14:23:23 +0200, tlaronde <at> polynum.com wrote:

> Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
> created in /usr/src/etc where my unprivilege user has nothing to do.
[...]
> The files netbsd-msp.cf and netbsd-proto.cf are present in netbsd-2-0
> branch but missing in netbsd-2-0-2-RELEASE under
> gnu/usr.sbin/sendmail/cf/cf.

You have polluted your src/etc with an non-objdir make (probably b/c
of etcupdate).  Clean your cvs tree - check those '?' entries in the
cvs update output.

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen

tlaronde | 16 Apr 10:53 2005

Re: Missing files in netbsd-2-0-2-RELEASE

On Fri, Apr 15, 2005 at 08:21:57PM +0000, Frederick Bruckman wrote:
> In article <20050415181624.GA17184 <at> polynum.com>,
> 	tlaronde <at> polynum.com writes:
> > 
> > The files netbsd-msp.cf and netbsd-proto.cf are present in netbsd-2-0
> > branch but missing in netbsd-2-0-2-RELEASE under
> > gnu/usr.sbin/sendmail/cf/cf.
> 
> Those files are supposed to be generated at "make distribution" time. I
> don't believe they were ever checked into the tree. There was a bug, where
> the generated files were deposited into the source tree somehow, and never
> cleaned, but that's evidently been fixed.

Yes, there are supposed to be generated from the Makefile.sendmail
chunk. And there are no more present in the CVS today.

>  
> > They should be generated from .mc files using Makefile.sendmail but are
> > not. I'm not accustomed to bmake syntax, but it seems __makemc should
> > be called.
> 
> I don't follow you.  My 2.0.2 build has them in "/usr/share/sendmail/cf",
> as expected.

The problem is perhaps the commands (Makefile.sendmail, __makemc target):
	${RM} $ <at> 
	${CHMODE} ${ROMODE} $ <at> 

since the object are created, logically, in ${.OBJDIR}/$ <at> , and in case
of unprivileged build this is distinct from SRCDIR, hence the $ <at>  are
(Continue reading)

tlaronde | 16 Apr 10:36 2005

Re: [PATCH] Unprivilege build creates MAKEDEV in /usr/src/etc

[Note: I'm subscribed to the list, so no need to CC me]

On Sat, Apr 16, 2005 at 01:09:29AM +0400, Valeriy E. Ushakov wrote:
> On Fri, Apr 15, 2005 at 14:23:23 +0200, tlaronde <at> polynum.com wrote:
> 
> > Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
> > created in /usr/src/etc where my unprivilege user has nothing to do.
> [...]
> > The files netbsd-msp.cf and netbsd-proto.cf are present in netbsd-2-0
> > branch but missing in netbsd-2-0-2-RELEASE under
> > gnu/usr.sbin/sendmail/cf/cf.
> 
> You have polluted your src/etc with an non-objdir make (probably b/c
> of etcupdate).  Clean your cvs tree - check those '?' entries in the
> cvs update output.

Unfortunately, this is not the case ;) There is no `make' left. The only
aliens are the ones checked out from netbsd-2-0 branch (for testing, see my other mail) from sendmail
directory (others are all netbsd-2-0-2-RELEASE):

----------CUT HERE
? gnu/usr.sbin/sendmail/cf/cf/netbsd-msp.cf
? gnu/usr.sbin/sendmail/cf/cf/netbsd-proto.cf
cvs update: Updating .
cvs update: Updating bin
----------CUT HERE

And the extract from my log appended to the first email shows that this
is indeed the generated toolchain that is used.

(Continue reading)


Gmane