unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 45023@debbugs.gnu.org
Subject: [bug#45023] [PATCH] install: Discover local substitute servers.
Date: Fri, 11 Dec 2020 17:45:33 +0100	[thread overview]
Message-ID: <87o8j05m1e.fsf@gnu.org> (raw)
In-Reply-To: <87mtyt2021.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 04 Dec 2020 14:05:58 +0100")

Hi!

Mathieu Othacehe <othacehe@gnu.org> skribis:

>>From 3e29ee9755ef0bb9917fc482528fdbdc864ae72e Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <othacehe@gnu.org>
> Date: Fri, 4 Dec 2020 11:33:16 +0100
> Subject: [PATCH v2] install: Discover local substitute servers.
>
> * gnu/installer/substitutes.scm: New file.
> * gnu/installer/newt/substitutes.scm: New file.
> * gnu/local.mk (INSTALLER_MODULES): Add them.
> * po/guix/POTFILES.in: Add gnu/installer/newt/substitutes.scm.
> * gnu/installer/proxy.scm (with-silent-shepherd): Move to ...
> * gnu/installer/utils.scm: ... here.
> * gnu/installer/record.scm (<installer>)[substitutes-page]: New field.
> * gnu/installer/newt.scm (substitutes-page): New procedure,
> (newt-installer): register it.
> * gnu/installer.scm (installer-steps): Add "substitutes-page" step.
> * gnu/system/install.scm (%installation-services): Add avahi-service-type and
> enable substitute server discover in guix-service-type.
> [<name-service-switch>]: Set it to %mdns-host-lookup-nss.

Neat!  Overall LGTM; some suggestions below.

> +         ;; Ask whether to enable substitute servers discovery.
> +         (installer-step
> +          (id 'substitutes)
> +          (description (G_ "Substitutes server discovery"))

Maybe “Substitute” (singular)

> +     (case (choice-window
> +            (G_ "Substitute servers discovery.")

“server” (singular)

> +            (G_ "If you have substitute servers on your local network, you can \
> +enable the following option. It might be faster than fetching from remote \
> +servers. There are no security risks, only genuine substitutes will be used \
> +but as servers may serve substitute over HTTP, unencrypted, anyone on the LAN \
> +can see what software you’re installing."))

Slightly reworked:

  By turning this option on, you allow Guix to fetch ``substitutes''
  (pre-built binaries) during installation from servers discovered on
  your local area network (LAN) in addition to the official server.
  This can increase download throughput.

  There are no security risks: only genuine substitutes may be retrieved
  from those servers.  However, eavesdroppers on your LAN may be able to
  see what software you are installing.

> +(define (enable-discover)
> +  (with-silent-shepherd
> +    (with-shepherd-action 'guix-daemon
> +        ('discover "on")
> +        result
> +      result)))
> +
> +(define (disable-discover)

‘{enable,disable}-discovery’ would seem more natural to me.

> +          ;; Use the Avahi daemon to discover substitute servers on the local
> +          ;; network.  It can be faster than fetching from remote servers.
> +          (service avahi-service-type
> +                   (avahi-configuration (debug? #t)))

Maybe we can remove the ‘debug?’ flag?

How bigger is the resulting ISO?

>            ;; The build daemon.  Register the default substitute server key(s)
> -          ;; as trusted to allow the installation process to use substitutes by
> -          ;; default.
> +          ;; as trusted to allow the installation process to use substitutes
> +          ;; by default.
>            (service guix-service-type
> -                   (guix-configuration (authorize-key? #t)))
> +                   (guix-configuration
> +                    (authorize-key? #t)))

Unneeded.  :-)

Thanks!

Ludo’.




  reply	other threads:[~2020-12-11 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:01 [bug#45023] [PATCH] install: Discover local substitute servers Mathieu Othacehe
2020-12-04 13:05 ` Mathieu Othacehe
2020-12-11 16:45   ` Ludovic Courtès [this message]
2020-12-11 20:43     ` bug#45023: " Mathieu Othacehe

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=87o8j05m1e.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=45023@debbugs.gnu.org \
    --cc=othacehe@gnu.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).