all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* SystemD & Symbolic Links
@ 2016-12-26 23:14 Hilco Wijbenga
  2016-12-27  3:48 ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Hilco Wijbenga @ 2016-12-26 23:14 UTC (permalink / raw)
  To: help-guix

Hi all,

I would like to use GUIX to organise my home directory but
unfortunately when I install GUIX it does not work because SystemD
(228 in my case) refuses to allow symlinks.

Specifically, "systemctl enable guix-daemon" fails with "Failed to
execute operation: Too many levels of symbolic links" (see [1]). Is
there a workaround for this? I suppose I could simply copy
guix-daemon.service into /etc/systemd/system instead of linking to it
but I'm not sure how many other things will fail because of this
symlink limitation.

Cheers,
Hilco

[1] https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html#Binary-Installation

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-26 23:14 SystemD & Symbolic Links Hilco Wijbenga
@ 2016-12-27  3:48 ` Leo Famulari
  2016-12-27  4:40   ` Hilco Wijbenga
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-12-27  3:48 UTC (permalink / raw)
  To: Hilco Wijbenga; +Cc: help-guix

On Mon, Dec 26, 2016 at 03:14:42PM -0800, Hilco Wijbenga wrote:
> Hi all,

Welcome!

> I would like to use GUIX to organise my home directory but
> unfortunately when I install GUIX it does not work because SystemD
> (228 in my case) refuses to allow symlinks.

Systemd didn't support symlinked unit files until version 231:

https://github.com/systemd/systemd/commit/f777b4345e8c57e739bda746f78757d0fb136ac7

> Specifically, "systemctl enable guix-daemon" fails with "Failed to
> execute operation: Too many levels of symbolic links" (see [1]). Is
> there a workaround for this? I suppose I could simply copy
> guix-daemon.service into /etc/systemd/system instead of linking to it
> but I'm not sure how many other things will fail because of this
> symlink limitation.

I recommend copying the service file as you suggested. It's exactly what
I do on Debian, both before systemd 231 and after, and it works fine for
me.

If the ExecStart value contains a path to '/gnu/store/...', you should
replace that path with
'/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'.

Using the absolute path to /gnu/store only works properly if the service
file is a symlink to root's profile, in which case the executable path
would get updated as root updates their packages. My suggested
replacement will have the same effect.

If you do that, make sure to recreate the rest of the ExecStart value
after the path to the guix-daemon.

PS What OS are you using? I'm wondering if it's too early to rely on
systemd 231 being widely deployed.

PPS It's "Guix", without all capital letters :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-27  3:48 ` Leo Famulari
@ 2016-12-27  4:40   ` Hilco Wijbenga
  2016-12-27 10:02     ` ng0
  2016-12-27 22:18     ` Leo Famulari
  0 siblings, 2 replies; 7+ messages in thread
From: Hilco Wijbenga @ 2016-12-27  4:40 UTC (permalink / raw)
  To: help-guix

On 26 December 2016 at 19:48, Leo Famulari <leo@famulari.name> wrote:
> On Mon, Dec 26, 2016 at 03:14:42PM -0800, Hilco Wijbenga wrote:
>> Specifically, "systemctl enable guix-daemon" fails with "Failed to
>> execute operation: Too many levels of symbolic links" (see [1]). Is
>> there a workaround for this? I suppose I could simply copy
>> guix-daemon.service into /etc/systemd/system instead of linking to it
>> but I'm not sure how many other things will fail because of this
>> symlink limitation.
>
> I recommend copying the service file as you suggested. It's exactly what
> I do on Debian, both before systemd 231 and after, and it works fine for
> me.

Okay, thanks. Why also for systemd >=231?

> If the ExecStart value contains a path to '/gnu/store/...', you should
> replace that path with
> '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'.
>
> Using the absolute path to /gnu/store only works properly if the service
> file is a symlink to root's profile, in which case the executable path
> would get updated as root updates their packages. My suggested
> replacement will have the same effect.
>
> If you do that, make sure to recreate the rest of the ExecStart value
> after the path to the guix-daemon.

Mmm, okay, I'll keep that in mind.

> PS What OS are you using? I'm wondering if it's too early to rely on
> systemd 231 being widely deployed.

This was the latest OpenSUSE (LEAP 42.2) that I'm thinking of using at
work. At home I use Gentoo but without systemd so I should not have
any issues there.

> PPS It's "Guix", without all capital letters :)

Huh, yes, I don't know why I made it all caps. :-) And systemd doesn't
have any caps either. What is this world coming too! ;-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-27  4:40   ` Hilco Wijbenga
@ 2016-12-27 10:02     ` ng0
  2016-12-27 22:18     ` Leo Famulari
  1 sibling, 0 replies; 7+ messages in thread
From: ng0 @ 2016-12-27 10:02 UTC (permalink / raw)
  To: Hilco Wijbenga; +Cc: help-guix

Hilco Wijbenga <hilco.wijbenga@gmail.com> writes:

> On 26 December 2016 at 19:48, Leo Famulari <leo@famulari.name> wrote:
>> On Mon, Dec 26, 2016 at 03:14:42PM -0800, Hilco Wijbenga wrote:
>>> Specifically, "systemctl enable guix-daemon" fails with "Failed to
>>> execute operation: Too many levels of symbolic links" (see [1]). Is
>>> there a workaround for this? I suppose I could simply copy
>>> guix-daemon.service into /etc/systemd/system instead of linking to it
>>> but I'm not sure how many other things will fail because of this
>>> symlink limitation.
>>
>> I recommend copying the service file as you suggested. It's exactly what
>> I do on Debian, both before systemd 231 and after, and it works fine for
>> me.
>
> Okay, thanks. Why also for systemd >=231?
>
>> If the ExecStart value contains a path to '/gnu/store/...', you should
>> replace that path with
>> '/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon'.
>>
>> Using the absolute path to /gnu/store only works properly if the service
>> file is a symlink to root's profile, in which case the executable path
>> would get updated as root updates their packages. My suggested
>> replacement will have the same effect.
>>
>> If you do that, make sure to recreate the rest of the ExecStart value
>> after the path to the guix-daemon.
>
> Mmm, okay, I'll keep that in mind.
>
>> PS What OS are you using? I'm wondering if it's too early to rely on
>> systemd 231 being widely deployed.
>
> This was the latest OpenSUSE (LEAP 42.2) that I'm thinking of using at
> work. At home I use Gentoo but without systemd so I should not have
> any issues there.

There exists a package (and service) for Gentoo in the
youbroketheinternet-overlay, but I no longer maintain
it. Improvements welcome, especially for the service which can
slow down shutdown / reboot to 30 minutes and more.
I no longer use Gentoo, but contributions are easy and
welcome. Maybe we can get the openrc one day generic enough to
include it in Guix.
I no longer use Gentoo so I can't test.
The way most people who use Gentoo here seem to have done it is
using not the package. At least one person in IRC uses Guix on
Gentoo (ZombieChicken ?).

>
>> PPS It's "Guix", without all capital letters :)
>
> Huh, yes, I don't know why I made it all caps. :-) And systemd doesn't
> have any caps either. What is this world coming too! ;-)
>
>

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-27  4:40   ` Hilco Wijbenga
  2016-12-27 10:02     ` ng0
@ 2016-12-27 22:18     ` Leo Famulari
  2016-12-28 20:46       ` Joshua Branson
  1 sibling, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-12-27 22:18 UTC (permalink / raw)
  To: Hilco Wijbenga; +Cc: help-guix

On Mon, Dec 26, 2016 at 08:40:28PM -0800, Hilco Wijbenga wrote:
> On 26 December 2016 at 19:48, Leo Famulari <leo@famulari.name> wrote:
> > I recommend copying the service file as you suggested. It's exactly what
> > I do on Debian, both before systemd 231 and after, and it works fine for
> > me.
> 
> Okay, thanks. Why also for systemd >=231?

I set a custom TMPDIR environment variable in the service file. And
because of habit :)

> > PS What OS are you using? I'm wondering if it's too early to rely on
> > systemd 231 being widely deployed.
> 
> This was the latest OpenSUSE (LEAP 42.2) that I'm thinking of using at
> work. At home I use Gentoo but without systemd so I should not have
> any issues there.

Okay. If we get another question like yours I'll suggest making the
service file use the path I suggested you use rather than the absolute
store path.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-27 22:18     ` Leo Famulari
@ 2016-12-28 20:46       ` Joshua Branson
  2016-12-30 20:41         ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Joshua Branson @ 2016-12-28 20:46 UTC (permalink / raw)
  To: help-guix

Leo Famulari <leo@famulari.name> writes:

Does GuixSD even use systemd?  I thought it used shepherd.

> On Mon, Dec 26, 2016 at 08:40:28PM -0800, Hilco Wijbenga wrote:
>> On 26 December 2016 at 19:48, Leo Famulari <leo@famulari.name> wrote:
>> > I recommend copying the service file as you suggested. It's exactly what
>> > I do on Debian, both before systemd 231 and after, and it works fine for
>> > me.
>> 
>> Okay, thanks. Why also for systemd >=231?
>
> I set a custom TMPDIR environment variable in the service file. And
> because of habit :)
>
>> > PS What OS are you using? I'm wondering if it's too early to rely on
>> > systemd 231 being widely deployed.
>> 
>> This was the latest OpenSUSE (LEAP 42.2) that I'm thinking of using at
>> work. At home I use Gentoo but without systemd so I should not have
>> any issues there.
>
> Okay. If we get another question like yours I'll suggest making the
> service file use the path I suggested you use rather than the absolute
> store path.
>

-- 
<hr>
Joshua Branson

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SystemD & Symbolic Links
  2016-12-28 20:46       ` Joshua Branson
@ 2016-12-30 20:41         ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-12-30 20:41 UTC (permalink / raw)
  To: Joshua Branson; +Cc: help-guix

On Wed, Dec 28, 2016 at 03:46:38PM -0500, Joshua Branson wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> Does GuixSD even use systemd?  I thought it used shepherd.

Correct, GuixSD uses the Shepherd. But we ship service files for the
guix-daemon for whoever uses Guix on another distro.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-30 20:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-26 23:14 SystemD & Symbolic Links Hilco Wijbenga
2016-12-27  3:48 ` Leo Famulari
2016-12-27  4:40   ` Hilco Wijbenga
2016-12-27 10:02     ` ng0
2016-12-27 22:18     ` Leo Famulari
2016-12-28 20:46       ` Joshua Branson
2016-12-30 20:41         ` Leo Famulari

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.