From unknown Sun Jun 22 03:48:44 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#65229 <65229@debbugs.gnu.org> To: bug#65229 <65229@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Add '-q' for 'pull' and 'time-machine'; support loading from pipes Reply-To: bug#65229 <65229@debbugs.gnu.org> Date: Sun, 22 Jun 2025 10:48:44 +0000 retitle 65229 [PATCH 0/2] Add '-q' for 'pull' and 'time-machine'; support l= oading from pipes reassign 65229 guix-patches submitter 65229 Ludovic Court=C3=A8s severity 65229 normal tag 65229 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 11:31:42 2023 Received: (at submit) by debbugs.gnu.org; 11 Aug 2023 15:31:42 +0000 Received: from localhost ([127.0.0.1]:47788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUU73-0002lI-OD for submit@debbugs.gnu.org; Fri, 11 Aug 2023 11:31:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:46980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUU71-0002l2-8c for submit@debbugs.gnu.org; Fri, 11 Aug 2023 11:31:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUU6t-0005bQ-Pf for guix-patches@gnu.org; Fri, 11 Aug 2023 11:31:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUU6s-0001xd-Bj; Fri, 11 Aug 2023 11:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=DoZpFf3FRG+nvgohbeiINeUUgBGW69NUymC9BDutTi8=; b=r2hogurZCx4mAN Ihg2rZcrQPhacZKiJtc8KNo6nu+evF2WULbwpvafD6mHdIjQNlKb+s/DkipCSkVsoI6WsGogWQtxF GGeR7wDvpBbD/sctECr1K9LLG6WV6Hk8lph1RPxCESlSUNSyAP5XWIlouAD+t4vuyB78iIz7NAG7Q sbmiv7Hh6f6ioy9Bk4CT4Ebe9vb0ykARwY2f4YoWcn9e122lqSS7ZtpJ/YTVwKVU8ijWcAQSfAxoH 31nyXgcjkhcvpsrm3f5zhELMSUA7W1ZQmcbzjr+OTuVmemMayzgtTVahOscmXByyYSOwsehZAFaeT fr2x/kn52Dgc1XtP5NsQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/2] Add '-q' for 'pull' and 'time-machine'; support loading from pipes Date: Fri, 11 Aug 2023 17:31:06 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: maurice.bremond@inria.fr, =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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! These patches address two related issues: • The first one adds ‘-q’ to ‘pull’ and ‘time-machine’ to instruct them to ignore the user/system ‘channels.scm’ file. That way, a command like the following is guaranteed to have the same semantics regardless of available config files: guix time-machine -q --commit=v1.2.0 -- build hello This issue had been raised in . • The second one lets users do things (in Bash) like: guix time-machine -C <(echo %default-channels) -- … Feedback welcome! Ludo’. Ludovic Courtès (2): pull, time-machine: Add '-q' to ignore channel files. ui: 'load*' accepts /dev/fd/N files pointing to a pipe. doc/guix.texi | 30 ++++++++++++++++++++++-------- guix/scripts/pull.scm | 14 ++++++++++++-- guix/scripts/time-machine.scm | 7 ++++++- guix/ui.scm | 16 +++++++++++++++- tests/guix-build.sh | 9 ++++++++- 5 files changed, 63 insertions(+), 13 deletions(-) base-commit: 56fddefc6de3b0c1f2ccb9559d86ba08d2e429b9 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 11:34:50 2023 Received: (at 65229) by debbugs.gnu.org; 11 Aug 2023 15:34:50 +0000 Received: from localhost ([127.0.0.1]:47801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUUA5-0002q6-D1 for submit@debbugs.gnu.org; Fri, 11 Aug 2023 11:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUUA3-0002pq-OK for 65229@debbugs.gnu.org; Fri, 11 Aug 2023 11:34:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUU9y-0002oI-89; Fri, 11 Aug 2023 11:34:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=RLstrc5fpnjJxoJLc4e+ggj5tIuvJNZjVTLO1EePrP8=; b=YZTLNGHDGIoPG3h3QZ/D Dgdk09hko3PLUaEA104tJGhwOavb6C7ghcAB7FcNrHtPozAsW58T5Ee1mq9tv7hmdcjWoxB6cvZ5k EHyScjmYDfr7bLxcC08UiisbkN9MQGMIgnBHkER2Yzy1r1uLoPep3wWo64AWjg9Ap5Td8IDwXyWyV mDNaqyNDOfHK1s9BvfOugzN2eMtdAulueHgnIaxn29tM89H98UpIuv3q1puK9ZHww3nD9qEThXnV2 BBywvvvTJTarpwUVZfInTXwKHuvPDPGqPRSqyVq9lIiy3uGzaERXR+PgA8TSKY5H+t0U2Zk2IaxV0 dm7oxI2UFxTRBQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 65229@debbugs.gnu.org Subject: [PATCH 1/2] pull, time-machine: Add '-q' to ignore channel files. Date: Fri, 11 Aug 2023 17:34:18 +0200 Message-ID: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65229 Cc: maurice.bremond@inria.fr, =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Simon Tournier 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 (---) From: Ludovic Courtès This also fixes . * guix/scripts/pull.scm (show-help, %options): Add '-q'. (channel-list): Honor it. * guix/scripts/time-machine.scm (show-help, %options): Add '-q'. * doc/guix.texi (Invoking guix pull, Invoking guix time-machine): Document it. Reported-by: Simon Tournier --- doc/guix.texi | 30 ++++++++++++++++++++++-------- guix/scripts/pull.scm | 14 ++++++++++++-- guix/scripts/time-machine.scm | 7 ++++++- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 409ca2ad62..ec36159de1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4801,9 +4801,11 @@ Invoking guix pull @item the @option{--channels} option; @item -the user's @file{~/.config/guix/channels.scm} file; +the user's @file{~/.config/guix/channels.scm} file, unless @option{-q} +is passed; @item -the system-wide @file{/etc/guix/channels.scm} file; +the system-wide @file{/etc/guix/channels.scm} file, unless @option{-q} +is passed; @item the built-in default channels specified in the @code{%default-channels} variable. @@ -4905,6 +4907,10 @@ Invoking guix pull evaluates to a list of channel objects. @xref{Channels}, for more information. +@item -q +Inhibit loading of the user and system channel files, +@file{~/.config/guix/channels.scm} and @file{/etc/guix/channels.scm}. + @cindex channel news @item --news @itemx -N @@ -5092,18 +5098,26 @@ Invoking guix time-machine Read the list of channels from @var{file}. @var{file} must contain Scheme code that evaluates to a list of channel objects. @xref{Channels} for more information. + +@item -q +Inhibit loading of the user and system channel files, +@file{~/.config/guix/channels.scm} and @file{/etc/guix/channels.scm}. @end table -As for @command{guix pull}, the absence of any options means that the -latest commit on the master branch will be used. The command +As for @command{guix pull}, in the absence of any options, +@command{time-machine} fetches the latest commits of the channels +specified in @file{~/.config/guix/channels.scm}, +@file{/etc/guix/channels.scm}, or the default channels; the @option{-q} +option lets you ignore these configuration files. The command: @example -guix time-machine -- build hello +guix time-machine -q -- build hello @end example -will thus build the package @code{hello} as defined in the master branch, -which is in general a newer revision of Guix than you have installed. -Time travel works in both directions! +will thus build the package @code{hello} as defined in the main branch +of Guix, without any additional channel, which is in general a newer +revision of Guix than you have installed. Time travel works in both +directions! Note that @command{guix time-machine} can trigger builds of channels and their dependencies, and these are controlled by the standard build diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index ecd264d3fa..f0d4ff36e6 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -84,6 +84,8 @@ (define (show-help) Download and deploy the latest version of Guix.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) + (display (G_ " + -q inhibit loading of user and system 'channels.scm'")) (display (G_ " --url=URL download \"guix\" channel from the Git repository at URL")) (display (G_ " @@ -133,6 +135,9 @@ (define %options (cons* (option '(#\C "channels") #t #f (lambda (opt name arg result) (alist-cons 'channel-file arg result))) + (option '(#\q) #f #f + (lambda (opt name arg result) + (alist-cons 'ignore-channel-files? #t result))) (option '(#\l "list-generations") #f #t (lambda (opt name arg result) (cons `(query list-generations ,arg) @@ -735,6 +740,9 @@ (define (channel-list opts) (define file (assoc-ref opts 'channel-file)) + (define ignore-channel-files? + (assoc-ref opts 'ignore-channel-files?)) + (define default-file (string-append (config-directory) "/channels.scm")) @@ -750,9 +758,11 @@ (define (channel-list opts) (define channels (cond (file (load-channels file)) - ((file-exists? default-file) + ((and (not ignore-channel-files?) + (file-exists? default-file)) (load-channels default-file)) - ((file-exists? global-file) + ((and (not ignore-channel-files?) + (file-exists? global-file)) (load-channels global-file)) (else %default-channels))) diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index d7c71ef705..8afea6b35d 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Konrad Hinsen -;;; Copyright © 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2019, 2020, 2021, 2023 Ludovic Courtès ;;; Copyright © 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. @@ -51,6 +51,8 @@ (define (show-help) Execute COMMAND ARGS... in an older version of Guix.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) + (display (G_ " + -q inhibit loading of user and system 'channels.scm'")) (display (G_ " --url=URL use the Git repository at URL")) (display (G_ " @@ -75,6 +77,9 @@ (define %options (cons* (option '(#\C "channels") #t #f (lambda (opt name arg result) (alist-cons 'channel-file arg result))) + (option '(#\q) #f #f + (lambda (opt name arg result) + (alist-cons 'ignore-channel-files? #t result))) (option '("url") #t #f (lambda (opt name arg result) (alist-cons 'repository-url arg -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 11:34:52 2023 Received: (at 65229) by debbugs.gnu.org; 11 Aug 2023 15:34:52 +0000 Received: from localhost ([127.0.0.1]:47803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUUA8-0002qK-5p for submit@debbugs.gnu.org; Fri, 11 Aug 2023 11:34:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUUA4-0002pr-DZ for 65229@debbugs.gnu.org; Fri, 11 Aug 2023 11:34:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUU9z-0002oU-6y; Fri, 11 Aug 2023 11:34:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=4+nfJAjFTaMoKMhiD+s5D9q7E4G2OJtv2W3ZoJCLMqw=; b=mGKDNRB5Axm9/93TJXiK q8WhVjGVmaKt5T02oq0sPAei1rOOvUx5TeQsztOwwWTTJEy9+xSPqX+4wZo0dCFSx3GmYglL2+Sgj CC0tvALkm0/fyXVL0fPb99zymnEj/O5yJXjrD0iDk22bfJS5t51S0bG0Vv6OmXS6RXzyeiSEKFjxP VRm1kov3X+3V6z3Lm5IKk2IGSxA/YKUpl/pwFY9IviLgwrVl7AXY8AS0zx5ZS4qbSy3dkfHRhM22l iwQW25veJOcvZIkAOwngAy/BHpcmzoNDLhckud587vbTVZcUKtcGRwQT7ULFgXTLcEDJ/8QIPP/0D Rf3Y9qG2VLVGRA==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 65229@debbugs.gnu.org Subject: [PATCH 2/2] ui: 'load*' accepts /dev/fd/N files pointing to a pipe. Date: Fri, 11 Aug 2023 17:34:19 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65229 Cc: maurice.bremond@inria.fr, =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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 (---) From: Ludovic Courtès This allows users to write Bash commands like: guix time-machine -C <(echo %default-channels) -- ... or: guix build -m <(echo '(specifications->manifest (list "guile"))') Previously, on GNU/Linux, they would fail with: error: failed to load '/dev/fd/63': No such file or directory * guix/ui.scm (try-canonicalize-path): New procedure. (load*): Use it. * tests/guix-build.sh: Test 'guix build -m' with a /dev/fd/N file. --- guix/ui.scm | 16 +++++++++++++++- tests/guix-build.sh | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 47a118364a..6f2d4fe245 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -200,6 +200,20 @@ (define-syntax-rule (without-compiler-optimizations exp) (parameterize (((@ (system base compile) default-optimization-level) 1)) exp)) +(define (try-canonicalize-path file) + "Like 'canonicalize-path', but return FILE as-is if 'canonicalize-path' +throws. + +This is necessary for corner cases where 'canonicalize-path' fails. One +example is on Linux when a /dev/fd/N file denotes a pipe, represented as a +symlink to a non-existent file like 'pipe:[1234]', as in this example: + + sh -c 'stat $(readlink -f /dev/fd/1)' | cat" + (catch 'system-error + (lambda () + (canonicalize-path file)) + (const file))) + (define* (load* file user-module #:key (on-error 'nothing-special)) "Load the user provided Scheme source code FILE." @@ -230,7 +244,7 @@ (define* (load* file user-module ;; 'primitive-load', so that FILE is compiled, which then allows ;; us to provide better error reporting with source line numbers. (without-compiler-optimizations - (load (canonicalize-path file)))) + (load (try-canonicalize-path file)))) (const #f)))))) (lambda _ ;; XXX: Errors are reported from the pre-unwind handler below, but diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 317c58ac42..4eab0e38b6 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012-2014, 2016-2022 Ludovic Courtès +# Copyright © 2012-2014, 2016-2023 Ludovic Courtès # Copyright © 2020 Marius Bakke # Copyright © 2021 Chris Marusich # @@ -397,6 +397,13 @@ guix build -d -m "$module_dir/manifest.scm" \ rm "$module_dir"/*.scm +if [ -n "$BASH_VERSION" ] +then + # Check whether we can load from a /dev/fd/N denoting a pipe, using this + # handy Bash-specific construct. + guix build -m <(echo '(specifications->manifest (list "guile"))') -n +fi + # Using 'GUIX_BUILD_OPTIONS'. GUIX_BUILD_OPTIONS="--dry-run --no-grafts" export GUIX_BUILD_OPTIONS -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:45 2023 Received: (at 65229) by debbugs.gnu.org; 16 Aug 2023 17:11:45 +0000 Received: from localhost ([127.0.0.1]:41925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3d-0005NI-6g for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:45 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:39275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3a-0005Mk-Jt for 65229@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:44 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fe1b6192e8so18085985e9.1 for <65229@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205897; x=1692810697; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wjvTybTrE3/q1Xoq+zfJZhsCyhJuc2X45m5L9AkuqH8=; b=DSQ4X5V7rI0Pr9EnHS5mowAhvpOywVsHd/YUYA8TWBXs6EOUzEctsjBG14oNICSoo2 gKSwUjrE0eSnsw1U/hpAwDfPcZx0cm0gPNlqKSECzRBw/ZLwNCtqDFFDw0Spvd6MAnEx RpcD4cVqUqbcSFWZWZKwpa4P8lJXypWBCSqitxhv8Sh9+NKLLRi+lKgFjV8fWQnAmq0G 2Wt79hybSSqAYw8hhZhp5fIlk+xxJQoYxj4F9+OLuYKnA8nHE7UKtFioHRowbAcT88JT EnMek1bk/JF52PycG4I5EBnYt0vmGvYHUBT9djdmyQoi+l8NMQ0yTVLQlAuKy8xAGI+d obYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205897; x=1692810697; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wjvTybTrE3/q1Xoq+zfJZhsCyhJuc2X45m5L9AkuqH8=; b=XoZHfq7yUlLZfvqseRF3R9SsJaA7JsigLbcCpKC6JtUa7WR1pSdEojdvq+eruuEtJZ IJU5bmEb+v8Eo4yozOIB68nJfoav650HcpyhvI+67J7aJxKHM5K5UO1QnF9ScmJtl/Rz jy95UNo+JPyHiqR4p7cRsuX9ersZR25ya6MHNotjKxqH1tx+6mza7vLVxKsmjL+jkrSQ HDJ704UWMaVolgRaT+F7Z6FGV1U26qCNwOIzaulJFL1JLWk4vOlmoOLJX6FVCwbx+urw hxqA3svjZotr8g2GtJSrPI3V4/2CuC8yvI08FHXNbBHt0kU4agkUxhkLVJ6BNgGcv0wS YREg== X-Gm-Message-State: AOJu0Yz/xs1fJ4SHemczLeVJg134diYQP3xhlqF01aVAwc5AhwSsysIO jNfOAC8uOj5lhBDg2YqY18pEAzbyq14= X-Google-Smtp-Source: AGHT+IGJViMZYvhd6dSEMCWT7+sh4RKZhFuFfVa6kpLsY3G0IjiQrzBZ3rPQuvNw37B8KcDE5NZtZw== X-Received: by 2002:a05:600c:850d:b0:3f8:efad:31ee with SMTP id gw13-20020a05600c850d00b003f8efad31eemr1939126wmb.2.1692205896966; Wed, 16 Aug 2023 10:11:36 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id a4-20020a5d53c4000000b00319756d5b80sm11762144wrw.29.2023.08.16.10.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:36 -0700 (PDT) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 65229@debbugs.gnu.org Subject: Re: [bug#65229] [PATCH 2/2] ui: 'load*' accepts /dev/fd/N files pointing to a pipe. In-Reply-To: References: Date: Wed, 16 Aug 2023 15:32:13 +0200 Message-ID: <87a5urglk2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Ludo, Cool! On Fri, 11 Aug 2023 at 17:34, Ludovic Courtès wrote: Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 65229 Cc: Josselin Poiret , Tobias Geerinckx-Rice , maurice.bremond@inria.fr, Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Baines , Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= 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.1 (/) Hi Ludo, Cool! On Fri, 11 Aug 2023 at 17:34, Ludovic Court=C3=A8s wrote: > This allows users to write Bash commands like: > > guix time-machine -C <(echo %default-channels) -- ... > > or: > > guix build -m <(echo '(specifications->manifest (list "guile"))') I propose to document this. WDYT about this? --8<---------------cut here---------------start------------->8--- 1 file changed, 6 insertions(+) doc/guix.texi | 6 ++++++ modified doc/guix.texi @@ -5103,6 +5103,12 @@ Invoking guix time-machine @item -q Inhibit loading of the user and system channel files, @file{~/.config/guix/channels.scm} and @file{/etc/guix/channels.scm}. + +This option is equivalent to the command run on Bash shell: + +@example +guix time-machine -C <(echo %default-channels) -- build hello +@end example @end table =20 As for @command{guix pull}, in the absence of any options, --8<---------------cut here---------------end--------------->8--- Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:46 2023 Received: (at 65229) by debbugs.gnu.org; 16 Aug 2023 17:11:46 +0000 Received: from localhost ([127.0.0.1]:41927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3d-0005NO-Hg for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:46 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3a-0005Mi-3L for 65229@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:44 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3fe8d816a40so10390485e9.1 for <65229@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205896; x=1692810696; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xpaaZM7zd0QnCB8dq1tLd/bASjDcrPmsO8xp9q8P/nU=; b=BSds4SuukTVT2tYhCCUjArwEa/W4m5fsF0Nsocl6cDMdWH1YTj/vIrFagZ7ZQ5mZkw 7N7eOjoMSAkf/EYzbxWZdBsj56GthHZlsaCrYZOVPrMX76b+uKykIKgymOKUEtmNLSvF V2MIfcH+CqIGyplyceLCVbNAigUCLHKRkgZYrxdxHxc8H9OG8kzvjU1G0WGrGRKsByRz xLuh34h2sBNlunYibfLnx6macNHycKGXgJX1jFFw0n6gstLvzIoQ3AjWZmW/Pt4S5OK9 s6EupOMcX66uZUoj6yM86MUFog5hLtkemLkvCktDNNbK0t2WP2PKb+ZiH/KtV+/w+Rf7 rdUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205896; x=1692810696; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xpaaZM7zd0QnCB8dq1tLd/bASjDcrPmsO8xp9q8P/nU=; b=J3UdzXBvUr7Fh/Bzs7FRJ8KBGnafybDeF3adOijW9K8eSsfKVFEB9+rtFkQF7uKuzr elDj1fDJeMlsP05lS2IxTCUCYPz/sigYmUBn4sTlfUbCL/XHJBB1NSUJWJTB+1vvablZ 4c04N/W6n4TrvGbugeNb69U/d3/jObahNo4JWiLF6EXFDtvZrcC6moGuAklmxWzGrla4 w60xij7zgb6f/go4jcFpmuwnIl0MAQc+vuLzYFVHE5rEs/0Et+v0l0ScHBOJ7NMydVlQ 97lZWfVhedMWt7dPgjXmvbxs7Rnboq9tvcyNzNAV6tZldeJfGd5F2J668D+wykVaWre0 Pikw== X-Gm-Message-State: AOJu0YyKveID+yn0s5fQB7g4J5MnFLiW7RBxVJyUJ+enIPBHdVdc2otc 47IkYJjIbGuqqODObu14PaI= X-Google-Smtp-Source: AGHT+IHadyuC81wRLeSVqE5csfr7y7o+Qg5x7AJv8FVKyMCesmJqkZ1mRPpjRGem/ThIk884A9/LaQ== X-Received: by 2002:a5d:67cc:0:b0:317:3d36:b2c1 with SMTP id n12-20020a5d67cc000000b003173d36b2c1mr1873900wrw.7.1692205896049; Wed, 16 Aug 2023 10:11:36 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id r13-20020a0560001b8d00b003143c6e09ccsm21775174wru.16.2023.08.16.10.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:35 -0700 (PDT) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 65229@debbugs.gnu.org Subject: Re: [bug#65229] [PATCH 1/2] pull, time-machine: Add '-q' to ignore channel files. In-Reply-To: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> References: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> Date: Wed, 16 Aug 2023 14:59:35 +0200 Message-ID: <87edk3gn2g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Ludo, Cool addition! On Fri, 11 Aug 2023 at 17:34, Ludovic Courtès wrote: Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32e listed in] [list.dnswl.org] X-Debbugs-Envelope-To: 65229 Cc: Josselin Poiret , Tobias Geerinckx-Rice , maurice.bremond@inria.fr, Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Baines , Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= 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.1 (/) Hi Ludo, Cool addition! On Fri, 11 Aug 2023 at 17:34, Ludovic Court=C3=A8s wrote: > -As for @command{guix pull}, the absence of any options means that the > -latest commit on the master branch will be used. The command > +As for @command{guix pull}, in the absence of any options, > +@command{time-machine} fetches the latest commits of the channels > +specified in @file{~/.config/guix/channels.scm}, > +@file{/etc/guix/channels.scm}, or the default channels; the @option{-q} > +option lets you ignore these configuration files. The command: >=20=20 > @example > -guix time-machine -- build hello > +guix time-machine -q -- build hello > @end example >=20=20 > -will thus build the package @code{hello} as defined in the master branch, > -which is in general a newer revision of Guix than you have installed. > -Time travel works in both directions! > +will thus build the package @code{hello} as defined in the main branch Why not the master branch? Is the branch renamed from =E2=80=99master=E2= =80=99 to =E2=80=99main=E2=80=99? If not, I would keep the explicit master branch in= order to avoid confusion. > +of Guix, without any additional channel, which is in general a newer > +revision of Guix than you have installed. Time travel works in both > +directions! Well, I would keep the previous example because the behaviour appears to me more prone-error. I mean, by default, there is no channels.scm file under ~/.config/guix/ or /etc/guix, therefore an explanation of the behaviour without any option at all appears to me worth. Moreover, since there is no channels.scm file by default, i.e., the default is %default-channels, it appears to me weird to explain the specific behaviour (without any option and reaching new revision) using an option turning off the channels.scm file. > diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm > + (display (G_ " > + -q inhibit loading of user and system 'channels.sc= m'")) [...] > diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm > + (display (G_ " > + -q inhibit loading of user and system 'channels.sc= m'")) No long option? As --no-channel-files or --ignore-channel-files ? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:54 2023 Received: (at 65229) by debbugs.gnu.org; 16 Aug 2023 17:11:54 +0000 Received: from localhost ([127.0.0.1]:41938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3m-0005Oo-2L for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:54 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3b-0005Mn-GS for 65229@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:45 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3159b524c56so1056860f8f.1 for <65229@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205898; x=1692810698; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=B0L2nnZOGIiq71bBoX76VsEuIZKQklxfNGnXbsqwK04=; b=M25ch8456pMPSnB+E83yuJ81hNGaN0zz1GMAK3M81cdrwcq6AyYeUpixsxx1T6Km88 12HxNuQRTFpMZQZdpeoFdQxHF//2Bz73ve0JGDUqldS4+xcO9D7SlCQRgKLEV9Ux4v1C y+mxqA6sOQFthtPhT6i4yfKTEJQtWQ/k9OVg/lbYfDaETG8RqKA0c/HKZVi052vYU3Or uK1w0FoDrteBOzKC5cQmy1x2QmOVxqA/45JTJsd6R5lo1ip66+sGMB1WN3NvvpX6bb88 dQskydC3yEkAvUMuepw+1dLSnKvH67dkdhSIc3H6SjDUxAgx2RK2VxIdzLXvgX15xapc Sdww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205898; x=1692810698; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B0L2nnZOGIiq71bBoX76VsEuIZKQklxfNGnXbsqwK04=; b=Ea/E9p0xHL9bBq6ocn+L7dwKPoM+jbOwS5QebFuc0ISGn9+Y9V1/xFO/IyHftl6nPo vs0+qm0xrqazgyZPFas5VbsAq5aEP9zAk5dW8LA2azjZOO8QxqUniZxRWW4vCz0Pv1DH K9BKj7Xs2jIhGb1tfcAkjUjeok6QbaOUa9/YxGdOooMlrQ5yioAB7FkLaH7VDVcKJAWB 3Vpeh0mHYHxUu+Rm1yxr+zDHNflQjcfDPd0HgBLSgbkC6b42O3xb8DCi8s6miOFY6j2m z9W4o0pWAZpph6ui+LZlzxs7G1mQF7TW6cNB8fy1CuiyHDqb1Soa+11gORjG7wHiy+cw nMAQ== X-Gm-Message-State: AOJu0Yw+7+DL7aOSKfFmND0leWFcCkUIHPjw30P5xUMtpuLpxzc9UzdN YbTN+WNLWZncW+ly8bVSWuQ= X-Google-Smtp-Source: AGHT+IE0Ll1xtt5Fxi00yoBZRak4WJmRnniXmbsPkRgOG2vZPt7sRQAtoeFbT6DFlsYLeYtUQvh2Qg== X-Received: by 2002:adf:ea8a:0:b0:317:5f35:8540 with SMTP id s10-20020adfea8a000000b003175f358540mr1975840wrm.3.1692205897910; Wed, 16 Aug 2023 10:11:37 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id k1-20020a05600c0b4100b003fa95f328afsm24821094wmr.29.2023.08.16.10.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:37 -0700 (PDT) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 65229@debbugs.gnu.org Subject: Re: [bug#65229] [PATCH 1/2] pull, time-machine: Add '-q' to ignore channel files. In-Reply-To: <87edk3gn2g.fsf@gmail.com> References: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> <87edk3gn2g.fsf@gmail.com> Date: Wed, 16 Aug 2023 15:43:42 +0200 Message-ID: <874jkzgl0x.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Re, On Wed, 16 Aug 2023 at 14:59, Simon Tournier wrote: > Well, I would keep the previous example because the behaviour appears to > me more prone-error. I mean, by default, there is no channels.scm file > under ~/.config/guix/ or /etc/guix, therefore an e [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:429 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 65229 Cc: Josselin Poiret , Tobias Geerinckx-Rice , maurice.bremond@inria.fr, Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Baines , Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= 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.1 (/) Re, On Wed, 16 Aug 2023 at 14:59, Simon Tournier wrote: > Well, I would keep the previous example because the behaviour appears to > me more prone-error. I mean, by default, there is no channels.scm file > under ~/.config/guix/ or /etc/guix, therefore an explanation of the > behaviour without any option at all appears to me worth. Moreover, > since there is no channels.scm file by default, i.e., the default is > %default-channels, it appears to me weird to explain the specific > behaviour (without any option and reaching new revision) using an option > turning off the channels.scm file. Somehow, I would keep something like [1]: --8<---------------cut here---------------start------------->8--- Similarly as @command{guix pull}, the absence of any options means that either the user's @file{~/.config/guix/channels.scm} file, or either the system-wide @file{/etc/guix/channels.scm} file, or either the built-in default channels specified in the @code{%default-channels} will be honored, in that order. The command @example guix time-machine -- build hello @end example will thus build the package @code{hello} as defined by the previous @dfn{channels} file (@pxref{Channels}). In general, it builds a newer revision of Guix than you have installed. Time travel works in both directions! --8<---------------cut here---------------end--------------->8--- 1: https://yhetil.org/guix/87r0qyrlm0.fsf@gmail.com Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 04:57:26 2023 Received: (at 65229) by debbugs.gnu.org; 17 Aug 2023 08:57:26 +0000 Received: from localhost ([127.0.0.1]:42746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWYoo-0007es-Bo for submit@debbugs.gnu.org; Thu, 17 Aug 2023 04:57:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWYol-0007ee-QG for 65229@debbugs.gnu.org; Thu, 17 Aug 2023 04:57:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWYod-0001wq-Ud; Thu, 17 Aug 2023 04:57:15 -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=nS4QSXHDBXGxouo0lsdXNlkDqQiWIn57RUxo3ohB4IE=; b=sMpDxG2OwdyKqx/RsI+3 EjeF0KDe/jC9p4fgKv67GYgWdgqkw253XUwQ1fWUKN14Qsq737ZKLfUCR3pD8iKZUIBcwKFGzHhBe niNKeLCOWCPr13ZWozxA0vdfBxwPSUXT3BoyBVkuuYlSdXet6LbWrtzXspMN7u+gyNoHRwmZqb6aC pmQ1elHh/WITWdj7q2eFg9j3KdDFH23/J4X2Thej1PhGt+pXuMRrqKX56RB1Z0PrBvCWMaSpeyy50 Uv2avDmwv2qx90NzTvvqT8x+3wFQSRRsjjPpV7CuyPP+kcG7mMzfoyVVwiC8z16zuysdDvYvgamvk A5GOR5qWFOJ73w==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: [bug#65229] [PATCH 1/2] pull, time-machine: Add '-q' to ignore channel files. References: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> <87edk3gn2g.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 30 Thermidor an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Moulin X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 17 Aug 2023 10:56:59 +0200 In-Reply-To: <87edk3gn2g.fsf@gmail.com> (Simon Tournier's message of "Wed, 16 Aug 2023 14:59:35 +0200") Message-ID: <875y5eyrl0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 65229 Cc: Tobias Geerinckx-Rice , Josselin Poiret , 65229@debbugs.gnu.org, maurice.bremond@inria.fr, Mathieu Othacehe , Christopher Baines , Ricardo Wurmus 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, Simon Tournier skribis: > On Fri, 11 Aug 2023 at 17:34, Ludovic Court=C3=A8s wrote: [...] >> -will thus build the package @code{hello} as defined in the master branc= h, >> -which is in general a newer revision of Guix than you have installed. >> -Time travel works in both directions! >> +will thus build the package @code{hello} as defined in the main branch > > Why not the master branch? Is the branch renamed from =E2=80=99master=E2= =80=99 to > =E2=80=99main=E2=80=99? If not, I would keep the explicit master branch = in order to > avoid confusion. The =E2=80=9Cmain branch=E2=80=9D is the branch currently called =E2=80=98m= aster=E2=80=99 (I think we should rename it to =E2=80=98main=E2=80=99 eventually, but I=E2=80=99d have= written @code{main} if I wanted to imply it=E2=80=99s called that way). >> +of Guix, without any additional channel, which is in general a newer >> +revision of Guix than you have installed. Time travel works in both >> +directions! > > Well, I would keep the previous example because the behaviour appears to > me more prone-error. I mean, by default, there is no channels.scm file > under ~/.config/guix/ or /etc/guix, therefore an explanation of the > behaviour without any option at all appears to me worth. Moreover, > since there is no channels.scm file by default, i.e., the default is > %default-channels, it appears to me weird to explain the specific > behaviour (without any option and reaching new revision) using an option > turning off the channels.scm file. I thought that we cannot easily describe what =E2=80=98guix time-machine -- build hello=E2=80=99 does, precisely because it depends on whether =E2=80=98channels.scm=E2=80=99 files are present and on what they do. Conv= ersely, explaining what happens with =E2=80=98-q=E2=80=99 is trivial because it doe= sn=E2=80=99t depend on external state. Anyway, I=E2=80=99ll try and reword that. >> diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm > >> + (display (G_ " >> + -q inhibit loading of user and system 'channels.s= cm'")) > > [...] > >> diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.s= cm > >> + (display (G_ " >> + -q inhibit loading of user and system 'channels.s= cm'")) > > No long option? As --no-channel-files or --ignore-channel-files ? Yeah, I thought we=E2=80=99d follow =E2=80=98guix repl=E2=80=99 and =E2=80= =98guile=E2=80=99, which have no long option, but maybe we should add =E2=80=98--no-channel-files=E2=80=99. Thanks you; I=E2=80=99ll send a new version. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 06:00:17 2023 Received: (at 65229) by debbugs.gnu.org; 17 Aug 2023 10:00:17 +0000 Received: from localhost ([127.0.0.1]:42799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWZnd-0000nW-7V for submit@debbugs.gnu.org; Thu, 17 Aug 2023 06:00:17 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:38973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWZnc-0000nI-0M for 65229@debbugs.gnu.org; Thu, 17 Aug 2023 06:00:16 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4ff7ecd0a0dso1095656e87.0 for <65229@debbugs.gnu.org>; Thu, 17 Aug 2023 03:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692266410; x=1692871210; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UIIqcFpC56R26IBN8x10uYw+TH0XKKw05VpUwFIkH04=; b=FS07aluHwBehGSWSzLk8pur7ZnoGKHlh5F+awJDYF/9xLEafFQVdTxduJX5zsm0H9k ayoGp+G4ppHPCr3YUqJCXbuh6/SMdI8ali9dNNkjIFhcZg2GuZ1TChAoJZVY6m1t7vdK mwlmurxsvDlg5GuIOwns97BlgynfwknbkaHfVlbCBWS7+uenZRM+twqFWfg9roYFJ6ny eyzB5+cGsFGy8iVCWCGbDRqYgfNml7c7JTmdUu5kAXhY08RUBeGrKVGWuQuhya+TxB6x 2sb4aDQCmw0uO3UFrkd0B+DgbDas09itPKxoxxHtoqw8a+u+OrjK0hH7OHrF/tyElo+d EKBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692266410; x=1692871210; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UIIqcFpC56R26IBN8x10uYw+TH0XKKw05VpUwFIkH04=; b=QDcFjGZ/RzhivoIAqZCDvPAonTaogVrUmJP6SzKLrtzr8WI6txREifz2sFn3xijaCE LzPwDMg+gCmTykwM3M0nyDkZvGVnh/AAxHHamhQ+b5z8MlzBDrGiXlGvoBd8SdTejzwb GXVZ8edObNW73PkDcxrjifM0lSD3jWA4kXItX5CWBRtDJDkOy7gHjr9+Pqny4FeBOsvC CN8PFtoaj/jEVOOgLC1S/NukxpFXmZY3X3+PJ1AvEIw7/eF9G9R7e2r5fUFBWy21uPBJ uzptVpbAkStLWFeUbM7g6WSDguPjtrfN9TGWE3iWv0zWpgylTAyG9xU+OpXyYp7TvVpT ciJg== X-Gm-Message-State: AOJu0YwklLkT074sl2Bp8zbRt1rHdFlGlZyff94C8CBef5Nfvvuiedy6 2xlolhnfnGOcQNKtVKfyIr8k1x0IQYz+XH6mCyQ= X-Google-Smtp-Source: AGHT+IHL3vC1/vi6t4tzOx8kwzVFovjf0HRWKIhf4tXgEyeYy6X/SAJHcxOAQVsppfIQ/++T474jDEklcQ3hlJL3XzI= X-Received: by 2002:a05:6512:4848:b0:4fe:626e:4572 with SMTP id ep8-20020a056512484800b004fe626e4572mr3152467lfb.5.1692266409616; Thu, 17 Aug 2023 03:00:09 -0700 (PDT) MIME-Version: 1.0 References: <0ee5ee05ea81374342740f06915e9dadb1a92a63.1691767568.git.ludo@gnu.org> <87edk3gn2g.fsf@gmail.com> <875y5eyrl0.fsf@gnu.org> In-Reply-To: <875y5eyrl0.fsf@gnu.org> From: Simon Tournier Date: Thu, 17 Aug 2023 11:59:57 +0200 Message-ID: Subject: Re: [bug#65229] [PATCH 1/2] pull, time-machine: Add '-q' to ignore channel files. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65229 Cc: Tobias Geerinckx-Rice , Josselin Poiret , 65229@debbugs.gnu.org, maurice.bremond@inria.fr, Mathieu Othacehe , Christopher Baines , Ricardo Wurmus 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 Ludo, On Thu, 17 Aug 2023 at 10:57, Ludovic Court=C3=A8s wrote: > >> -will thus build the package @code{hello} as defined in the master bra= nch, > >> -which is in general a newer revision of Guix than you have installed. > >> -Time travel works in both directions! > >> +will thus build the package @code{hello} as defined in the main branc= h > > > > Why not the master branch? Is the branch renamed from =E2=80=99master= =E2=80=99 to > > =E2=80=99main=E2=80=99? If not, I would keep the explicit master branc= h in order to > > avoid confusion. > > The =E2=80=9Cmain branch=E2=80=9D is the branch currently called =E2=80= =98master=E2=80=99 (I think we > should rename it to =E2=80=98main=E2=80=99 eventually, but I=E2=80=99d ha= ve written @code{main} > if I wanted to imply it=E2=80=99s called that way). I think the term "main branch" is confusing because many forges as Gitlab propose by default to rename from @code{master} to @code{main}. Well, if instead of @code{main}, these forges were proposing @code{trunk} or @code{primary} or whatever else, it would be fine. Therefore, I propose the wording: defined in the main branch of Guix (currently called @code{master}), wi= thout any additional channel, [...] Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 06:17:53 2023 Received: (at 65229) by debbugs.gnu.org; 17 Aug 2023 10:17:53 +0000 Received: from localhost ([127.0.0.1]:42811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWa4e-0001C4-C2 for submit@debbugs.gnu.org; Thu, 17 Aug 2023 06:17:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWa4b-0001Bl-Rh for 65229@debbugs.gnu.org; Thu, 17 Aug 2023 06:17:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWa4W-0003J8-Lt; Thu, 17 Aug 2023 06:17:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=UsNaWrHkHvq2DGiBtv4CJgFaBdffIekK95+sMIK99tg=; b=HEi0M28h/AksKaR012nv aPYIC961Njxdqh4nwWeWdG0QzUaHzRAgYFog2XWkyMNzeigPu5JfJ/Svw4OnOaweDkZLeASacdqmQ 0fZ3YSF2LupU3F2Epq699NAjEDjMHgnBW5HlvrUWcE0CAfejs1aDG2+qPqHofGRNUG7xJL+PmW9Ly smnrDp+YvPhEaW8HYs12lMSEQcfgtIcjh5U7AYxzKF1HscCpf5homnfEFgACOzkWrZkWn/9HNOcLL kJcjPfSiwjT/qyNKOLTfHiT8HUl+PQBD1YwzFxQilVUcbMkkA7FRGm88MDORg9YMGMgFw0WCYn142 MdD83YKHchGMUw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 65229@debbugs.gnu.org Subject: [PATCH v2 2/2] pull, time-machine: Add '-q' to ignore channel files. Date: Thu, 17 Aug 2023 12:17:29 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <875y5eyrl0.fsf@gnu.org> References: <875y5eyrl0.fsf@gnu.org> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65229 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Simon Tournier 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 (---) From: Ludovic Courtès This also fixes . * guix/scripts/pull.scm (show-help, %options): Add '-q'. (channel-list): Honor it. * guix/scripts/time-machine.scm (show-help, %options): Add '-q'. * doc/guix.texi (Invoking guix pull, Invoking guix time-machine): Document it. Reported-by: Simon Tournier --- doc/guix.texi | 47 +++++++++++++++++++++++++++-------- guix/scripts/pull.scm | 15 +++++++++-- guix/scripts/time-machine.scm | 8 +++++- 3 files changed, 57 insertions(+), 13 deletions(-) Changes since v1: • Add ‘--no-channel-files’. • Join the two ‘time-machine’ examples, the one without ‘-q’ and the one with ‘-q’ (I realized there was already one example without ‘-q’ so I figured it was easier to clarify ‘channels.scm’ handling upfront). • Document the <(echo %default-channels) trick. Let me know what you think! Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index 633d62bd98..2d54b92fa5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4802,9 +4802,11 @@ Invoking guix pull @item the @option{--channels} option; @item -the user's @file{~/.config/guix/channels.scm} file; +the user's @file{~/.config/guix/channels.scm} file, unless @option{-q} +is passed; @item -the system-wide @file{/etc/guix/channels.scm} file; +the system-wide @file{/etc/guix/channels.scm} file, unless @option{-q} +is passed; @item the built-in default channels specified in the @code{%default-channels} variable. @@ -4906,6 +4908,11 @@ Invoking guix pull evaluates to a list of channel objects. @xref{Channels}, for more information. +@item --no-channel-files +@itemx -q +Inhibit loading of the user and system channel files, +@file{~/.config/guix/channels.scm} and @file{/etc/guix/channels.scm}. + @cindex channel news @item --news @itemx -N @@ -5051,7 +5058,9 @@ Invoking guix time-machine environment -C --ad-hoc guile -- guile @end example -The command above fetches Guix@tie{}1.2.0 and runs its @command{guix +The command above fetches Guix@tie{}1.2.0 (and possibly other channels +specified by your @file{channels.scm} configuration files---see +below) and runs its @command{guix environment} command to spawn an environment in a container running @command{guile} (@command{guix environment} has since been subsumed by @command{guix shell}; @pxref{Invoking guix shell}). It's like driving a @@ -5061,6 +5070,21 @@ Invoking guix time-machine large number of packages; the result is cached though and subsequent commands targeting the same commit are almost instantaneous. +As for @command{guix pull}, in the absence of any options, +@command{time-machine} fetches the latest commits of the channels +specified in @file{~/.config/guix/channels.scm}, +@file{/etc/guix/channels.scm}, or the default channels; the @option{-q} +option lets you ignore these configuration files. The command: + +@example +guix time-machine -q -- build hello +@end example + +will thus build the package @code{hello} as defined in the main branch +of Guix, without any additional channel, which is in general a newer +revision of Guix than you have installed. Time travel works in both +directions! + @quotation Note The history of Guix is immutable and @command{guix time-machine} provides the exact same software as they are in a specific Guix @@ -5093,18 +5117,21 @@ Invoking guix time-machine Read the list of channels from @var{file}. @var{file} must contain Scheme code that evaluates to a list of channel objects. @xref{Channels} for more information. -@end table -As for @command{guix pull}, the absence of any options means that the -latest commit on the master branch will be used. The command +@item --no-channel-files +@itemx -q +Inhibit loading of the user and system channel files, +@file{~/.config/guix/channels.scm} and @file{/etc/guix/channels.scm}. + +Thus, @command{guix time-machine -q} is equivalent to the following Bash +command, using the ``process substitution'' syntax (@pxref{Process +Substitution,,, bash, The GNU Bash Reference Manual}): @example -guix time-machine -- build hello +guix time-machine -C <(echo %default-channels) @dots{} @end example -will thus build the package @code{hello} as defined in the master branch, -which is in general a newer revision of Guix than you have installed. -Time travel works in both directions! +@end table Note that @command{guix time-machine} can trigger builds of channels and their dependencies, and these are controlled by the standard build diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index ecd264d3fa..3a8dd6ea01 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -84,6 +84,9 @@ (define (show-help) Download and deploy the latest version of Guix.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) + (display (G_ " + -q, --no-channel-files + inhibit loading of user and system 'channels.scm'")) (display (G_ " --url=URL download \"guix\" channel from the Git repository at URL")) (display (G_ " @@ -133,6 +136,9 @@ (define %options (cons* (option '(#\C "channels") #t #f (lambda (opt name arg result) (alist-cons 'channel-file arg result))) + (option '(#\q "no-channel-files") #f #f + (lambda (opt name arg result) + (alist-cons 'ignore-channel-files? #t result))) (option '(#\l "list-generations") #f #t (lambda (opt name arg result) (cons `(query list-generations ,arg) @@ -735,6 +741,9 @@ (define (channel-list opts) (define file (assoc-ref opts 'channel-file)) + (define ignore-channel-files? + (assoc-ref opts 'ignore-channel-files?)) + (define default-file (string-append (config-directory) "/channels.scm")) @@ -750,9 +759,11 @@ (define (channel-list opts) (define channels (cond (file (load-channels file)) - ((file-exists? default-file) + ((and (not ignore-channel-files?) + (file-exists? default-file)) (load-channels default-file)) - ((file-exists? global-file) + ((and (not ignore-channel-files?) + (file-exists? global-file)) (load-channels global-file)) (else %default-channels))) diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index d7c71ef705..fa12e6f170 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Konrad Hinsen -;;; Copyright © 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2019, 2020, 2021, 2023 Ludovic Courtès ;;; Copyright © 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. @@ -51,6 +51,9 @@ (define (show-help) Execute COMMAND ARGS... in an older version of Guix.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) + (display (G_ " + -q, --no-channel-files + inhibit loading of user and system 'channels.scm'")) (display (G_ " --url=URL use the Git repository at URL")) (display (G_ " @@ -75,6 +78,9 @@ (define %options (cons* (option '(#\C "channels") #t #f (lambda (opt name arg result) (alist-cons 'channel-file arg result))) + (option '(#\q "no-channel-files") #f #f + (lambda (opt name arg result) + (alist-cons 'ignore-channel-files? #t result))) (option '("url") #t #f (lambda (opt name arg result) (alist-cons 'repository-url arg -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 06:17:57 2023 Received: (at 65229) by debbugs.gnu.org; 17 Aug 2023 10:17:57 +0000 Received: from localhost ([127.0.0.1]:42813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWa4j-0001CE-3d for submit@debbugs.gnu.org; Thu, 17 Aug 2023 06:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWa4b-0001Bk-Oi for 65229@debbugs.gnu.org; Thu, 17 Aug 2023 06:17:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWa4V-0003Hj-Lw; Thu, 17 Aug 2023 06:17:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Mnxw26De5vdZVXKFi5nZ2Y/yB10IKQ3L9iKRyr0hvjc=; b=Y7Uk123DxmujXGeiYXws 1JpDz9dYSh2F5DCqOhprbNqCrcUMCKAUbVVWTLwsSjWKfnMDk+E4zSH7QvgqoQtdXL7ex5Rm49T3k skyXf+snA8nfDZ2R7rMNvRhg0loMsd5u5XWOcHE4oYSn61qvRfV8NcMDDOiOOhmkyl/HuCo7NW/QQ oa3ig4tv0oGaDQwVK0O9VDxp6LtTX7kZZThANSXpKqwk6RBh01tmfW85P+kAidGkYHw8AxTSaferZ kgnSTrcNMixlpn/6ImBuSjHgp9fkQvk0h/cwzU+fE223o5za1E05hlJOCxVc4j2Q/Zj7mh2fM3DoW 9sI7ncPhf/f+aQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 65229@debbugs.gnu.org Subject: [PATCH v2 1/2] ui: 'load*' accepts /dev/fd/N files pointing to a pipe. Date: Thu, 17 Aug 2023 12:17:28 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <875y5eyrl0.fsf@gnu.org> References: <875y5eyrl0.fsf@gnu.org> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65229 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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 (---) From: Ludovic Courtès This allows users to write Bash commands like: guix time-machine -C <(echo %default-channels) -- ... or: guix build -m <(echo '(specifications->manifest (list "guile"))') Previously, on GNU/Linux, they would fail with: error: failed to load '/dev/fd/63': No such file or directory * guix/ui.scm (try-canonicalize-path): New procedure. (load*): Use it. * tests/guix-build.sh: Test 'guix build -m' with a /dev/fd/N file. --- guix/ui.scm | 16 +++++++++++++++- tests/guix-build.sh | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 47a118364a..6f2d4fe245 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -200,6 +200,20 @@ (define-syntax-rule (without-compiler-optimizations exp) (parameterize (((@ (system base compile) default-optimization-level) 1)) exp)) +(define (try-canonicalize-path file) + "Like 'canonicalize-path', but return FILE as-is if 'canonicalize-path' +throws. + +This is necessary for corner cases where 'canonicalize-path' fails. One +example is on Linux when a /dev/fd/N file denotes a pipe, represented as a +symlink to a non-existent file like 'pipe:[1234]', as in this example: + + sh -c 'stat $(readlink -f /dev/fd/1)' | cat" + (catch 'system-error + (lambda () + (canonicalize-path file)) + (const file))) + (define* (load* file user-module #:key (on-error 'nothing-special)) "Load the user provided Scheme source code FILE." @@ -230,7 +244,7 @@ (define* (load* file user-module ;; 'primitive-load', so that FILE is compiled, which then allows ;; us to provide better error reporting with source line numbers. (without-compiler-optimizations - (load (canonicalize-path file)))) + (load (try-canonicalize-path file)))) (const #f)))))) (lambda _ ;; XXX: Errors are reported from the pre-unwind handler below, but diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 317c58ac42..4eab0e38b6 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012-2014, 2016-2022 Ludovic Courtès +# Copyright © 2012-2014, 2016-2023 Ludovic Courtès # Copyright © 2020 Marius Bakke # Copyright © 2021 Chris Marusich # @@ -397,6 +397,13 @@ guix build -d -m "$module_dir/manifest.scm" \ rm "$module_dir"/*.scm +if [ -n "$BASH_VERSION" ] +then + # Check whether we can load from a /dev/fd/N denoting a pipe, using this + # handy Bash-specific construct. + guix build -m <(echo '(specifications->manifest (list "guile"))') -n +fi + # Using 'GUIX_BUILD_OPTIONS'. GUIX_BUILD_OPTIONS="--dry-run --no-grafts" export GUIX_BUILD_OPTIONS base-commit: 1bd44b425b79e9da160b33a9b19d01973b44772e -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 07:21:09 2023 Received: (at 65229) by debbugs.gnu.org; 17 Aug 2023 11:21:09 +0000 Received: from localhost ([127.0.0.1]:42881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWb3s-0005fO-QU for submit@debbugs.gnu.org; Thu, 17 Aug 2023 07:21:09 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:38340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWb3q-0005eY-LB for 65229@debbugs.gnu.org; Thu, 17 Aug 2023 07:21:07 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fe8c1aec15so2507415e87.1 for <65229@debbugs.gnu.org>; Thu, 17 Aug 2023 04:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692271260; x=1692876060; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=owxkgznT7ckrC4uVgLsGuCXKdmBqhK0F+rbNWRec8m4=; b=Bf4+51pfp1yTFOvgE0dKjQt04TMLRQJ7dIFftagvT+jrN/XjH2zl9i2vs/VqDAhUFG hiDVitj0xF7kJvQeCnJPQtjFr5uSM0pu9K2GApYKa3itzC9gg6TH8pyTef1lH/p4gvEc a6U79XSSrQJooDS1jljVaajMtIe+26+BpjLRHMc5lplpEewYo2m0Y3Wj5Nw2DVyOOpXN r7rklBe5w/B3XN7v6RtClmf6uN9laXzLN50Me5srUVbKx55447DXPPMsyw6P1k+s2aQp drOHVGq05Q2mSabiF5QKdrYLowI3TMb6+cdeDPoK+IYq86jPE+BKMtq4fd8yzqCiV5YQ eU1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692271260; x=1692876060; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=owxkgznT7ckrC4uVgLsGuCXKdmBqhK0F+rbNWRec8m4=; b=Tpah4JmocteA/crzcIsKuvHAT4lK0QQiMOpthOu4/x51VDE8Ai8PI13J5FpbwYDULH nnp6RFizJtMzNeJGnajMAOKwZLcLfvmimf+R2yR2ig3/7KDF8JYV3iEufknmjpPK0j13 7Th463T72fKLC4GnsgcqQNSzLvVNWYX6UI8vTljnMb0pMN/GjxFKjJAoD22nxdfowgyf 8E0ePrHvo0VJf613wEwGDt5rMt+WJ+f9QSXTzqg0Vcjw+erkwPh1GPRWX2Im2DOS2/4o zB2dM5wxwXsgLJ8EUmxcYRyrB6bExCbuBtQfhSP/mze2ZP+/9wnMoB3AhbEFfmOHdO9c EzvQ== X-Gm-Message-State: AOJu0Yz1VnBpYYgvww4uad0kNfjtOrsAHnGOLKGBe9pM7z58ImdND3Bz ErlbWU2fRIFqHfG0pZG5BB8dydRBupwN+RNbjeo= X-Google-Smtp-Source: AGHT+IHd5Q8ogv2+JhN60kg27aicZl+f7rpyHtMEKlpTo75mtCSRXBDzZhm+0vS6nZ+AodQXUz9xDDdmcBjaioGP4SI= X-Received: by 2002:ac2:4a88:0:b0:4fd:cbd8:17d4 with SMTP id l8-20020ac24a88000000b004fdcbd817d4mr3123771lfp.3.1692271260088; Thu, 17 Aug 2023 04:21:00 -0700 (PDT) MIME-Version: 1.0 References: <875y5eyrl0.fsf@gnu.org> In-Reply-To: From: Simon Tournier Date: Thu, 17 Aug 2023 13:20:48 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] pull, time-machine: Add '-q' to ignore channel files. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65229 Cc: =?UTF-8?Q?Ludovic_Court=C3=A8s?= , 65229@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, On Thu, 17 Aug 2023 at 12:17, Ludovic Court=C3=A8s wrote: > =E2=80=A2 Document the <(echo %default-channels) trick. LGTM! Well, it appears to me weird to document with this patch this track and then introduce the implementation in the next commit. Anyway, it's nitpicking. :-) However, as I mentioned, I still find confusing the wording "main branch" and I think "main branch of Guix (currently named @code{master))" fixes the confusion. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 13:10:20 2023 Received: (at 65229-done) by debbugs.gnu.org; 17 Aug 2023 17:10:20 +0000 Received: from localhost ([127.0.0.1]:45483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWgVn-0006yo-Vf for submit@debbugs.gnu.org; Thu, 17 Aug 2023 13:10:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWgVl-0006yW-8i for 65229-done@debbugs.gnu.org; Thu, 17 Aug 2023 13:10:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWgVf-0007EB-Gb; Thu, 17 Aug 2023 13:10:11 -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=lOUmeDeWPl8wjvLn6QiOj6ySBLKj2bu4SDXTUgXMEGM=; b=GDOLQ1jYq0yjPAYxC2jQ XhPkbSFlNYItAIHKhoVSTOX6r/qYPGdTbB35am/TcUOOFFV6G5F5UNoe9GsVuqmaysqqssQ5Hujfn Hmx2FAPEfJZZ+uAJ4StKis4q7gS+0u6vTMFhSLnX0fb3dX/NLUn3n4ldX5yRtPkhLuJK9L3zFutV5 00j9HVYfadqD7bSpBZjmSCvk/3V5ePZNRm466+thIgeWrgdYrv3yMQU9k1lUSxnaR9Av+aUepnYH0 FS2BQRZ0Mnc3j530QTMIKa+Vvz2pWI+SWbE7WNdKw8Ra90fPFK0A7wksLIAKm9RBWedSSaT9sYbXv MtvWiMbi3ohBlA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#65229: [PATCH 0/2] Add '-q' for 'pull' and 'time-machine'; support loading from pipes References: <875y5eyrl0.fsf@gnu.org> Date: Thu, 17 Aug 2023 19:10:05 +0200 In-Reply-To: (Simon Tournier's message of "Thu, 17 Aug 2023 13:20:48 +0200") Message-ID: <87a5upvbma.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 65229-done Cc: 65229-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 (---) Simon Tournier skribis: > On Thu, 17 Aug 2023 at 12:17, Ludovic Court=C3=A8s wrote: > >> =E2=80=A2 Document the <(echo %default-channels) trick. > > LGTM! Pushed as 9c8098424b5be3abf21144c74162ec39c0c2e799, thanks! Ludo=E2=80=99. From unknown Sun Jun 22 03:48:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 15 Sep 2023 11:24:07 +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