Bug#783433: --firmware-chroot doesn't work
Package: live-build
Version: 3.0.5-1
Severity: important
Tags: patch
Hi folks,
I built some live images for the Jessie release, but during testing
Luk spotted (#783318) that the non-free images including firmware
didn't actually have those firmware packages installed in the
chroot. I've tested and confirmed this, despite using the
--firmware-chroot flag in the build.
I've tracked down what appears to be the problem. In chroot_firmware,
there is code to remove prism2-usb-firmware-installer as a "broken
package". Unfortunately, the "grep -v" in that line is removing *all*
the firmware packages from the list in the shell variable
$FIRMWARE_PACKAGES. The patch here works for me, parsing out the
firmware packages individually.
diff --git a/scripts/build/chroot_firmware b/scripts/build/chroot_firmware
index 0b237cd..bb41b50 100755
--- a/scripts/build/chroot_firmware
+++ b/scripts/build/chroot_firmware
@@ -91,7 +91,18 @@ then
fi
# Remove broken packages
-FIRMWARE_PACKAGES="$(echo ${FIRMWARE_PACKAGES} | grep -v prism2-usb-firmware-installer || true)"
+FIRMWARE_PACKAGES1="${FIRMWARE_PACKAGES}"
+FIRMWARE_PACKAGES=""
+for pkg in ${FIRMWARE_PACKAGES1}; do
+ case $pkg in
+ *prism2-usb-firmware-installer*)
+ echo "Not installing prism2-usb-firmware-installer"
+ ;;
+ *)
+ FIRMWARE_PACKAGES="$FIRMWARE_PACKAGES $pkg"
+ ;;
+ esac
+done
# Drop section and keep package names only
for _PACKAGE in ${FIRMWARE_PACKAGES}
-- Package-specific info:
-- System Information:
Debian Release: 7.8
APT prefers oldoldstable
APT policy: (500, 'oldoldstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages live-build depends on:
ii debootstrap 1.0.48+deb7u2
Versions of packages live-build recommends:
ii cpio 2.11+dfsg-0.1+deb7u1
pn gnu-fdisk <none>
ii live-boot-doc 3.0.1-1
ii live-config-doc 3.0.23-1+deb7u1
ii live-manual-html [live-manual] 1:3.0.2-1
Versions of packages live-build suggests:
ii debian-keyring 2013.04.21
ii dosfstools 3.0.13-1.1
ii fakeroot 1.18.4-2
ii git 1:1.7.10.4-1+wheezy1
ii gpgv 1.4.12-7+deb7u7
pn loadlin <none>
ii memtest86+ 4.20-1.1
ii mtd-tools 20090606-1
ii mtd-utils [mtd-tools] 1:1.5.0-1
ii mtools 4.0.17-1
ii parted 2.3-12
ii sudo 1.8.5p2-1+nmu2
ii syslinux 2:4.05+dfsg-6+deb7u1
ii uuid-runtime 2.20.1-5.3
ii win32-loader 0.7.4.7+deb7u2
ii xorriso 1.2.2-2
-- no debconf information
Reply to: