Skip to content

debian/templates/image.*.in: allow maint scripts in /usr/share/kernel/*.d

Allows packages to place their maintainer script snippets in a path in /usr instead of making them create a conf-file in /etc. If the admin wants to ignore or modify a maintainer script in /usr, they can create a config file (a script) of the same name in /etc and it will override or disable the maintainer script snippet. This tries to follow this spec: https://uapi-group.org/specifications/specs/configuration_files_specification/

Shipping content in /etc instead of /usr is problematic for packages because package upgrades become a hassle in case the user changed the file in /etc. It is not anymore easy for packages to change or delete a maintainer script snippet without involving writing their own maintainer script magic. Other parts of Debian are also moving to the pattern of: vendor ships files in /usr and admin can override them in /etc if necessary. This change allows this for the kernel maintainer script snippets as well.

This is a much simpler implementation of !1159 (closed) because this relies on run-parts from debianutils to carry the desired functionality. As such, this requires a versioned dependency on debianutils. The debianutils maintainer already approved of this feature and is currently gathering further input and reviews in this MR: debian/debianutils!32 (merged)

Having this functionality in run-parts from debianutils will also make it easier to upstream this change. For this to happen, debianutils with this functionality will probably first need to be part of a stable release. I will contact linux upstream once a debianutils version with debian/debianutils!32 (merged) merged is in unstable.

In any case, as has already been pointed out in !1159 (closed), packages cannot declare a dependency on the kernel they support. So one possible migration would be to have the kernel support both /etc and /usr in a stable release or even in old-stable and then advertise to packages that they can start relying on this functionality. I am aware that this is a multi-year transition. I am not asking for packages to switch their postinst snippets to /usr for trixie. But I think for packages to do this in forky, the support has to be there in trixie.

Merge request reports

Loading