From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iLXqE9GQZWCeMAAAgWs5BA (envelope-from ) for ; Thu, 01 Apr 2021 11:22:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MK7hDdGQZWBTRgAA1q6Kng (envelope-from ) for ; Thu, 01 Apr 2021 09:22:25 +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 E9E0CE36A for ; Thu, 1 Apr 2021 11:22:24 +0200 (CEST) Received: from localhost ([::1]:36932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRtWy-0006CP-2v for larch@yhetil.org; Thu, 01 Apr 2021 05:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRtWj-0006Az-6O for guix-devel@gnu.org; Thu, 01 Apr 2021 05:22:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51021) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRtWh-0006Gl-FH; Thu, 01 Apr 2021 05:22:07 -0400 Received: from [2a01:e0a:19b:d9a0:1a7a:d05e:2600:6047] (port=47256 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRtWh-0000dk-1w; Thu, 01 Apr 2021 05:22:07 -0400 From: Mathieu Othacehe To: raid5atemyhomework Subject: Re: Adding Substitute Mirrors page to installer References: <87blbsah0x.fsf@ambrevar.xyz> <-WVvn-rIc2HXdunUeEp6YfVQ9WkU-JsP_sAdLNK4ebx5YUTZ0-lSxWF2MGWOTGpqCvfil-JSAW1n-_82UQlRSXM5Qmb2ajaTYsa_EFUJ6o4=@protonmail.com> <3YQTy8cg8z-IZkxgM7lJSk8ZeolHbf4t7_HPw9Q8GCkx1lP7CXrbdtPZ9Hvyo--NvKXyr9W2iv82d8lL2T0NQPpTPhDbBFo3_3jQ3eAdAEI=@protonmail.com> Date: Thu, 01 Apr 2021 11:22:05 +0200 In-Reply-To: <3YQTy8cg8z-IZkxgM7lJSk8ZeolHbf4t7_HPw9Q8GCkx1lP7CXrbdtPZ9Hvyo--NvKXyr9W2iv82d8lL2T0NQPpTPhDbBFo3_3jQ3eAdAEI=@protonmail.com> (raid5atemyhomework@protonmail.com's message of "Tue, 16 Mar 2021 15:55:57 +0000") Message-ID: <87o8eys6ki.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , Cc: "guix-devel@gnu.org" 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=1617268945; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Ahk7jCtdNTeLvMSvmuzJM/klYjyMxlJMw2fh67zjOkU=; b=nNMuqVJrWCoKcx4DGNlOejB5nHwTRX/x3BwHoOY7UPXf3FXfod08+nprO3HyTxZwSv5fhw TILv4BHwNFsH3DmGRfEE9sjDeLzzP3XcnHLWcsvqMLE8XBFEA1NUDUD0IL3fm5Gf6H47Yc AgQJHrPIBnN39vJblDMHFlfuKkbRIvBqqsa/38Ydn0VcQGMlaY0+vDBj7xQcwfEgERVN2t A6TOpS2lmnzeNxFR4ocZwffvPDudFBnRp/GSDCAsh19HMulJ/81oQfwr3Cdj5Hyw8Nx1Ij jgfHEmx2umKXkyH/5cNbGoY7oc8imRoVvDL0QCq/qRRCbkmt2rb8S3TdYUN/Bg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617268945; a=rsa-sha256; cv=none; b=RY9I3VgM6u/jkhsZO0Kdt7PKJG+pJ1HzjkpF209i1B5OVpxJYHQXsIZUZKrsNVN3EQ37Y6 zqeEGNSMOOLgfMoZzGv0GSLMCWnAwNHXf38fUgRSPpZDv/MpLW2wAfi1BY3BJFeeHfT5sT C56rogINwG6HZB4ao9ka+zccrWmFGvIvHQhek94TScZQu3ERVD08sAmuXtXp6Je2/xO0OQ LUF9ByptiiEsvEGnOf2C4SwGuiSTehxkTvY/ekIzR9/+fmSqXi+TSit/U5lc3VzG0RAv5p jXDrtPSoAoJCHxl8wh2UO78pEod86LEUs1iU6HxRQY1Zxr71LFoRIWyMCp5eWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: E9E0CE36A X-Spam-Score: -1.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9gK2x7JD6vuF 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. > +(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? Thanks, Mathieu