unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: raid5atemyhomework via Bug reports for GNU Guix <bug-guix@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: "pengmeiyu@riseup.net" <pengmeiyu@riseup.net>,
	"46942@debbugs.gnu.org" <46942@debbugs.gnu.org>
Subject: bug#46942: ci.guix.gnu.org is slow from my system
Date: Sat, 06 Mar 2021 00:23:36 +0000	[thread overview]
Message-ID: <lGviRgmwsny7K6TMhFruJRyL-WG-ALbrPEIJ8X_qaEgTfC1fQDPUBxEvdVc-fATn7qRrX0BHMLDn8yCfQdJN4z7YjUgRinCdLzZxOSUxuwE=@protonmail.com> (raw)
In-Reply-To: <8bR3l7i5BPTQzCRF0BRGqsXMNe-DIM0QlFFj7qG-SJd7Z-KgPdvdlM5ZkhFlX8GVqQSocUgx9WCBthzbVrgZ5c2zMBegDmhCj-_1rjQ_oiY=@protonmail.com>

Hi zimoun,

Thanks, this is a definite improvement and I have set both systems to use it as the first item in `substitute-server`. I'll make a patch for the manual at least, then close this issue once that patch is accepted.

So I was thinking of modifying the installer so at least some page offers up options for mirrors. However, because of the way the installer works, it would have to be done by `(gnu installer services)`, which does not use `modify-services` on the base service list.

What the installer expects is that services will have their own `(service <type> <config>)` entry, without modifying the base service type.

What I *want* to do would be to have an extensible `guix-substitute-url-service-type`.  Unfortunately the existing `guix-service-type` accepts a list of build directories to `chroot`.

So here's a sketch:

* Create a new `guix-daemon-service-type` and move most of the `guix-service-type` code into it.
  * This is extensible; extensions provide a procedure which accepts a `<guix-configuration>` record and outputs a `<guix-configuration>` record.
  * `(compose (cut apply compose <>))`
  * `(extend (lambda (config modifier) (modifier config)))`
* Create a new `guix-build-chroot-service-type` which just extends `guix-daemon-service-type`:
  * `(service-extension guix-daemon-service-type (lambda (build-chroots) (lambda (guix-config) (guix-configuration (inherit guix-config) (chroot-directories (append (guix-configuration-chroot-directories guix-config) build-chroots))))))`
* `(define-deprecated guix-service-type guix-build-chroot-service-type)`
  * I mean seriously why does Guix assume only one configuration field of a base system service is usefully extensible, it seems to me that the general pattern should be that basic system service types should be extensible by a procedure that accepts an existing configuration record and returns a modified configuration record, then just define individual service types for each list-of-foo field of the configuration record to make a convenient way to extend such lists.
* Create a new `guix-substitute-url-service-type` similar to `guix-build-chroot-service-type`, which prepends a list of substitute URLs to the one in the configuration.

Then finally in the installer side:

* in `(gnu installer services)` add something like:
  * `(system-service (name (G_ "https://mirrors.sjtug.sjtu.edu.cn/guix/ (SJTUG, China)")) (type 'substitute-url) (snippet '((simple-service guix-substitute-url-service-type (list "https://mirrors.sjtug.sjtu.edu.cn/guix/")))))`
  * `(system-service (name (G_ "https://ci.guix.gnu.org (Guix, Germany) - no mirror") (type 'substitute-url) (snippet '())))`
* In `(gnu installer newt services)`, add a page for substitute URL mirrors, probably a `run-listbox-selection-page`.
  * `(G_ "You can select a mirror that is nearer to you for faster updating of packages. The main Guix substitute server, https://ci.guix.gnu.org/, will always be set as a fallback, so even if the mirror goes down, you can still upgrade from the main Guix substitute server.")`

Is that something that has any chance of getting accepted into Guix? I'd rather not do any coding unless this has any chance at all of getting merged in.

Thanks
raid5atemyhomework




  parent reply	other threads:[~2021-03-06  0:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 11:22 bug#46942: ci.guix.gnu.org is slow from my system raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 11:48 ` Christopher Baines
2021-03-05 12:12   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:26   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:41     ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:41 ` zimoun
2021-03-05 13:00   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 14:46     ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 18:39       ` zimoun
2021-03-05 22:57         ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 23:48           ` zimoun
2021-03-06  0:23           ` raid5atemyhomework via Bug reports for GNU Guix [this message]
2021-03-06  0:42             ` zimoun
2021-03-15  0:13               ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-15  7:21                 ` Maxime Devos
2021-03-15 10:01                   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-15 10:14                     ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-16 12:38                       ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 19:40 ` Leo Famulari
2021-03-05 21:53   ` Julien Lepiller
2021-03-05 22:12     ` Leo Famulari

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='lGviRgmwsny7K6TMhFruJRyL-WG-ALbrPEIJ8X_qaEgTfC1fQDPUBxEvdVc-fATn7qRrX0BHMLDn8yCfQdJN4z7YjUgRinCdLzZxOSUxuwE=@protonmail.com' \
    --to=bug-guix@gnu.org \
    --cc=46942@debbugs.gnu.org \
    --cc=pengmeiyu@riseup.net \
    --cc=raid5atemyhomework@protonmail.com \
    --cc=zimon.toutoune@gmail.com \
    /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).