From unknown Fri Jun 20 07:14:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49425 <49425@debbugs.gnu.org> To: bug#49425 <49425@debbugs.gnu.org> Subject: Status: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. Reply-To: bug#49425 <49425@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:14:32 +0000 retitle 49425 [PATCH] guix-install.sh: Prompt for configuring substitutes d= iscovery. reassign 49425 guix-patches submitter 49425 Maxim Cournoyer severity 49425 normal tag 49425 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 05 19:49:22 2021 Received: (at submit) by debbugs.gnu.org; 5 Jul 2021 23:49:22 +0000 Received: from localhost ([127.0.0.1]:46850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0YL0-0004Rm-6J for submit@debbugs.gnu.org; Mon, 05 Jul 2021 19:49:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:60958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0YKv-0004RY-NK for submit@debbugs.gnu.org; Mon, 05 Jul 2021 19:49:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0YKv-00026c-DL for guix-patches@gnu.org; Mon, 05 Jul 2021 19:49:13 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:45727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0YKp-0004jf-84 for guix-patches@gnu.org; Mon, 05 Jul 2021 19:49:13 -0400 Received: by mail-qt1-x82d.google.com with SMTP id c13so13243678qtb.12 for ; Mon, 05 Jul 2021 16:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A9lLBtoD/fl1kKkzDha0b1VqZc2cYmouoKR10LaWdaM=; b=OEu8xmrVQ4rGq52wYNcOWLtOk35k800MBGwyEe3g6622KORmex0c4Rec9bkMiM/Ro1 zNXWRmRQcZISUtLK40kC5m3Y0c4THKrLZ2Aj0YrO+eLfMNt0XjuUOc+fOxM8i1f4XvS6 hoele+mbNObVgZSLNmhugb+5MRse4p/vzYd7aYstfFhDBL1vOg5mwLIA6CYbmLSs8hva 8pc6hLt3a3UFyLRgAUGuULP9sG25swWSbg2rXL65znmaCzFRkZaGWvsLkmmDIKs89mGW ShJesK5ZMiga/eOKGuDiEEvGNepA/rp76q5qTVrOkv2p6Z1+NCVBOLLDFOknW68w7BnZ TdRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A9lLBtoD/fl1kKkzDha0b1VqZc2cYmouoKR10LaWdaM=; b=fbD+oO2vwHJC4g8UeUdOsdoJ+uuwyV3qENF429HuPi6WyhkvB0uQCOi/Qnu0p9UHsE AkQ1DFaOj9CVZWIOpUgLxhIP+O0tTjNmXrKKkRGZIc2IG/WKK98FQ91uYkua/Ae09wus 7nwJhcXCRZkPo3nJsYOa/+/IMXNTPrzMEIzijyUF8GfvCveiFnxeBPzcrIaMlem+Vs9e m/aPJguX7ItapiUxplLtkbMB0aFZYccUlnnIaDiVAdnuOerorwQcSpJnSYdpFZEwFN1K PXGYIa87yuTM6iJOXsGZk4/O0Mk/yZzPS1t8FLUa921BFExCIUEwpeNI0CHDIycVW6OR eOnw== X-Gm-Message-State: AOAM531MYKfmQnLmHhG8pmVtrMxOqbJOu5WRTafAZyymLBeeeoz4OLov tjLFnd0Di1BOnwt0Ipv864E5qKN2KmnNZg== X-Google-Smtp-Source: ABdhPJx/UhKOdun7FI7+SbdaBN+lACOOA/rmlgwuUnix5cQIdBk+ibfuVgIEUy8uoyuF66BNwyucsg== X-Received: by 2002:ac8:608:: with SMTP id d8mr14774729qth.26.1625528945877; Mon, 05 Jul 2021 16:49:05 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-221.b2b2c.ca. [205.233.125.221]) by smtp.gmail.com with ESMTPSA id i10sm1694150qtx.80.2021.07.05.16.49.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 16:49:05 -0700 (PDT) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. Date: Mon, 5 Jul 2021 19:49:03 -0400 Message-Id: <20210705234903.21244-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Maxim Cournoyer 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Also ensure prompt_yes_no always print the message with a trailing space, which is more pleasing to the eye. * etc/guix-daemon.conf.in <--discovery=no>: New guix-daemon option. * etc/guix-daemon.service.in: Likewise. * etc/init.d/guix-daemon.in: Likewise. * etc/openrc/guix-daemon.in: Likewise. * etc/guix-install.sh (configure_substitute_discovery): New procedure. (sys_enable_guix_daemon): Ask the user whether automatic substitute discovery should be enabled. Set the '--discovery' argument accordingly. (prompt_yes_no): Add a trailing space to the message. (sys_authorize_build_farms): Remove trailing space from the message argument. * NEWS (Distribution): Add news. --- NEWS | 4 +++- etc/guix-daemon.conf.in | 2 +- etc/guix-daemon.service.in | 3 ++- etc/guix-install.sh | 22 ++++++++++++++++++++-- etc/init.d/guix-daemon.in | 2 +- etc/openrc/guix-daemon.in | 2 +- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index b0647b3700..ad9433a921 100644 --- a/NEWS +++ b/NEWS @@ -14,7 +14,9 @@ Please send Guix bug reports to bug-guix@gnu.org. * Changes in 1.4.0 (since 1.3.0) ** Package management - * New 'deb' format for the 'guix pack' command +*** New 'deb' format for the 'guix pack' command +** Distribution +*** The installation script can now configure substitute discovery * Changes in 1.3.0 (since 1.2.0) ** Package management diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in index 755192d555..b122ca8c7a 100644 --- a/etc/guix-daemon.conf.in +++ b/etc/guix-daemon.conf.in @@ -7,4 +7,4 @@ start on runlevel [2345] stop on runlevel [016] -exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild +exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --discovery=no diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in index 407cdd199c..17b54eaeb0 100644 --- a/etc/guix-daemon.service.in +++ b/etc/guix-daemon.service.in @@ -6,7 +6,8 @@ Description=Build daemon for GNU Guix [Service] -ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild +ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ + --build-users-group=guixbuild --discover=no Environment='GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8 RemainAfterExit=yes StandardOutput=syslog diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 6a799fa823..1e7702d4c5 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -96,7 +96,7 @@ _debug() # $1: The prompt question. prompt_yes_no() { while true; do - read -rp "$1" yn + read -rp "$1 " yn case $yn in [Yy]*) return 0;; [Nn]*) return 1;; @@ -249,6 +249,16 @@ chk_sys_nscd() fi } +# Configure substitute discovery according to user's preferences. +# $1 is the installed service file to edit. +configure_substitute_discovery() { +if grep -q -- '--discover=no' "$1" && \ + prompt_yes_no "Would you like to enable automatic substitute \ +discovery? (yes/no)"; then + sed -i 's/--discover=no/--discover=yes/' "$1" +fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -397,6 +407,7 @@ sys_enable_guix_daemon() { initctl reload-configuration; cp "~root/.config/guix/current/lib/upstart/system/guix-daemon.conf" \ /etc/init/ && + configure_substitute_discovery /etc/init/guix-daemon.conf && start guix-daemon; } && _msg "${PAS}enabled Guix daemon via upstart" ;; @@ -426,6 +437,9 @@ sys_enable_guix_daemon() -e 's/^Environment=\(.*\)$/Environment=\1 LC_ALL=en_US.UTF-8'; fi; + configure_substitute_discovery \ + /etc/systemd/system/guix-daemon.service + systemctl daemon-reload && systemctl enable guix-daemon && systemctl start guix-daemon; } && @@ -437,6 +451,8 @@ sys_enable_guix_daemon() /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon; + configure_substitute_discovery /etc/init.d/guix-daemon + update-rc.d guix-daemon defaults && update-rc.d guix-daemon enable && service guix-daemon start; } && @@ -448,6 +464,8 @@ sys_enable_guix_daemon() /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon; + configure_substitute_discovery /etc/init.d/guix-daemon + rc-update add guix-daemon default && rc-service guix-daemon start; } && _msg "${PAS}enabled Guix daemon via OpenRC" @@ -472,7 +490,7 @@ sys_enable_guix_daemon() sys_authorize_build_farms() { # authorize the public key of the build farm if prompt_yes_no "Permit downloading pre-built package binaries from the \ -project's build farm? (yes/no) "; then +project's build farm? (yes/no)"; then guix archive --authorize \ < "~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub" \ && _msg "${PAS}Authorized public key for ci.guix.gnu.org" diff --git a/etc/init.d/guix-daemon.in b/etc/init.d/guix-daemon.in index 1cc49fed89..b7d4bb72bb 100644 --- a/etc/init.d/guix-daemon.in +++ b/etc/init.d/guix-daemon.in @@ -36,7 +36,7 @@ start) -E LC_ALL=en_US.utf8 \ -p "/var/run/guix-daemon.pid" \ @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ - --build-users-group=guixbuild + --build-users-group=guixbuild --discover=no fi ;; stop) diff --git a/etc/openrc/guix-daemon.in b/etc/openrc/guix-daemon.in index 110a58b88d..eeedc2a840 100644 --- a/etc/openrc/guix-daemon.in +++ b/etc/openrc/guix-daemon.in @@ -20,7 +20,7 @@ export GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale export LC_ALL=en_US.utf8 command="@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon" -command_args="--build-users-group=guixbuild" +command_args="--build-users-group=guixbuild --discover=no" command_background="yes" pidfile="/var/run/guix-daemon.pid" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 06 05:01:59 2021 Received: (at 49425) by debbugs.gnu.org; 6 Jul 2021 09:01:59 +0000 Received: from localhost ([127.0.0.1]:47314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0gxr-0007pb-55 for submit@debbugs.gnu.org; Tue, 06 Jul 2021 05:01:59 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:53894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0gxo-0007ow-5r for 49425@debbugs.gnu.org; Tue, 06 Jul 2021 05:01:57 -0400 Received: by mail-wm1-f41.google.com with SMTP id w13so13041956wmc.3 for <49425@debbugs.gnu.org>; Tue, 06 Jul 2021 02:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=j32Sydqbc9IxsNhCEn2/uzimUU7h30dfxort8XbI0Hw=; b=ZdduK662Ym1gQbdnFQ2JGfJAgwW8VGs3gMq63WyTS8hrCbheyptqJt8rjIa4pOzHz6 iHQ8ViKwF7uo+kn5d6CRXgDLKYeYU9Xy330lAsa2VK95geTDX9i9j8DRqPtuG46pIQCd EzC+YD/5Cdj8SRHZXaeZjFMsTeC185fveXxhyHv799tf+zBsPq+ScAMdMcIyqUz2RnaW KWf6n8u59wm1m1FXIBVsPfsJ23Iw3UXcT67+dY4ta+IdrFwdA7/Ja0MD2iCAvPqD5hEM nYJKxurxpCekWQedvCXksP0Y6teojSAD/xDV1FCXLjpAyHpD+MDp5AstFYK0D4h1aKYu 5oXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=j32Sydqbc9IxsNhCEn2/uzimUU7h30dfxort8XbI0Hw=; b=MLj26/plRIie8wG9OU55tvlrKohtAwYD4POl9tNzv8Jd1zpuFUg/wWiVbwrTDk3it0 yo4C1tPdQkcCQ6AK2Wc+Gd9K+fwqo6gclHxROaSlZI4ou/cecFBwMqeQt3WVIWe4VPx9 kuTLdGLcX8nLI2XGZMeQCqkhZ/lFGZJYns59vxiFfrtOxggrIsBfjPAlMk3EhNaaq9Ae GRs4JK0Y/dmugGW01aLh09cQuhV14olybNT662jDdmfazH/s6VrWz/0CIW2BazmWe+wk A6J7SoTxPZNTSp3h4ST/mc5ULLIAI5yVEZIiRstSUNyudVRcwe0EHLj68AVBzERHK4Ju 47ew== X-Gm-Message-State: AOAM531ltyg1GcG7Rsq7691foTlmdurrWzfL5H3kw3gb3x3wzUf8cDH4 ftT8JaFzbyG3iGaO399vHBq1IM6qrAw= X-Google-Smtp-Source: ABdhPJzjAOhnSCx9l9gw7PBzvrGwOdfXwiBw97UYPDiGFkb3rXHXKUAeOd9TSDixtm0hC/cD63Kswg== X-Received: by 2002:a7b:c21a:: with SMTP id x26mr3566887wmi.6.1625562110564; Tue, 06 Jul 2021 02:01:50 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x187sm6184365wmb.47.2021.07.06.02.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 02:01:50 -0700 (PDT) From: zimoun To: Maxim Cournoyer , 49425@debbugs.gnu.org Subject: Re: [bug#49425] [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. In-Reply-To: <20210705234903.21244-1-maxim.cournoyer@gmail.com> References: <20210705234903.21244-1-maxim.cournoyer@gmail.com> Date: Tue, 06 Jul 2021 10:38:01 +0200 Message-ID: <86pmvv3kie.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49425 Cc: Maxim Cournoyer 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, (Not related to the patch :-)) On Mon, 05 Jul 2021 at 19:49, Maxim Cournoyer wrote: > * NEWS (Distribution): Add news. [...] > diff --git a/NEWS b/NEWS > index b0647b3700..ad9433a921 100644 > --- a/NEWS > +++ b/NEWS > @@ -14,7 +14,9 @@ Please send Guix bug reports to bug-guix@gnu.org. > > * Changes in 1.4.0 (since 1.3.0) > ** Package management > - * New 'deb' format for the 'guix pack' command > +*** New 'deb' format for the 'guix pack' command > +** Distribution > +*** The installation script can now configure substitute discovery > > * Changes in 1.3.0 (since 1.2.0) > ** Package management >From my point of view, this is a good practise. :-) Especially when preparing a new release. ;-) Now, is it a standard practise? I mean, is it asked to committers to do it more systematically for the changes that require it? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 06 10:40:26 2021 Received: (at 49425) by debbugs.gnu.org; 6 Jul 2021 14:40:26 +0000 Received: from localhost ([127.0.0.1]:49629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mFO-0004KU-1F for submit@debbugs.gnu.org; Tue, 06 Jul 2021 10:40:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mFM-0004KJ-02 for 49425@debbugs.gnu.org; Tue, 06 Jul 2021 10:40:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44098) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0mFG-0007Sx-M9; Tue, 06 Jul 2021 10:40:18 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36624 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0mF6-0000cl-Bv; Tue, 06 Jul 2021 10:40:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#49425: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. References: <20210705234903.21244-1-maxim.cournoyer@gmail.com> <86pmvv3kie.fsf@gmail.com> Date: Tue, 06 Jul 2021 16:40:06 +0200 In-Reply-To: <86pmvv3kie.fsf@gmail.com> (zimoun's message of "Tue, 06 Jul 2021 10:38:01 +0200") Message-ID: <87fswrqzeh.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49425 Cc: 49425@debbugs.gnu.org, Maxim Cournoyer 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: >> diff --git a/NEWS b/NEWS >> index b0647b3700..ad9433a921 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -14,7 +14,9 @@ Please send Guix bug reports to bug-guix@gnu.org. >>=20=20 >> * Changes in 1.4.0 (since 1.3.0) >> ** Package management >> - * New 'deb' format for the 'guix pack' command >> +*** New 'deb' format for the 'guix pack' command >> +** Distribution >> +*** The installation script can now configure substitute discovery >>=20=20 >> * Changes in 1.3.0 (since 1.2.0) >> ** Package management > >>>From my point of view, this is a good practise. :-) Especially when > preparing a new release. ;-) > > Now, is it a standard practise? I mean, is it asked to committers to do > it more systematically for the changes that require it? I think we should aim to make it standard practice! The worst that could happen is that we=E2=80=99d end up with an overly deta= iled =E2=80=98NEWS=E2=80=99, but that=E2=80=99s probably better than the other w= ay around. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 06 10:44:56 2021 Received: (at 49425) by debbugs.gnu.org; 6 Jul 2021 14:44:56 +0000 Received: from localhost ([127.0.0.1]:49633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mJk-0004Qn-LA for submit@debbugs.gnu.org; Tue, 06 Jul 2021 10:44:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mJj-0004Qc-Vc for 49425@debbugs.gnu.org; Tue, 06 Jul 2021 10:44:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44356) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0mJe-0001va-Ad; Tue, 06 Jul 2021 10:44:50 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36626 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0mJd-00012Z-OU; Tue, 06 Jul 2021 10:44:50 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#49425: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. References: <20210705234903.21244-1-maxim.cournoyer@gmail.com> Date: Tue, 06 Jul 2021 16:44:48 +0200 In-Reply-To: <20210705234903.21244-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Mon, 5 Jul 2021 19:49:03 -0400") Message-ID: <87a6mzqz6n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49425 Cc: 49425@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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: > +# Configure substitute discovery according to user's preferences. > +# $1 is the installed service file to edit. > +configure_substitute_discovery() { > +if grep -q -- '--discover=3Dno' "$1" && \ > + prompt_yes_no "Would you like to enable automatic substitute \ > +discovery? (yes/no)"; then > + sed -i 's/--discover=3Dno/--discover=3Dyes/' "$1" > +fi > +} Indentation is off, compared to the other functions. Should the message say a bit more, similar to that in (gnu installer newt substitutes)? Otherwise LGTM! Note that someone running =E2=80=9Cyes | ./guix-install.sh=E2=80=9D will no= w have substitutes enabled (whereas it=E2=80=99s off by default in ). I suppose that=E2=80=99s fine though. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 06 12:16:17 2021 Received: (at 49425) by debbugs.gnu.org; 6 Jul 2021 16:16:17 +0000 Received: from localhost ([127.0.0.1]:49860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0nk9-000396-Gz for submit@debbugs.gnu.org; Tue, 06 Jul 2021 12:16:17 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:39759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0nk7-00038t-Nb for 49425@debbugs.gnu.org; Tue, 06 Jul 2021 12:16:16 -0400 Received: by mail-qt1-f180.google.com with SMTP id f13so14809042qtb.6 for <49425@debbugs.gnu.org>; Tue, 06 Jul 2021 09:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Y5cZvM+D0fyXps1mTAB+ZDk6C8NP3iH7uGePvvxCumE=; b=ZmjPhb4+Z9ygLFHGOSJmtv0FMNMr3kUYw0r51k/qeFrShElP2rqEODyQBW//wsbVu6 CGx2vLxEUafuqB4V2vG1V26tszQ+Nms9Q4KqQwoGGcz8B2kF4BHvvFdn3zjjsYnBP4QR Iou995bb4z6W+uUVHsYQVu/tNmJ4wR4+W5jePkcPUww17h3XuVrq/ZK1+46lgxSeGwAP hJKHPl5+1ttmisDXzkyHHPSUspnE26uWXBzLUqZE79os8ElH9YnBLKdVOKLPd9g5srQf fi6cc/mxerZqPx//RlYfuexLZsmvLwipbw4APJCW4Yk8cr1bdNj8/pUKSh5kKVgi8sLe 6yiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Y5cZvM+D0fyXps1mTAB+ZDk6C8NP3iH7uGePvvxCumE=; b=rmQSqulyJwZmgthRfJ1SHXT3zac5qOwjmO/VHaqnFUfKco9YxYC0btzT0r+BQaVat1 tY3tDqmPvCb3z77mII+CnNJUq7SMl6urlQOimuswX3xqxbZY9Dru2Fpu9eF92+3bAUJF VgjziwfkGJDbbUtdhcWYfCtVlo3e+GmizfykwnNs9TXK7QbdFTOOJouPr+6pKP3zd6+L uMrGas0qQDMgBQZyZWvpOYfQaaiC8CZsWhL9Wu3jTer/hM8jVTjAlbBDKjVwezlxKV9I GHyUVNXT3E6iq/TzPO9iRcDd6t6QDbefpue9G9gTn2YvsMuqKnETD11XY9SqmVg3Ipe3 k6zw== X-Gm-Message-State: AOAM531kGQP2w8TFJd6ytp9YFXGMSAuaEKExKSAP9KoFLoxZ4RMn6qax SsYv376HD3Mj3zkh9tbg2gBk6RTyH1xUgw== X-Google-Smtp-Source: ABdhPJzIPegbwYEAC+tnHUCSxFaXhc/YalsLEBqw76jS5FtcDJbfdaORm3t8i/9i96LLFW9zXM5Okg== X-Received: by 2002:a05:622a:164d:: with SMTP id y13mr18133344qtj.244.1625588170097; Tue, 06 Jul 2021 09:16:10 -0700 (PDT) Received: from hurd (dsl-205-233-125-111.b2b2c.ca. [205.233.125.111]) by smtp.gmail.com with ESMTPSA id i6sm6632013qkn.118.2021.07.06.09.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 09:16:09 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#49425: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. References: <20210705234903.21244-1-maxim.cournoyer@gmail.com> <86pmvv3kie.fsf@gmail.com> <87fswrqzeh.fsf_-_@gnu.org> Date: Tue, 06 Jul 2021 12:16:08 -0400 In-Reply-To: <87fswrqzeh.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 06 Jul 2021 16:40:06 +0200") Message-ID: <87eecb5sfr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49425 Cc: 49425@debbugs.gnu.org, zimoun 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Ludovic Court=C3=A8s writes: > Hi, > > zimoun skribis: > >>> diff --git a/NEWS b/NEWS >>> index b0647b3700..ad9433a921 100644 >>> --- a/NEWS >>> +++ b/NEWS >>> @@ -14,7 +14,9 @@ Please send Guix bug reports to bug-guix@gnu.org. >>>=20=20 >>> * Changes in 1.4.0 (since 1.3.0) >>> ** Package management >>> - * New 'deb' format for the 'guix pack' command >>> +*** New 'deb' format for the 'guix pack' command >>> +** Distribution >>> +*** The installation script can now configure substitute discovery >>>=20=20 >>> * Changes in 1.3.0 (since 1.2.0) >>> ** Package management >> >>>>From my point of view, this is a good practise. :-) Especially when >> preparing a new release. ;-) >> >> Now, is it a standard practise? I mean, is it asked to committers to do >> it more systematically for the changes that require it? > > I think we should aim to make it standard practice! > > The worst that could happen is that we=E2=80=99d end up with an overly de= tailed > =E2=80=98NEWS=E2=80=99, but that=E2=80=99s probably better than the other= way around. It'd be useful indeed to have the NEWS file populated by the very people who authored the features. We could at least mention that doing so is useful and appreciated in our contributing section. Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 07 23:58:53 2021 Received: (at 49425-done) by debbugs.gnu.org; 8 Jul 2021 03:58:53 +0000 Received: from localhost ([127.0.0.1]:53966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1LBd-0006zo-1K for submit@debbugs.gnu.org; Wed, 07 Jul 2021 23:58:53 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:44703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1LBb-0006zW-3h for 49425-done@debbugs.gnu.org; Wed, 07 Jul 2021 23:58:52 -0400 Received: by mail-qk1-f178.google.com with SMTP id 77so2643946qkk.11 for <49425-done@debbugs.gnu.org>; Wed, 07 Jul 2021 20:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=RmGfj9kax2vwuj6zgpMucha7Ry+2gtc5vfyRE/pVZC8=; b=ThhehhM33SYWsIUUwJjDJ0T0UMU2+OeH6SJ5TXBFC79OxASX+A+MQot7bwDbgb/Rjl e/gMF+wuUUWH5PsSIbTAF1BU9kwGuM9EfosjvT0Kj4o0drkSmmHQY+EzT3bPuOrBktwO QXOnX689dK/JlrYngkoh7cdLD+1mCLPK5t5LR5xw3BKMlFsYwpa00JOEKDJA5BUbSZEi kLNcsiXxB7rB5ZFkaUCgP1LvotMuQnKf9MM7P0rr+Foa63DeG0Ouk9+jTibUgc0riH5S k38yQX/nM1RCOl4cTVqXs5VIEro4BxHOGd1AeXKX57sglQwv08/S92AR45EeLLZn0NvO mbiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=RmGfj9kax2vwuj6zgpMucha7Ry+2gtc5vfyRE/pVZC8=; b=jvTdR/4fwa3krEfIT5zauyX4luuxtcY+wpnaPlRIx4/7NrCyKt1qSZYwatUYzsUGr1 XdD6MTb+JGf+VB02T8sEmmF8mexSvbrIp/UPljG7KKW2FTTlQT2vAWS5JkWVBAhHzOM2 j+s3hGK1eAcYC4EHKiobB/uBAa3EXwWm87T1uzHw5pn30R1y96Y6x1/MGyUaqIBkSiom gXynOoD3fCPx2J/WYmJ8EFv7BQbFWdJcAHXQZv99s5rzYSuA2jH/04Zm68ICEPMIVdCu mbQA+NS2zg2BF40SFZp/+IyPWlLn4t466MmPdaXw2+ecA6aCgQ0FZ/phmhzkm1dIA5nR yzmw== X-Gm-Message-State: AOAM531wkaLPgdU2OKMtcXVCzg6QOCyyzosP8sgK+6Am4XQZkZEms8Ma jBszn4GaZE95EOYSIbpi+NV6gINLb4Y5hQ== X-Google-Smtp-Source: ABdhPJzMsDADvS0FwV7x7FC3OoBCAkyxZQLgViLyZM+gwJMxvmf0y6OK4B5WzS9muR47vpTrhVi0PA== X-Received: by 2002:a05:620a:1a9e:: with SMTP id bl30mr618574qkb.395.1625716725184; Wed, 07 Jul 2021 20:58:45 -0700 (PDT) Received: from hurd (dsl-205-233-125-111.b2b2c.ca. [205.233.125.111]) by smtp.gmail.com with ESMTPSA id c27sm452089qkk.59.2021.07.07.20.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 20:58:44 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#49425: [PATCH] guix-install.sh: Prompt for configuring substitutes discovery. References: <20210705234903.21244-1-maxim.cournoyer@gmail.com> <87a6mzqz6n.fsf@gnu.org> Date: Wed, 07 Jul 2021 23:58:43 -0400 In-Reply-To: <87a6mzqz6n.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 06 Jul 2021 16:44:48 +0200") Message-ID: <87y2ah4ft8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49425-done Cc: 49425-done@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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi! Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> +# Configure substitute discovery according to user's preferences. >> +# $1 is the installed service file to edit. >> +configure_substitute_discovery() { >> +if grep -q -- '--discover=3Dno' "$1" && \ >> + prompt_yes_no "Would you like to enable automatic substitute \ >> +discovery? (yes/no)"; then >> + sed -i 's/--discover=3Dno/--discover=3Dyes/' "$1" >> +fi >> +} > > Indentation is off, compared to the other functions. Good catch. > Should the message say a bit more, similar to that in (gnu installer > newt substitutes)? > > Otherwise LGTM! I went with: --8<---------------cut here---------------start------------->8--- -if grep -q -- '--discover=3Dno' "$1" && \ - prompt_yes_no "Would you like to enable automatic substitute \ -discovery? (yes/no)"; then - sed -i 's/--discover=3Dno/--discover=3Dyes/' "$1" -fi + if grep -q -- '--discover=3Dno' "$1" && \ + prompt_yes_no "Would you like the Guix daemon to automatically= \ +discover substitute servers on the local network? (yes/no)"; then + sed -i 's/--discover=3Dno/--discover=3Dyes/' "$1" + fi } --8<---------------cut here---------------end--------------->8--- and pushed as commit 4cbe0127a6. > Note that someone running =E2=80=9Cyes | ./guix-install.sh=E2=80=9D will = now have > substitutes enabled (whereas it=E2=80=99s off by default in > ). I suppose that=E2=80=99s fine though. I think it's OK too. I like to think that someone typing yes | ./guix-install.sh wants the most complete setup, with all the bells and whistles ("yes, all that" :-)). Thanks! Maxim From unknown Fri Jun 20 07:14:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Aug 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator