From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 1/2] doc: Symlink daemon start-up files. Date: Sun, 5 Mar 2017 15:55:53 -0500 Message-ID: <20170305205553.GB2279@jasmine> References: <1479466834-3508-1-git-send-email-h.goebel@crazy-compilers.com> <1479466834-3508-2-git-send-email-h.goebel@crazy-compilers.com> <20161118203124.GA27280@jasmine> <20170115182310.GA26341@jasmine> <8737gj1gib.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0lnxQi9hkpPO77W3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckdCB-0002pt-2U for guix-devel@gnu.org; Sun, 05 Mar 2017 15:56:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckdC7-0003wU-MD for guix-devel@gnu.org; Sun, 05 Mar 2017 15:55:59 -0500 Content-Disposition: inline In-Reply-To: <8737gj1gib.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org --0lnxQi9hkpPO77W3 Content-Type: multipart/mixed; boundary="8GpibOaaTibBMecb" Content-Disposition: inline --8GpibOaaTibBMecb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 16, 2017 at 10:49:32AM +0100, Ludovic Court=E8s 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. >=20 > 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. --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Revert-doc-Symlink-daemon-start-up-files.patch" Content-Transfer-Encoding: quoted-printable =46rom 62249ac64fb5cd0235bba28197cb7ac697719b83 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari 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 wide= ly 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: =20 @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: =20 @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 =20 --=20 2.12.0 --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-build-Don-t-embed-absolute-paths-in-.service-and-.co.patch" Content-Transfer-Encoding: quoted-printable =46rom b79385c076ba4921fdf5f3ad2af76d3d171515c8 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari 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-dae= mon if they copy the service files instead of symlinking them. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/guix-publish.con= f.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] =20 task =20 -exec @bindir@/guix-daemon --build-users-group=3Dguixbuild +exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-dae= mon --build-users-group=3Dguixbuild 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=3DBuild daemon for GNU Guix =20 [Service] -ExecStart=3D@bindir@/guix-daemon --build-users-group=3Dguixbuild +ExecStart=3D@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/g= uix-daemon --build-users-group=3Dguixbuild Environment=3DGUIX_LOCPATH=3D/root/.guix-profile/lib/locale RemainAfterExit=3Dyes StandardOutput=3Dsyslog 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] =20 task =20 -exec @bindir@/guix publish --user=3Dnobody --port=3D8181 +exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix pub= lish --user=3Dnobody --port=3D8181 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=3DPublish the GNU Guix store =20 [Service] -ExecStart=3D@bindir@/guix publish --user=3Dnobody --port=3D8181 +ExecStart=3D@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/g= uix publish --user=3Dnobody --port=3D8181 Environment=3DGUIX_LOCPATH=3D/root/.guix-profile/lib/locale RemainAfterExit=3Dyes StandardOutput=3Dsyslog 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 =3D 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" "$@" =20 @@ -201,7 +201,7 @@ nodist_upstartjob_DATA =3D etc/guix-daemon.conf etc/gui= x-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" "$@" =20 --=20 2.12.0 --8GpibOaaTibBMecb-- --0lnxQi9hkpPO77W3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAli8e1gACgkQJkb6MLrK fwhqDxAAyfEfNr/T7ikuwpYj7jgMTs0C6HzN6bTLTb8/hZGSlw5vFvZyMnFRfzsT mlv+eniNyBkyft+U+A/xnaOW7NJde+kWoLCzJ/G5XuaU41xgakN33TViYh9VBWZj OCalbYmilV3gzb7A1Ea1qvsw5ivuvlEtqqyccUKyhxV6O7Rbn38Q3X4ourWS1ApC NhVz7stvkTXwTP3Ir4j2VPQAltzjB+XKyG+VUI7zKzCBbQvcbsYhP6Ky88jiTGYg IRfeVmBv3zkuW8+qsH5Y0LE30VJoClkfvJ9QlYy6fmzSAG/tH/dztXmL1E5tgh8J cCpYK+Tkk/fL9rVawDFlFur9tSDsS7jhTyAHC5M86IMNCEFj9EDlIfRHnwbg+yJE yZ6bzlpRn3tD8BPAk8NFFUD5LIwA88+kV0feEzmQYolb/VOV3Hffkdc5h6TrQris YqGcMi191ljWTrMLYRKeqhOTyC7ohQbju4aEc4f5liW5aO0AsBKrILYEINugXMtI U3Fb/IcPTOvLrWpoFtnsCeZKlyJtxXlsvJPkKVtY66zgjfaoci/7wje1AxnKSpQ5 CKQmTfgAZ3VFLAzofTolfbL85IF7Oe43eNwV+7vTZUoXL0FQeY7UT6uNYXGGkAUN 4pDx5U4oN+KAaqWyNxV376BQ48WXxTfOoUvG+q7ImPTjbS7Onqs= =0eJJ -----END PGP SIGNATURE----- --0lnxQi9hkpPO77W3--