* [PATCH] kbuild: deb-pkg: do not include empty hook directories
@ 2024-12-03 13:59 Masahiro Yamada
2024-12-03 14:16 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2024-12-03 13:59 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor, Nicolas Schier
The linux-image package currently includes empty hook directories
(/etc/kernel/{pre,post}{inst,rm}.d/ by default).
These directories were perhaps intended as a fail-safe in case no
hook scripts exist there.
However, they are unnecessary because the run-parts command is already
guarded by the following check:
test -d ${debhookdir}/${script}.d && run-parts ...
The only difference is that the run-parts command either runs for empty
directories (resulting in a no-op) or is skipped entirely.
The maintainer scripts will succeed without these dummy directories.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/package/builddeb | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index fb686fd3266f..e823742e17c4 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -70,8 +70,6 @@ install_linux_image () {
# so do we; recent versions of dracut and initramfs-tools will obey this.
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
for script in postinst postrm preinst prerm; do
- mkdir -p "${pdir}${debhookdir}/${script}.d"
-
mkdir -p "${pdir}/DEBIAN"
cat <<-EOF > "${pdir}/DEBIAN/${script}"
#!/bin/sh
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: deb-pkg: do not include empty hook directories
2024-12-03 13:59 [PATCH] kbuild: deb-pkg: do not include empty hook directories Masahiro Yamada
@ 2024-12-03 14:16 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2024-12-03 14:16 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Nathan Chancellor, Nicolas Schier, Ben Hutchings
On Tue, Dec 3, 2024 at 11:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> The linux-image package currently includes empty hook directories
> (/etc/kernel/{pre,post}{inst,rm}.d/ by default).
>
> These directories were perhaps intended as a fail-safe in case no
> hook scripts exist there.
>
> However, they are unnecessary because the run-parts command is already
> guarded by the following check:
>
> test -d ${debhookdir}/${script}.d && run-parts ...
>
> The only difference is that the run-parts command either runs for empty
> directories (resulting in a no-op) or is skipped entirely.
>
> The maintainer scripts will succeed without these dummy directories.
The linux-image packages from the Debian kernel do not contain
the /etc/kernel/*.d/ directories either.
(Please correct me if I'm wrong, Ben)
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/package/builddeb | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index fb686fd3266f..e823742e17c4 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -70,8 +70,6 @@ install_linux_image () {
> # so do we; recent versions of dracut and initramfs-tools will obey this.
> debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
> for script in postinst postrm preinst prerm; do
> - mkdir -p "${pdir}${debhookdir}/${script}.d"
> -
> mkdir -p "${pdir}/DEBIAN"
> cat <<-EOF > "${pdir}/DEBIAN/${script}"
> #!/bin/sh
> --
> 2.43.0
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-03 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 13:59 [PATCH] kbuild: deb-pkg: do not include empty hook directories Masahiro Yamada
2024-12-03 14:16 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.