Package: tiny-initramfs Version: 0.1-5 Severity: normal File: /usr/sbin/update-tirfs Tags: patch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Contrary to section 8.3 of the Debian Kernel Handbook [1], /usr/sbin/update-tirfs does not run the hook scripts in /etc/initramfs/post-update.d. Together with a bug in systemd-boot (#1014581) this led to my system trying and failing to boot without an initramfs. I did not know whether to make the severity of this bug normal or serious. While it does violate a 'must' directive in the Kernel Handbook, I don't know whether that carries the same severity as violating a directive from the Policy. Regards, Victor Westerhuis - -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (100, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Kernel: Linux 5.18.0-4-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=en_NL.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en_US:en:nl_NL:nl Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages tiny-initramfs depends on: ii tiny-initramfs-core 0.1-5+b12 tiny-initramfs recommends no packages. tiny-initramfs suggests no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEE6OxII3T+o0Ujs6ECQz2Rq5dHQPsFAmMLWO0THHZpY3RvckB3 ZXN0ZXJodS5pcwAKCRBDPZGrl0dA+yvGEACaLdiF9/QD61nv7cjjcLeE4bqqLBBR WhVA1INGoJX27qf+o0WQVKUCe0/PqzgMjSp6wW2Ta8lrj3HaxdjutEIwIVC3VrxG 4R48X4EJzZjIqIZWPiPxvTDXJeVH1ar8KTYbyQNhZY5r8uCtIfiqgh2DUc/vRt5p DW57YmIo6UAl2p0gRxQfi3ULaqTI4Mslp6bfVZQ8MWXNuf1tabY3mts2vPL/K7cp /XMHLv567XQJqGYz1SJdb4LizpgD+OauoThFdTk37dJVXU6gvY8QPUMaN7wIZp2g kR54jPWR3cFiHCrHZdHl6D2cwwSr44wnL6qxBUS1+wvORVS6tNBpJHROxScKYpHk QDYsJrgqlcef4KSxUxXF5MR6kDR8ylX+2WFUrPjYNUiC3NSQCl0NaG3iXv/7KU/+ zkQyYYzbagtueYsMzL6MUlpE51nnpM6R2DwLg19/Yzsm4xgTVU6K6NtHNu1lU9mo MfseeGMf6ZUmN44SYVLdehd+mXT8C9KXYYmS9aRAPUL8dybQFmIWGz15dmpsyeUA DkYARyS0oBtKZUQKFAMkV/fxgL0f4JPvrWRAjejxtAtjKWS4/5PIjYwx+zQql5+T 8tSPOcZYmJuQA4WyOhghBNwqn/dfT3EvLZ8nfNTPmbJsO/oukgnwU6cmb7NCPKNq VbAfSz54YMmfWQ== =Lc76 -----END PGP SIGNATURE-----
>From 4f8089ba3ab39d55b19447712224972afabfc908 Mon Sep 17 00:00:00 2001 From: Victor Westerhuis <vic...@westerhu.is> Date: Sun, 28 Aug 2022 13:37:50 +0200 Subject: Run hook scripts in /etc/initramfs/post-update.d According to the Debian Kernel Handbook, section 8.3, "initramfs builders must call these scripts using run-parts after they create, update or delete an initramfs." Because update-tirfs uses `set -e`, there is no need to check if the preceding invocation of mktirfs was successful. --- debian/extra/update-tirfs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/extra/update-tirfs b/debian/extra/update-tirfs index c79898d..e5f69f2 100755 --- a/debian/extra/update-tirfs +++ b/debian/extra/update-tirfs @@ -61,6 +61,9 @@ if [ x"$VERSION" = x"all" ] ; then if ! [ -r "${V}" ] ; then continue ; fi V=${V#/boot/vmlinu?-} mktirfs -o /boot/initrd.img-"${V}" "${V}" + if [ -d /etc/initramfs/post-update.d ]; then + run-parts --arg="${V}" --arg=/boot/initrd.img-"${V}" /etc/initramfs/post-update.d + fi done else if ! ls /boot/vmlinu[xz]-"${VERSION}" >/dev/null 2>&1 ; then @@ -68,4 +71,7 @@ else exit 1 fi mktirfs -o /boot/initrd.img-"${VERSION}" "${VERSION}" + if [ -d /etc/initramfs/post-update.d ]; then + run-parts --arg="${VERSION}" --arg=/boot/initrd.img-"${VERSION}" /etc/initramfs/post-update.d + fi fi -- 2.37.2