[Bug 1976527] [NEW] live-build tries to install non-existing packages for jammy during live-image build process

Stefan Safar 1976527 at bugs.launchpad.net
Wed Jun 1 15:34:46 UTC 2022


Public bug reported:

During the process of building a live image, during chroot_firmware()
step which is run by default (controlled by --firmware-chroot parameter
of lb config), I noticed that the build process tries to install some
weird looking non-existing packages:

[2022-06-01 15:07:43] lb_chroot_install-packages install
P: Begin installing packages (install pass)...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package PLUS.txt
E: Couldn't find any package by glob 'PLUS.txt'
E: Couldn't find any package by regex 'PLUS.txt'
E: Unable to locate package Pi
E: Unable to locate package Z83-4.txt
E: Couldn't find any package by glob 'Z83-4.txt'
E: Couldn't find any package by regex 'Z83-4.txt'
P: Begin unmounting filesystems...
P: Saving caches...


I started investigating this and found out that the issue happens at this line: https://github.com/debian-live/live-build/blob/debian/scripts/build/chroot_firmware#L70

Together with the downloaded Contents file that is stored in cache/contents.chroot/contents.jammy.amd64 which contains lines like these:
lib/firmware/brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt    misc/linux-firmware
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt misc/linux-firmware
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt misc/linux-firmware
lib/firmware/brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt    misc/linux-firmware


It produces output like this:
root at 189fbc849e85:/live/tmp/cache/contents.chroot# awk '/^lib\/firmware/ { print $2 }' contents.jammy.amd64  | sort -u
PLUS.txt
Pi
Z83-4.txt
admin/amd64-microcode
admin/intel-microcode
libs/alsa-topology-conf
misc/linux-firmware
multiverse/admin/linux-firmware-xilinx-ap1302
multiverse/comm/dahdi-firmware-nonfree
multiverse/graphics/linux-firmware-xilinx-vcu
multiverse/kernel/bluez-firmware
multiverse/kernel/firmware-ast
multiverse/kernel/nouveau-firmware
multiverse/libs/libfishcamp1
multiverse/libs/libsbigudrv2
multiverse/net/atmel-firmware
net/wireless-regdb
restricted/kernel/firmware-sof-signed
restricted/libs/nvidia-kernel-common-470,restricted/libs/nvidia-kernel-common-470-server
restricted/libs/nvidia-kernel-common-510
restricted/libs/nvidia-kernel-common-510-server
universe/admin/prism2-usb-firmware-installer
universe/embedded/ixo-usb-jtag
universe/misc/firmware-ath9k-htc
universe/science/indi-dsi
universe/video/hdmi2usb-fx2-firmware


The core issue seems to be that there are unquoted spaces in the
Contents file which live-build with --firmware-chroot does not expect,
see the code linked above.


Steps to reproduce:
1) Install Ubuntu Jammy 22.04
2) apt-get -y install vim live-build fdisk
3) lb config --distribution jammy --debian-installer live --binary-images netboot --debconf-frontend noninteractive --chroot-filesystem squashfs --archive-areas "main restricted universe multiverse" --apt-options "--yes" --bootappend-live "keyboard-layouts=no" --mode ubuntu
4) lb build


If I run the lb config command (step 3) with an explicit --firmware-
chroot false, the bug does not happen and I can successfully build an
image.


OS: Description:	Ubuntu 22.04 LTS Release:	22.04
live-build version: 3.0~a57-1ubuntu41

** Affects: live-build (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to live-build in Ubuntu.
https://bugs.launchpad.net/bugs/1976527

Title:
  live-build tries to install non-existing packages for jammy during
  live-image build process

Status in live-build package in Ubuntu:
  New

Bug description:
  During the process of building a live image, during chroot_firmware()
  step which is run by default (controlled by --firmware-chroot
  parameter of lb config), I noticed that the build process tries to
  install some weird looking non-existing packages:

  [2022-06-01 15:07:43] lb_chroot_install-packages install
  P: Begin installing packages (install pass)...
  Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package PLUS.txt
  E: Couldn't find any package by glob 'PLUS.txt'
  E: Couldn't find any package by regex 'PLUS.txt'
  E: Unable to locate package Pi
  E: Unable to locate package Z83-4.txt
  E: Couldn't find any package by glob 'Z83-4.txt'
  E: Couldn't find any package by regex 'Z83-4.txt'
  P: Begin unmounting filesystems...
  P: Saving caches...

  
  I started investigating this and found out that the issue happens at this line: https://github.com/debian-live/live-build/blob/debian/scripts/build/chroot_firmware#L70

  Together with the downloaded Contents file that is stored in cache/contents.chroot/contents.jammy.amd64 which contains lines like these:
  lib/firmware/brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt    misc/linux-firmware
  lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt misc/linux-firmware
  lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt misc/linux-firmware
  lib/firmware/brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt    misc/linux-firmware


  It produces output like this:
  root at 189fbc849e85:/live/tmp/cache/contents.chroot# awk '/^lib\/firmware/ { print $2 }' contents.jammy.amd64  | sort -u
  PLUS.txt
  Pi
  Z83-4.txt
  admin/amd64-microcode
  admin/intel-microcode
  libs/alsa-topology-conf
  misc/linux-firmware
  multiverse/admin/linux-firmware-xilinx-ap1302
  multiverse/comm/dahdi-firmware-nonfree
  multiverse/graphics/linux-firmware-xilinx-vcu
  multiverse/kernel/bluez-firmware
  multiverse/kernel/firmware-ast
  multiverse/kernel/nouveau-firmware
  multiverse/libs/libfishcamp1
  multiverse/libs/libsbigudrv2
  multiverse/net/atmel-firmware
  net/wireless-regdb
  restricted/kernel/firmware-sof-signed
  restricted/libs/nvidia-kernel-common-470,restricted/libs/nvidia-kernel-common-470-server
  restricted/libs/nvidia-kernel-common-510
  restricted/libs/nvidia-kernel-common-510-server
  universe/admin/prism2-usb-firmware-installer
  universe/embedded/ixo-usb-jtag
  universe/misc/firmware-ath9k-htc
  universe/science/indi-dsi
  universe/video/hdmi2usb-fx2-firmware


  The core issue seems to be that there are unquoted spaces in the
  Contents file which live-build with --firmware-chroot does not expect,
  see the code linked above.


  Steps to reproduce:
  1) Install Ubuntu Jammy 22.04
  2) apt-get -y install vim live-build fdisk
  3) lb config --distribution jammy --debian-installer live --binary-images netboot --debconf-frontend noninteractive --chroot-filesystem squashfs --archive-areas "main restricted universe multiverse" --apt-options "--yes" --bootappend-live "keyboard-layouts=no" --mode ubuntu
  4) lb build


  If I run the lb config command (step 3) with an explicit --firmware-
  chroot false, the bug does not happen and I can successfully build an
  image.


  OS: Description:	Ubuntu 22.04 LTS Release:	22.04
  live-build version: 3.0~a57-1ubuntu41

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/live-build/+bug/1976527/+subscriptions




More information about the foundations-bugs mailing list