guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: home-syncthing-service-type wants /root paths, yet syncthing can wor


From: Ludovic Courtès
Subject: Re: home-syncthing-service-type wants /root paths, yet syncthing can work
Date: Tue, 09 Jan 2024 23:58:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> Hi,
>
> On 2024-01-05 15:05:38 +0100, Sébastien Lerique wrote:
>> Hi Guix! And dear helpers and devs,
>>
>> I'm running into a weird failure of home-syncthing-service-type.
>>
>> Running syncthing manually from the terminal works fine (here's an example
>> log: <https://pastebin.com/1dLMKkyK>).
>>
>> So I Ctrl-C syncthing, then add home-syncthing-service-type to my
>> home-configuration 
>> <https://gitlab.com/wehlutyk/guix-config/-/blob/master/home-configuration.scm>
>> (bottom lines).
>>
>> After restarting, home-syncthing-service-type fails synchronizing because it
>> bases all user folders inside /root, to which it doesn't have writing
>> rights. This happens whether all syncthing configurations in
>> `.local/state/syncthing` had been removed in the meantime or not. Here's a
>> log: <https://pastebin.com/14LwbvRn>
>>
>> Could this be a bug? A mistake in the configuration files?
>
> After some digging in the source code, I managed to pinpoint the cause.  Your
> configuration does not set user nor home, which causes Guix to call (getpw 
> #f).
> That returns the root user.  I would say this is a bug.  The code probably
> should be something like this (untested):
>
>     (or #$home (passwd:dir (getpw (if (and #$home-service? (not #$user)) 
> (getuid) #$user))))

Agreed.  Sébastien, could you confirm and send a patch?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]