Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1043133: live-build fails with debian 12.1 becuase it expects linux-firmware

725 views
Skip to first unread message

Chris Ward

unread,
Aug 6, 2023, 8:10:05 AM8/6/23
to
Package: live-build
Version: 1:20230502
Severity: important
X-Debbugs-Cc: tj...@cantab.net

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?
I installed debian 12.1 in a VM and installed the live-build package
* What exactly did you do (or not do) that was effective (or
ineffective)?
I attempted to use live-build to build an ISO
* What was the outcome of this action?
I got an error message about linux-firmware not being available
* What outcome did you expect instead?
A successful build of a live ISO

*** End of the template - remove these template lines ***


-- Package-specific info:

-- System Information:
Debian Release: 12.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages live-build depends on:
ii debootstrap 1.0.128+nmu2

Versions of packages live-build recommends:
ii apt-utils 2.6.1
ii bzip2 1.0.8-5+b1
ii cpio 2.13+dfsg-7.1
ii cryptsetup 2:2.6.1-4~deb12u1
ii file 1:5.44-3
ii live-boot-doc 1:20230131
ii live-config-doc 11.0.3+nmu1
ii live-manual-html [live-manual] 2:20151217.2
ii rsync 3.2.7-1
ii systemd-container 252.12-1~deb12u1
ii wget 1.21.3-1+b2
ii xz-utils 5.4.1-0.2

Versions of packages live-build suggests:
ii e2fsprogs 1.47.0-2
pn mtd-utils <none>
ii parted 3.5-3

-- no debconf information

Chris Ward

unread,
Aug 6, 2023, 9:30:05 AM8/6/23
to
I revised 2 files along the lines of

tjcw@debian:~/lb$ fgrep -A 2 -r firmware-linux /usr/lib/live/build
/usr/lib/live/build/chroot_firmware:# Manually add firmware-linux meta
package if available
/usr/lib/live/build/chroot_firmware:# 20230806 tjcw firmware-linux no
longer shipped as separate package
/usr/lib/live/build/chroot_firmware:#if [ $(apt-cache show
"^firmware-linux$" 2> /dev/null | grep "^Package:" | wc -l) -eq 1 ]
/usr/lib/live/build/chroot_firmware-#then
/usr/lib/live/build/chroot_firmware:#
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
/usr/lib/live/build/chroot_firmware-#fi
/usr/lib/live/build/chroot_firmware-
--
/usr/lib/live/build/installer_debian-installer:        # Manually add
firmware-linux meta package if available
/usr/lib/live/build/installer_debian-installer:                #
20230806 tjcw no firmware-linux any more
/usr/lib/live/build/installer_debian-installer:        #if [ $(apt-cache
show "^firmware-linux$" 2> /dev/null | grep "^Package:" | wc -l) -eq 1 ]
/usr/lib/live/build/installer_debian-installer-        #then
/usr/lib/live/build/installer_debian-installer:        #
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
/usr/lib/live/build/installer_debian-installer-        #fi
/usr/lib/live/build/installer_debian-installer-
tjcw@debian:~/lb$


and now I can run the live builds that I want to run


Chris Ward.

Roland Clobus

unread,
Aug 6, 2023, 9:51:52 AM8/6/23
to
Hello Chris,

On 06/08/2023 15:17, Chris Ward wrote:
> I revised 2 files along the lines of
...
> and now I can run the live builds that I want to run

I've seen the issue as well and have prepared a fix in git at [1].
This fix has not been released yet.

As you wrote in the first mail, you are using Debian 12.1 to build an
image. Unfortunately such fixes cannot flow back into Debian stable, so
for building Debian 12.1 images you'll have to use the git version of
live-build for now. See the instructions at [2].

With kind regards,
Roland Clobus

[1]
https://salsa.debian.org/live-team/live-build/-/commit/ba34bfbfd0efdd6c036496f960bf4df1f42ba332
[2] https://wiki.debian.org/ReproducibleInstalls/LiveImages
Section "Use case: while preparing new hooks, using the local git
checkout of `live-build`" -> The environment variable LIVE_BUILD must be
correctly set

OpenPGP_signature

Chris Ward

unread,
Aug 6, 2023, 11:30:05 AM8/6/23
to
The following fixes the bug for me. It may need adjusting so that it
can work both for debian 12.0 and previous, and for debian 12.11 where
'firmware-linux' is no longer a separate item.

The patch to binary_rootfs fixes a bug that I reported previously.

diff --git a/./binary_rootfs b/home/tjcw/live-build/binary_rootfs
index af8448d..080ee15 100755
--- a/./binary_rootfs
+++ b/home/tjcw/live-build/binary_rootfs
@@ -106,7 +106,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
dd if=/dev/zero
of=chroot/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0
seek=${REAL_DIM}

FAKE_MTAB=false
- if ! Chroot chroot "test -s /etc/mtab"
+ if ! Chroot chroot "test -e /etc/mtab"
then
Chroot chroot "ln -s
/proc/mounts/mtab /etc/mtab"
FAKE_MTAB=true
diff --git a/./chroot_firmware b/home/tjcw/live-build/chroot_firmware
index e22068f..6272c9e 100755
--- a/./chroot_firmware
+++ b/home/tjcw/live-build/chroot_firmware
@@ -54,10 +54,11 @@ Check_package host /usr/bin/wget wget
FIRMWARE_PACKAGES=""

# Manually add firmware-linux meta package if available
-if [ $(apt-cache show "^firmware-linux$" 2> /dev/null | grep
"^Package:" | wc -l) -eq 1 ]
-then
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
-fi
+# 20230806 tjcw firmware-linux no longer shipped as separate package
+#if [ $(apt-cache show "^firmware-linux$" 2> /dev/null | grep
"^Package:" | wc -l) -eq 1 ]
+#then
+# FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+#fi

Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}"
"${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"

diff --git a/./installer_debian-installer
b/home/tjcw/live-build/installer_debian-installer
index c28b516..edc5edb 100755
--- a/./installer_debian-installer
+++ b/home/tjcw/live-build/installer_debian-installer
@@ -402,10 +402,11 @@ then
FIRMWARE_PACKAGES=""

# Manually add firmware-linux meta package if available
- if [ $(apt-cache show "^firmware-linux$" 2> /dev/null
| grep "^Package:" | wc -l) -eq 1 ]
- then
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
- fi
+ # 20230806 tjcw no firmware-linux any more
+ #if [ $(apt-cache show "^firmware-linux$" 2> /dev/null
| grep "^Package:" | wc -l) -eq 1 ]
+ #then
+ # FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+ #fi

Firmware_List_From_Contents
"${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}"
"${LB_PARENT_ARCHIVE_AREAS}"

Chris Ward

unread,
Aug 6, 2023, 12:40:04 PM8/6/23
to
Now 2 patches

diff --git a/chroot_firmware b/chroot_firmware.1
index e22068f..d061c42 100755
--- a/chroot_firmware
+++ b/chroot_firmware.1
@@ -54,10 +54,11 @@ Check_package host /usr/bin/wget wget
FIRMWARE_PACKAGES=""

# Manually add firmware-linux meta package if available
-if [ $(apt-cache show "^firmware-linux$" 2> /dev/null | grep
"^Package:" | wc -l) -eq 1 ]
-then
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
-fi
+# tjcw 20230806 firmware now in base install with debian 12.1
+#if [ $(apt-cache show "^firmware-linux$" 2> /dev/null | grep
"^Package:" | wc -l) -eq 1 ]
+#then
+# FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+#fi

Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}"
"${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"

and

diff --git a/installer_debian-installer b/installer_debian-installer.1
index c28b516..5b3819a 100755
--- a/installer_debian-installer
+++ b/installer_debian-installer.1
@@ -402,10 +402,11 @@ then
FIRMWARE_PACKAGES=""

# Manually add firmware-linux meta package if available
- if [ $(apt-cache show "^firmware-linux$" 2> /dev/null
| grep "^Package:" | wc -l) -eq 1 ]
- then
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
- fi
+ # 20230806 tjcw Already in base linux with debian 12.1
+ #if [ $(apt-cache show "^firmware-linux$" 2> /dev/null
| grep "^Package:" | wc -l) -eq 1 ]
+ #then
+ # FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+ #fi

Firmware_List_From_Contents
"${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}"
"${LB_PARENT_ARCHIVE_AREAS}"

Chris Ward

Roland Clobus

unread,
Aug 6, 2023, 1:01:59 PM8/6/23
to
Hello Chris,

On 06/08/2023 17:19, Chris Ward wrote:
> The following fixes the bug for me. It may need adjusting so that it
> can work both for debian 12.0 and previous, and for debian 12.11 where
> 'firmware-linux' is no longer a separate item.
>
> The patch to binary_rootfs fixes a bug that I reported previously.

My previous reply was blocked by Google, but this one should pass.

See my reply [1] for a patch which was already applied in git.

Actually 'firmware-linux' still is available [2], but it moved to
'non-free-firmware', which you might want to include in your own images.

I'll take a look at the 'ext4' issue (#1032408) soon, let's keep the
topic for each bug report separate.

In general, building a bookworm image, typically requires either a
bookworm+1 basic image, or a fresh git repo.

With kind regards,
Roland Clobus

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043133#15
[2] https://packages.debian.org/search?keywords=firmware-linux
OpenPGP_signature

Chris Ward

unread,
Aug 6, 2023, 5:40:04 PM8/6/23
to
The patches I have on to live-build are here
https://github.com/tjcw/screensavers/tree/bookworm/patches . The
isolinux patch is a choice; for my purposes I want the live build to
display the splash screen before booting. And it may be that just one
of the chroot and installer patches is sufficient, or that something
here should be done a different way; I just hunted for
"firmware-linux" and dummied out all the references that I found.

Chris Ward.
0 new messages