]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Makefile, fsck: Use libexec instead of lib
authorNeal Gompa <neal@gompa.dev>
Sun, 24 Dec 2023 13:34:16 +0000 (08:34 -0500)
committerNeal Gompa <neal@gompa.dev>
Sun, 24 Dec 2023 13:34:16 +0000 (08:34 -0500)
These are executables that need to be installed in a non-path location.
Most distributions now install these into /usr/libexec, and the
path variable for this is LIBEXECDIR, so use that instead.

Makefile
fsck/bcachefsck_all_fail.service.in
fsck/bcachefsck_fail@.service.in

index 0e5cf6e0d9a976881392ef4374c3732d1a3a22bd..a38f0742c86ad50db5b4d53f11056b6c5b46b917 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -105,14 +105,14 @@ else
        ROOT_SBINDIR?=$(PREFIX)/sbin
        INITRAMFS_DIR=/etc/initramfs-tools
 endif
-LIBDIR=$(PREFIX)/lib
+LIBEXECDIR=$(PREFIX)/libexec
 
 PKGCONFIG_SERVICEDIR:=$(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd)
 ifeq (,$(PKGCONFIG_SERVICEDIR))
   $(warning skipping systemd integration)
 else
 BCACHEFSCK_ARGS=-f -n
-systemd_libfiles=\
+systemd_libexecfiles=\
        fsck/bcachefsck_fail \
        fsck/bcachefsck_all
 
@@ -133,14 +133,14 @@ built_scripts+=\
 
 %.service: %.service.in
        @echo "    [SED]    $@"
-       $(Q)sed -e "s|@libdir@|$(LIBDIR)|g" \
+       $(Q)sed -e "s|@libexecdir@|$(LIBEXECDIR)|g" \
                -e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
 
 fsck/bcachefsck_all: fsck/bcachefsck_all.in
        @echo "    [SED]    $@"
        $(Q)sed -e "s|@bcachefsck_args@|$(BCACHEFSCK_ARGS)|g" < $< > $@
 
-optional_build+=$(systemd_libfiles) $(systemd_services)
+optional_build+=$(systemd_libexecfiles) $(systemd_services)
 optional_install+=install_systemd
 endif  # PKGCONFIG_SERVICEDIR
 
@@ -226,8 +226,8 @@ install: bcachefs $(optional_install)
        echo "copy_exec $(ROOT_SBINDIR)/bcachefs /sbin/bcachefs" >> $(DESTDIR)$(INITRAMFS_HOOK)
 
 .PHONY: install_systemd
-install_systemd: $(systemd_services) $(systemd_libfiles)
-       $(INSTALL) -m0755 -D $(systemd_libfiles) -t $(DESTDIR)$(LIBDIR)
+install_systemd: $(systemd_services) $(systemd_libexecfiles)
+       $(INSTALL) -m0755 -D $(systemd_libexecfiles) -t $(DESTDIR)$(LIBEXECDIR)
        $(INSTALL) -m0644 -D $(systemd_services) -t $(DESTDIR)$(PKGCONFIG_SERVICEDIR)
 
 .PHONY: clean
index b79f81963f540be7d9a537f1dbc63700d16057e0..fe5845148e921e2abd5c723cd91e5d61535c8435 100644 (file)
@@ -10,7 +10,7 @@ Documentation=man:bcachefsck_all(8)
 [Service]
 Type=oneshot
 Environment=EMAIL_ADDR=root
-ExecStart=@libdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefsck_all
+ExecStart=@libexecdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefsck_all
 User=mail
 Group=mail
 SupplementaryGroups=systemd-journal
index 369a809ab5f36aae34d2315c2568b8544cafd142..8d5ed4c6b15ace894853ace44faf326b23f87984 100644 (file)
@@ -10,7 +10,7 @@ Documentation=man:bcachefs(8)
 [Service]
 Type=oneshot
 Environment=EMAIL_ADDR=root
-ExecStart=@libdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefs %f
+ExecStart=@libexecdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefs %f
 User=mail
 Group=mail
 SupplementaryGroups=systemd-journal