systemd service files installed by guix 0.13.0 cannot used by other distributions

OpenSubmitted by 藍挺瑋.
Details
2 participants
  • 藍挺瑋
  • Leo Famulari
Owner
unassigned
Severity
normal
藍挺瑋 wrote on 23 May 2017 17:33
(address . bug-guix@gnu.org)
CAG-RorUA4NG3wdJcStHTCMASJXtk-gWo-aM6+GHfi=V2=o1wyA@mail.gmail.com
I want to update my unofficial guix packages for Arch and Fedora to0.13.0, but I found the systemd service files installed by guix 0.13.0use /var/guix/profiles/per-user/root/guix-profile/bin/guix* instead of/usr/bin/guix* in ExecStart=. The path /var/guix/profiles don't existon systems that don't have guix installed before, and users will haveto manually start guix-daemon and install guix with guix before theycan use the systemd service files. Is it possible to fix systemdservice files, so it can be easily used by packages in otherdistributions?
L
L
Leo Famulari wrote on 23 May 2017 18:16
(name . 藍挺瑋)(address . lantw44@gmail.com)(address . 27037@debbugs.gnu.org)
20170523161624.GA15379@jasmine
On Tue, May 23, 2017 at 11:33:42PM +0800, 藍挺瑋 wrote:
Hi!
Toggle quote (5 lines)> I found the systemd service files installed by guix 0.13.0> use /var/guix/profiles/per-user/root/guix-profile/bin/guix* instead of> /usr/bin/guix* in ExecStart=. The path /var/guix/profiles don't exist> on systems that don't have guix installed before
I'm a little confused: is there a situation where Guix is not installedbut '/usr/bin/guix-daemon' exists?
The path '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'is guaranteed to exist if you followed the instructions in BinaryInstallation [0], which is, as far as I know, the most common way toinstall Guix on other distros. So, I think this path is appropriate forthe basic service file we provide.
Toggle quote (3 lines)> Is it possible to fix systemd service files, so it can be easily used> by packages in other distributions?
I think that, if you are packaging Guix for other distros, you shouldprovide your own service file. My experience is that each systemd-baseddistro uses systemd's advanced features (e.g. process grouping andresource limiting) in different ways. So, making your own service file,in accordance with your distro's standards, will help Guix work in a waythat is more idiomatic to the host distro.
[0] Specifically, it happens during the initial unpacking and renaming:`mv var/guix /var/ && mv gnu/`https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlkkYFQACgkQJkb6MLrKfwhNORAAt0bjjdVO9IdQikUbhFexM4kKVvfk6+cBTAqEVPYJ6ECdEvgO+WKuccna3OSvpY6IShtkffg78306HXsWn55BfTnodpXf0f7bvINY3CMzGhDzJ8AcsriON2fqnERdSUGfUcW0lNrtH++9u+65D8cSYFJ4Qln3BGQ9rbAb/2eyyvYh0593HY9KGygn3Ym/dlJwFB6HrjsjZ0xGA5lqgLTUHcNAxebAJJ1hhfbmCzhm3q7/rHN7TqYAahM+QUMVrV/xs5WRY20OUh59/k1rRFblAkxqbn7Y+phoGUIETs1uh/MiZzHttvAm8/uBex/zmmMJ8/0qvgMMd1oQX+OOic923Rr1BlPUO9230oLn0eEYqd/kinXyZO7VGFp/h85LhBPXQ/uZT3alMwlTcXoSpn+Lk3SCr/naf4fdYKNDzFz1FVkcWdoYpDfW6frjAlIwq7CZvUhYqL/6UxHaeJTqZKdVPKqFgKPIhsAvcHLoStQf/xLfGE5D8I4O5jOppgcKTrkao9H1K3xTKTUhpO5IlgYuJYYY9MpCDKFMYESfEnMLIhqQcdNBdocEBLLBezWUGVbyQRXrzsg9jMqlrdfmZ4kOKZZmN6AWLWvxYEpBhJ8d8qRNYmaSlqnxFWaAPbwYLUkZmpI4daft44AjegXiuHCVDFH51i1eyKPmSk2Tv1oeUOM==pupo-----END PGP SIGNATURE-----

藍挺瑋 wrote on 24 May 2017 17:37
(name . Leo Famulari)(address . leo@famulari.name)(address . 27037@debbugs.gnu.org)
8c249c24-b33b-3f41-112c-59e04d96803b@gmail.com
Leo Famulari 於 西元2017年05月24日 00:16 寫道:
Toggle quote (12 lines)> On Tue, May 23, 2017 at 11:33:42PM +0800, 藍挺瑋 wrote:> > Hi!> >> I found the systemd service files installed by guix 0.13.0>> use /var/guix/profiles/per-user/root/guix-profile/bin/guix* instead of>> /usr/bin/guix* in ExecStart=. The path /var/guix/profiles don't exist>> on systems that don't have guix installed before> > I'm a little confused: is there a situation where Guix is not installed> but '/usr/bin/guix-daemon' exists?
This can happen with source installation. 'make install' installs /usr/bin/guix* but not /var/guix. /var/guix doesn't exist until guix-daemon is started.
Toggle quote (7 lines)> > The path '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'> is guaranteed to exist if you followed the instructions in Binary> Installation [0], which is, as far as I know, the most common way to> install Guix on other distros. So, I think this path is appropriate for> the basic service file we provide.
I think you mean that the systemd service files included in Guix are only intended to be used with binary installation process. Do you mean that using them with traditional 'make install' installation is not supported?
Toggle quote (11 lines)> >> Is it possible to fix systemd service files, so it can be easily used>> by packages in other distributions?> > I think that, if you are packaging Guix for other distros, you should> provide your own service file. My experience is that each systemd-based> distro uses systemd's advanced features (e.g. process grouping and> resource limiting) in different ways. So, making your own service file,> in accordance with your distro's standards, will help Guix work in a way> that is more idiomatic to the host distro.
Yes, I am packaging Guix for Arch and Fedora, and I use the systemd service files provided by Guix in my packages since version 0.8.3. If doing so is never supported, I can make my own service files like what I did for version 0.6 to 0.8.2 and I think this bug can be closed.
Toggle quote (5 lines)> > [0] Specifically, it happens during the initial unpacking and renaming:> `mv var/guix /var/ && mv gnu/`> https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html>
L
L
Leo Famulari wrote on 25 May 2017 00:07
(name . 藍挺瑋)(address . lantw44@gmail.com)(address . 27037@debbugs.gnu.org)
20170524220753.GA27348@jasmine
On Wed, May 24, 2017 at 11:37:27PM +0800, 藍挺瑋 wrote:
Toggle quote (8 lines)> Leo Famulari 於 西元2017年05月24日 00:16 寫道:> > I'm a little confused: is there a situation where Guix is not installed> > but '/usr/bin/guix-daemon' exists?> > This can happen with source installation. 'make install' installs> /usr/bin/guix* but not /var/guix. /var/guix doesn't exist until guix-daemon> is started.
I see. We discussed this use case previously, which led to the changewhich caused your issue:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25852#80
In short, we decided to break this for `make install` since we didn'tcome up with a better solution at the time.
Toggle quote (10 lines)> > The path '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'> > is guaranteed to exist if you followed the instructions in Binary> > Installation [0], which is, as far as I know, the most common way to> > install Guix on other distros. So, I think this path is appropriate for> > the basic service file we provide.> > I think you mean that the systemd service files included in Guix are only> intended to be used with binary installation process. Do you mean that using> them with traditional 'make install' installation is not supported?
It's de facto unsupported, since it's not working :) But, I think weshould address this use case, since it is causing problems fordownstream packagers.
Toggle quote (5 lines)> Yes, I am packaging Guix for Arch and Fedora, and I use the systemd service> files provided by Guix in my packages since version 0.8.3. If doing so is> never supported, I can make my own service files like what I did for version> 0.6 to 0.8.2 and I think this bug can be closed.
I do think you should look into tailoring a service file to thosesystems; you might be able to provide Guix on those systems in a moreintegrated or idiomatic way.
However, we also try to offer upstream service files in the packagesoffered by Guix, so I'd like to find a way to support both the binaryinstallation and `make install` use cases simultaneously.
Unless somebody proposes a fix in the meantime, I'll look into this moreclosely before the next release.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlkmBDkACgkQJkb6MLrKfwgPqBAAqtD8KnPb8WMGdIgh8U1dGWxvzIjCJxAVOPcaCwcbW4r+H2/TDy/JHUfsdA7llPbAc3DXrEARMpbG5MS19REy94X5s7Xx0GFAFx+qmzSJejtZ7NYlxNEipptXLWvOdD5uplo3TTUUFfzKYPzwAqTWJnPbPplNCeAJ9oF73a8Q498MwGMoWFIAeejCoTPDmdZ0kvZpf+y8YQqRJNGo6sjhrXEM5oZZJc+Rzo8LBEEUJ4ZuBoIadYwSwpwboNh+S896P2v5RpaQQE8EqHYS6tkXiMRZxal8Cz+H9rfsJhNKiStyoBiZqOooUWsweqltsGZxp2aYM8/xDI+gY3QpFGqZ8xBvdbiFKh3dcY3lCy5gUgSzsM0rhLxJtlJg7fE1he4s10UskcFXsaoS34Xr5eOvPuqWZb8MukRPpzqFPkyPrQSZTSH9XXtH+ua8Ltyh3aUOzUcQLB2kJykBUuGZeT8dfBzVGUBKzXO46OV1b/Cs5457YEYlmnCctxapU/h6jqUU5cyfLc6bxa+TusTKkkYAHCX/E4uM0B2BJkvycWTFx5SLFfGrO9nCWiQ4qOFbbg//SJHK74H00WckEyE99wC7sofI11+Vy0jCCZYT/eT3bxCNLvePXJ4+Vkn3UrSLjf6uKSZwIbUE3rYd4HITNAe2BK9t7jO9fpnHkgMpDRxawLA==F0g6-----END PGP SIGNATURE-----

藍挺瑋 wrote on 29 May 2017 16:19
(name . Leo Famulari)(address . leo@famulari.name)(address . 27037@debbugs.gnu.org)
eebf6dd4-e00f-1386-269e-6410a0cc336d@gmail.com
Leo Famulari 於 西元2017年05月25日 06:07 寫道:
Toggle quote (40 lines)> On Wed, May 24, 2017 at 11:37:27PM +0800, 藍挺瑋 wrote:>> Leo Famulari 於 西元2017年05月24日 00:16 寫道:>>> I'm a little confused: is there a situation where Guix is not installed>>> but '/usr/bin/guix-daemon' exists?>>>> This can happen with source installation. 'make install' installs>> /usr/bin/guix* but not /var/guix. /var/guix doesn't exist until guix-daemon>> is started.> > I see. We discussed this use case previously, which led to the change> which caused your issue:> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25852#80> > In short, we decided to break this for `make install` since we didn't> come up with a better solution at the time.> >>> The path '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'>>> is guaranteed to exist if you followed the instructions in Binary>>> Installation [0], which is, as far as I know, the most common way to>>> install Guix on other distros. So, I think this path is appropriate for>>> the basic service file we provide.>>>> I think you mean that the systemd service files included in Guix are only>> intended to be used with binary installation process. Do you mean that using>> them with traditional 'make install' installation is not supported?> > It's de facto unsupported, since it's not working :) But, I think we> should address this use case, since it is causing problems for> downstream packagers.> >> Yes, I am packaging Guix for Arch and Fedora, and I use the systemd service>> files provided by Guix in my packages since version 0.8.3. If doing so is>> never supported, I can make my own service files like what I did for version>> 0.6 to 0.8.2 and I think this bug can be closed.> > I do think you should look into tailoring a service file to those> systems; you might be able to provide Guix on those systems in a more> integrated or idiomatic way.
I updated my packages to install two systemd service files for guix-daemon to allow users to choose between /usr/bin/guix-daemon and /var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon.
Toggle quote (9 lines)> > However, we also try to offer upstream service files in the packages> offered by Guix, so I'd like to find a way to support both the binary> installation and `make install` use cases simultaneously.> > Unless somebody proposes a fix in the meantime, I'll look into this more> closely before the next release.>
Is it possible to resolve it by providing a configure option to choose between two versions of systemd service files, so guix binary tarballs can use /var/guix/profiles but packages of other distributions can use /usr/bin?
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 27037@debbugs.gnu.org