NetBSD Problem Report #57893

From www@netbsd.org  Tue Jan 30 09:22:37 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 20D901A9238
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Jan 2024 09:22:37 +0000 (UTC)
Message-Id: <20240130092235.645441A9239@mollari.NetBSD.org>
Date: Tue, 30 Jan 2024 09:22:35 +0000 (UTC)
From: jbglaw@lug-owl.de
Reply-To: jbglaw@lug-owl.de
To: gnats-bugs@NetBSD.org
Subject: ia64: `build.sh [...] iso-image` installs host's `/netbsd` instead of newly built NetBSD kernel
X-Send-Pr-Version: www-1.0

>Number:         57893
>Category:       port-ia64
>Synopsis:       ia64: `build.sh [...] iso-image` installs host's `/netbsd` instead of newly built NetBSD kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-ia64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 30 09:25:00 +0000 2024
>Last-Modified:  Tue Jan 30 11:00:02 +0000 2024
>Originator:     Jan-Benedict Glaw
>Release:        current
>Organization:
>Environment:
Silent problem on NetBSD hosts, breaking on Linux hosts.
>Description:
Hi!

When doing CI builds, I noticed that running `build.sh ... release iso-image` on a Linux box will fail:

[bld iso 2024-01-15 17:27:57] iso_image ===> distrib/ia64/cdroms/installcd
[bld iso 2024-01-15 17:27:57] mkdir -p -m 0755 "/var/lib/laminar/run/netbsd-ia64-ia64/17/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom"
[bld iso 2024-01-15 17:27:57] /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64/bin/ia64--netbsd-install -c -m 0644 /netbsd cdrom/netbsd
[bld iso 2024-01-15 17:27:57] ia64--netbsd-install: /netbsd: stat: No such file or directory
[bld iso 2024-01-15 17:27:57] 
[bld iso 2024-01-15 17:27:57] *** Failed target:  prepare
[bld iso 2024-01-15 17:27:57] *** Failed command: /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64/bin/ia64--netbsd-install -c -m 0644 /netbsd cdrom/netbsd
[bld iso 2024-01-15 17:27:57] *** Error code 1


Building in an amd64 NetBSD VM, this step succeeds, but I doubt it was actually _ment_ to put the amd64 kernel into the CD image:

[bld iso 2024-01-18 09:14:00] iso_image ===> distrib/ia64/cdroms/installcd
[bld iso 2024-01-18 09:14:00] mkdir -p -m 0755 "/root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom"
[bld iso 2024-01-18 09:14:00] /root/tools-ia64-ia64/bin/ia64--netbsd-install -c -m 0644 /netbsd cdrom/netbsd
[bld iso 2024-01-18 09:14:01] rm -f /root/release-ia64-ia64/images/NetBSD-10.99.10-ia64.iso
[bld iso 2024-01-18 09:14:01] if true; then                                              if [ ! -d /root/release-ia64-ia64/ia64 ]; then          echo "Missing /root/release-ia64-ia64/ia64, ab
orting";  exit 1;                                        fi;                                                     mkdir -p -m 0755 "/root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64";      release_destdir="/root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64";        cd /root/release-ia64-ia64/ia64;                        echo Copying $(pwd) to $release_destdir ...;           /root/tools-ia64-ia64/bin/nbpax --timestamp "1705439332"                                -rw -pe -v                              -s ',./binary/sets/debug.tgz,,gp' -s ',./binary/sets/xdebug.tgz,,gp' -s ',./binary/sets/debug.tar.xz,,gp' -s ',./binary/sets/xdebug.tar.xz,,gp' -s ',./installation/liveimage.*,,gp' -s ',./installation/installimage.*,,gp'                                  . $release_destdir;                             cd "/root/NetBSD-src/distrib/ia64/cdroms/installcd/obj";                                        fi
[bld iso 2024-01-18 09:14:01] Copying /root/release-ia64-ia64/ia64 to /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64 ...
[bld iso 2024-01-18 09:14:01] /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64/.
[bld iso 2024-01-18 09:14:01] /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64/./binary
[bld iso 2024-01-18 09:14:01] /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64/./binary/sets
[bld iso 2024-01-18 09:14:01] /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64/./binary/sets/kern-GENERIC.tgz
[bld iso 2024-01-18 09:14:01] /root/NetBSD-src/distrib/ia64/cdroms/installcd/obj/cdrom/ia64/./binary/sets/kern-GENERIC.SKI.tgz


Full build logs can be found at
http://toolchain.lug-owl.de/laminar/jobs/netbsd-ia64-ia64  (Linux VM building NetBSD)
http://toolchain.lug-owl.de/laminar/jobs/nnetbsd-ia64-ia64 (NetBSD VM building NetBSD)

I'm not too sure how relevant the ia64 stuff is these days, but this glitch also affects the releng builds. Since this issue wasn't introduced recently, I guess that the NetBSD Install ISO isn't too much tested at all.
>How-To-Repeat:
On a non-NetBSD system:

./build.sh -N 3 -P -U -u -m ia64 -a ia64 -E -D /var/lib/laminar/run/netbsd-ia64-ia64/17/dest-ia64-ia64 -R /var/lib/laminar/run/netbsd-ia64-ia64/17/release-ia64-ia64 -T /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64 tools
./build.sh -N 3 -P -U -u -m ia64 -a ia64 -E -D /var/lib/laminar/run/netbsd-ia64-ia64/17/dest-ia64-ia64 -R /var/lib/laminar/run/netbsd-ia64-ia64/17/release-ia64-ia64 -T /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64 libs
./build.sh -N 3 -P -U -u -m ia64 -a ia64 -E -D /var/lib/laminar/run/netbsd-ia64-ia64/17/dest-ia64-ia64 -R /var/lib/laminar/run/netbsd-ia64-ia64/17/release-ia64-ia64 -T /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64 release
./build.sh -N 3 -P -U -u -m ia64 -a ia64 -E -D /var/lib/laminar/run/netbsd-ia64-ia64/17/dest-ia64-ia64 -R /var/lib/laminar/run/netbsd-ia64-ia64/17/release-ia64-ia64 -T /var/lib/laminar/run/netbsd-ia64-ia64/17/tools-ia64-ia64 iso-image
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-ia64/57893: ia64: `build.sh [...] iso-image` installs
 host's `/netbsd` instead of newly built NetBSD kernel
Date: Tue, 30 Jan 2024 10:46:51 +0100

 On Tue, Jan 30, 2024 at 09:25:00AM +0000, jbglaw@lug-owl.de wrote:
 > I'm not too sure how relevant the ia64 stuff is these days, but this
 > glitch also affects the releng builds. Since this issue wasn't
 > introduced recently, I guess that the NetBSD Install ISO isn't too much
 > tested at all.

 Sind the ia64 port does not boot to multiuser (AFAIK), it certainly
 isn't tested at all.

 Martin

From: Taylor R Campbell <riastradh@NetBSD.org>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-ia64/57893: ia64: `build.sh [...] iso-image` installs host's `/netbsd` instead of newly built NetBSD kernel
Date: Tue, 30 Jan 2024 10:55:10 +0000

 Wild guess after 30sec of looking: Missing setting of CDINSTKERNEL in
 this makefile?

 Maybe we should put a .error in Makefile.bootcd to detect this case a
 little more obviously.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.