NetBSD Problem Report #58211
From tsutsui@ceres.dti.ne.jp Sun Apr 28 19:33:26 2024
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 8FF881A9238
for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Apr 2024 19:33:26 +0000 (UTC)
Message-Id: <202404281933.43SJX8An018158@ceres.dti.ne.jp>
Date: Mon, 29 Apr 2024 04:33:09 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: hp300 base.tgz doesn't include hard-linked files in /usr/mdec/
X-Send-Pr-Version: 3.95
>Number: 58211
>Category: port-hp300
>Synopsis: hp300 base.tgz doesn't include hard-linked files in /usr/mdec/
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: tsutsui
>State: pending-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 28 19:35:00 +0000 2024
>Closed-Date:
>Last-Modified: Sat May 11 14:40:03 +0000 2024
>Originator: Izumi Tsutsui
>Release: NetBSD 10.0, netbsd-9 is also affected
>Organization:
>Environment:
System: NetBSD 10.0
Architecture: m68k
Machine: hp300
>Description:
src/distrib/sets/lists/base/md.hp300 includes following bootloader files:
---
# $NetBSD: md.hp300,v 1.41 2011/02/07 18:11:28 tsutsui Exp $
./usr/mdec/bootct base-sysutil-bin
./usr/mdec/bootrd base-sysutil-bin
./usr/mdec/bootsd base-sysutil-bin
./usr/mdec/ctboot base-sysutil-bin
./usr/mdec/inst.lif base-sysutil-bin
./usr/mdec/installboot base-sysutil-bin
./usr/mdec/mkboot base-sysutil-bin
./usr/mdec/rbootd base-sysutil-bin
./usr/mdec/rbootd/SYS_INST base-sysutil-bin
./usr/mdec/rbootd/SYS_UBOOT base-sysutil-bin
./usr/mdec/rdboot base-sysutil-bin
./usr/mdec/sdboot base-sysutil-bin
./usr/mdec/uboot.lif base-sysutil-bin
---
but NetBSD/NetBSD-10.0/hp300/binary/sets/base.tgz doesn't include
hardlinked files in it:
---
% ftp http://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/hp300/binary/sets/base.tgz
Trying [2a04:4e42:8c::262]:80 ...
Requesting http://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/hp300/binary/sets/base.tgz
100% |***********************************| 54456 KiB 1.66 MiB/s 00:00 ETA
55763809 bytes retrieved in 00:31 (1.66 MiB/s)
% tar -ztvf base.tgz ./usr/mdec
drwxr-xr-x 0 root wheel 0 Mar 28 17:33 ./usr/mdec
-r--r--r-- 0 root wheel 84840 Mar 28 17:33 ./usr/mdec/inst.lif
-r-xr-xr-x 0 root wheel 524 Mar 28 17:33 ./usr/mdec/installboot
-r-xr-xr-x 0 root wheel 10804 Mar 28 17:33 ./usr/mdec/mkboot
-r--r--r-- 0 root wheel 79416 Mar 28 17:33 ./usr/mdec/uboot.lif
drwxr-xr-x 0 root wheel 0 Mar 28 17:33 ./usr/mdec/rbootd
%
---
>How-To-Repeat:
build.sh -U -m hp300 release and then check
obj.hp300/destdir.hp300/usr/mdec
and
obj.hp300/releasedir/hp300/binary/sets/base.tgz file.
Actually ${DESTDIR}/SETS.metalog.missing includes these files:
---
% cat obj.hp300/destdir.hp300/SETS.metalog.missing
./bin/[
./rescue/[
./usr/mdec/bootct
./usr/mdec/bootrd
./usr/mdec/bootsd
./usr/mdec/ctboot
./usr/mdec/rbootd/SYS_INST
./usr/mdec/rbootd/SYS_UBOOT
./usr/mdec/rdboot
./usr/mdec/sdboot
./usr/share/man/html1/[.html
./usr/share/man/man1/[.1
---
(note files that include '[' look handled in SETS.metalog.extra)
>Fix:
src/sys/arch/hp300/stand/inst/Makefile and
src/sys/arch/hp300/stand/uboot/Makefile should use 'LINKS='
to create hard-links rather than manually creating them.
---
Index: sys/arch/hp300/stand/inst/Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/stand/inst/Makefile,v
retrieving revision 1.10
diff -u -p -d -r1.10 Makefile
--- sys/arch/hp300/stand/inst/Makefile 23 Sep 2019 13:42:36 -0000 1.10
+++ sys/arch/hp300/stand/inst/Makefile 28 Apr 2024 19:26:40 -0000
@@ -6,16 +6,14 @@ NEWVERSWHAT= "Miniroot Installer"
CPPFLAGS+= -DSUPPORT_ETHERNET -DSUPPORT_TAPE -DSUPPORT_DISK
+LINKS= ${BINDIR}/${PROG} ${BINDIR}/rbootd/SYS_INST
+
.include "../Makefile.buildboot"
-install:
+beforeinstall:
${INSTALL} -d -m 755 -o ${BINOWN} -g ${BINGRP} ${INSTPRIV} \
${DESTDIR}${BINDIR}/rbootd
- ${INSTALL} ${COPY} -m 444 -o ${BINOWN} -g ${BINGRP} ${INSTPRIV} \
- inst.lif ${DESTDIR}${BINDIR}/inst.lif
- rm -f ${DESTDIR}${BINDIR}/rbootd/SYS_INST
- ln ${DESTDIR}${BINDIR}/inst.lif ${DESTDIR}${BINDIR}/rbootd/SYS_INST
-release: check_RELEASEDIR .WAIT inst.lif
- ${HOST_INSTALL_FILE} -m ${NONBINMODE} inst.lif \
+release: check_RELEASEDIR .WAIT ${PROG}
+ ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/SYS_INST
Index: sys/arch/hp300/stand/uboot/Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/stand/uboot/Makefile,v
retrieving revision 1.10
diff -u -p -d -r1.10 Makefile
--- sys/arch/hp300/stand/uboot/Makefile 11 Dec 2022 07:41:37 -0000 1.10
+++ sys/arch/hp300/stand/uboot/Makefile 28 Apr 2024 19:26:40 -0000
@@ -7,28 +7,20 @@ NEWVERSWHAT= "Primary Boot"
CPPFLAGS+= -DSUPPORT_ETHERNET -DSUPPORT_TAPE -DSUPPORT_DISK
CPPFLAGS+= -DSUPPORT_UFS2
+LINKS= ${BINDIR}/${PROG} ${BINDIR}/rdboot
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/bootrd
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/sdboot
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/bootsd
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/ctboot
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/bootct
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/rbootd/SYS_UBOOT
+
.include "../Makefile.buildboot"
-install:
+beforeinstall:
${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} -m 755 \
${DESTDIR}${BINDIR}/rbootd
- ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 444 \
- uboot.lif ${DESTDIR}${BINDIR}/uboot.lif
- rm -f ${DESTDIR}${BINDIR}/rdboot
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/rdboot
- rm -f ${DESTDIR}${BINDIR}/bootrd
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/bootrd
- rm -f ${DESTDIR}${BINDIR}/sdboot
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/sdboot
- rm -f ${DESTDIR}${BINDIR}/bootsd
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/bootsd
- rm -f ${DESTDIR}${BINDIR}/ctboot
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/ctboot
- rm -f ${DESTDIR}${BINDIR}/bootct
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/bootct
- rm -f ${DESTDIR}${BINDIR}/rbootd/SYS_UBOOT
- ln ${DESTDIR}${BINDIR}/uboot.lif ${DESTDIR}${BINDIR}/rbootd/SYS_UBOOT
-release: check_RELEASEDIR .WAIT uboot.lif
- ${HOST_INSTALL_FILE} -m ${NONBINMODE} uboot.lif \
+release: check_RELEASEDIR .WAIT ${PROG}
+ ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/SYS_UBOOT
---
But I wonder why maketar (or makeflist) script under
src/distrib/sets doesn't complain about these missed files
in the SETS.metalog.missing..
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-hp300-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Mon, 29 Apr 2024 06:49:44 +0000
Responsible-Changed-Why:
I'll handle this as a port maintainer.
State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 29 Apr 2024 06:49:44 +0000
State-Changed-Why:
I have a possible fix.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-hp300/58211: hp300 base.tgz doesn't include hard-linked files
in /usr/mdec/
Date: Mon, 29 Apr 2024 15:54:37 +0900
> But I wonder why maketar (or makeflist) script under
> src/distrib/sets doesn't complain about these missed files
> in the SETS.metalog.missing..
src/distrib/sets/checkflist currently disables METALOG checks:
---
if false && [ -n "${metalog}" ]; then
# XXX: Temporarily disabled due to problems with obsolete files in metalog
compare_metalog
else
compare_destdir
fi
exit 0 # cleanup will exit with ${es}
---
It looks there is another problem for metalogs to handle '[':
---
% cat SETS.metalog.extra
./bin/\133
./rescue/\133
./usr/share/man/html1/\133.html
./usr/share/man/man1/\133.1
% cat SETS.metalog.missing
./bin/[
./rescue/[
./usr/share/man/html1/[.html
./usr/share/man/man1/[.1
%
---
Anyway, using MLINKS generates proper hardlinks in ./usr/mdec in base.tgz
so I'll commit a fix for src/sys/arch/hp300/stand Makefiles.
---
Izumi Tsutsui
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58211 CVS commit: src/sys/arch/hp300/stand
Date: Mon, 29 Apr 2024 07:13:42 +0000
Module Name: src
Committed By: tsutsui
Date: Mon Apr 29 07:13:42 UTC 2024
Modified Files:
src/sys/arch/hp300/stand/inst: Makefile
src/sys/arch/hp300/stand/uboot: Makefile
Log Message:
Use LINKS to create hard links to generate proper METALOG files.
Also use the default ${PROG} variable and "install" target.
Fixes PR port-hp300/58211.
Should be pulled up to netbsd-10 and netbsd-9.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/inst/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/uboot/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 05 May 2024 18:27:42 +0000
State-Changed-Why:
[pullup-10 #684] [pullup-9 #1838]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58211 CVS commit: [netbsd-10] src/sys/arch/hp300/stand
Date: Sat, 11 May 2024 14:38:41 +0000
Module Name: src
Committed By: martin
Date: Sat May 11 14:38:40 UTC 2024
Modified Files:
src/sys/arch/hp300/stand/inst [netbsd-10]: Makefile
src/sys/arch/hp300/stand/uboot [netbsd-10]: Makefile
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #684):
sys/arch/hp300/stand/uboot/Makefile: revision 1.11
sys/arch/hp300/stand/inst/Makefile: revision 1.11
Use LINKS to create hard links to generate proper METALOG files.
Also use the default ${PROG} variable and "install" target.
Fixes PR port-hp300/58211.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.26.1 src/sys/arch/hp300/stand/inst/Makefile
cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/arch/hp300/stand/uboot/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58211 CVS commit: [netbsd-9] src/sys/arch/hp300/stand
Date: Sat, 11 May 2024 14:39:58 +0000
Module Name: src
Committed By: martin
Date: Sat May 11 14:39:57 UTC 2024
Modified Files:
src/sys/arch/hp300/stand/inst [netbsd-9]: Makefile
src/sys/arch/hp300/stand/uboot [netbsd-9]: Makefile
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1838):
sys/arch/hp300/stand/uboot/Makefile: revision 1.11
sys/arch/hp300/stand/inst/Makefile: revision 1.11
Use LINKS to create hard links to generate proper METALOG files.
Also use the default ${PROG} variable and "install" target.
Fixes PR port-hp300/58211.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.170.1 src/sys/arch/hp300/stand/inst/Makefile
cvs rdiff -u -r1.8 -r1.8.198.1 src/sys/arch/hp300/stand/uboot/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.