[Pkg-raspi-maintainers] Bug#968376: chroot postinst failure modes
Ryan Finnie
ryan at finnie.org
Thu Aug 13 22:11:46 BST 2020
Package: raspi-firmware
Version: 1.20200601-2
Severity: important
/etc/kernel/postinst.d/z50-raspi-firmware will fail in the following
situations:
1) findmnt fails. It attempts to mitigate this:
ROOTPART=`findmnt -n --output=source /`
if [ -z "$ROOTPART" ]; then ROOTPART=/dev/mmcblk0p2;fi
But findmnt will exit 1 and fail -e, so this is needed:
ROOTPART=`findmnt -n --output=source / || true`
if [ -z "$ROOTPART" ]; then ROOTPART=/dev/mmcblk0p2;fi
2) dtbs don't exist for kernel being considered:
for dtb in ${dtb_path}/bcm*.dtb; do
[ -e "${dtb}" ] && cp "${dtb}" /boot/firmware/
[ will exit 1 in that case and fail -e, so we need to flip the test:
for dtb in ${dtb_path}/bcm*.dtb; do
[ -e "${dtb}" ] || continue
cp "${dtb}" /boot/firmware/
Context: live-build pulls in all packages which have files in
/lib/firmware, so raspi-firmware is installed in the arm64/armel chroot
it's building, even though it's not necessarily targeting raspi hardware
or kernel.
Thank you!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-raspi-maintainers/attachments/20200813/3c8a674c/attachment.sig>
More information about the Pkg-raspi-maintainers
mailing list