NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-hp300/58211: hp300 base.tgz doesn't include hard-linked files in /usr/mdec/



>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:    port-hp300-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 28 19:35:00 +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



Home | Main Index | Thread Index | Old Index