unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: raid5atemyhomework <raid5atemyhomework@protonmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>,
	Mathieu Othacehe <othacehe@gnu.org>
Subject: Re: Adding Substitute Mirrors page to installer
Date: Tue, 16 Mar 2021 01:07:07 +0000	[thread overview]
Message-ID: <PMShtQcaXPhGtUwbueNQYhhJPsinijq0sg7wHcgCIgRKeO9_zF0t1D5ccpsBCmTym5TFYwnALsJ-7uhrQIbNkXmjYcFD1d83gS3x52fBKQ8=@protonmail.com> (raw)
In-Reply-To: <-WVvn-rIc2HXdunUeEp6YfVQ9WkU-JsP_sAdLNK4ebx5YUTZ0-lSxWF2MGWOTGpqCvfil-JSAW1n-_82UQlRSXM5Qmb2ajaTYsa_EFUJ6o4=@protonmail.com>



>     The ability to also use the same mirror during install rather than after it would be very nice. After all, the guix daemon has to be restarted during installation in the meantime anyway, so on restart it should be possible to switch the `substitute-urls`. However the complications are:
>
> -   The `(gnu installer service)` module inherently assumes that services are completely orthogonal to everything else being configured in the installation. I'm not sure what the best way to extract the substitute mirror selection would be.
> -   The installation image has to do a local `guix system reconfigure` of itself so that its shepherd points the guix daemon to a new mirror, so that the guix daemon restart in `install-system` of `(gnu installer final)` will refer to a new mirror.

Another way to do this would be to add another argument to the `start` action of `guix-daemon`, in much the same way the installer passes in its pid so that the guix daemon can access the copy-on-write store on the destination.  This argument would override the `--substitute-urls`.

So in `(gnu services base)` the `guix-shepherd-service` procedure would have something like:

    (define substitute-urls
            (match args
              ((_ substitute-urls . __) substitute-urls)
              (else                     #$(string-join substitute-urls))))

    #; ....

    (fork-exec-command/container
      #; ...
      #:pid
      (match args
        ((pid . _) pid)
        (else      (getpid)))
      #; ...)


The question now is how does the `install-system` procedure in `(gnu installer final)` determine what substitute URL to pass into `(start-service 'guix-daemon (list (number->string (getpid)) <>))`?

* Change the architecture of the installer somehow so that a single page can both manipulate the `services` field and also manipulate how `install-system` is invoked, and add a new argument to `install-system`.
* Or have `install-system` `read` in the `(%installer-configuration-file)`, look for the `operating-system` form, then delve in its `services` field for a `substitute-urls` field.  This feels fairly brittle but does take advantage of the homoiconicity of Scheme.

Thanks
raid5atemyhomework


  parent reply	other threads:[~2021-03-16  1:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07  2:46 Adding Substitute Mirrors page to installer raid5atemyhomework
2021-03-09  2:34 ` raid5atemyhomework
2021-03-09  8:05   ` Pierre Neidhardt
2021-03-10  9:49     ` raid5atemyhomework
2021-03-15 16:14       ` Ludovic Courtès
2021-03-15 22:53       ` zimoun
2021-03-16  1:07       ` raid5atemyhomework [this message]
2021-03-16 15:55         ` raid5atemyhomework
2021-03-27  6:48           ` raid5atemyhomework
2021-03-27  8:56             ` Mathieu Othacehe
2021-04-01  9:22           ` Mathieu Othacehe
2021-04-22  5:23             ` raid5atemyhomework
2021-05-13  1:27               ` raid5atemyhomework
2021-05-31  9:42                 ` raid5atemyhomework
2021-05-31 10:04                   ` Maxime Devos
2021-06-01  6:39                     ` raid5atemyhomework
2021-06-01  8:30               ` Mathieu Othacehe
2021-06-02 14:44                 ` raid5atemyhomework
2021-07-23 14:53                   ` raid5atemyhomework
2021-07-23 15:10                     ` Tobias Geerinckx-Rice
2021-07-23 15:21                       ` raid5atemyhomework
2021-08-01  9:42                         ` raid5atemyhomework
2021-08-01 12:28                         ` Christopher Baines
2021-12-01  6:11                           ` raid5atemyhomework
2021-12-01  8:16                             ` zimoun
2021-12-01 22:49                               ` raid5atemyhomework
2021-12-02  9:36                                 ` zimoun
2021-12-02 10:20                                   ` Jonathan Brielmaier

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='PMShtQcaXPhGtUwbueNQYhhJPsinijq0sg7wHcgCIgRKeO9_zF0t1D5ccpsBCmTym5TFYwnALsJ-7uhrQIbNkXmjYcFD1d83gS3x52fBKQ8=@protonmail.com' \
    --to=raid5atemyhomework@protonmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    --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).