guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: services: Add gnunet-service.


From: ng0
Subject: Re: [PATCH] gnu: services: Add gnunet-service.
Date: Wed, 21 Dec 2016 14:57:55 +0000

Ludovic Courtès <address@hidden> writes:

> ng0 <address@hidden> skribis:
>
>> address@hidden GNUnet
>> address@hidden gnunet
>> address@hidden GNUnet Service
>> +
>> address@hidden {Scheme Variable} gnunet-service-type
>> +This is the type of the @uref{https://gnunet.org, GNUnet}
>
> Since GNUnet is supposed to be available to unprivileged users via
> ‘gnunet-arm’, perhaps you could clarify a bit what this does and what
> the tradeoffs are?

I can document this in the next preview I send to the
list. Running gnunet via system service is the correct way to run
it, this way multiple unix users can have their own ego (gnunet
term) etc. You will no longer use gnunet-arm, you just use the
gnunet subsystems directly.

>
> [...]
>
>> +        (user-account
>> +         (name "gnunet")
>> +         (group "gnunet")
>> +         (system? #t)
>> +         (comment "GNUnet system user")
>> +         (home-directory "/var/empty")
>> +         (shell #~(string-append #$shadow "/sbin/nologin")))))
>
> Prefer (file-append shadow "/sbin/nologin").

Ok.

>> +(define gnunet-activation
>> +  (match-lambda
>> +    (($ <gnunet-configuration> package config-file)
>> +     (let ((gnunet
>> +            (file-append package "/lib/gnunet/libexec/gnunet-service-arm")))
>> +       #~(begin
>> +           (use-modules (guix build utils))
>> +           (define %user (getpw "gnunet"))
>> +           (mkdir-p "/var/lib/gnunet/")
>> +           (chown "/var/lib/gnunet" (passwd:uid %user) (passwd:gid %user))
>> +           (chmod "/var/lib/gnunet/" #o600)
>> +           (mkdir-p "/var/lib/gnunet/.local/share/gnunet")
>> +           (mkdir-p "/var/lib/gnunet/.cache/gnunet")
>> +           (mkdir-p "/var/lib/gnunet/.config/gnunet")
>> +           (chmod "/var/lib/gnunet/.config/gnunet" #o600)
>> +           (chmod "/var/lib/gnunet/.cache/gnunet" #o600)
>> +           (chmod "/var/lib/gnunet/.local/share/gnunet" #o600))))))
>
> The .local, .share, and .config sub-directories here look fishy.  I’d
> suggest reporting that as a bug upstream.  :-)

I'm discussing it right now, to figure out if this was fixed
later or if this is still relevant to report, and if it was fixed
later if it can be backported.

> The rest LGTM!
>
> Thanks,
> Ludo’.
>

Thanks for this first review.
-- 
♥Ⓐ  ng0  | PGP keys and more: https://n0is.noblogs.org/
         |                    http://ng0.chaosnet.org



reply via email to

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