From: "Ludovic Courtès" <ludo@gnu.org>
To: "Sébastien Lerique" <sl@eauchat.org>
Cc: help-guix@gnu.org, guix-devel@gnu.org
Subject: Re: home-syncthing-service-type wants /root paths, yet syncthing can work
Date: Tue, 09 Jan 2024 23:58:44 +0100 [thread overview]
Message-ID: <87zfxew1uj.fsf@gnu.org> (raw)
In-Reply-To: <ZZlKEbqGHHYN9k9n@ws> (Tomas Volf's message of "Sat, 6 Jan 2024 13:39:45 +0100")
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’.
prev parent reply other threads:[~2024-01-09 22:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 14:05 home-syncthing-service-type wants /root paths, yet syncthing can work Sébastien Lerique
2024-01-06 12:39 ` Tomas Volf
2024-01-09 22:58 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfxew1uj.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=help-guix@gnu.org \
--cc=sl@eauchat.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).