guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add Tor client only package definition


From: Ludovic Courtès
Subject: Re: [PATCH] Add Tor client only package definition
Date: Sun, 24 May 2020 22:51:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Andre,

Andre Batista <address@hidden> skribis:

> Starting on version 0.4.3.5, Tor provides a configuration flag to
> disable relay code (--disable-module-relay). Considering most
> people are running clients, not relays, I thought it would be
> nice for guix to have a client-only package definition (maybe
> it could even be the default?). What do you think?

What difference does it make, for instance in terms of the total size
returned by “guix size tor-client” vs. “guix size tor”?

Are there other considerations, such as a reduced attack surface?

> I've tested the code below and it works as expected on my guix
> install. However, since I'm neither a schemer nor guixpert, fell
> free to teach me how to do it the guix way.

It looks good to me overall!  Some nitpicking:

> + (define-public tor-client
> +   (package
> +     (inherit tor)
> +     (name "tor-client")
> +     (arguments
> +      `(#:configure-flags
> +        `(,@(cons "--disable-module-relay"
> +             ,(cadr (package-arguments tor))))))

We’d rather use ‘substitute-keyword-arguments’ to augment
#:configure-flags without touching the other keyword arguments (there
are several examples in the source).

> +     (synopsis "Client to the anonymous Tor network")
> +     (description
> +      (string-append (package-description tor)
> +       "\n\nThis package only provides the client funcionality to the Tor
> +Network.  If you want to setup a relay you need to install @code{tor}."))))

We generally avoid concatenating text like this, for the reasons
explained at:

  https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

Regarding the format of patches, you can take a look at this:

  https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html

Thanks,
Ludo’.



reply via email to

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