Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected], [email protected]
Control: affects -1 + src:linux-base
User: [email protected]
Usertags: pu
[ Reason ]
linux-run-hooks does not look for linux-headers postinst hooks in the
same directory as older linux-headers postinst scripts. This was an
unintended incompatible change between bookworm and trixie.
[ Impact ]
linux-headers postinst hooks are not being run when a linux-headers
package is installed. Currently the only such hook packaged in Debian
belongs to dkms. This could result in out-of-tree modules not being
rebuilt at the right time.
In trixie the impact is mitigated because linux-headers packages
depend on the corresponding linux-image packages and dkms also
installs a postinst hook for those. However, this dependency has been
removed in unstable, so the mitigation does not apply when installing
a kernel from trixie-backports or during an upgrade to forky.
Secondly, I want to avoid downstream distributions or users adding
hooks in {/etc,/usr/share}/kernel/headers_postinst.d, which won't work
in either bookworm or forky.
[ Tests ]
I verified that:
- Installation of a linux-headers package while
linux-base 4.12 was installed did not run a hook script in
/etc/kernel/header_postinst.d
- Reinstallation of a linux-headers package while
linux-base 4.12.1 was installed did run the hook script
- Installation of a linux-image package while linux-base 4.12.1 was
installed ran the postinst hooks in /etc/kernel/postinst.d
[ Risks ]
If any downstream distribution or user added or moved a hook in
{/etc,/usr/share}/kernel/headers_postinst.d post-trixie, this will
stop working until they move it back to the previously
supported directory.
[ Checklist ]
[X] *all* changes are documented in the d/changelog
[X] I reviewed all changes and I approve them
[X] attach debdiff against the package in (old)stable
[X] the issue is verified as fixed in unstable
[ Changes ]
- Change the construction of hook directory names to drop the 's'
from 'headers'
- Fix a somewhat related documentation error
- Adjust CI configuration for trixie
[ Other info ]
diff -Nru linux-base-4.12/bin/linux-run-hooks
linux-base-4.12.1/bin/linux-run-hooks
--- linux-base-4.12/bin/linux-run-hooks 2025-05-25 17:54:49.000000000 +0200
+++ linux-base-4.12.1/bin/linux-run-hooks 2026-01-14 12:34:15.000000000
+0100
@@ -92,7 +92,6 @@
my ($pkg_type, $script_type) = @ARGV;
if (!defined($pkg_type)
- or ($pkg_type ne 'image' and $pkg_type ne 'headers')
or !defined($script_type)
or ($script_type !~ /^(?:pre|post)(?:inst|rm)$/)) {
usage_error();
@@ -101,9 +100,13 @@
if ($pkg_type eq 'image') {
$hook_type = $script_type;
$n_hook_args = 2;
-} else {
- $hook_type = "${pkg_type}_${script_type}";
+} elsif ($pkg_type eq 'headers') {
+ # For backward compatibility, hook directory names start with
+ # 'header_' not 'headers_'
+ $hook_type = "header_${script_type}";
$n_hook_args = 1;
+} else {
+ usage_error();
}
my ($arg_sep_index) = grep({ $ARGV[$_] eq '--' } 2..$#ARGV);
if (!defined($arg_sep_index)
diff -Nru linux-base-4.12/debian/changelog linux-base-4.12.1/debian/changelog
--- linux-base-4.12/debian/changelog 2025-05-25 21:16:36.000000000 +0200
+++ linux-base-4.12.1/debian/changelog 2026-01-20 13:44:51.000000000 +0100
@@ -1,3 +1,12 @@
+linux-base (4.12.1) trixie; urgency=medium
+
+ * d/salsa-ci.yml: Set RELEASE to trixie
+ * linux-run-hooks(1): Fix description of the first argument
+ * linux-run-hooks: Use compatible hook dir names for headers packages
+ (Closes: #1121366)
+
+ -- Ben Hutchings <[email protected]> Tue, 20 Jan 2026 13:44:51 +0100
+
linux-base (4.12) unstable; urgency=medium
* d/changelog: Word-wrap previous entry to under 80 characters
diff -Nru linux-base-4.12/debian/salsa-ci.yml
linux-base-4.12.1/debian/salsa-ci.yml
--- linux-base-4.12/debian/salsa-ci.yml 2025-05-13 22:48:46.000000000 +0200
+++ linux-base-4.12.1/debian/salsa-ci.yml 2026-01-14 12:33:38.000000000
+0100
@@ -3,7 +3,7 @@
-
https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
variables:
- RELEASE: 'unstable'
+ RELEASE: 'trixie'
# We only build arch:all packages
SALSA_CI_DISABLE_BLHC: 'true'
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 'true'
diff -Nru linux-base-4.12/man/linux-run-hooks.1
linux-base-4.12.1/man/linux-run-hooks.1
--- linux-base-4.12/man/linux-run-hooks.1 2025-05-25 21:05:02.000000000
+0200
+++ linux-base-4.12.1/man/linux-run-hooks.1 2026-01-14 12:34:15.000000000
+0100
@@ -14,10 +14,8 @@
\fBrun-parts\fR command to execute hooks installed in the appropriate
subdirectories of \fB/etc/kernel\fR and \fB/usr/share/kernel\fR.
.PP
-Each maintainer script in a kernel image package should call this
-command with its script type as the first argument. The postinst
-script in a headers package should call it with \fBheaders_postinst\fR
-as the first argument.
+The first argument is the package type; either \fBimage\fR or
+\fBheaders\fR.
.PP
The \fIMAINT\-SCRIPT\fR argument must be the name of the maintainer
script: \fBpreinst\fR, \fBpostinst\fR, \fBprerm\fR, or \fBpostrm\fR.