From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uE0qDNMEUGAveAAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 01:07:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IH3dB9MEUGDpHAAAB5/wlQ (envelope-from ) for ; Tue, 16 Mar 2021 01:07:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D07491FCE0 for ; Tue, 16 Mar 2021 02:07:30 +0100 (CET) Received: from localhost ([::1]:46532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLyBF-0004lU-Uh for larch@yhetil.org; Mon, 15 Mar 2021 21:07:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLyB6-0004l1-6C for guix-devel@gnu.org; Mon, 15 Mar 2021 21:07:20 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]:19920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLyB3-0004j8-7D for guix-devel@gnu.org; Mon, 15 Mar 2021 21:07:19 -0400 Date: Tue, 16 Mar 2021 01:07:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1615856834; bh=6x8W2BNWhZVZsyOgX6BZi/9uaPFh9JL5aBLZJ0WPQPE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=hY4Qx6ljBFKur4bQ2d+oXXq5C7ou6fQIjUdRZ/x39eMtjSTjPeIKA6ZDhiCLzoafo CLQm4MS/GzI6z/2nwHzJYbUM0lrBUEi87GBJ3O9A+WLn9HcTPcksDFg/W6oxNpfIJh PQtfmRXuz+MkxCkqkCqawv8rTasUKLlLuZEJrxlg= To: Pierre Neidhardt From: raid5atemyhomework Cc: "guix-devel@gnu.org" , Mathieu Othacehe Subject: Re: Adding Substitute Mirrors page to installer Message-ID: In-Reply-To: <-WVvn-rIc2HXdunUeEp6YfVQ9WkU-JsP_sAdLNK4ebx5YUTZ0-lSxWF2MGWOTGpqCvfil-JSAW1n-_82UQlRSXM5Qmb2ajaTYsa_EFUJ6o4=@protonmail.com> References: <87blbsah0x.fsf@ambrevar.xyz> <-WVvn-rIc2HXdunUeEp6YfVQ9WkU-JsP_sAdLNK4ebx5YUTZ0-lSxWF2MGWOTGpqCvfil-JSAW1n-_82UQlRSXM5Qmb2ajaTYsa_EFUJ6o4=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.130; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40130.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: raid5atemyhomework Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615856850; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6x8W2BNWhZVZsyOgX6BZi/9uaPFh9JL5aBLZJ0WPQPE=; b=qUhVS8sVZDfj4rpUuIGOEtIaV+E2IMjJZ+Xmql8R2WedoPaIfigu7kC+949B4yWPhexbSK t2WBQRhdLfjFUU6aQ/PCqPD9fYC60wRqsIfZwT/AtZqEq40GvrkW74OIIfzr4WdjrqFHqS KzLtxtBFbVN8d4ig7GyhmYongET5GTN8wWASr2HPq909N5DhzzlhnbF7+auziQ/AXDmCre Go8qGQnsVg9oalGlLvYM4AnaOXBf20NiqGE/GxeYLPpHwLYmya5X1XEOfnVw/kz/ZL5AlN WSjKo4RnKjKbWUS7heUPVDqteUDXHTQkDY60/bbFV3HjDkCaQdQh7PqkPLe81w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615856850; a=rsa-sha256; cv=none; b=W5zz+wP6HABJnlQ1gS5OxHGX5yXXA4pVRxMZgpC0371hzlkryyKoA1ASgukvdjLh1Aamqw Zd0CWvMKPfsDCTO34RqxsYR+6ZDB2zG2AvW7U2VHWs3lzDfWiYehWTF5Q4aFqtdKARurSJ VO7rA2meOgcW5EBxLZofzpR+3zbN+nrDDpAVFkeB1AGnCpNBrsM5TAdEhAhdWpUbBWatLf G8gIdzKofSr03dfrFYRmw4wjjJPT7rfqAlDFFqVz5a3KrgPOGGim+ny2AmCPm/CN1oeAZj lp2EdliUi+ZaEbTLk0JC18x4Y1EslUlXC3xWDVmnuXcdrAPlWsx84wEODWACNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=hY4Qx6lj; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=hY4Qx6lj; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: D07491FCE0 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: zLFSPXZ2NwAz > The ability to also use the same mirror during install rather than af= ter it would be very nice. After all, the guix daemon has to be restarted d= uring installation in the meantime anyway, so on restart it should be possi= ble 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 insta= llation. I'm not sure what the best way to extract the substitute mirror se= lection 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 tha= t the guix daemon restart in `install-system` of `(gnu installer final)` wi= ll refer to a new mirror. Another way to do this would be to add another argument to the `start` acti= on of `guix-daemon`, in much the same way the installer passes in its pid s= o that the guix daemon can access the copy-on-write store on the destinatio= n. This argument would override the `--substitute-urls`. So in `(gnu services base)` the `guix-shepherd-service` procedure would hav= e 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 instal= ler final)` determine what substitute URL to pass into `(start-service 'gui= x-daemon (list (number->string (getpid)) <>))`? * Change the architecture of the installer somehow so that a single page ca= n both manipulate the `services` field and also manipulate how `install-sys= tem` 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 f= or a `substitute-urls` field. This feels fairly brittle but does take adva= ntage of the homoiconicity of Scheme. Thanks raid5atemyhomework