Per FHS 3.0, non-PATH executable binaries are supposed to live under
/usr/libexec, not /usr/lib. e2scrub_fail is an executable script, so
move it to libexec in case some distro some day tries to mount /usr/lib
as noexec or something. Also, there's no reason why these scripts need
to be put under an arch-dependent path.
Cc: Neal Gompa <neal@gompa.dev>
Link: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://lore.kernel.org/r/20231231203903.GC36164@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
infodir = @infodir@
datadir = @datadir@
pkgconfigdir = $(libdir)/pkgconfig
-pkglibdir = $(libdir)/e2fsprogs
+pkglibexecdir = @libexecdir@/e2fsprogs
HAVE_UDEV = @have_udev@
UDEV_RULES_DIR = @pkg_udev_rules_dir@
sbin/tune2fs
usr/bin/chattr
usr/bin/lsattr
-[linux-any] usr/lib/*/e2fsprogs/e2scrub_all_cron
-[linux-any] usr/lib/*/e2fsprogs/e2scrub_fail
+[linux-any] usr/libexec/e2fsprogs/e2scrub_all_cron
+[linux-any] usr/libexec/e2fsprogs/e2scrub_fail
usr/sbin/e2freefrag
[linux-any] usr/sbin/e4crypt
[linux-any] usr/sbin/e4defrag
$(Q) $(MKDIR_P) $(DESTDIR)$(CROND_DIR)
installdirs-libprogs:
- $(E) " MKDIR_P $(pkglibdir)"
- $(Q) $(MKDIR_P) $(DESTDIR)$(pkglibdir)
+ $(E) " MKDIR_P $(pkglibexecdir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(pkglibexecdir)
installdirs-systemd:
$(E) " MKDIR_P $(SYSTEMD_SYSTEM_UNIT_DIR)"
install-libprogs: $(LIBPROGS) installdirs-libprogs
$(Q) for i in $(LIBPROGS); do \
- $(ES) " INSTALL $(pkglibdir)/$$i"; \
- $(INSTALL_PROGRAM) $$i $(DESTDIR)$(pkglibdir)/$$i; \
+ $(ES) " INSTALL $(pkglibexecdir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(pkglibexecdir)/$$i; \
done
install-systemd: $(SERVICE_FILES) installdirs-systemd
uninstall-libprogs:
for i in $(LIBPROGS); do \
- $(RM) -f $(DESTDIR)$(pkglibdir)/$$i; \
+ $(RM) -f $(DESTDIR)$(pkglibexecdir)/$$i; \
done
uninstall-systemd:
-30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 @pkglibdir@/e2scrub_all_cron
+30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 @pkglibexecdir@/e2scrub_all_cron
10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 @root_sbindir@/e2scrub_all -A -r
[Service]
Type=oneshot
-ExecStart=@pkglibdir@/e2scrub_fail "%f"
+ExecStart=@pkglibexecdir@/e2scrub_fail "%f"
User=mail
Group=mail
SupplementaryGroups=systemd-journal
root_bindir @root_bindir@
libdir @libdir@
$exec_prefix @exec_prefix@
-pkglibdir @libdir@/e2fsprogs
+pkglibexecdir @libexecdir@/e2fsprogs