commit f9a1f0200b1bc0ed5dde594a49b37dcca75592f9
Author: Luca Boccassi <luca.boccassi@gmail.com>
Date: Thu Dec 4 00:38:10 2025 +0000
util-linux: do not fail postinst/prerm if update-alternatives is missing
Do not attempt to run update-alternatives if it does not exist
anymore in the maint scripts.
This allows building an extremely minimal image, that can be used
for a portable service or a container of any kind, where after
installing all dependencies required by the software that is
actually needed in the container, Prio: essential but unneeded
packages can be removed, including dpkg, reducing the image size.
Minimal mkosi (https://github.com/systemd/mkosi) config to build
an image that has a working python3 interpreter, to ship any
python code that can run as a portable service.
Without this, the minimization step (removing packages) fails:
$ mkdir foo
$ cd foo
$ cat <<EOF>mkosi.conf
[Output]
Format=portable
[Build]
BuildDirectory=mkosi.builddir
CacheDirectory=mkosi.cache
[Content]
Packages=
python3
RemovePackages=
dpkg
bash
diffutils
hostname
init-system-helpers
ncurses-base
ncurses-bin
perl-base
sysvinit-utils
bsdutils
findutils
grep
gzip
sed
util-linux
EOF
$ mkosi -d debian -r unstable build
<...>
‣ Removing 15 packages…
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'bsdutils' is not installed, so not removed
The following packages will be REMOVED:
bash* diffutils* dpkg* findutils* grep* gzip* hostname* init-system-helpers* ncurses-base* ncurses-bin* perl-base*
sed* sysvinit-utils* util-linux*
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
bash diffutils dpkg findutils grep gzip hostname init-system-helpers ncurses-base ncurses-bin perl-base sed
sysvinit-utils util-linux
0 upgraded, 0 newly installed, 14 to remove and 0 not upgraded.
After this operation, 34.7 MB disk space will be freed.
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
(Reading database ... 5639 files and directories currently installed.)
Removing bash (5.3-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing diffutils (1:3.12-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing dpkg (1.22.21) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing findutils (4.10.0-3) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing grep (3.12-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing gzip (1.13-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing hostname (3.25) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing init-system-helpers (1.69) ...
dpkg: warning: while removing init-system-helpers, directory '/var/lib/systemd' not empty so not removed
dpkg: warning: while removing init-system-helpers, directory '/etc/systemd/system' not empty so not removed
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing ncurses-base (6.5+20251123-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing ncurses-bin (6.5+20251123-1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing perl-base (5.40.1-7) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing sed (4.9-2) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing sysvinit-utils (3.15-6) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: this is an essential package; it should not be removed
Removing util-linux (2.41.2-4) ...
/var/lib/dpkg/info/util-linux.prerm: 6: update-alternatives: not found
dpkg: error processing package util-linux (--remove):
installed util-linux package pre-removal script subprocess returned error exit status 127
dpkg: too many errors, stopping
/var/lib/dpkg/info/util-linux.postinst: 7: update-alternatives: not found
dpkg: error while cleaning up:
installed util-linux package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
util-linux
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
‣ "apt-get -o APT::Architecture=amd64 -o APT::Architectures=amd64 -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 Acquire::Check-Valid-Until=false -o Dir::Cache=/var/cache/apt -o Dir::State=/buildroot/var/lib/apt -o Dir::State::lists=/var/lib/apt/lists/ -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=, purge dpkg bash diffutils hostname init-system-helpers ncurses-base ncurses-bin perl-base sysvinit-utils bsdutils findutils grep gzip sed util-linux" returned non-zero exit code 100.
commit eca2dcfb7037b22327a958dd444b7b5c9d6822dc
Author: Chris Hofstaedtler <zeha@debian.org>
Date: Sat Nov 22 18:10:47 2025 +0100
Stop installing lastlog2-import.service
As trixie did not have lastlog anymore, there should be nothing left to import.
Among the 11 debian patches available in version 2.41.2-4 of the package, we noticed the following issues: