summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-03-05 14:33:13 -0500
committerLeo Famulari <leo@famulari.name>2017-03-06 13:25:51 -0500
commit613d0895b92c677e0639d5e77c55043e38e020c8 (patch)
tree5f2600f6c1fdf0648d310d7198772a34b5286c8a
parentb812da70594f5d40647d156f69be0eb169d6be19 (diff)
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@.
-rw-r--r--etc/guix-daemon.conf.in2
-rw-r--r--etc/guix-daemon.service.in2
-rw-r--r--etc/guix-publish.conf.in2
-rw-r--r--etc/guix-publish.service.in2
-rw-r--r--nix/local.mk4
5 files changed, 6 insertions, 6 deletions
diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in
index 8f833cb6930..09c70cde38a 100644
--- a/etc/guix-daemon.conf.in
+++ b/etc/guix-daemon.conf.in
@@ -9,4 +9,4 @@ stop on runlevel [016]
9 9
10task 10task
11 11
12exec @bindir@/guix-daemon --build-users-group=guixbuild 12exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in
index ab0ce090c3e..ffe4cf9bd5c 100644
--- a/etc/guix-daemon.service.in
+++ b/etc/guix-daemon.service.in
@@ -6,7 +6,7 @@
6Description=Build daemon for GNU Guix 6Description=Build daemon for GNU Guix
7 7
8[Service] 8[Service]
9ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild 9ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
10Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale 10Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
11RemainAfterExit=yes 11RemainAfterExit=yes
12StandardOutput=syslog 12StandardOutput=syslog
diff --git a/etc/guix-publish.conf.in b/etc/guix-publish.conf.in
index 498fa295be7..241c5945595 100644
--- a/etc/guix-publish.conf.in
+++ b/etc/guix-publish.conf.in
@@ -9,4 +9,4 @@ stop on runlevel [016]
9 9
10task 10task
11 11
12exec @bindir@/guix publish --user=nobody --port=8181 12exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
diff --git a/etc/guix-publish.service.in b/etc/guix-publish.service.in
index fc4e3c21f33..8aaf09e3cdc 100644
--- a/etc/guix-publish.service.in
+++ b/etc/guix-publish.service.in
@@ -6,7 +6,7 @@
6Description=Publish the GNU Guix store 6Description=Publish the GNU Guix store
7 7
8[Service] 8[Service]
9ExecStart=@bindir@/guix publish --user=nobody --port=8181 9ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
10Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale 10Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
11RemainAfterExit=yes 11RemainAfterExit=yes
12StandardOutput=syslog 12StandardOutput=syslog
diff --git a/nix/local.mk b/nix/local.mk
index eb70d266fbd..9e0c457becb 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -190,7 +190,7 @@ nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
190etc/guix-%.service: etc/guix-%.service.in \ 190etc/guix-%.service: etc/guix-%.service.in \
191 $(top_builddir)/config.status 191 $(top_builddir)/config.status
192 $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ 192 $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
193 $(SED) -e 's|@''bindir''@|$(bindir)|' < \ 193 $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
194 "$<" > "$@.tmp"; \ 194 "$<" > "$@.tmp"; \
195 mv "$@.tmp" "$@" 195 mv "$@.tmp" "$@"
196 196
@@ -201,7 +201,7 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
201etc/guix-%.conf: etc/guix-%.conf.in \ 201etc/guix-%.conf: etc/guix-%.conf.in \
202 $(top_builddir)/config.status 202 $(top_builddir)/config.status
203 $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ 203 $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
204 $(SED) -e 's|@''bindir''@|$(bindir)|' < \ 204 $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
205 "$<" > "$@.tmp"; \ 205 "$<" > "$@.tmp"; \
206 mv "$@.tmp" "$@" 206 mv "$@.tmp" "$@"
207 207