all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: raid5atemyhomework <raid5atemyhomework@protonmail.com>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: Pierre Neidhardt <mail@ambrevar.xyz>,
	"guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Adding Substitute Mirrors page to installer
Date: Mon, 31 May 2021 09:42:59 +0000	[thread overview]
Message-ID: <Q8G_VzZJz9559LaL74dCSazrWhZDD9Q8ddukCVI9qqrt81XDcVB5d83ABWzG7XqBTyLHxmnrQFhyKErvo9Cd3y5x5PwH7toy277StUntfMc=@protonmail.com> (raw)
In-Reply-To: <4HlazINP0mSEQboLeHTJJ45LmDc1HsA8GIDTy4SQDc-vs8IQYfLArkT_Yf8mRH_aiHYAb9C6Ji_JZXm76D6niESZJB1Bjdk7RspulUTN1yw=@protonmail.com>

bump

> bump
>
> > Hello Mathieu,
> >
> > > Hello,
> > > Thanks for this patch, it seems to work fine!
> > >
> > > > -               ;; Extract the substitute URLs of the user configuration.
> > > >
> > > >
> > > > -               (os              (read-operating-system (%installer-configuration-file)))
> > > >
> > > >
> > > > -               (substitute-urls (and=> (find
> > > >
> > > >
> > > > -                                         (lambda (service)
> > > >
> > > >
> > > > -                                           (eq? guix-service-type
> > > >
> > > >
> > > > -                                                (service-kind service)))
> > > >
> > > >
> > > > -                                         (operating-system-services os))
> > > >
> > > >
> > > > -                                       (compose guix-configuration-substitute-urls
> > > >
> > > >
> > > > -                                                service-value)))
> > > >
> > > >
> > >
> > > We could make the mirror selection a proper step, adding it to (gnu
> > > installer record). Then in (gnu installer), you could add:
> > > --8<---------------cut here---------------start------------->8---
> > > (installer-step
> > > (id 'mirrors)
> > > (description (G_ "Mirror substitute server"))
> > > (compute (lambda _
> > > ((installer-mirrors-page current-installer)))))
> > > --8<---------------cut here---------------end--------------->8---
> > > This way, you should be able to select the step result in
> > > "run-final-page" this way:
> > > --8<---------------cut here---------------start------------->8---
> > > (let* ((configuration (format-configuration prev-steps result))
> > > (user-partitions (result-step result 'partition))
> > > (locale (result-step result 'locale))
> > > (users (result-step result 'user))
> > > (mirrors (result-step result 'mirrors))
> > > (install-ok?
> > > (with-mounted-partitions
> > > user-partitions
> > > (configuration->file configuration)
> > >
> > >          (run-config-display-page #:locale locale)
> > >          (run-install-shell locale #:users users #:mirrors mirrors))))
> > >
> > >
> > > ...)
> > > --8<---------------cut here---------------end--------------->8---
> > > That would avoid the need to parse the resulting configuration file.
> >
> > I don't think that will work.
> > The intent is that mirror selection affects two things:
> >
> > -   The actual installed system, i.e. `/etc/config.scm`.
> >
> > -   The installer's Guix Daemon.
> >     If my understanding of the above is correct, it will only affect the installer's Guix Daemon (via `run-install-shell` which will call into `install-system`, presumably with the added argument), but not affect the installed system, because the `configuration` cannot be modified by the `'mirrors` page in the above construction.
> >     Currently what the installer assumes is that a page will at most include a unique entry into the `operating-system`, but it cannot handle a page which modifies the entry created by a previous page.
> >     It would be a breakage of expectations to ask the user to select some mirror, then the installed system, when `guix system reconfigure`d, uses the default `ci.guix.gnu.org`.
> >     My patch affects both, because that is logically what a user would expect, after all, they selected a particular server to install from.
> >     Thus, they expect, that both the installed system, and the installer, will use the selected mirror.
> >     Of course, it feels somewhat dirty, as there is a need to read the configuration file.
> >     It would be cleaner if a page could affect the field created by a previous page.
> >     For example, perhaps the result of a page is not an AST that is a field of an `operating-system` form, but instead a procedure that accepts a `(operating-system ...)` form and returns it.
> >     Most existing pages would just append their keyed sub-form.
> >     However the `mirrors` page would modify an existing `services` field in the input `operating-system` form instead.
> >
> >
> > > > +(define (run-substitute-mirror-page)
> > > >
> > > > -   (let ((title (G_ "Substitute mirror")))
> > > >
> > > > -   (run-listbox-selection-page
> > > >
> > > > -            #:title title
> > > >
> > > >
> > > > -            #:info-text (G_ "Choose a server to get substitutes from.
> > > >
> > > >
> > > > -
> > > >
> > > > +Depending on your location, the official substitutes server can be slow; \
> > > > +in that case, using a mirror may be faster.")
> > >
> > > I wonder if it would make sense to select multiple mirrors, as fallback
> > > if the preferred mirror is not up to date. We could also add the
> > > possibility for the user to add a mirror manually.
> > > In that case, the mirror page could look like the "User creation" page,
> > > with an "Add" button opening a popup proposing to type a mirror URL or
> > > to select one from an existing list.
> > > WDYT?
> >
> > I think Less is More, and deploying an installer with a simple "select one mirror" pagenow will cover 90% of use-cases, and we can add the more complicated page later when there is more time.
> > In particular, there is really only one public mirror of Guix that I know of, the SJTU mirror, so all the flexibility here is not very useful, at least not to me.
> > Since "multiple mirrors" aren't even available yet anyway, why add the complication now?
> > Maybe you can encourage more people to actually run mirrors if the installer has a visible "select mirrors" page, so that you can actually get more than just the SJTU mirror and "select multiple mirrors" is now a (good) problem to have to solve.
> > For now I think a simple "select one mirror, we'll add ci.guix.gnu.org as a fallback" would be better.
> > You can add a "select multiple mirrors in an order I want to specify" later, when there are multiple mirrors existing.
> > Thanks
> > raid5atemyhomework




  reply	other threads:[~2021-05-31  9:43 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='Q8G_VzZJz9559LaL74dCSazrWhZDD9Q8ddukCVI9qqrt81XDcVB5d83ABWzG7XqBTyLHxmnrQFhyKErvo9Cd3y5x5PwH7toy277StUntfMc=@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.