mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
build: Don't embed absolute paths in .service and .conf service files.
Otherwise, users will be stuck running an old copy of guix and the guix-daemon if they copy the service files instead of symlinking them. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/guix-publish.conf.in, etc/guix-publish.service.in: Expand @localstatedir@ instead of @bindir@. * nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Use @localstatedir@ instead of @bindir@.
This commit is contained in:
parent
b812da7059
commit
613d0895b9
5 changed files with 6 additions and 6 deletions
|
@ -9,4 +9,4 @@ stop on runlevel [016]
|
||||||
|
|
||||||
task
|
task
|
||||||
|
|
||||||
exec @bindir@/guix-daemon --build-users-group=guixbuild
|
exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Description=Build daemon for GNU Guix
|
Description=Build daemon for GNU Guix
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild
|
ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
|
||||||
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
|
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
|
|
|
@ -9,4 +9,4 @@ stop on runlevel [016]
|
||||||
|
|
||||||
task
|
task
|
||||||
|
|
||||||
exec @bindir@/guix publish --user=nobody --port=8181
|
exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Description=Publish the GNU Guix store
|
Description=Publish the GNU Guix store
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@bindir@/guix publish --user=nobody --port=8181
|
ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
|
||||||
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
|
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
|
|
|
@ -190,7 +190,7 @@ nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
|
||||||
etc/guix-%.service: etc/guix-%.service.in \
|
etc/guix-%.service: etc/guix-%.service.in \
|
||||||
$(top_builddir)/config.status
|
$(top_builddir)/config.status
|
||||||
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
|
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
|
||||||
$(SED) -e 's|@''bindir''@|$(bindir)|' < \
|
$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
|
||||||
"$<" > "$@.tmp"; \
|
"$<" > "$@.tmp"; \
|
||||||
mv "$@.tmp" "$@"
|
mv "$@.tmp" "$@"
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
|
||||||
etc/guix-%.conf: etc/guix-%.conf.in \
|
etc/guix-%.conf: etc/guix-%.conf.in \
|
||||||
$(top_builddir)/config.status
|
$(top_builddir)/config.status
|
||||||
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
|
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
|
||||||
$(SED) -e 's|@''bindir''@|$(bindir)|' < \
|
$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
|
||||||
"$<" > "$@.tmp"; \
|
"$<" > "$@.tmp"; \
|
||||||
mv "$@.tmp" "$@"
|
mv "$@.tmp" "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue