From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/2] doc: Symlink daemon start-up files.
Date: Sun, 5 Mar 2017 15:55:53 -0500 [thread overview]
Message-ID: <20170305205553.GB2279@jasmine> (raw)
In-Reply-To: <8737gj1gib.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 546 bytes --]
On Mon, Jan 16, 2017 at 10:49:32AM +0100, Ludovic Courtès wrote:
> > On Fri, Nov 18, 2016 at 03:31:24PM -0500, Leo Famulari wrote:
> > I think we should go back to the "old way" of instructing users to copy
> > the file...
> >
> >> I'd argue it should point to /var/guix/profiles/per-user/root/...
> >
> > ... and make the service file execute this path.
>
> Could you send a patch?
I've attached two patches. The first updates the instructions in the
manual, and the second builds the service files with the '/var/guix...'
path.
[-- Attachment #1.2: 0001-Revert-doc-Symlink-daemon-start-up-files.patch --]
[-- Type: text/plain, Size: 1411 bytes --]
From 62249ac64fb5cd0235bba28197cb7ac697719b83 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sun, 5 Mar 2017 14:04:34 -0500
Subject: [PATCH 1/2] Revert "doc: Symlink daemon start-up files."
This reverts commit b7230de54b493da5a78922b4226255763b525a98.
Versions of systemd that supported symlinked service files are not yet widely
deployed.
See this thread for more information:
http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01199.html
---
doc/guix.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 7c7729859..21ddb6916 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -444,7 +444,7 @@ If your host distro uses the systemd init system, this can be achieved
with these commands:
@example
-# ln -s ~root/.guix-profile/lib/systemd/system/guix-daemon.service \
+# cp ~root/.guix-profile/lib/systemd/system/guix-daemon.service \
/etc/systemd/system/
# systemctl start guix-daemon && systemctl enable guix-daemon
@end example
@@ -452,8 +452,8 @@ with these commands:
If your host distro uses the Upstart init system:
@example
-# ln -s ~root/.guix-profile/lib/upstart/system/guix-daemon.conf /etc/init/
# initctl reload-configuration
+# cp ~root/.guix-profile/lib/upstart/system/guix-daemon.conf /etc/init/
# start guix-daemon
@end example
--
2.12.0
[-- Attachment #1.3: 0002-build-Don-t-embed-absolute-paths-in-.service-and-.co.patch --]
[-- Type: text/plain, Size: 3580 bytes --]
From b79385c076ba4921fdf5f3ad2af76d3d171515c8 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sun, 5 Mar 2017 14:33:13 -0500
Subject: [PATCH 2/2] 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@.
---
etc/guix-daemon.conf.in | 2 +-
etc/guix-daemon.service.in | 2 +-
etc/guix-publish.conf.in | 2 +-
etc/guix-publish.service.in | 2 +-
nix/local.mk | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in
index 8f833cb69..09c70cde3 100644
--- a/etc/guix-daemon.conf.in
+++ b/etc/guix-daemon.conf.in
@@ -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
diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in
index ab0ce090c..ffe4cf9bd 100644
--- a/etc/guix-daemon.service.in
+++ b/etc/guix-daemon.service.in
@@ -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
diff --git a/etc/guix-publish.conf.in b/etc/guix-publish.conf.in
index 498fa295b..241c59455 100644
--- a/etc/guix-publish.conf.in
+++ b/etc/guix-publish.conf.in
@@ -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
diff --git a/etc/guix-publish.service.in b/etc/guix-publish.service.in
index fc4e3c21f..8aaf09e3c 100644
--- a/etc/guix-publish.service.in
+++ b/etc/guix-publish.service.in
@@ -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
diff --git a/nix/local.mk b/nix/local.mk
index eb70d266f..9e0c457be 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -190,7 +190,7 @@ nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
etc/guix-%.service: etc/guix-%.service.in \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
- $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
"$<" > "$@.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 \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
- $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
"$<" > "$@.tmp"; \
mv "$@.tmp" "$@"
--
2.12.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-03-05 20:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 11:00 [PATCH 0/2] Hartmut Goebel
2016-11-18 11:00 ` [PATCH 1/2] doc: Symlink daemon start-up files Hartmut Goebel
2016-11-18 20:31 ` Leo Famulari
2016-11-21 16:38 ` Hartmut Goebel
2017-01-15 18:23 ` Leo Famulari
2017-01-15 19:23 ` Marius Bakke
2017-01-16 9:49 ` Ludovic Courtès
2017-03-05 20:55 ` Leo Famulari [this message]
2017-03-06 9:10 ` Hartmut Goebel
2017-03-06 10:23 ` Ludovic Courtès
2017-01-16 10:02 ` Hartmut Goebel
2016-11-18 11:00 ` [PATCH 2/2] Add system start-up files for "guix publish" Hartmut Goebel
2016-11-18 20:35 ` Leo Famulari
2016-11-21 8:52 ` Ludovic Courtès
2016-11-21 17:17 ` Hartmut Goebel
2016-11-18 20:36 ` [PATCH 0/2] Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170305205553.GB2279@jasmine \
--to=leo@famulari.name \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.