From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 10:22:35 2022 Received: (at submit) by debbugs.gnu.org; 22 May 2022 14:22:35 +0000 Received: from localhost ([127.0.0.1]:46109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsmTZ-0008E6-E6 for submit@debbugs.gnu.org; Sun, 22 May 2022 10:22:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:48634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsm2k-00072P-4B for submit@debbugs.gnu.org; Sun, 22 May 2022 09:54:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsm2j-0003k8-SX for guix-patches@gnu.org; Sun, 22 May 2022 09:54:49 -0400 Received: from msg-1.mailo.com ([213.182.54.11]:60282) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsm2h-0000bK-Af for guix-patches@gnu.org; Sun, 22 May 2022 09:54:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1653227682; bh=kZlhmz2mrVMmu0n1r5XDX/M/8sWpUwu3O9YtblxgQb4=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: Content-Type:Content-Transfer-Encoding; b=U4ZGy/CrTIHOTzvgrnvL1ZKWEjc3kUR+8NaWPrqWxeQBoDeDJKvDInLQ4a56ZKuIB li8T0e5+g+JB3xaGfjMwZPlD9vlBiM2jLR5pJsa2p74nwXrLmrCK1Hp4QztS2IUUru iI0kJ2bzasEV6o+jnxrdo3A6uIZgG7vIDXCestRw= Received: by www-7.mailo.com with http webmail; Sun, 22 May 2022 15:54:42 +0200 (CEST) X-EA-Auth: MFdw7ab51SW+aSaw1OCN3yMzwJdv2/lPYU4hKopUPGYLWIkcb2z3/Sy1gkGVXj0TIcnpTFwVW/9z0DieV4t4FNjOq1nG87gW From: yarl-baudig@mailoo.org To: guix-patches@gnu.org Date: Sun, 22 May 2022 15:54:42 +0200 (CEST) Subject: [PATCH] Check substitute --help or --version options early X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA21.01/r20220415 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=213.182.54.11; envelope-from=yarl-baudig@mailoo.org; helo=msg-1.mailo.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 22 May 2022 10:22:32 -0400 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: -2.3 (--) Running `guix archive --authorize` sets /etc/guix/acl to 600 via with-atomic-file-output via mkstemp!. Then running `guix substitute --help/--version` fails on "permission denie= d". While "guix substitute" is an internal tool, the options --help and --vers= ion exist and you should be able to run those from the command line. * guix/scripts/substitute.scm: earlier check for --help or --version. --- guix/scripts/substitute.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 908a8334a8..c5f5d23b47 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -704,6 +704,14 @@ (define-command (guix-substitute . args) (category internal) (synopsis "implement the build daemon's substituter protocol") =20 + (match args + ((or ("-V") ("--version")) + (show-version-and-exit "guix substitute")) + ((or ("-h") ("--help") ()) + (show-help) + (exit 0)) + (_ #t)) + (define print-build-trace? (match (or (find-daemon-option "untrusted-print-extended-build-trace"= ) (find-daemon-option "print-extended-build-trace")) @@ -775,10 +783,6 @@ (define reply-port #:print-build-trace? print-build-trace?) (loop)))))) - ((or ("-V") ("--version")) - (show-version-and-exit "guix substitute")) - ((or ("-h") ("--help")) - (show-help)) (opts (leave (G_ "~a: unrecognized options~%") opts)))))) =20 --=20 2.36.0 From debbugs-submit-bounces@debbugs.gnu.org Fri May 27 17:36:34 2022 Received: (at 55577-done) by debbugs.gnu.org; 27 May 2022 21:36:34 +0000 Received: from localhost ([127.0.0.1]:35935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuhdK-0000rI-3m for submit@debbugs.gnu.org; Fri, 27 May 2022 17:36:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuhdH-0000r4-Qx for 55577-done@debbugs.gnu.org; Fri, 27 May 2022 17:36:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuhdB-000275-SH; Fri, 27 May 2022 17:36:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=z/S/tjI7ceBvgsnONRidUNL34F515NJXtsP+KYZL7DQ=; b=nidrye/a08e6Njg5B9cC TtydVXm330eEleHh489Tm6oGWj/IzeG32pM9I1q98/g2iQjOiYhsxAx18XjfKDTcR5ggBSIWcQePx RtjQoMyVU7+6y0ZbLl5/qpCHI30earqza8qaBNAyxuz97ZHiyBFXvLBTH6Lq8iJ/H6UoOMkvI6H/J qSkRNLzuKBd1QDdG6G2KDtR5JRx94Ra5EFoE3puJkpMU4vFd2C8hkljmfijuIrJAuQOHsY0lGtcIj SxC0tdI0FNraTR5XAiYzoXaSfMeUfCl8GNWZ69BcdCnUinBuNgh0UH4tGamm7LeXgsC0hXt6FLrv5 1DDVTFkebUP8qg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49394 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuhdB-00012n-GN; Fri, 27 May 2022 17:36:25 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: yarl-baudig@mailoo.org Subject: Re: bug#55577: [PATCH] Check substitute --help or --version options early References: Date: Fri, 27 May 2022 23:36:23 +0200 In-Reply-To: (yarl-baudig@mailoo.org's message of "Sun, 22 May 2022 15:54:42 +0200 (CEST)") Message-ID: <878rqmd5ew.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: 55577-done Cc: 55577-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: -3.3 (---) Hi, yarl-baudig@mailoo.org skribis: > Running `guix archive --authorize` sets /etc/guix/acl to 600 > via with-atomic-file-output via mkstemp!. > Then running `guix substitute --help/--version` fails on "permission deni= ed". > While "guix substitute" is an internal tool, the options --help and --ver= sion > exist and you should be able to run those from the command line. > > * guix/scripts/substitute.scm: earlier check for --help or --version. Applied, thanks! Ludo=E2=80=99. From unknown Sat Sep 13 18:40:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 25 Jun 2022 11:24:09 +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