From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 05 19:23:54 2021 Received: (at 46942) by debbugs.gnu.org; 6 Mar 2021 00:23:54 +0000 Received: from localhost ([127.0.0.1]:35698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIKjZ-0000ke-Ls for submit@debbugs.gnu.org; Fri, 05 Mar 2021 19:23:54 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:34622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIKjW-0000kN-Bj for 46942@debbugs.gnu.org; Fri, 05 Mar 2021 19:23:51 -0500 Date: Sat, 06 Mar 2021 00:23:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1614990220; bh=Q2Zesaetg5QUULWUysTH3glNApNZPqBn+1bkhj1Q5rg=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=lUIMomecZS7ckFGe/Q663H2iCvkBdg2lyiDMG3vYijAfd970iiUUMWTQj/ci06IIC ncWPrl7znoefHTzZNzUF98xV18b3Ac5y5EC+T4CjB+wAb4HaiZR2e28uA9mxAbXJQI 4FZkEGGJ5VmY8S/XU9oNxgZ9SKf2Naa+9mKg4Pow= To: zimoun From: raid5atemyhomework Subject: Re: bug#46942: ci.guix.gnu.org is slow from my system Message-ID: In-Reply-To: <8bR3l7i5BPTQzCRF0BRGqsXMNe-DIM0QlFFj7qG-SJd7Z-KgPdvdlM5ZkhFlX8GVqQSocUgx9WCBthzbVrgZ5c2zMBegDmhCj-_1rjQ_oiY=@protonmail.com> References: <86a6rh7oyr.fsf@gmail.com> <86r1ktsaw3.fsf@gmail.com> <8bR3l7i5BPTQzCRF0BRGqsXMNe-DIM0QlFFj7qG-SJd7Z-KgPdvdlM5ZkhFlX8GVqQSocUgx9WCBthzbVrgZ5c2zMBegDmhCj-_1rjQ_oiY=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46942 Cc: "pengmeiyu@riseup.net" , "46942@debbugs.gnu.org" <46942@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: raid5atemyhomework Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi zimoun, Thanks, this is a definite improvement and I have set both systems to use i= t as the first item in `substitute-server`. I'll make a patch for the manua= l 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 u= p 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 `mo= dify-services` on the base service list. What the installer expects is that services will have their own `(service <= type> )` entry, without modifying the base service type. What I *want* to do would be to have an extensible `guix-substitute-url-ser= vice-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-servic= e-type` code into it. * This is extensible; extensions provide a procedure which accepts a `` record and outputs a `` record. * `(compose (cut apply compose <>))` * `(extend (lambda (config modifier) (modifier config)))` * Create a new `guix-build-chroot-service-type` which just extends `guix-da= emon-service-type`: * `(service-extension guix-daemon-service-type (lambda (build-chroots) (l= ambda (guix-config) (guix-configuration (inherit guix-config) (chroot-direc= tories (append (guix-configuration-chroot-directories guix-config) build-ch= roots))))))` * `(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 genera= l pattern should be that basic system service types should be extensible by= a procedure that accepts an existing configuration record and returns a mo= dified 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-ch= root-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/ (SJ= TUG, China)")) (type 'substitute-url) (snippet '((simple-service guix-subst= itute-url-service-type (list "https://mirrors.sjtug.sjtu.edu.cn/guix/")))))= ` * `(system-service (name (G_ "https://ci.guix.gnu.org (Guix, Germany) - n= o 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/, wi= ll always be set as a fallback, so even if the mirror goes down, you can st= ill upgrade from the main Guix substitute server.")` Is that something that has any chance of getting accepted into Guix? I'd ra= ther not do any coding unless this has any chance at all of getting merged = in. Thanks raid5atemyhomework