Skip to content

Commit 87985bd

Browse files
committed
debian/rules: Do not hardcode the authd daemons path
1 parent bea5daa commit 87985bd

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PartOf=authd.socket
66

77
[Service]
88
Type=notify
9-
ExecStart=/usr/libexec/authd
9+
ExecStart=@AUTHD_DAEMONS_PATH@/authd
1010

1111
# Some daemon restrictions
1212
LockPersonality=yes

debian/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/dh-exec
22

33
# Install daemon
4-
usr/bin/authd /usr/libexec
4+
usr/bin/authd ${env:AUTHD_DAEMONS_PATH}
55

66
# pam-auth-update files
77
debian/pam-configs/* /usr/share/pam-configs

debian/rules

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export CARGO_HOME = $(CURDIR)/debian/cargo_home
3434
# Needed by the pam module loader
3535
export AUTHD_PAM_MODULES_PATH = /usr/lib/$(DEB_TARGET_GNU_TYPE)/security
3636

37+
# Used not to hardcore the daemons paths
38+
export AUTHD_DAEMONS_PATH := /usr/libexec
39+
3740
# Skip some tests that rely on external dependencies when building package:
3841
# they need external commands (e.g. `vhs`) that are not available in the build environment.
3942
export AUTHD_SKIP_EXTERNAL_DEPENDENT_TESTS=1
@@ -67,12 +70,19 @@ override_dh_auto_clean:
6770
# Cleanup empty cargo-checksum
6871
rm -f debian/cargo-checksum.json
6972

73+
# Cleanup generated service files
74+
rm -f debian/*.service
75+
7076
override_dh_auto_configure:
7177
dh_auto_configure
7278

7379
touch debian/cargo-checksum.json
7480
dh_auto_configure --buildsystem=cargo
7581

82+
for i in debian/*.service.in; do \
83+
sed s,@AUTHD_DAEMONS_PATH@,$(AUTHD_DAEMONS_PATH),g $$i > $${i%.*}; \
84+
done
85+
7686
override_dh_auto_build:
7787
# Build PAM library & Go loader
7888
DH_GOLANG_GO_GENERATE=1 dh_auto_build -- $(AUTHD_GO_PACKAGE)/pam

0 commit comments

Comments
 (0)