Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please install install into ${prefix}/libexec instead of ${prefix}lib #2485

Open
bdrung opened this issue Aug 16, 2023 · 3 comments
Open

Please install install into ${prefix}/libexec instead of ${prefix}lib #2485

bdrung opened this issue Aug 16, 2023 · 3 comments
Labels
bug Our bugs

Comments

@bdrung
Copy link
Contributor

bdrung commented Aug 16, 2023

Lintian on Debian complains about dozen of executables in /usr/lib/dracut with following reasoning:

The package ships an executable file in /usr/lib.

Please move the file to /usr/libexec.

With policy revision 4.1.5, Debian adopted the Filesystem Hierarchy Specification (FHS) version 3.0.

The FHS 3.0 describes /usr/libexec. Please use that location for executables.

Please refer to File System Structure (Section 9.1.1) in the Debian Policy Manual, filesystem-hierarchy, https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html, and Bug#954149 for details.

Please change the configure script to use --libexecdir instead of --libdir and default it to ${prefix}/libexec.

@bdrung bdrung added the bug Our bugs label Aug 16, 2023
@aafeijoo-suse
Copy link
Member

The problem here is that if a dracut module contains executables and non executables, the module would be split into 2 separate directories, one in /usr/lib and one in /usr/libexec, which implies that a single moddir variable is no longer valid, so fixing this issue is more complex than just changing the configure script. See for example how the files of the dracut-systemd module are installed:

install() {
inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency
inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/emergency.service
inst_simple "$moddir/dracut-emergency.service" "${systemdsystemunitdir}"/dracut-emergency.service
inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/rescue.service
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target"
inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
inst_script "$moddir/dracut-cmdline-ask.sh" /bin/dracut-cmdline-ask
inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev
inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger
inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue
inst_script "$moddir/dracut-pre-mount.sh" /bin/dracut-pre-mount
inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount
inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot
inst_script "$moddir/rootfs-generator.sh" "$systemdutildir"/system-generators/dracut-rootfs-generator
inst_hook cmdline 00 "$moddir/parse-root.sh"
for i in \
dracut-cmdline.service \
dracut-cmdline-ask.service \
dracut-initqueue.service \
dracut-mount.service \
dracut-pre-mount.service \
dracut-pre-pivot.service \
dracut-pre-trigger.service \
dracut-pre-udev.service; do
inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}"
$SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i"
done
inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf"
inst_multiple sulogin
}

@bdrung
Copy link
Contributor Author

bdrung commented Aug 16, 2023

Good point. https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html says: " Either practice is now acceptable"

Please close this bug if the added complexity will not warrant the cost. Then I will add a lintian override.

@aafeijoo-suse
Copy link
Member

I'd leave it open for now, because your concern is very valid. Let's see what others think about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
Development

No branches or pull requests

2 participants