unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: ng0 <ng0@libertad.pw>
Cc: guix-devel@gnu.org, ng0 <ng0@we.make.ritual.n0.is>
Subject: Re: [PATCH] gnu: services: Add gnunet-service.
Date: Wed, 21 Dec 2016 10:10:21 +0100	[thread overview]
Message-ID: <878tr9odfm.fsf@gnu.org> (raw)
In-Reply-To: <20161219193029.10513-2-ng0@libertad.pw> (ng0@libertad.pw's message of "Mon, 19 Dec 2016 19:30:29 +0000")

ng0 <ng0@libertad.pw> skribis:

> +@cindex GNUnet
> +@cindex gnunet
> +@subsubheading GNUnet Service
> +
> +@deffn {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?


[...]

> +        (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").

> +(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.  :-)

The rest LGTM!

Thanks,
Ludo’.

  reply	other threads:[~2016-12-21  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 19:30 gnunet-service, first draft in need of review ng0
2016-12-19 19:30 ` [PATCH] gnu: services: Add gnunet-service ng0
2016-12-21  9:10   ` Ludovic Courtès [this message]
2016-12-21 14:57     ` ng0
2016-12-20 16:59 ` gnunet-service, first draft in need of review Hartmut Goebel
2016-12-20 17:11   ` ng0
2016-12-20 19:44     ` Hartmut Goebel
  -- strict thread matches above, loose matches on Subject: below --
2017-01-18 16:50 Services: gnunet. (require help) contact.ng0
2017-01-18 16:50 ` [PATCH] gnu: services: Add gnunet-service contact.ng0

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=878tr9odfm.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ng0@libertad.pw \
    --cc=ng0@we.make.ritual.n0.is \
    /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).