Hey Daniel,

ke 22.10.2025 klo 16.55 Daniel Gröber ([email protected]) kirjoitti:
> On Wed, Apr 30, 2025 at 05:11:11PM +0300, Martin-Éric Racine wrote:
> > To me, the problem is Lintian complaining that what's in our
> > subdirectory lacks the shebang (but the script that sources them has
> > it) i.e. /usr/lib/dhcpcd/dhcpcd-run-hooks has the shebang, but
> > everything inside /usr/lib/dhcpcd/dhcpcd-hooks lacks it.
>
> Lintian is correct here. /usr/lib allows non-executable files for
> historical reasons libexec does not. See quoted d-policy "relaxed to a
> suggestion" below:
>
> >> 9.1.1. File System Structur
> >>
> >> [...] The following exceptions to the FHS apply:
> >>
> >> The FHS requirement that architecture-independent application-specific
> >> static files be located in /usr/share is relaxed to a suggestion.
> >>
> >> In particular, a subdirectory of /usr/lib may be used by a package (or a
> >> collection of packages) to hold a mixture of architecture-independent and
> >> architecture-dependent files. However, when a directory is entirely
> >> composed of architecture-independent files, it should be located in
> >> /usr/share.
>
> Also FHS 3.0 Sec 4.7:
>
> >> /usr/libexec includes internal binaries that are not intended to be
> >> executed directly by users or shell scripts.
>
> Sourced scripts are neither "binaries" nor "executed". They are
> "interpreted" if anything.

That's the way I interpreted it as well, hence why everything is still
in /usr/lib even though the top item (the script that sources the
numbered fragments) is an executable shell script.

> > > Looking more closesly at dhcpcd-base I'm actually confused. In addtion to
> > > /usr/lib/dhcpcd/dhcpcd-hooks/ there's also eg.  /usr/share/dhcpcd/hooks/
> > > wich has more numbered scripts:
> > >
> > >     /usr/share/dhcpcd/hooks/10-wpa_supplicant
> > >     /usr/share/dhcpcd/hooks/15-timezone
> > >     /usr/share/dhcpcd/hooks/29-lookup-hostname
> > >
> > > What's the difference?
> >
> > See https://github.com/NetworkConfiguration/dhcpcd/issues/494
> >
> > Those are sample scripts that are not installed by default (but might
> > be symbolically linked by the administrator if needed).
>
> I see.
>
> Well since you're big on "pedantic respect" if these truly are examples
> they outght to be in /usr/share/doc/dhcpcd/examples by policy:
> https://www.debian.org/doc/debian-policy/ch-docs.html#examples

Agreed.  Then again, having recently had a discussion with upstream
about what those sample scripts do (provide workarounds that haven't
been needed in ages), I'd be tempted to just stop shipping them.

> > ke 30.4.2025 klo 15.21 Daniel Gröber ([email protected]) kirjoitti:
> > > On Thu, Apr 17, 2025 at 03:24:33PM +0200, Laurent Bigonville wrote:
> > > > Would be a good idea to move the dhcpcd-run-hooks and the dhcpcd-hooks
> > > > directory
> > >
> > > So we're talking about these:
> > >
> > >     /usr/lib/dhcpcd/dhcpcd-hooks/01-test
> > >     /usr/lib/dhcpcd/dhcpcd-hooks/20-resolv.conf
> > >     /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname
> > >
> > > > [move] to /usr/libexec
> > >
> > > To what end?
> >
> > Pedantic respect of FHS, which Laurent rightfully hopes to achieve.
>
> How does blind pedantic respect serve our users?

That's the endless debate: Do we put respecting standards first or
keeping things predictable?  Personally, I understand Laurent's point,
but I'm not sure that changing this path just for FHS' sake is
desirable.

Martin-Éric

PS: I'll get back to your thread about ifupdown integration sometime
next week. You've raised some valid points which I'd like to address
when I have enough time to sit down, and that won't be until the end
of next week.

Reply via email to