diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-01-11 18:07:06 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-01-11 18:08:47 -0800 |
commit | e0cb10f5f8fc9c22b3dcc8671e3edbcaa1eecf5c (patch) | |
tree | eb796ef38a231d7483105ade485e191657569d36 | |
parent | fd650873e1dab125329b9b17c69f895fccc62c5c (diff) | |
download | xfsprogs-dev-e0cb10f5f8fc9c22b3dcc8671e3edbcaa1eecf5c.tar.gz |
xfs_scrub_fail: move executable script to /usr/libexec
Per FHS 3.0, non-PATH executable binaries are supposed to live under
/usr/libexec, not /usr/lib. xfs_scrub_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.
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | include/builddefs.in | 1 | ||||
-rw-r--r-- | scrub/Makefile | 7 | ||||
-rw-r--r-- | scrub/xfs_scrub_fail@.service.in | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/builddefs.in b/include/builddefs.in index 43025ba4fc..32ede788ab 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -52,6 +52,7 @@ PKG_ROOT_SBIN_DIR = @root_sbindir@ PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@ PKG_LIB_DIR = @libdir@@libdirsuffix@ PKG_LIB_SCRIPT_DIR = @libdir@ +PKG_LIBEXEC_DIR = @libexecdir@/@pkg_name@ PKG_INC_DIR = @includedir@/xfs DK_INC_DIR = @includedir@/disk PKG_MAN_DIR = @mandir@ diff --git a/scrub/Makefile b/scrub/Makefile index 70bc0a5b31..1d2da3d845 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -139,8 +139,7 @@ install: $(INSTALL_SCRUB) @echo " [SED] $@" $(Q)$(SED) -e "s|@sbindir@|$(PKG_SBIN_DIR)|g" \ -e "s|@scrub_args@|$(XFS_SCRUB_ARGS)|g" \ - -e "s|@pkg_lib_dir@|$(PKG_LIB_SCRIPT_DIR)|g" \ - -e "s|@pkg_name@|$(PKG_NAME)|g" \ + -e "s|@pkg_libexec_dir@|$(PKG_LIBEXEC_DIR)|g" \ < $< > $@ %.cron: %.cron.in $(builddefs) @@ -150,8 +149,8 @@ install: $(INSTALL_SCRUB) install-systemd: default $(SYSTEMD_SERVICES) $(INSTALL) -m 755 -d $(SYSTEMD_SYSTEM_UNIT_DIR) $(INSTALL) -m 644 $(SYSTEMD_SERVICES) $(SYSTEMD_SYSTEM_UNIT_DIR) - $(INSTALL) -m 755 -d $(PKG_LIB_SCRIPT_DIR)/$(PKG_NAME) - $(INSTALL) -m 755 $(XFS_SCRUB_FAIL_PROG) $(PKG_LIB_SCRIPT_DIR)/$(PKG_NAME) + $(INSTALL) -m 755 -d $(PKG_LIBEXEC_DIR) + $(INSTALL) -m 755 $(XFS_SCRUB_FAIL_PROG) $(PKG_LIBEXEC_DIR) install-crond: default $(CRONTABS) $(INSTALL) -m 755 -d $(CROND_DIR) diff --git a/scrub/xfs_scrub_fail@.service.in b/scrub/xfs_scrub_fail@.service.in index 49a3b08f48..96a2ed5da3 100644 --- a/scrub/xfs_scrub_fail@.service.in +++ b/scrub/xfs_scrub_fail@.service.in @@ -10,7 +10,7 @@ Documentation=man:xfs_scrub(8) [Service] Type=oneshot Environment=EMAIL_ADDR=root -ExecStart=@pkg_lib_dir@/@pkg_name@/xfs_scrub_fail "${EMAIL_ADDR}" %f +ExecStart=@pkg_libexec_dir@/xfs_scrub_fail "${EMAIL_ADDR}" %f User=mail Group=mail SupplementaryGroups=systemd-journal |