Package: src:debian-installer Version: 20160112 Severity: important Tags: patch pending User: debian-bsd@lists.debian.org Usertags: kfreebsd
Hi, d-i daily builds of kfreebsd-amd64 started to have problems beginning with: https://d-i.debian.org/daily-images/kfreebsd-amd64/20160406-00:06/build_netboot-gtk-10.log When makefs created the initramfs, it had an error, but left a broken/truncated output file. Within the case statement, an error there is ignored and gzip will try to compress the output file. If that succeeds, it returns a success status to make, and the build continues... This could affect linux too. A patch is attached; I'll commit it as soon as the BTS gives me a bug number. Thanks! | case ufs1 in \ | ext2) \ | genext2fs -d ./tmp/netboot-gtk-10/tree -b `expr $(du -s ./tmp/netboot-gtk-10/tree | cut -f 1) + $(expr $(find ./tmp/netboot-gtk-10/tree | wc -l) \* 2)` -m 0 ./tmp/netboot-gtk-10/initrd; \ | e2fsck -fy ./tmp/netboot-gtk-10/initrd || true; \ | gzip -n -v9f ./tmp/netboot-gtk-10/initrd; \ | ;; \ | initramfs) \ | (cd ./tmp/netboot-gtk-10/tree && find . | sort | cpio --quiet -o -H newc) > ./tmp/netboot-gtk-10/initrd; \ | gzip -n -v9f ./tmp/netboot-gtk-10/initrd; \ | ;; \ | jffs2) \ | -d ./tmp/netboot-gtk-10/tree -o ./tmp/netboot-gtk-10/initrd.gz; \ | ;; \ | ufs1) \ | sh -c 'makefs -t ffs -T 1459901061 -s 68m -f 3000 -o minfree=0,version=1 $0 ./tmp/netboot-gtk-10/tree' ./tmp/netboot-gtk-10/initrd; \ | gzip -n -v9f ./tmp/netboot-gtk-10/initrd; \ | ;; \ | *) \ | echo "Unsupported filesystem type"; \ | exit 1 ;; \ | esac | Calculated size of `./tmp/netboot-gtk-10/initrd': 71303168 bytes, 4595 inodes | Extent size set to 8192 | ./tmp/netboot-gtk-10/initrd: 68.0MB (139264 sectors) block size 8192, fragment size 1024 | using 2 cylinder groups of 52.26MB, 6689 blks, 3584 inodes. | super-block backups (for fsck -b #) at: | 32, 107056,makefs: Writing inode 1578 (./tmp/netboot-gtk-10/tree/sbin/devd), bytes 188416 + 8192: No space left on device | | Populating `./tmp/netboot-gtk-10/initrd' | ./tmp/netboot-gtk-10/initrd: 61.6% -- replaced with ./tmp/netboot-gtk-10/initrd.gz -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 10.1-0-amd64 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
>From 93af24652f09144720d730a8de7f0e5e574c9947 Mon Sep 17 00:00:00 2001 From: Steven Chamberlain <ste...@pyro.eu.org> Date: Sun, 17 Apr 2016 00:09:33 +0100 Subject: [PATCH] Handle error creating initramfs (Closes: #xxxxxx) The case statement returns only the last-executed command's status, potentially ignoring errors creating the initramfs. Use `set -e` so that any error is returned immediately to make. --- build/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Makefile b/build/Makefile index ec1953b..cff44e0 100644 --- a/build/Makefile +++ b/build/Makefile @@ -707,6 +707,7 @@ endif install -d $(TEMP) + set -e; \ case $(INITRD_FS) in \ ext2) \ $(genext2fs) $(TEMP)/initrd; \ -- 1.8.4.rc3