Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/1] scripts/package/builddeb: allow hooks also in /usr/share/kernel
Date: Tue, 03 Dec 2024 10:40:55 +0100	[thread overview]
Message-ID: <173321885530.3934267.7112925923730589277@localhost> (raw)
In-Reply-To: <CAK7LNASiENba_7O2-6utUaWCad=rsFkD5ZMeSheqG64MGhZGQg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2105 bytes --]

Quoting Masahiro Yamada (2024-12-03 10:27:11)
> > @@ -68,11 +70,18 @@ install_linux_image () {
> >         # kernel packages, as well as kernel packages built using make-kpkg.
> >         # make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
> >         # so do we; recent versions of dracut and initramfs-tools will obey this.
> > -       debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
> > +       debhookdir=${KDEB_HOOKDIR:-/etc/kernel /usr/share/kernel}
> > +
> > +       # Only pre-create the first hook directory. Support for more than one hook
> > +       # directory requires run-parts 5.21 and it is the responsibility of packages
> > +       # creating additional hook directories to declare that dependency.
> > +       firsthookdir=${debhookdir%% *}
> >         for script in postinst postrm preinst prerm; do
> > -               mkdir -p "${pdir}${debhookdir}/${script}.d"
> > +               mkdir -p "${pdir}${firsthookdir}/${script}.d"
> 
> I still do not understand why this 'mkdir' is needed.
> 
> linux-image package does not install any script into the hook directory.
> In general, there exist some scripts (e.g. initramfs-tools) already
> under /etc/kernel/*.d/  (and under /usr/share/kernel/*.d/ once the
> new location is used broader).
> If nothing exists under the hook directory, there is no point to
> execute run-parts.

Unless I'm misunderstanding the old code, the existing script *does* create
/etc/kernel/*.d/ (That's the "- mkdir -p" line above) so I wanted to preserve
this behaviour even with more than one directory in KDEB_HOOKDIR. Do I
misunderstand something? Are you saying that with this change, no
/etc/kernel/*.d/ should be created anymore? Why?

> > +       done
> >
> > -               mkdir -p "${pdir}/DEBIAN"
> > +       mkdir -p "${pdir}/DEBIAN"
> 
> Please drop this noise change.
> 
> If you want to optimize this, please split it into a separate patch like
> "kbuild: deb-pkg: create DEBIAN directory just once" etc.

Okay, no need to optimize this now. mkdir -p is cheap.

Thanks!

cheers, josch

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmdO0iQACgkQ8sulx4+9
g+G84w/8C12soywhuafBv5UkSJTU0Wwbpjn3vo9lsGRlZFhWTG33gAtNE8EDKDJH
SMSrC8+BeopYAKXDw80aQdupSbgYE2Ksi2os2uTQT+BtrMenbTvT5HWvUyLYPeqa
OKxgxGDMDoEch/SgxYJAlqt2R6D7bBb7kkeub0y6xwmPMZ+oiiAJPYOUagvSxFlK
d9DtHf/o75hGv5oQpB9QaGQP51XavyvXeFCmf0R86Alh2p5CcMFnfpdb7q6YSGcf
6IvpFm7gSJCyYp7CMz5DirxXfI3P1Bk4qOaWZ938jyk4Ts1TRJbJNLIk25jjDoLA
t4/WTAySBi+ELMu9BF0WWcjjXKK3gMXizR/X9ejqEjOKVylXEWaSg0PZgWF/Neey
z8eCumAvtIav2NOUeGqsq5/uo9j0swIvERqnJBrhF7yHQAYmrBkRb3OUHxU7pTL5
5Nu6xdXRty5txgeqFMwJomG4KcvAcc2/V3sK8eggXYXu9Hty9cxhsy4gTexxws5h
Ss3wbx3Uvtt1ADFoFQ2WVI9u/2fgkQSP9PgsBEyifY3Qfykn3xBF3aCYbLuAA5k5
avteIg+JNZbhLiWa9RkEgcQVkBJ01WEE+KhtPYNjG+OKEejwmRXM5nIhPupcOzZ9
jYL6QueXHbDwvxXkf0YV6Rw2ZqmSa5IiB4biZGHoqH8srR6iHAI=
=yu9k
-----END PGP SIGNATURE-----

  reply	other threads:[~2024-12-03  9:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 10:58 [PATCH 0/1] scripts/package/builddeb: allow hooks also in /usr/share/kernel Johannes Schauer Marin Rodrigues
2024-11-27 10:58 ` [PATCH 1/1] " Johannes Schauer Marin Rodrigues
2024-11-28  1:38   ` Masahiro Yamada
2024-11-28  6:29     ` [PATCH v2 0/1] " Johannes Schauer Marin Rodrigues
2024-11-28  6:29       ` [PATCH 1/1] " Johannes Schauer Marin Rodrigues
2024-12-02 15:42         ` Masahiro Yamada
2024-12-02 17:58           ` Johannes Schauer Marin Rodrigues
2024-12-03  6:15             ` Masahiro Yamada
2024-12-03  6:54               ` [PATCHv3 0/1] " Johannes Schauer Marin Rodrigues
2024-12-03  6:54                 ` [PATCH 1/1] " Johannes Schauer Marin Rodrigues
2024-12-03  9:27                   ` Masahiro Yamada
2024-12-03  9:40                     ` Johannes Schauer Marin Rodrigues [this message]
2024-12-03 14:24                       ` Masahiro Yamada
2024-12-03 16:17                         ` [PATCHv4 0/1] kbuild: deb-pkg: " Johannes Schauer Marin Rodrigues
2024-12-03 16:17                           ` [PATCHv4 1/1] " Johannes Schauer Marin Rodrigues
2024-12-04  8:06                             ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=173321885530.3934267.7112925923730589277@localhost \
    --to=josch@mister-muffin.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox