NetBSD Problem Report #51399

From www@NetBSD.org  Mon Aug  8 14:52:43 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 98CE77A0F3
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  8 Aug 2016 14:52:43 +0000 (UTC)
Message-Id: <20160808145242.539327A2C3@mollari.NetBSD.org>
Date: Mon,  8 Aug 2016 14:52:42 +0000 (UTC)
From: nickpeteromalley@gmail.com
Reply-To: nickpeteromalley@gmail.com
To: gnats-bugs@NetBSD.org
Subject: evbarm7hf release fails to build on Linux 3.16 host. 
X-Send-Pr-Version: www-1.0

>Number:         51399
>Category:       port-evbarm
>Synopsis:       evbarm7hf release fails to build on Linux 3.16 host.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-evbarm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 08 14:55:00 +0000 2016
>Closed-Date:    Sun May 15 19:46:25 +0000 2022
>Last-Modified:  Sun May 15 19:46:25 +0000 2022
>Originator:     Nickolas O'Malley
>Release:        7.0.1
>Organization:
>Environment:
Linux ner 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
>Description:
Toward the end of building an evbarm release, the build fails with the following error output (PRIVILEGED BUILD. Invoked this way: `./build.sh -m evbarm -a earmv7hf -u release`):


=== configuring sets ===
=== running MAKEDEV ===
=== fixing up permissions
=== looking for kernels in /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-BEAGLEBOARD.ub
.gz to /boot/netbsd-BEAGLEBOARD.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-BEAGLEBONE.ub.
gz to /boot/netbsd-BEAGLEBONE.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-BPI.ub.gz to /
boot/netbsd-BPI.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-CUBIEBOARD.ub.
gz to /boot/netbsd-CUBIEBOARD.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-CUBIETRUCK.ub.
gz to /boot/netbsd-CUBIETRUCK.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-HUMMINGBIRD_A
1.ub.gz to /boot/netbsd-HUMMINGBIRD_A31.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-ODROID-C1.ub.g
z to /boot/netbsd-ODROID-C1.ub ===
=== installing /home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/kernel/netbsd-RPI2.bin.gz to
 /boot/netbsd-RPI2.bin ===
=== renaming netbsd-RPI2.bin to kernel7.img ===
=== installing firmware files ===
 LICENCE.broadcom
 bootcode.bin
 fixup.dat
 fixup_cd.dat
 start.elf
 start_cd.elf
=== Populating msdos filesystem ===
Creating `/home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/gzimg/armv7.img'
/home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/gzimg/armv7.img: 114536 sectors in 14317 FA
T16 clusters (4096 bytes/cluster)
MBR type: 6
bps=512 spc=8 res=1 nft=2 rde=512 mid=0xf0 spf=56 spt=63 hds=255 hid=0 bsec=114688
Populating `/home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/gzimg/armv7.img'
Image `/home/np/netbsd/usr/src/obj/releasedir/evbarm/binary/gzimg/armv7.img' complete
=== Populating ffs filesystem ===
nbmakefs: unknown group `root'
nbmakefs: failed at line 1709 of the specification

*** Failed target:  smp_armv7
*** Failed command: TOOL_MAKEFS=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x86_64/
bin/nbmakefs TOOL_DISKLABEL=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x86_64/bin/
nbdisklabel TOOL_FDISK=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x86_64/bin/armv7
--netbsdelf-eabihf-fdisk TOOL_GZIP=gzip TOOL_MKNOD=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.1
6.0-4-amd64-x86_64/bin/nbmknod TOOL_PAX=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64
-x86_64/bin/nbpax TOOL_MKUBOOTIMAGE=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x86
_64/bin/nbmkubootimage TOOL_MTREE=/home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x86_6
4/bin/nbmtree HOST_SH=/bin/sh /bin/sh /home/np/netbsd/usr/src/distrib/utils/embedded/mkimage -x
-h armv7 -D /home/np/netbsd/usr/src/obj/destdir.evbarm -S /home/np/netbsd/usr/src -K /home/np/ne
tbsd/usr/src/obj/releasedir/evbarm/binary/kernel /home/np/netbsd/usr/src/obj/releasedir/evbarm/b
inary/gzimg/armv7.img.gz
*** Error code 1

Stop.
nbmake[1]: stopped in /home/np/netbsd/usr/src/etc

*** Failed target:  release
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*)
 this="${dir}/"; real="${dir}" ;; .) this=""; real="/home/np/netbsd/usr/src" ;; *) this="${dir}/
"; real="/home/np/netbsd/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/
}${1:+ (with: $@)}"; cd "${real}" && /home/np/netbsd/usr/src/obj/tooldir.Linux-3.16.0-4-amd64-x8
6_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget etc release DISTRIBUTION_
ONE=1
*** Error code 1

Stop.
nbmake: stopped in /home/np/netbsd/usr/src

ERROR: Failed to make release
*** BUILD ABORTED ***

>How-To-Repeat:
1. Run Debian 8, install necessary building prerequisites.
2. Download sets from here: http://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/source/sets/
3. Extract sets and cd usr/src.
4. sudo ./build.sh -m evbarm -a earmv7hf -u release
5. (After receiving the above errors, try again with 'su' instead of 'sudo')

>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux
 3.16 host.
Date: Mon, 8 Aug 2016 16:17:09 +0000

 On Mon, Aug 08, 2016 at 02:55:00PM +0000, nickpeteromalley@gmail.com wrote:
  > === Populating ffs filesystem ===
  > nbmakefs: unknown group `root'
  > nbmakefs: failed at line 1709 of the specification

 It would be helpful to know what file this is associated with. Try
 "grep gname=root" in METALOG.sanitized (I think that's the right file)
 which appears in destdir.evbarm, which according to your build log is
 here: /home/np/netbsd/usr/src/obj/destdir.evbarm

 Most likely what's happening is that earlier in the build the build
 host group name is leaking in where it shouldn't be.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Nickolas Peter <nickpeteromalley@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux 3.16 host.
Date: Mon, 8 Aug 2016 18:07:24 -0400

 --94eb2c19a4f0237bf0053996a4fd
 Content-Type: text/plain; charset=UTF-8

 Thanks for the quick response, David. After talking with some people in the
 irc channel, they strongly suggested that the error was due to running
 build.sh in privileged mode. They also suggested I start over and rebuild
 with the '-U' flag, so I followed their advice. The build just finished
 successfully. Unfortunately I removed the original directory that I build
 as root, so I don't have the sanitized METALOG file. I wish I had kept it,
 in case others have come across this issue. I guess the workaround is just
 to run build.sh unprivileged.

 Thanks,

 Nick

 On Mon, Aug 8, 2016 at 12:20 PM, David Holland <dholland-bugs@netbsd.org>
 wrote:

 > The following reply was made to PR port-evbarm/51399; it has been noted by
 > GNATS.
 >
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux
 >  3.16 host.
 > Date: Mon, 8 Aug 2016 16:17:09 +0000
 >
 >  On Mon, Aug 08, 2016 at 02:55:00PM +0000, nickpeteromalley@gmail.com
 > wrote:
 >   > === Populating ffs filesystem ===
 >   > nbmakefs: unknown group `root'
 >   > nbmakefs: failed at line 1709 of the specification
 >
 >  It would be helpful to know what file this is associated with. Try
 >  "grep gname=root" in METALOG.sanitized (I think that's the right file)
 >  which appears in destdir.evbarm, which according to your build log is
 >  here: /home/np/netbsd/usr/src/obj/destdir.evbarm
 >
 >  Most likely what's happening is that earlier in the build the build
 >  host group name is leaking in where it shouldn't be.
 >
 >  --
 >  David A. Holland
 >  dholland@netbsd.org
 >
 >

 --94eb2c19a4f0237bf0053996a4fd
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr">Thanks for the quick response, David. After talking with s=
 ome people in the irc channel, they strongly suggested that the error was d=
 ue to running build.sh in privileged mode. They also suggested I start over=
  and rebuild with the &#39;-U&#39; flag, so I followed their advice. The bu=
 ild just finished successfully. Unfortunately I removed the original direct=
 ory that I build as root, so I don&#39;t have the sanitized METALOG file. I=
  wish I had kept it, in case others have come across this issue. I guess th=
 e workaround is just to run build.sh unprivileged.<div><br></div><div>Thank=
 s,</div><div><br></div><div>Nick</div></div><div class=3D"gmail_extra"><br>=
 <div class=3D"gmail_quote">On Mon, Aug 8, 2016 at 12:20 PM, David Holland <=
 span dir=3D"ltr">&lt;<a href=3D"mailto:dholland-bugs@netbsd.org" target=3D"=
 _blank">dholland-bugs@netbsd.org</a>&gt;</span> wrote:<br><blockquote class=
 =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
 ing-left:1ex">The following reply was made to PR port-evbarm/51399; it has =
 been noted by GNATS.<br>
 <br>
 From: David Holland &lt;<a href=3D"mailto:dholland-bugs@netbsd.org">dhollan=
 d-bugs@netbsd.org</a>&gt;<br>
 To: gnats-bugs@NetBSD.org<br>
 Cc:<br>
 Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux<b=
 r>
 =C2=A03.16 host.<br>
 Date: Mon, 8 Aug 2016 16:17:09 +0000<br>
 <br>
 =C2=A0On Mon, Aug 08, 2016 at 02:55:00PM +0000, <a href=3D"mailto:nickpeter=
 omalley@gmail.com">nickpeteromalley@gmail.com</a> wrote:<br>
 =C2=A0 &gt; =3D=3D=3D Populating ffs filesystem =3D=3D=3D<br>
 =C2=A0 &gt; nbmakefs: unknown group `root&#39;<br>
 =C2=A0 &gt; nbmakefs: failed at line 1709 of the specification<br>
 <br>
 =C2=A0It would be helpful to know what file this is associated with. Try<br=
 >
 =C2=A0&quot;grep gname=3Droot&quot; in METALOG.sanitized (I think that&#39;=
 s the right file)<br>
 =C2=A0which appears in destdir.evbarm, which according to your build log is=
 <br>
 =C2=A0here: /home/np/netbsd/usr/src/obj/<wbr>destdir.evbarm<br>
 <br>
 =C2=A0Most likely what&#39;s happening is that earlier in the build the bui=
 ld<br>
 =C2=A0host group name is leaking in where it shouldn&#39;t be.<br>
 <br>
 =C2=A0--<br>
 =C2=A0David A. Holland<br>
 =C2=A0<a href=3D"mailto:dholland@netbsd.org">dholland@netbsd.org</a><br>
 <br>
 </blockquote></div><br></div>

 --94eb2c19a4f0237bf0053996a4fd--

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux
 3.16 host.
Date: Sun, 14 Aug 2016 18:34:07 +0000

 On Mon, Aug 08, 2016 at 10:10:01PM +0000, Nickolas Peter wrote:
  >  Thanks for the quick response, David. After talking with some people in the
  >  irc channel, they strongly suggested that the error was due to running
  >  build.sh in privileged mode. They also suggested I start over and rebuild
  >  with the '-U' flag, so I followed their advice. The build just finished
  >  successfully. Unfortunately I removed the original directory that I build
  >  as root, so I don't have the sanitized METALOG file. I wish I had kept it,
  >  in case others have come across this issue. I guess the workaround is just
  >  to run build.sh unprivileged.

 Hmm... the METALOG files are what's produced by an unprivileged build
 in place of chown/chmod in $DESTDIR, so you wouldn't have had them
 anyway.

 I'm not sure privileged cross-builds are expected to work at all...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: nickpeteromalley@gmail.com
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux 3.16 host.
Date: Sun, 14 Aug 2016 21:04:32 +0200

 On Sun, Aug 14, 2016 at 06:35:00PM +0000, David Holland wrote:
 >  I'm not sure privileged cross-builds are expected to work at all...

 FWIW, I expect them to work
 (and they work for netbsd-current hosts)

 Martin

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: port-evbarm-maintainer@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, nickpeteromalley@gmail.com
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux
 3.16 host.
Date: Sun, 14 Aug 2016 21:18:07 +0200

 On Sun, Aug 14, 2016 at 07:05:01PM +0000, Martin Husemann wrote:
 > The following reply was made to PR port-evbarm/51399; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: nickpeteromalley@gmail.com
 > Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux 3.16 host.
 > Date: Sun, 14 Aug 2016 21:04:32 +0200
 > 
 >  On Sun, Aug 14, 2016 at 06:35:00PM +0000, David Holland wrote:
 >  >  I'm not sure privileged cross-builds are expected to work at all...
 >  
 >  FWIW, I expect them to work
 >  (and they work for netbsd-current hosts)

 NetBSD normally has the correct lists of groups, at least if the host is
 of comparative vintage as the sources to be build. That's extremely
 unlikely for cross-building from non-NetBSD.

 Joerg

From: Martin Husemann <martin@duskware.de>
To: Joerg Sonnenberger <joerg@bec.de>
Cc: gnats-bugs@NetBSD.org, nickpeteromalley@gmail.com
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux 3.16 host.
Date: Sun, 14 Aug 2016 21:37:27 +0200

 On Sun, Aug 14, 2016 at 09:18:07PM +0200, Joerg Sonnenberger wrote:
 > NetBSD normally has the correct lists of groups, at least if the host is
 > of comparative vintage as the sources to be build. That's extremely
 > unlikely for cross-building from non-NetBSD.

 Yes, I do understand the difference - but the question is what is the
 easiest fix.

 Should we check & enforce existance of all needed uid/gids on the host?
 Or tanslate all named references to target integer ones?

 If there is no easy fix, we might make it officially desupported and
 fail early.

 Martin

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-evbarm/51399: evbarm7hf release fails to build on Linux
 3.16 host.
Date: Sun, 14 Aug 2016 23:20:49 +0000

 On Sun, Aug 14, 2016 at 07:40:01PM +0000, Martin Husemann wrote:
  >  > NetBSD normally has the correct lists of groups, at least if the host is
  >  > of comparative vintage as the sources to be build. That's extremely
  >  > unlikely for cross-building from non-NetBSD.
  >  
  >  Yes, I do understand the difference - but the question is what is the
  >  easiest fix.
  >  
  >  Should we check & enforce existance of all needed uid/gids on the host?
  >  Or tanslate all named references to target integer ones?
  >  
  >  If there is no easy fix, we might make it officially desupported and
  >  fail early.

 I don't think there's any reason to expect it to work.

 There was some talk a while back about making all builds unprivileged,
 and that seems like a good plan too...

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Sun, 15 May 2022 19:46:25 +0000
State-Changed-Why:
Fixed by using unprivileged build.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.