Hello,
I'm using mkosi project to build Debian system container images, which has recently switched from using debootstrap to plain apt.
After the change, it's not possible to build Bookworm armhf container with sane-utils package. This is because, for some reason, apt configures sane-utils before libsane1, but expects libsane1 post-install script to create scanner group beforehand. This is reproducible without mkosi, just with apt, and happens only when running apt on foreign architecture.
Mkosi developers told me this is sane packaging issue, and I already have contacted sane maintainer. However mkosi runs apt with APT::Immediate-Configure=off option, and I'd like to know from apt developers whether this is reasonable to use it in this case, or could it create more issues then good.
Please check the response of mkosi developers at https://github.com/systemd/mkosi/issues/3310
The issue reproducible with just debootstrap+apt, and affects armhf and aarch64 at least. Commands are attached. I used podman container with bookworm to run it.
The result is the following:
Setting up
sane-utils:armhf (1.2.1-2) ...
debconf:
unable to initialize frontend: Dialog
debconf:
(No usable dialog-like program is installed, so the dialog
based frontend cannot be used. at
/usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf:
falling back to frontend: Readline
Adding
saned group and user...
adduser:
The group `scanner' does not exist.
dpkg:
error processing package sane-utils:armhf (--configure):
installed
sane-utils:armhf package post-installation script subprocess
returned error exit status 1
Setting up
libperl5.36:armhf (5.36.0-7+deb12u1) ...
Setting up
update-inetd (4.53) ...
debconf:
unable to initialize frontend: Dialog
debconf:
(No usable dialog-like program is installed, so the dialog
based frontend cannot be used. at
/usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf:
falling back to frontend: Readline
Setting up
libsane1:armhf (1.2.1-2) ...
Adding
scanner group...
Processing
triggers for libc-bin:armhf (2.36-9+deb12u9) ...
Errors
were encountered while processing:
sane-utils:armhf
E:
Sub-process /usr/bin/dpkg returned an error code (1)
mkdir /buildroot debootstrap --arch=armhf --variant=minbase bookworm /buildroot apt-get -o APT::Architecture=armhf -o APT::Architectures=armhf -o APT::Install-Recommends=false -o APT::Immediate-Configure=off -o APT::Get::Assume-Yes=true -o APT::Get::AutomaticRemove=true -o APT::Get::Allow-Change-Held-Packages=true -o APT::Get::Allow-Remove-Essential=true -o APT::Sandbox::User=root -o Acquire::AllowReleaseInfoChange=true -o Dir::Cache=/var/cache/apt -o Dir::State=/var/lib/apt -o Dir::Log=/var/log/apt -o Dir::State::Status=/buildroot/var/lib/dpkg/status -o Dir::Bin::DPkg=/usr/bin/dpkg -o Debug::NoLocking=true -o DPkg::Options::=--root=/buildroot -o DPkg::Options::=--force-unsafe-io -o DPkg::Options::=--force-architecture -o DPkg::Options::=--force-depends -o DPkg::Options::=--no-debsig -o DPkg::Use-Pty=false -o DPkg::Install::Recursive::Minimum=1000 -o pkgCacheGen::ForceEssential=, '--option=DPkg::Options::=--path-exclude=/usr/share/doc/*' '--option=DPkg::Options::=--path-exclude=/usr/share/man/*' '--option=DPkg::Options::=--path-exclude=/usr/share/groff/*' '--option=DPkg::Options::=--path-exclude=/usr/share/gtk-doc/*' '--option=DPkg::Options::=--path-exclude=/usr/share/info/*' '--option=DPkg::Options::=--path-include=/usr/share/doc/*/copyright' update apt-get -o APT::Architecture=armhf -o APT::Architectures=armhf -o APT::Install-Recommends=false -o APT::Immediate-Configure=off -o APT::Get::Assume-Yes=true -o APT::Get::AutomaticRemove=true -o APT::Get::Allow-Change-Held-Packages=true -o APT::Get::Allow-Remove-Essential=true -o APT::Sandbox::User=root -o Acquire::AllowReleaseInfoChange=true -o Dir::Cache=/var/cache/apt -o Dir::State=/var/lib/apt -o Dir::Log=/var/log/apt -o Dir::State::Status=/buildroot/var/lib/dpkg/status -o Dir::Bin::DPkg=/usr/bin/dpkg -o Debug::NoLocking=true -o DPkg::Options::=--root=/buildroot -o DPkg::Options::=--force-unsafe-io -o DPkg::Options::=--force-architecture -o DPkg::Options::=--force-depends -o DPkg::Options::=--no-debsig -o DPkg::Use-Pty=false -o DPkg::Install::Recursive::Minimum=1000 -o pkgCacheGen::ForceEssential=, '--option=DPkg::Options::=--path-exclude=/usr/share/doc/*' '--option=DPkg::Options::=--path-exclude=/usr/share/man/*' '--option=DPkg::Options::=--path-exclude=/usr/share/groff/*' '--option=DPkg::Options::=--path-exclude=/usr/share/gtk-doc/*' '--option=DPkg::Options::=--path-exclude=/usr/share/info/*' '--option=DPkg::Options::=--path-include=/usr/share/doc/*/copyright' install sane-utils
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature