]> www.infradead.org Git - users/dwmw2/linux.git/commit
kbuild: deb-pkg: allow hooks also in /usr/share/kernel
authorJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>
Tue, 3 Dec 2024 16:17:35 +0000 (17:17 +0100)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 10 Jan 2025 14:01:21 +0000 (23:01 +0900)
commitac2c30f98f28a6606af89ce44bff77af5d558fe8
treee4b1fe5afb777ccdce43a2dafbe362d3779718bf
parentd9ecb92b4fbbbb0a9993017da8d044541ca35886
kbuild: deb-pkg: allow hooks also in /usr/share/kernel

By passing an additional directory to run-parts, allow Debian and its
derivatives to ship maintainer scripts in /usr while at the same time
allowing the local admin to override or disable them by placing hooks of
the same name in /etc. This adds support for the mechanism described in
the UAPI Configuration Files Specification for kernel hooks. The same
idea is also used by udev, systemd or modprobe for their config files.
https://uapi-group.org/specifications/specs/configuration_files_specification/

This functionality relies on run-parts 5.21 or later.  It is the
responsibility of packages installing hooks into /usr/share/kernel to
also declare a Depends: debianutils (>= 5.21).

KDEB_HOOKDIR can be used to change the list of directories that is
searched. By default, /etc/kernel and /usr/share/kernel are hook
directories. Since the list of directories in KDEB_HOOKDIR is separated
by spaces, the paths must not contain the space character themselves.

Signed-off-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb