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:
Leo Famulari 2017-03-05 14:33:13 -05:00
parent b812da7059
commit 613d0895b9
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
5 changed files with 6 additions and 6 deletions

View file

@ -9,4 +9,4 @@ stop on runlevel [016]
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

View file

@ -6,7 +6,7 @@
Description=Build daemon for GNU Guix
[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
RemainAfterExit=yes
StandardOutput=syslog

View file

@ -9,4 +9,4 @@ stop on runlevel [016]
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

View file

@ -6,7 +6,7 @@
Description=Publish the GNU Guix store
[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
RemainAfterExit=yes
StandardOutput=syslog