Hi Martin,

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.

> > 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

Remeber that:

> Packages must not require the existence of any files in /usr/share/doc/
> in order to function. Any files that are used or read by programs but are
> also useful as stand alone documentation should be installed elsewhere,
> such as under /usr/share/package/, and then included via symbolic links
> in /usr/share/doc/package.

To move them with minimal user impact we can leave symlinks behind (for a
release cycle or so) along with a d/NEWS entry for forky.

> 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.

May I remind you of

>> Debian Social Contract
>>
>>   4. Our priorities are our users and free software
>>
>>      We will be guided by the needs of our users and the free software
>>      community. We will place their interests first in our
>>      priorities. [...]

https://www.debian.org/social_contract

How does blind pedantic respect serve our users?

--Daniel

Attachment: signature.asc
Description: PGP signature

Reply via email to