From unknown Wed Jun 18 23:06:21 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#49610 <49610@debbugs.gnu.org> To: bug#49610 <49610@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Add channels field to guix-configuration Reply-To: bug#49610 <49610@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:06:21 +0000 retitle 49610 [PATCH 0/2] Add channels field to guix-configuration reassign 49610 guix-patches submitter 49610 Brice Waegeneire severity 49610 normal tag 49610 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 17 16:58:30 2021 Received: (at submit) by debbugs.gnu.org; 17 Jul 2021 20:58:30 +0000 Received: from localhost ([127.0.0.1]:54672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rOH-0007iM-QG for submit@debbugs.gnu.org; Sat, 17 Jul 2021 16:58:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:46996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rOF-0007iE-Mq for submit@debbugs.gnu.org; Sat, 17 Jul 2021 16:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rOF-0007wc-DY for guix-patches@gnu.org; Sat, 17 Jul 2021 16:58:27 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:40743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rOD-000707-7N for guix-patches@gnu.org; Sat, 17 Jul 2021 16:58:27 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id CA86AFF803 for ; Sat, 17 Jul 2021 20:58:21 +0000 (UTC) From: Brice Waegeneire To: guix-patches@gnu.org Subject: [PATCH 0/2] Add channels field to guix-configuration Date: Sat, 17 Jul 2021 22:58:19 +0200 Message-Id: <20210717205819.380-1-brice@waegenei.re> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.199; envelope-from=brice@waegenei.re; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit 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.6 (--) This patchset brings the same feature as the authorized-keys but for channels; allowing to sepcify the default channels an operating-system uses. Allowing an operating-system declaration to be self-contained in regards to channels Brice Waegeneire (2): services: guix: Use "match-record" in activation. sevices: guix: Add channels field. doc/guix.texi | 14 +++++++++- gnu/services/base.scm | 65 +++++++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 15 deletions(-) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 17 17:04:41 2021 Received: (at submit) by debbugs.gnu.org; 17 Jul 2021 21:04:41 +0000 Received: from localhost ([127.0.0.1]:54685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rUC-0007st-91 for submit@debbugs.gnu.org; Sat, 17 Jul 2021 17:04:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:49522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rU9-0007sk-Ax for submit@debbugs.gnu.org; Sat, 17 Jul 2021 17:04:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rU9-0001We-5c for guix-patches@gnu.org; Sat, 17 Jul 2021 17:04:33 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rU7-0002eD-99 for guix-patches@gnu.org; Sat, 17 Jul 2021 17:04:32 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A948D20002 for ; Sat, 17 Jul 2021 21:04:26 +0000 (UTC) From: Brice Waegeneire To: guix-patches@gnu.org Subject: [PATCH 1/2] services: guix: Use "match-record" in activation. Date: Sat, 17 Jul 2021 23:04:23 +0200 Message-Id: <20210717210424.1921-1-brice@waegenei.re> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210717205819.380-1-brice@waegenei.re> References: <20210717205819.380-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.200; envelope-from=brice@waegenei.re; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit 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.6 (--) It's more explicit to specify used fields instead of depending on their position. * gnu/services/base.scm (guix-activation): Replace "match" with "match-record". --- gnu/services/base.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index ab3e441a7b..e206bea5f0 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2019 John Soo ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Florian Pelz -;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2021 qblade ;;; Copyright © 2021 Hui Lu ;;; @@ -1700,21 +1700,21 @@ proxy of 'guix-daemon'...~%") (define (guix-activation config) "Return the activation gexp for CONFIG." - (match config - (($ guix build-group build-accounts authorize-key? keys) - ;; Assume that the store has BUILD-GROUP as its group. We could - ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, - ;; chown leads to an entire copy of the tree, which is a bad idea. + (match-record config + (guix authorize-key? authorized-keys) + #~(begin + ;; Assume that the store has BUILD-GROUP as its group. We could + ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, + ;; chown leads to an entire copy of the tree, which is a bad idea. - ;; Generate a key pair and optionally authorize substitute server keys. - #~(begin - (unless (file-exists? "/etc/guix/signing-key.pub") - (system* #$(file-append guix "/bin/guix") "archive" - "--generate-key")) + ;; Generate a key pair and optionally authorize substitute server keys. + (unless (file-exists? "/etc/guix/signing-key.pub") + (system* #$(file-append guix "/bin/guix") "archive" + "--generate-key")) - #$(if authorize-key? - (substitute-key-authorization keys guix) - #~#f))))) + #$(if authorize-key? + (substitute-key-authorization authorized-keys guix) + #~#f)))) (define* (references-file item #:optional (name "references")) "Return a file that contains the list of references of ITEM." -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 17 17:04:47 2021 Received: (at submit) by debbugs.gnu.org; 17 Jul 2021 21:04:47 +0000 Received: from localhost ([127.0.0.1]:54688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rUI-0007tD-Mc for submit@debbugs.gnu.org; Sat, 17 Jul 2021 17:04:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:49528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4rUC-0007sv-UL for submit@debbugs.gnu.org; Sat, 17 Jul 2021 17:04:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rUC-0001a0-Oo for guix-patches@gnu.org; Sat, 17 Jul 2021 17:04:36 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4rU7-0002ep-CJ for guix-patches@gnu.org; Sat, 17 Jul 2021 17:04:36 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 68722FF803 for ; Sat, 17 Jul 2021 21:04:28 +0000 (UTC) From: Brice Waegeneire To: guix-patches@gnu.org Subject: [PATCH 2/2] services: guix: Add channels field. Date: Sat, 17 Jul 2021 23:04:24 +0200 Message-Id: <20210717210424.1921-2-brice@waegenei.re> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210717205819.380-1-brice@waegenei.re> References: <20210717205819.380-1-brice@waegenei.re> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.199; envelope-from=brice@waegenei.re; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit 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.6 (--) * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' contains channels configuration. (Base Services): Document 'guix-configuration-channels' field. * gnu/services/base.scm (setup-channels): New procedure. (guix-configuration): Add channels field. (guix-activation): Use 'setup-channels' procedure. --- doc/guix.texi | 14 +++++++++++++- gnu/services/base.scm | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cca46218f2..c930530228 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5001,7 +5001,7 @@ $ wget -O - \ Guix and its package collection are updated by running @command{guix pull} (@pxref{Invoking guix pull}). By default @command{guix pull} downloads and deploys Guix itself from the official GNU@tie{}Guix repository. This can be -customized by defining @dfn{channels} in the +customized by defining @dfn{channels} in @file{/etc/guix/channels.scm} and @file{~/.config/guix/channels.scm} file. A channel specifies a URL and branch of a Git repository to be deployed, and @command{guix pull} can be instructed to pull from one or more channels. In other words, channels can be used @@ -15549,6 +15549,18 @@ This example assumes that the file @file{./guix.example.org-key.pub} contains the public key that @code{guix.example.org} uses to sign substitutes. +@item @code{channels} (default: @code{'()}) +List of system channels to use, it populates +@file{/etc/guix/channels.scm}. + +@quotation Note +When booting or reconfiguring to a system where @code{channels} +is not null, the existing @file{/etc/guix/channels.scm} file is backed up as +@file{/etc/guix/channels.scm.bak} if it was determined to be a manually modified +file. This is to facilitate migration from earlier versions, which +allowed for in-place modifications to @file{/etc/guix/channels.scm}. +@end quotation + @item @code{max-silent-time} (default: @code{0}) @itemx @code{timeout} (default: @code{0}) The number of seconds of silence and the number of seconds of activity, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index e206bea5f0..db63eb540b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -58,6 +58,7 @@ #:use-module (gnu packages terminals) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask)) + #:use-module (guix channels) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -66,6 +67,7 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 pretty-print) #:re-export (user-processes-service-type ;backwards compatibility %default-substitute-urls) #:export (fstab-service-type @@ -1502,6 +1504,35 @@ archive' public keys, with GUIX." ;; Installed the declared ACL. (symlink #+default-acl "/etc/guix/acl")))) +;; FIXME Does this gexp should be build before boot, such as +;; substitute-key-authorization does? +(define (setup-channels channels) + "Return a gexp with code to setup CHANNELS, a list of channels" + (define channels-file + (plain-file "channels.scm" + (with-output-to-string + (lambda _ + (pretty-print (map channel->code + channels)))))) + + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + ;; If channels.scm already exists, move it out of the way. Create a + ;; backup if it's a regular file: it's likely that the user + ;; manually defined it. + (if (file-exists? "/etc/guix/channels.scm") + (if (and (symbolic-link? "/etc/guix/channels.scm") + (store-file-name? (readlink "/etc/guix/channels.scm"))) + (delete-file "/etc/guix/channels.scm") + (rename-file "/etc/guix/channels.scm" + "/etc/guix/channels.scm.bak")) + (mkdir-p "/etc/guix")) + + ;; Installed the declared channels. + (symlink #+channels-file "/etc/guix/channels.scm")))) + (define %default-authorized-guix-keys ;; List of authorized substitute keys. (list (file-append guix "/share/guix/berlin.guix.gnu.org.pub") @@ -1524,6 +1555,8 @@ archive' public keys, with GUIX." (default #t)) (substitute-urls guix-configuration-substitute-urls ;list of strings (default %default-substitute-urls)) + (channels guix-configuration-channels ;list of channels + (default '())) (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer @@ -1701,7 +1734,7 @@ proxy of 'guix-daemon'...~%") (define (guix-activation config) "Return the activation gexp for CONFIG." (match-record config - (guix authorize-key? authorized-keys) + (guix authorize-key? authorized-keys channels) #~(begin ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, @@ -1714,6 +1747,10 @@ proxy of 'guix-daemon'...~%") #$(if authorize-key? (substitute-key-authorization authorized-keys guix) + #~#f) + + #$(if (not (null? channels)) + (setup-channels channels) #~#f)))) (define* (references-file item #:optional (name "references")) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 17:47:14 2021 Received: (at 49610) by debbugs.gnu.org; 21 Jul 2021 21:47:14 +0000 Received: from localhost ([127.0.0.1]:38824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6K3e-0003at-Hv for submit@debbugs.gnu.org; Wed, 21 Jul 2021 17:47:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6K3c-0003af-3e for 49610@debbugs.gnu.org; Wed, 21 Jul 2021 17:47:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35482) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6K3W-00036d-6K; Wed, 21 Jul 2021 17:47:06 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45280 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6K3V-0008MC-VL; Wed, 21 Jul 2021 17:47:06 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Brice Waegeneire Subject: Re: bug#49610: [PATCH 0/2] Add channels field to guix-configuration References: <20210717205819.380-1-brice@waegenei.re> <20210717210424.1921-1-brice@waegenei.re> Date: Wed, 21 Jul 2021 23:47:04 +0200 In-Reply-To: <20210717210424.1921-1-brice@waegenei.re> (Brice Waegeneire's message of "Sat, 17 Jul 2021 23:04:23 +0200") Message-ID: <87wnpje3vr.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: 49610 Cc: 49610@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 (---) Hello, Brice Waegeneire skribis: > It's more explicit to specify used fields instead of depending on their > position. > > * gnu/services/base.scm (guix-activation): Replace "match" with > "match-record". LGTM! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 17:53:44 2021 Received: (at 49610) by debbugs.gnu.org; 21 Jul 2021 21:53:44 +0000 Received: from localhost ([127.0.0.1]:38833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6K9w-0003kC-Cv for submit@debbugs.gnu.org; Wed, 21 Jul 2021 17:53:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6K9v-0003k1-7p for 49610@debbugs.gnu.org; Wed, 21 Jul 2021 17:53:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35572) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6K9p-0007fi-IP; Wed, 21 Jul 2021 17:53:37 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45282 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6K9p-0000Qj-Ai; Wed, 21 Jul 2021 17:53:37 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Brice Waegeneire Subject: Re: bug#49610: [PATCH 0/2] Add channels field to guix-configuration References: <20210717205819.380-1-brice@waegenei.re> <20210717210424.1921-2-brice@waegenei.re> Date: Wed, 21 Jul 2021 23:53:36 +0200 In-Reply-To: <20210717210424.1921-2-brice@waegenei.re> (Brice Waegeneire's message of "Sat, 17 Jul 2021 23:04:24 +0200") Message-ID: <87sg07e3kv.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: 49610 Cc: 49610@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 (---) Brice Waegeneire skribis: > * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' > contains channels configuration. > (Base Services): Document 'guix-configuration-channels' field. > * gnu/services/base.scm (setup-channels): New procedure. > (guix-configuration): Add channels field. > (guix-activation): Use 'setup-channels' procedure. [...] > +@item @code{channels} (default: @code{'()}) > +List of system channels to use, it populates > +@file{/etc/guix/channels.scm}. What about: List of channels to be used by @command{guix pull}, by default. Channels listed here are written to @file{/etc/guix/channels.scm}. ? > +;; FIXME Does this gexp should be build before boot, such as > +;; substitute-key-authorization does? There=E2=80=99s a grammatical issue :-), but also I=E2=80=99m not sure: wha= t are you worried about? > +(define (setup-channels channels) > + "Return a gexp with code to setup CHANNELS, a list of channels" Missing period. For the name, how about =E2=80=98install-channels-file=E2= =80=99 instead? > + (channels guix-configuration-channels ;list of channels > + (default '())) I wonder if it should default to =E2=80=98%default-channels=E2=80=99, for c= onsistency and least-surprise. In practice, it means we=E2=80=99d always end up creat= ing /etc/guix/channels.scm, but that=E2=80=99s probably OK. (The downside is i= f we, Guix devs, choose to change =E2=80=98%default-channels=E2=80=99 at some poi= nt: users would be stuck with the value that got written to /etc. That=E2=80=99s a v= ery hypothetical situation though.) WDYT? > + #$(if (not (null? channels)) > + (setup-channels channels) > #~#f)))) In that case, we could remove the (null? channels) special case. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 00:42:48 2021 Received: (at 49610) by debbugs.gnu.org; 4 Aug 2021 04:42:49 +0000 Received: from localhost ([127.0.0.1]:42105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB8jw-0000Sp-P9 for submit@debbugs.gnu.org; Wed, 04 Aug 2021 00:42:48 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:42325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB8ju-0000SZ-4p for 49610@debbugs.gnu.org; Wed, 04 Aug 2021 00:42:47 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 4F9D3200002; Wed, 4 Aug 2021 04:42:38 +0000 (UTC) From: Brice Waegeneire To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#49610: [PATCH 0/2] Add channels field to guix-configuration References: <20210717205819.380-1-brice@waegenei.re> <20210717210424.1921-1-brice@waegenei.re> <87wnpje3vr.fsf_-_@gnu.org> Date: Wed, 04 Aug 2021 06:42:34 +0200 In-Reply-To: <87wnpje3vr.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Wed, 21 Jul 2021 23:47:04 +0200") Message-ID: <87eeb9izwl.fsf_-_@waegenei.re> 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.7 (/) X-Debbugs-Envelope-To: 49610 Cc: 49610@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.7 (-) Hello Ludo=E2=80=98, Ludovic Court=C3=A8s writes: > Brice Waegeneire skribis: > >> It's more explicit to specify used fields instead of depending on their >> position. >> >> * gnu/services/base.scm (guix-activation): Replace "match" with >> "match-record". > > LGTM! Thanks, pushed as 92605326ae909471d17b0db51504e810989989f8. Cheers, - Brice From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 17:16:55 2021 Received: (at 49610) by debbugs.gnu.org; 1 Sep 2021 21:16:55 +0000 Received: from localhost ([127.0.0.1]:39106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLXbL-00039u-0V for submit@debbugs.gnu.org; Wed, 01 Sep 2021 17:16:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLXbH-00039h-6j for 49610@debbugs.gnu.org; Wed, 01 Sep 2021 17:16:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38408) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLXbB-0008JB-4W; Wed, 01 Sep 2021 17:16:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48824 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLXbA-0002cq-SP; Wed, 01 Sep 2021 17:16:45 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Brice Waegeneire Subject: Re: bug#49610: [PATCH 0/2] Add channels field to guix-configuration References: <20210717205819.380-1-brice@waegenei.re> <20210717210424.1921-2-brice@waegenei.re> <87sg07e3kv.fsf_-_@gnu.org> Date: Wed, 01 Sep 2021 23:16:43 +0200 In-Reply-To: <87sg07e3kv.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Wed, 21 Jul 2021 23:53:36 +0200") Message-ID: <877dg06lok.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: 49610 Cc: 49610@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 (---) Hello Brice, Any update on this one? :-) Thanks in advance, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 21 16:01:02 2021 Received: (at 49610) by debbugs.gnu.org; 21 Dec 2021 21:01:02 +0000 Received: from localhost ([127.0.0.1]:55849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzmFm-00035T-Hd for submit@debbugs.gnu.org; Tue, 21 Dec 2021 16:01:02 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzmFg-00035C-DX for 49610@debbugs.gnu.org; Tue, 21 Dec 2021 16:00:56 -0500 Received: (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 18677E0007; Tue, 21 Dec 2021 21:00:45 +0000 (UTC) From: Brice Waegeneire To: ludo@gnu.org Subject: [PATCH v2] sevices: guix: Add channels field. Date: Tue, 21 Dec 2021 22:00:42 +0100 Message-Id: <20211221210042.6302-1-brice@waegenei.re> X-Mailer: git-send-email 2.34.0 In-Reply-To: <87sg07e3kv.fsf_-_@gnu.org> References: <87sg07e3kv.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 Cc: 49610@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.7 (-) * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' contains channels configuration. (Base Services): Document 'guix-configuration-channels' field. * gnu/services/base.scm (install-channels-file): New procedure. (guix-configuration): Add channels field. (guix-activation): Use 'install-channels-file' procedure. --- doc/guix.texi | 15 ++++++++++++++- gnu/services/base.scm | 42 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) I've changed the type of the new field from a list to a s-expression, I'm not sure if it should be a G-exp instead. The documentation of the 'channels' field as been updated as suggested. Ludovic Courtès writes: >> +;; FIXME Does this gexp should be build before boot, such as >> +;; substitute-key-authorization does? > > There’s a grammatical issue :-), but also I’m not sure: what are you > worried about? This is related to your commit 8b3ad455be7e8ace35a2eaebf7fffbb611280852, where you added pre-computation of the ACL to make « [...] the first boot slightly faster ». Should this be done in this case too? >> + (channels guix-configuration-channels ;list of channels >> + (default '())) > > I wonder if it should default to ‘%default-channels’, for consistency > and least-surprise. In practice, it means we’d always end up creating > /etc/guix/channels.scm, but that’s probably OK. (The downside is if we, > Guix devs, choose to change ‘%default-channels’ at some point: users > would be stuck with the value that got written to /etc. That’s a very > hypothetical situation though.) Users would not have been stuck with a stale ‘%default-channels’, even with the first version of this patch. The issue with using a non null default value, is the absence of backward compatibility. A user with an already defined /etc/guix/chanels.scm, would see its custom channels being replaced by the default one after having reconfigure a system with this patch for the first time. So I guess I should make further adjustment to the patch ¹ diff --git a/doc/guix.texi b/doc/guix.texi index a826171f34..5284a69156 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5001,7 +5001,7 @@ $ wget -O - \ Guix and its package collection are updated by running @command{guix pull} (@pxref{Invoking guix pull}). By default @command{guix pull} downloads and deploys Guix itself from the official GNU@tie{}Guix repository. This can be -customized by defining @dfn{channels} in the +customized by defining @dfn{channels} in @file{/etc/guix/channels.scm} and @file{~/.config/guix/channels.scm} file. A channel specifies a URL and branch of a Git repository to be deployed, and @command{guix pull} can be instructed to pull from one or more channels. In other words, channels can be used @@ -15557,6 +15557,19 @@ This example assumes that the file @file{./guix.example.org-key.pub} contains the public key that @code{guix.example.org} uses to sign substitutes. +@item @code{channels} (default: @code{'(cons* %default-channels)}) +S-expression producing a list of channels to be used by @command{guix +pull}, by default. The S-exp is written to +@file{/etc/guix/channels.scm}. + +@quotation Note +When booting or reconfiguring to a system where @code{channels} +is not null, the existing @file{/etc/guix/channels.scm} file is backed up as +@file{/etc/guix/channels.scm.bak} if it was determined to be a manually modified +file. This is to facilitate migration from earlier versions, which +allowed for in-place modifications to @file{/etc/guix/channels.scm}. +@end quotation + @item @code{max-silent-time} (default: @code{0}) @itemx @code{timeout} (default: @code{0}) The number of seconds of silence and the number of seconds of activity, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index e206bea5f0..c9823e6d55 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -58,6 +58,7 @@ #:use-module (gnu packages terminals) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask)) + #:use-module (guix channels) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -66,6 +67,7 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 pretty-print) #:re-export (user-processes-service-type ;backwards compatibility %default-substitute-urls) #:export (fstab-service-type @@ -1502,6 +1504,39 @@ archive' public keys, with GUIX." ;; Installed the declared ACL. (symlink #+default-acl "/etc/guix/acl")))) +;; FIXME Does this gexp should be built before boot, such as +;; substitute-key-authorization does? +(define (install-channels-file channels) + "Return a gexp with code to install a file with CHANNELS, a S-exp returning +a list of channels." + (define channels-file + (plain-file "channels.scm" + (with-output-to-string + (lambda _ + (pretty-print (map (lambda (channel) + (if (channel? channel) + (channel->code channel) + channel)) + channels)))))) + + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + ;; If channels.scm already exists, move it out of the way. Create a + ;; backup if it's a regular file: it's likely that the user + ;; manually defined it. + (if (file-exists? "/etc/guix/channels.scm") + (if (and (symbolic-link? "/etc/guix/channels.scm") + (store-file-name? (readlink "/etc/guix/channels.scm"))) + (delete-file "/etc/guix/channels.scm") + (rename-file "/etc/guix/channels.scm" + "/etc/guix/channels.scm.bak")) + (mkdir-p "/etc/guix")) + + ;; Installed the declared channels. + (symlink #+channels-file "/etc/guix/channels.scm")))) + (define %default-authorized-guix-keys ;; List of authorized substitute keys. (list (file-append guix "/share/guix/berlin.guix.gnu.org.pub") @@ -1524,6 +1559,8 @@ archive' public keys, with GUIX." (default #t)) (substitute-urls guix-configuration-substitute-urls ;list of strings (default %default-substitute-urls)) + (channels guix-configuration-channels ;sexp + (default '(cons* %default-channels))) (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer @@ -1701,7 +1738,7 @@ proxy of 'guix-daemon'...~%") (define (guix-activation config) "Return the activation gexp for CONFIG." (match-record config - (guix authorize-key? authorized-keys) + (guix authorize-key? authorized-keys channels) #~(begin ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, @@ -1714,7 +1751,8 @@ proxy of 'guix-daemon'...~%") #$(if authorize-key? (substitute-key-authorization authorized-keys guix) - #~#f)))) + #~#f) + #$(install-channels-file channels)))) (define* (references-file item #:optional (name "references")) "Return a file that contains the list of references of ITEM." -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 03 06:32:44 2022 Received: (at 49610) by debbugs.gnu.org; 3 Jan 2022 11:32:44 +0000 Received: from localhost ([127.0.0.1]:34278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4LZz-0006JA-UT for submit@debbugs.gnu.org; Mon, 03 Jan 2022 06:32:44 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:55562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4LZw-0006Is-MW for 49610@debbugs.gnu.org; Mon, 03 Jan 2022 06:32:42 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B2B4A2C3; Mon, 3 Jan 2022 12:32:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KOiKNH4C6J-d; Mon, 3 Jan 2022 12:32:32 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1AF6113B; Mon, 3 Jan 2022 12:32:32 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Brice Waegeneire Subject: Re: [PATCH v2] sevices: guix: Add channels field. References: <87sg07e3kv.fsf_-_@gnu.org> <20211221210042.6302-1-brice@waegenei.re> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?utf-8?Q?Niv=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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: Mon, 03 Jan 2022 12:32:31 +0100 In-Reply-To: <20211221210042.6302-1-brice@waegenei.re> (Brice Waegeneire's message of "Tue, 21 Dec 2021 22:00:42 +0100") Message-ID: <87v8z1kqb4.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-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: B2B4A2C3 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49610 Cc: 49610@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: -0.0 (/) Hi Brice, Brice Waegeneire skribis: > * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' > contains channels configuration. > (Base Services): Document 'guix-configuration-channels' field. > * gnu/services/base.scm (install-channels-file): New procedure. > (guix-configuration): Add channels field. > (guix-activation): Use 'install-channels-file' procedure. > --- > doc/guix.texi | 15 ++++++++++++++- > gnu/services/base.scm | 42 ++++++++++++++++++++++++++++++++++++++++-- > 2 files changed, 54 insertions(+), 3 deletions(-) > > I've changed the type of the new field from a list to a s-expression, I'm= not > sure if it should be a G-exp instead. The documentation of the > 'channels' field as been updated as suggested. It=E2=80=99s OK to keep it this way. > Ludovic Court=C3=A8s writes: > >>> +;; FIXME Does this gexp should be build before boot, such as >>> +;; substitute-key-authorization does? >> >> There=E2=80=99s a grammatical issue :-), but also I=E2=80=99m not sure: = what are you >> worried about? > > This is related to your commit 8b3ad455be7e8ace35a2eaebf7fffbb611280852, = where > you added pre-computation of the ACL to make =C2=AB [...] the first boot = slightly > faster =C2=BB. Should this be done in this case too? Ah no, commit 8b3ad455be7e8ace35a2eaebf7fffbb611280852 is about pre-generating /etc/guix/acl. In the case of /etc/guix/channels.scm, there=E2=80=99s nothing to pre-generate though since we=E2=80=99re just dum= ping the sexp as-is to /etc/guix/channels.scm, so I think this comment can be safely removed. [...] > +@item @code{channels} (default: @code{'(cons* %default-channels)}) I=E2=80=99d make the default #~%default-channels, no need for =E2=80=98cons= *=E2=80=99. > +@quotation Note > +When booting or reconfiguring to a system where @code{channels} > +is not null, the existing @file{/etc/guix/channels.scm} file is backed u= p as > +@file{/etc/guix/channels.scm.bak} if it was determined to be a manually = modified > +file. This is to facilitate migration from earlier versions, which > +allowed for in-place modifications to @file{/etc/guix/channels.scm}. > +@end quotation =E2=80=9CWhen (=E2=80=A6) where @code{channels} is not null=E2=80=9D does n= ot match the actual code, does it? Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 25 16:12:43 2023 Received: (at 49610) by debbugs.gnu.org; 25 May 2023 20:12:43 +0000 Received: from localhost ([127.0.0.1]:48228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2HKE-0005pi-MH for submit@debbugs.gnu.org; Thu, 25 May 2023 16:12:43 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:52790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2HKB-0005pO-8J for 49610@debbugs.gnu.org; Thu, 25 May 2023 16:12:41 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QRzk32WzRz9snt; Thu, 25 May 2023 22:12:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685045547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=t0YE/tUUnysGJ/ix8taLAdJdbn0hnsvXWk4gUgxWK3c=; b=O/agdFLAQhk/F9WFZn71RxoDVOYRR4abPJJbb+2HOhHv+n5huUTMSuB+cKKi4K8sn8UqVR zKjqKfIhA68UEuIczfUZk7r9xJdxCt/BXEElT/uYxGq2F9PQ/mdDCgizmXFfG3Sv5VoHvD XwJCSeW9vvytzSDMRQ/4QOmQdFUFjLd+DBd5WQm+vq4tFrrZjusMdYBpq02OXGS53E5Nqr iQb6K2qadrVo1+Ze9OW4kCEkwIiK7INENBkaSYIzJ56n4BHkobVTolgwnH2UFe511LGcIc TQwPPn8Ga/beA4msmvMiS4tRRfB4EjQpLjzsve6BjWxypmS3JJNyCaRl7XRHWw== From: Antero Mejr To: 49610@debbugs.gnu.org Subject: [PATCH v3] services: guix: Add channels field. Date: Thu, 25 May 2023 20:12:16 +0000 Message-Id: <20230525201216.16870-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 021eddfe7f0470a8ad1 X-MBO-RS-META: ni3zdxi47x61ssohximn7jrszttgwiww X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 Cc: ludo@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.7 (-) * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' contains channels configuration. (Base Services): Document 'guix-configuration-channels' field. * gnu/services/base.scm (install-channels-file): New procedure. (%default-channels-file): New variable. (guix-configuration): Add channels field. (guix-activation): Use 'install-channels-file' procedure. --- Updated v3 patch. Changed the channels field to accept a file-like object instead of an S-expression. I think this is more flexible because it lets users specify a local-file rather than just an sexp. I think this will be a unexpected/breaking change for Guix System users. If they have /etc/guix/channels.scm customized manually, on their next 'guix system reconfigure', it will move that file and use the channels field, unless they modify guix-configuration. Maybe this change should have a NEWS entry? doc/guix.texi | 17 +++++++++++++++-- gnu/services/base.scm | 44 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 31dc33fb97..d0367ab8c5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5397,8 +5397,8 @@ $ wget -O - \ Guix and its package collection are updated by running @command{guix pull} (@pxref{Invoking guix pull}). By default @command{guix pull} downloads and deploys Guix itself from the official GNU@tie{}Guix repository. This can be -customized by defining @dfn{channels} in the -@file{~/.config/guix/channels.scm} file. A channel specifies a URL and branch +customized by defining @dfn{channels} in the @file{/etc/guix/channels.scm} and +@file{~/.config/guix/channels.scm} files. A channel specifies a URL and branch of a Git repository to be deployed, and @command{guix pull} can be instructed to pull from one or more channels. In other words, channels can be used to @emph{customize} and to @emph{extend} Guix, as we will see below. @@ -18858,6 +18858,19 @@ few seconds when enough entropy is available and is only done once; you might want to turn it off for instance in a virtual machine that does not need it and where the extra boot time is a problem. +@item @code{channels} (default: @code{%default-channels-file}) +File-like object containing a list of channels to be used by +@command{guix pull}, by default. The file-like object is symlinked to +@file{/etc/guix/channels.scm}. + +@quotation Note +When reconfiguring a system, the existing @file{/etc/guix/channels.scm} +file is backed up as @file{/etc/guix/channels.scm.bak} if it was +determined to be a manually modified file. This is to facilitate +migration from earlier versions, which allowed for in-place +modifications to @file{/etc/guix/channels.scm}. +@end quotation + @item @code{max-silent-time} (default: @code{0}) @itemx @code{timeout} (default: @code{0}) The number of seconds of silence and the number of seconds of activity, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c5b06b57e8..e61bf6eac7 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -80,6 +80,7 @@ (define-module (gnu services base) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask swap-space->flags-bit-mask)) + #:use-module (guix channels) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -93,6 +94,7 @@ (define-module (gnu services base) #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 pretty-print) #:re-export (user-processes-service-type ;backwards compatibility %default-substitute-urls) #:export (fstab-service-type @@ -207,6 +209,7 @@ (define-module (gnu services base) guix-configuration-use-substitutes? guix-configuration-substitute-urls guix-configuration-generate-substitute-key? + guix-configuration-channels guix-configuration-extra-options guix-configuration-log-file guix-configuration-environment @@ -1739,6 +1742,39 @@ (define acl-file #$%acl-file) ;; Installed the declared ACL. (symlink #+default-acl acl-file)))) +(define %default-channels-file + ;; File-like object containing the default list of channels. + (plain-file "channels.scm" + (with-output-to-string + (lambda _ + (pretty-print (map (lambda (channel) + (if (channel? channel) + (channel->code channel) + channel)) + %default-channels)))))) + +;; FIXME: Should this gexp be built before boot, like +;; substitute-key-authorization does? +(define (install-channels-file channels-file) + "Return a gexp with code to install CHANNELS-FILE, a file-like object." + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + ;; If channels.scm already exists, move it out of the way. Create a + ;; backup if it's a regular file: it's likely that the user + ;; manually defined it. + (if (file-exists? "/etc/guix/channels.scm") + (if (and (symbolic-link? "/etc/guix/channels.scm") + (store-file-name? (readlink "/etc/guix/channels.scm"))) + (delete-file "/etc/guix/channels.scm") + (rename-file "/etc/guix/channels.scm" + "/etc/guix/channels.scm.bak")) + (mkdir-p "/etc/guix")) + + ;; Installed the declared channels. + (symlink #+channels-file "/etc/guix/channels.scm")))) + (define %default-authorized-guix-keys ;; List of authorized substitute keys. (list (file-append guix "/share/guix/berlin.guix.gnu.org.pub") @@ -1763,6 +1799,8 @@ (define-record-type* (default %default-substitute-urls)) (generate-substitute-key? guix-configuration-generate-substitute-key? (default #t)) ;Boolean + (channels guix-configuration-channels ;file-like + (default %default-channels-file)) (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer @@ -1949,7 +1987,7 @@ (define (guix-accounts config) (define (guix-activation config) "Return the activation gexp for CONFIG." (match-record config - (guix generate-substitute-key? authorize-key? authorized-keys) + (guix generate-substitute-key? authorize-key? authorized-keys channels) #~(begin ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, @@ -1963,7 +2001,9 @@ (define (guix-activation config) #$(if authorize-key? (substitute-key-authorization authorized-keys guix) - #~#f)))) + #~#f) + + #$(install-channels-file channels)))) (define-record-type* guix-extension make-guix-extension -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 07:25:36 2023 Received: (at 49610) by debbugs.gnu.org; 26 May 2023 11:25:36 +0000 Received: from localhost ([127.0.0.1]:48993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2VZg-0008Fj-Cc for submit@debbugs.gnu.org; Fri, 26 May 2023 07:25:36 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:39392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2VZT-0008Ep-FX for 49610@debbugs.gnu.org; Fri, 26 May 2023 07:25:35 -0400 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-30ad48957f5so56348f8f.1 for <49610@debbugs.gnu.org>; Fri, 26 May 2023 04:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685100318; x=1687692318; 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=xeNL6dY/C8VxRqASHlCaDWxXRCJ6CZcgCYZ71F2B9Tc=; b=jaE8+1xrRamM69B6Coqh6XL3dN2ss1QE7RRY2y3HNM60EJcIx219qbnmpZj++BEQP6 qS/9Q7YyAb3NxAfI6jGjNIjKdFZ0/TRtnRaX8bD3DygkzAX5kPdADcrNmmIN2qbGP16Z Jyj99k8TmMOfjIv9T/O+R4cNdZ+e422xPu37TIA+ZBnE6BTJTB7qBE/5+k19PfMUHGx/ K1ZhkumLsvJ9tZV3nKJWIP35lDjRN9apchRp3W1+PIFsV4claUn/6U6qxEloxawATLoR uTWM93h01lb7tE7XI83hDZvL84t3HlWiSAKIvVsUSoqjT0kdwnvwa2SCJbs629MV/shl 1rJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685100318; x=1687692318; 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=xeNL6dY/C8VxRqASHlCaDWxXRCJ6CZcgCYZ71F2B9Tc=; b=M3pDl+JX8KcGpcIn27mDr2r81JU8qiVYatitvWbD4XyKODRY8DMEdRtymPMKbzXv1C xB6cBjy+yd8ZpahBLsXIQwNTBGaoLxnLZVyIxRdqwX19bznHKBoBIEzqRCRt7xqcoOVd /zDtdDthxIFFA8u8JPcqHY9+bD+lfddEuMhXeYD8vk6VmWCOI2rzxufwQ13PkPLEjjWb Gy5oOEU5FUgJWlC43SO1QxnzsDxT2md9X2K4nCYA7u7gdhXlZD8sBEHBDpsKtLWXZPP1 q56kYiDxFRAEd3omLw4Y3Bq2MYG4vQ9zm/qQkhZmI0L/avzMQderrBTCvg5w3o24+JEN KVkQ== X-Gm-Message-State: AC+VfDwJ0VQyxLojvq5xpXmKZ7xdHldYrv/9j0igVyFBIxCgITIr4x6x X3H6HspUF7Jedk0C51PvMtc= X-Google-Smtp-Source: ACHHUZ77dmGtB0vHY4OTGYBtyK5o3e57aDZNAROcDfcIIv2itU2XRHYVyS1x3QhiVGuvzMbODMuu0A== X-Received: by 2002:adf:ec44:0:b0:2fe:e605:a8cd with SMTP id w4-20020adfec44000000b002fee605a8cdmr917833wrn.6.1685100317843; Fri, 26 May 2023 04:25:17 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id h2-20020adff4c2000000b0030631f199f9sm4861861wrp.34.2023.05.26.04.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 04:25:17 -0700 (PDT) From: Simon Tournier To: Antero Mejr , 49610@debbugs.gnu.org Subject: Re: [bug#49610] [PATCH v3] services: guix: Add channels field. In-Reply-To: <20230525201216.16870-1-antero@mailbox.org> References: <20210717205819.380-1-brice@waegenei.re> <20230525201216.16870-1-antero@mailbox.org> Date: Fri, 26 May 2023 12:40:40 +0200 Message-ID: <87lehbtlxz.fsf@gmail.com> 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: 49610 Cc: ludo@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, Sorry if I am missing something. A comment about the consistency of the manual. :-) The section =E2=80=9CInvoking guix pull=E2=80=9D mentions: Specifically, @command{guix pull} downloads code from the @dfn{chan= nels} (@pxref{Channels}) specified by one of the followings, in this orde= r: @enumerate @item the @option{--channels} option; @item the user's @file{~/.config/guix/channels.scm} file; @item the system-wide @file{/etc/guix/channels.scm} file; @item the built-in default channels specified in the @code{%default-chann= els} variable. @end enumerate On jeu., 25 mai 2023 at 20:12, Antero Mejr via Guix-patches via wrote: > -customized by defining @dfn{channels} in the > -@file{~/.config/guix/channels.scm} file. A channel specifies a URL and = branch > +customized by defining @dfn{channels} in the @file{/etc/guix/channels.sc= m} and > +@file{~/.config/guix/channels.scm} files. A channel specifies a URL and= branch I find this wording confusing. I would suggest: --8<---------------cut here---------------start------------->8--- A channel specifies a URL and branch customized by defining @dfn{channels} in the @file{~/.config/guix/channels.scm} file, and/or the @file{/etc/guix/channels.scm} file and/or the built-in default specified in the @code{%default-channels} variable. Guix honors the channels file in that previous order (@xref{Invoking guix pull}). --8<---------------cut here---------------end--------------->8--- or something like that. Keeping in mind that this part is not Guix System specific. WDYT? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 12:26:27 2023 Received: (at 49610) by debbugs.gnu.org; 26 May 2023 16:26:27 +0000 Received: from localhost ([127.0.0.1]:50674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aGo-000399-B2 for submit@debbugs.gnu.org; Fri, 26 May 2023 12:26:27 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:42264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aGm-00038r-SI for 49610@debbugs.gnu.org; Fri, 26 May 2023 12:26:25 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4QSVfX6Rclz9ssc; Fri, 26 May 2023 18:26:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685118372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=CpDr/hktiK8QND3jK5avAN6/G0ZGs5l4s3+hJ7rcWWo=; b=GrGt3yk2BwOF1z/Mc85CXhNeblB+KoEiOP2qGhYednpe21bBnb17C4BZQ0TZITQfQXbiIc BcK4Du7+lRcvqMfLnWOKiKNcDC7pb8/ppdZk/jeZsFobqJK/FoIHOS/8TxoRYmDCm5kFUD MmRz9kO0ffNHs2m5NLuQkHLzCEYTLO1+tb+gSmtwYONyBFhGmJ1dE17f2L1RMx2pRXd6k9 fop7R49zEt8k4w6K4pHumOpqe/CJGKr04JyhD0gTLTJqdH+gn/C6uLq+MOSO453FQZeEJg 36NFrxdVFkCI0EK6BHWSNo2dQvSUqzRrm+hXopyZDmciaU5rqwI4CeSjaYUShw== From: Antero Mejr To: 49610@debbugs.gnu.org Subject: [PATCH v4 1/2] services: guix: Add channels field. Date: Fri, 26 May 2023 16:26:05 +0000 Message-Id: <20230526162606.6747-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-META: uyijabr1utymf1zz9mcfmc7ny4xzo9e3 X-MBO-RS-ID: 5cde06eba5612d44fd5 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 Cc: ludo@gnu.org, zimon.toutoune@gmail.com 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.7 (-) * doc/guix.texi (Base Services): Document 'guix-configuration-channels' field. * gnu/services/base.scm (install-channels-file): New procedure. (%default-channels-file): New variable. (guix-configuration): Add channels field. (guix-activation): Use 'install-channels-file' procedure. --- doc/guix.texi | 13 +++++++++++++ gnu/services/base.scm | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 31dc33fb97..9ebdf70d81 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18858,6 +18858,19 @@ few seconds when enough entropy is available and is only done once; you might want to turn it off for instance in a virtual machine that does not need it and where the extra boot time is a problem. +@item @code{channels} (default: @code{%default-channels-file}) +File-like object containing a list of channels to be used by +@command{guix pull}, by default. The file-like object is symlinked to +@file{/etc/guix/channels.scm}. + +@quotation Note +When reconfiguring a system, the existing @file{/etc/guix/channels.scm} +file is backed up as @file{/etc/guix/channels.scm.bak} if it was +determined to be a manually modified file. This is to facilitate +migration from earlier versions, which allowed for in-place +modifications to @file{/etc/guix/channels.scm}. +@end quotation + @item @code{max-silent-time} (default: @code{0}) @itemx @code{timeout} (default: @code{0}) The number of seconds of silence and the number of seconds of activity, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c5b06b57e8..ee0c4880f9 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -80,6 +80,7 @@ (define-module (gnu services base) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask swap-space->flags-bit-mask)) + #:use-module (guix channels) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -93,6 +94,7 @@ (define-module (gnu services base) #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 pretty-print) #:re-export (user-processes-service-type ;backwards compatibility %default-substitute-urls) #:export (fstab-service-type @@ -207,6 +209,7 @@ (define-module (gnu services base) guix-configuration-use-substitutes? guix-configuration-substitute-urls guix-configuration-generate-substitute-key? + guix-configuration-channels guix-configuration-extra-options guix-configuration-log-file guix-configuration-environment @@ -1739,6 +1742,35 @@ (define acl-file #$%acl-file) ;; Installed the declared ACL. (symlink #+default-acl acl-file)))) +(define %default-channels-file + ;; File-like object containing the default list of channels. + (plain-file "channels.scm" + (with-output-to-string + (lambda _ + (pretty-print (map channel->code %default-channels)))))) + +;; FIXME: Should this gexp be built before boot, like +;; substitute-key-authorization does? +(define (install-channels-file channels-file) + "Return a gexp with code to install CHANNELS-FILE, a file-like object." + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + ;; If channels.scm already exists, move it out of the way. Create a + ;; backup if it's a regular file: it's likely that the user + ;; manually defined it. + (if (file-exists? "/etc/guix/channels.scm") + (if (and (symbolic-link? "/etc/guix/channels.scm") + (store-file-name? (readlink "/etc/guix/channels.scm"))) + (delete-file "/etc/guix/channels.scm") + (rename-file "/etc/guix/channels.scm" + "/etc/guix/channels.scm.bak")) + (mkdir-p "/etc/guix")) + + ;; Installed the declared channels. + (symlink #+channels-file "/etc/guix/channels.scm")))) + (define %default-authorized-guix-keys ;; List of authorized substitute keys. (list (file-append guix "/share/guix/berlin.guix.gnu.org.pub") @@ -1763,6 +1795,8 @@ (define-record-type* (default %default-substitute-urls)) (generate-substitute-key? guix-configuration-generate-substitute-key? (default #t)) ;Boolean + (channels guix-configuration-channels ;file-like + (default %default-channels-file)) (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer @@ -1949,7 +1983,7 @@ (define (guix-accounts config) (define (guix-activation config) "Return the activation gexp for CONFIG." (match-record config - (guix generate-substitute-key? authorize-key? authorized-keys) + (guix generate-substitute-key? authorize-key? authorized-keys channels) #~(begin ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW overlayfs, @@ -1963,7 +1997,9 @@ (define (guix-activation config) #$(if authorize-key? (substitute-key-authorization authorized-keys guix) - #~#f)))) + #~#f) + + #$(install-channels-file channels)))) (define-record-type* guix-extension make-guix-extension -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 12:26:29 2023 Received: (at 49610) by debbugs.gnu.org; 26 May 2023 16:26:29 +0000 Received: from localhost ([127.0.0.1]:50676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aGr-00039O-7P for submit@debbugs.gnu.org; Fri, 26 May 2023 12:26:29 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:34986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aGn-00038v-Ru for 49610@debbugs.gnu.org; Fri, 26 May 2023 12:26:26 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4QSVfZ22SFz9sdC; Fri, 26 May 2023 18:26:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685118374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LUrsRyESr6tffv4DXqW4KsWj3SpGZ7eYDT4jcccOZHs=; b=Bjxe3h3xP/tQPb2rLcUKgKE6EN5srM3yU3Kqw1ImdYr8GfXMdbsGKoR0cz8rRq1B4iImwl o92zB8x2yR0jg3MW30qb7ug0CGWHHv5BLnO28SN34tBt2e93HAJoyMtvoJAUQ1Ymx+xqcz 5JEJNfCJT18raxI3k4cZRymhxydbOw8AP3ar7Zm2L5NqpnOCwPByo3NAB4upS2mIeNDRQM rgOQ+x/O+f3EtQ2I+JNikxzoHqMMcA5Xp2qCiYFuaU28nvbB+4zScOW0eNKVtiidH3nTAz LM2I2AQdGl/BVJCXjO4u39nDzIC3P9cm48NegVbeMrzu0fMQ/rWn6z91Vfju5g== From: Antero Mejr To: 49610@debbugs.gnu.org Subject: [PATCH v4 2/2] doc: guix.texi: Clarify wording in Channels section. Date: Fri, 26 May 2023 16:26:06 +0000 Message-Id: <20230526162606.6747-2-antero@mailbox.org> In-Reply-To: <20230526162606.6747-1-antero@mailbox.org> References: <20230526162606.6747-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 415eb2f7e095857f755 X-MBO-RS-META: 65srwmh73y3cj9dywsy858cgg5k3fus4 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 Cc: ludo@gnu.org, zimon.toutoune@gmail.com 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.7 (-) * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' contains channels configuration. --- doc/guix.texi | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9ebdf70d81..643a36358d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5396,14 +5396,15 @@ $ wget -O - \ @cindex configuration of @command{guix pull} Guix and its package collection are updated by running @command{guix pull} (@pxref{Invoking guix pull}). By default @command{guix pull} downloads and -deploys Guix itself from the official GNU@tie{}Guix repository. This can be -customized by defining @dfn{channels} in the -@file{~/.config/guix/channels.scm} file. A channel specifies a URL and branch -of a Git repository to be deployed, and @command{guix pull} can be instructed -to pull from one or more channels. In other words, channels can be used -to @emph{customize} and to @emph{extend} Guix, as we will see below. -Guix is able to take into account security concerns and deal with authenticated -updates. +deploys Guix itself from the official GNU@tie{}Guix repository. A +channel specifies a URL and branch customized by defining @dfn{channels} +in the @file{~/.config/guix/channels.scm} file, and/or the +@file{/etc/guix/channels.scm} file and/or the built-in default specified +in the @code{%default-channels} variable. Guix honors the channels file +in that previous order (@xref{Invoking guix pull}). In other words, +channels can be used to @emph{customize} and to @emph{extend} Guix, as +we will see below. Guix is able to take into account security concerns +and deal with authenticated updates. @menu * Specifying Additional Channels:: Extending the package collection. -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 12:30:06 2023 Received: (at 49610) by debbugs.gnu.org; 26 May 2023 16:30:06 +0000 Received: from localhost ([127.0.0.1]:50687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aKL-0003FY-U0 for submit@debbugs.gnu.org; Fri, 26 May 2023 12:30:06 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:40216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2aKJ-0003EZ-LT for 49610@debbugs.gnu.org; Fri, 26 May 2023 12:30:04 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4QSVkm15Zzz9sdQ; Fri, 26 May 2023 18:29:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685118592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwZc8B7a9nJkmQzjiMavOUNKBX0V6ikejFsoFHDFOxQ=; b=iQjeY0KY/630S+35GCtkpwXlwGJdz7RDWNmLVa7fGpzd1HJf5OLDalDprUiC4dsOI8o/la fXqSfefTk/GLEvE/CZb1TjcKaXHgzRaKjkxqR2oof2uYxsKKKScJwtxW914B4y3uevOS3P a5PRnzg1rLw0R5IPS9Qxe4716dMBVE/QKx7CjqX4uqOGJwJWX6J5IWbXO4dfTKdNEri8yK /tEaDxJz028iT+v4igy3XUgmnt2AmoPBKf+sbSVDQjB8SIJMwGnDOxE/VToT8DnhS/M2XV t1jx7Hg8wyd8/v48TMCnW9vGbmRHJma0uMnIQB6tpEyH+kSCE6fIXzlTJkPpCQ== From: Antero Mejr To: Simon Tournier Subject: Re: [bug#49610] [PATCH v3] services: guix: Add channels field. In-Reply-To: <87lehbtlxz.fsf@gmail.com> (Simon Tournier's message of "Fri, 26 May 2023 12:40:40 +0200") References: <20210717205819.380-1-brice@waegenei.re> <20230525201216.16870-1-antero@mailbox.org> <87lehbtlxz.fsf@gmail.com> Date: Fri, 26 May 2023 16:29:49 +0000 Message-ID: <87a5xrvywy.fsf@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: 9983ae3937b45c68e9b X-MBO-RS-META: irpprhbz1wajgyupg7b77ekdxydbf91o X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 Cc: 49610@debbugs.gnu.org, ludo@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.7 (-) Simon Tournier writes: > Sorry if I am missing something. A comment about the consistency of the > manual. :-) The section =E2=80=9CInvoking guix pull=E2=80=9D mentions: > > (snip) > >> -customized by defining @dfn{channels} in the >> -@file{~/.config/guix/channels.scm} file. A channel specifies a URL and= branch >> +customized by defining @dfn{channels} in the @file{/etc/guix/channels.s= cm} and >> +@file{~/.config/guix/channels.scm} files. A channel specifies a URL an= d branch > > I find this wording confusing. I would suggest: > > A channel specifies a URL and branch customized by defining > @dfn{channels} in the @file{~/.config/guix/channels.scm} file, and/or > the @file{/etc/guix/channels.scm} file and/or the built-in default > specified in the @code{%default-channels} variable. Guix honors the > channels file in that previous order (@xref{Invoking guix pull}). > > or something like that. Keeping in mind that this part is not Guix > System specific. Updated to use that wording in v4. I put the documentation update for the Channels section into a separate patch, as that change isn't related to the guix-configuration changes. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 22 06:53:59 2024 Received: (at 49610) by debbugs.gnu.org; 22 Mar 2024 10:53:59 +0000 Received: from localhost ([127.0.0.1]:42559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX8-0001W0-HN for submit@debbugs.gnu.org; Fri, 22 Mar 2024 06:53:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX2-0001Ul-Jo for 49610@debbugs.gnu.org; Fri, 22 Mar 2024 06:53:53 -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 1rncNn-0003ZI-IK; Fri, 22 Mar 2024 06:44:19 -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:References:In-Reply-To:Subject:To: From; bh=lCFIaJmKM40OCvPEp178HOWZwgWKKJ2OUQxrL8os+1E=; b=FU6OeqJ0oH1zIT4Wik0j HtzVv2XIFKKpqLkBPzmRwZ+IdM+ldCUckqAifNnlIQi+GaVLOyBAtzhE5mh70uQqEbzYv8Cj1emrN nv2iobX67gm8/fx3jwV1/h5QCdxq9EKsRThA638olDcPb6+yMnst83Zga0wlbx0h84cy2ke2BFmh4 pOUPEi6agAWMiWURHkZrzksY1HhaNf93BlIFC7EpTMZR1hMaDqQWyI05w5RrVG/NeE1fRLRfcm/Xx GL9SpeEfnu2W0EgCFB8ds+olvTudavW9jGIHUkCe+8vM9GD9m9qrG+zMW4uVoiDqp+bb3JtrjdpEw Il3+SZfGcSPARw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Antero Mejr Subject: Re: [bug#49610] [PATCH v4 1/2] services: guix: Add channels field. In-Reply-To: <20230526162606.6747-1-antero@mailbox.org> (Antero Mejr's message of "Fri, 26 May 2023 16:26:05 +0000") References: <20210717205819.380-1-brice@waegenei.re> <20230526162606.6747-1-antero@mailbox.org> Date: Fri, 22 Mar 2024 11:44:14 +0100 Message-ID: <87sf0isg01.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49610 Cc: 49610@debbugs.gnu.org, zimon.toutoune@gmail.com 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 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Antero, Antero Mejr skribis: > * doc/guix.texi (Base Services): Document > 'guix-configuration-channels' field. > * gnu/services/base.scm (install-channels-file): New procedure. > (%default-channels-file): New variable. > (guix-configuration): Add channels field. > (guix-activation): Use 'install-channels-file' procedure. Rebased and finally applied! However, I took the liberty to make the changes below. Essentially, =E2=80=98channels=E2=80=99 is now a list of channel (as the name suggests) = rather than a file-like. It=E2=80=99s a tradeoff: on one hand it=E2=80=99s less expressi= ve (that prevents users from sticking arbitrary Scheme code in there), but OTOH it=E2=80=99s easier to use. If that is deemed too rigid, we can revisit that and either allow for file-like objects or for gexps, or add a separate =E2=80=98channels-file=E2= =80=99 field. Pushed as 883e69cdfd226c8f40b6e3b76ce0740b59857de6. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 5c974f2ea4..e419b8d1a4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4727,7 +4727,9 @@ Invoking guix pull is passed; @item the system-wide @file{/etc/guix/channels.scm} file, unless @option{-q} -is passed; +is passed (on Guix System, this file can be declared in the operating +system configuration, @pxref{guix-configuration-channels, +@code{channels} field of @code{guix-configuration}}); @item the built-in default channels specified in the @code{%default-channels} variable. @@ -19806,10 +19808,11 @@ Base Services might want to turn it off for instance in a virtual machine that does not need it and where the extra boot time is a problem. +@anchor{guix-configuration-channels} @item @code{channels} (default: @code{%default-channels}) -File-like object containing a list of channels to be used by -@command{guix pull}, by default. The file-like object is symlinked to -@file{/etc/guix/channels.scm}. +List of channels to be specified in @file{/etc/guix/channels.scm}, which +is what @command{guix pull} uses by default (@pxref{Invoking guix +pull}). @quotation Note When reconfiguring a system, the existing @file{/etc/guix/channels.scm} diff --git a/gnu/services/base.scm b/gnu/services/base.scm index dcd66b8064..cd61df718e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -83,7 +83,7 @@ (define-module (gnu services base) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask swap-space->flags-bit-mask)) - #:use-module (guix channels) + #:autoload (guix channels) (%default-channels channel->code) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -98,7 +98,6 @@ (define-module (gnu services base) #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 format) - #:use-module (ice-9 pretty-print) #:re-export (user-processes-service-type ;backwards compatibility %default-substitute-urls) #:export (fstab-service-type @@ -1743,17 +1742,13 @@ (define (substitute-key-authorization keys guix) ;; Installed the declared ACL. (symlink #+default-acl acl-file)))) -(define %default-channels-file - ;; File-like object containing the default list of channels. - (plain-file "channels.scm" - (with-output-to-string - (lambda _ - (pretty-print (map channel->code %default-channels)))))) +(define (install-channels-file channels) + "Return a gexp with code to install CHANNELS, a list of channels, in +/etc/guix/channels.scm." + (define channels-file + (scheme-file "channels.scm" + `(list ,@(map channel->code channels)))) -;; FIXME: Should this gexp be built before boot, like -;; substitute-key-authorization does? -(define (install-channels-file channels-file) - "Return a gexp with code to install CHANNELS-FILE, a file-like object." (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) @@ -1828,7 +1823,7 @@ (define-record-type* (generate-substitute-key? guix-configuration-generate-substitute-key? (default #t)) ;Boolean (channels guix-configuration-channels ;file-like - (default %default-channels-file)) + (default %default-channels)) (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer @@ -2040,7 +2035,7 @@ (define (guix-activation config) #~#f) ;; ... and /etc/guix/channels.scm... - #$(install-channels-file channels) + #$(and channels (install-channels-file channels)) ;; ... and /etc/guix/machines.scm. #$(if (guix-build-machines config) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 22 06:53:58 2024 Received: (at control) by debbugs.gnu.org; 22 Mar 2024 10:53:58 +0000 Received: from localhost ([127.0.0.1]:42553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX7-0001Vm-I8 for submit@debbugs.gnu.org; Fri, 22 Mar 2024 06:53:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX0-0001Ul-MQ for control@debbugs.gnu.org; Fri, 22 Mar 2024 06:53: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 1rncPg-0003xh-1G for control@debbugs.gnu.org; Fri, 22 Mar 2024 06:46:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=AOiWZTk3H0citgVu2jfLQ/RQFkejigoQlx8Sd50vu6o=; b=B6/Bx63szZh1X0 u73jMAgb/FiCWXm2pcMGK1lsm9PXjMANyshQrkueoXbcj5cV0xO12BRJgdhLCkOnkDz8FEOJgUvFy ZLP69M2RLXrIRp8+BC5o74N9PvVPFRSQbtjWvR1rMwVd4S7cuHos++p5GgX6LcgHwpiE9OWJK9PM1 qCvnebLyH+vRqsMznoVQ/pPum0GfNVIXezlnGWNoeKj6XRZRguJbmwRpXYgrCAZX+um0COw7588YA AbMOGmhcOont6wA8CspUAxdvMTIhJ04EcMBcdQvamYpiJEgxus+Xj7Y62NAQI7VSQx3GD1TjyDAEu UJMqn16+q75TkTJuiYHA==; Date: Fri, 22 Mar 2024 11:45:51 +0100 Message-Id: <87msqqsfxc.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #49610 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 49610 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 22 06:53:58 2024 Received: (at 49610-done) by debbugs.gnu.org; 22 Mar 2024 10:53:58 +0000 Received: from localhost ([127.0.0.1]:42557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX7-0001Vo-Vf for submit@debbugs.gnu.org; Fri, 22 Mar 2024 06:53:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rncX1-0001Ul-73 for 49610-done@debbugs.gnu.org; Fri, 22 Mar 2024 06:53:52 -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 1rncOl-0003ds-30; Fri, 22 Mar 2024 06:45:19 -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:References:In-Reply-To:Subject:To: From; bh=JVPH26PAwZd2ofihlbN+E1eh+7MdBnZ/FuIDNbkQ0Hw=; b=RqWTMZ7sD1KR5QIiG8my i+0wmmbD4oIIdLPErOt8H3FozFH+CoiLOOOGhfS5RUuHRTIWUg+HZrXc+D9CdumFdCWuM3x1f6+lZ 3Yf55iblqnhBxonMJplGYPA5wpC30wl1vpPsBgyOSJ+8JtdRGcG7vF/Mo8SR27cEMUVGfZCyn29eP O9vs0jV1lhD+tBtgekLYYCohJUpEXzdVY9BxaPaRJXKN5kAlV+eRbNnbm0nCOYSdZhytwWdwBfzV3 ZEeLN49QF7Sf9ghZN6/IFTYXkPATgQugsdvuc1QrcjP1tjsBFS2eEOSOHjAXaF7vCekkYxMr4Cjt/ iJV50zwuE5iteA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Antero Mejr Subject: Re: [bug#49610] [PATCH v4 2/2] doc: guix.texi: Clarify wording in Channels section. In-Reply-To: <20230526162606.6747-2-antero@mailbox.org> (Antero Mejr's message of "Fri, 26 May 2023 16:26:06 +0000") References: <20230526162606.6747-1-antero@mailbox.org> <20230526162606.6747-2-antero@mailbox.org> Date: Fri, 22 Mar 2024 11:45:17 +0100 Message-ID: <87o7b6sfya.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 49610-done Cc: 49610-done@debbugs.gnu.org, zimon.toutoune@gmail.com 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 (---) Antero Mejr skribis: > * doc/guix.texi (Channels): Specify that '/etc/guix/channels.scm' > contains channels configuration. I went with simpler wording to avoid repeating the file name ordering specified in =E2=80=9CInvoking guix pull=E2=80=9D. Pushed as b5018807ee4b09962507b67f7506cbdc70d6c810. Thanks for your work=E2=80=A6 and for your patience! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 24 06:55:17 2024 Received: (at 49610) by debbugs.gnu.org; 24 Mar 2024 10:55:17 +0000 Received: from localhost ([127.0.0.1]:48598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roLVV-0000ys-95 for submit@debbugs.gnu.org; Sun, 24 Mar 2024 06:55:17 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:47611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roL9E-0008Rc-76 for 49610@debbugs.gnu.org; Sun, 24 Mar 2024 06:32:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 3D3581380084 for <49610@debbugs.gnu.org>; Sun, 24 Mar 2024 06:24:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 24 Mar 2024 06:24:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1711275886; x=1711362286; bh=v6xFIn7f8l TzLn6U1Lx3uZL5ORLT9etfJtCHDfTru3w=; b=lUSP4wMo+iBuPk1/xVQQkXyDF5 E9jRv7ybs6Om0y4kM8NUZwuYmEh/RM9g72MZCnnA7KKUEU2RjUpkaezBrddBAYZ9 zB9R/LOyDDr3rwY1qN2a2mecUTU7CYP1pVReWYNGYHZ20Mbq7OQ1/DHTV2dMRY/4 hhydI7kN3d9LFlzPHX9MKHBMJ9uC+PMXo8g3nOYXrh1S7+yPBssJurrGvH+r2xFp 12R0bNQ7Pd4jmiF8oBgAuCXOuB2A95vt9jFtANKL/TJwGsCuhGIBbVDT26xsvJsr H6ief33T3Rq+imli8EaBFGAh/V9+FcmX5oEuIxR/vPgIz1VsucPu0LTdeRQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711275886; x=1711362286; bh=v6xFIn7f8lTzLn6U1Lx3uZL5ORLT 9etfJtCHDfTru3w=; b=Nw19ybaBBWEnsUj94TvRLe1+WyrWa3EiK0nV3F6pinSJ /mpnbmBW9zgVtebLyicgHNIeNLLjmi6jd8tuqRPkUY9ZgW1rasv/X90WL/Qj7UMW HPZZzTATvG7/IWyCmmAq+pTIVk+BCXkajEUwmB7FaeHTs3wRH4Wd3rzk9kqhO8dO GkSqkfVlYFKs7enscgq1pUqDYUKPA+7wctCNKe0lP8ReSOUP+e2ak+IxM8Ulwxvj covtcS4hd5DBIuaTBOTjg9pEuOMhk0KQWqJ3Wpb58TkK0mDWzl2tLOQK43xh7guy cN1hogk2K6r7l/xGIYLycg2A0gw/SrKokCc+woosVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddtjedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfvhffutgfgsehtjeertd dtfeejnecuhfhrohhmpefhrhgrnhiiucfivghffhhkvgcuoehfrhgrnhiisehprghnthhh vghrgidrohhrgheqnecuggftrfgrthhtvghrnhepjeehgedvgeegueefjeejudevgeektd dtfedtffeivdekgfdtteeugeekvdekkeetnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepfhhrrghniiesphgrnhhthhgvrhigrdhorhhg X-ME-Proxy: Feedback-ID: i477944df:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <49610@debbugs.gnu.org>; Sun, 24 Mar 2024 06:24:45 -0400 (EDT) Message-ID: <43aa186b-ee8e-3fea-0833-50a604a35e30@pantherx.org> Date: Sun, 24 Mar 2024 10:24:43 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US, de-DE To: 49610@debbugs.gnu.org From: Franz Geffke Subject: Re: [PATCH 0/2] Add channels field to guix-configuration Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 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.7 (-) As of yesterday the channels file on my computer has been replaced by a symlink to the default channels; I guess hundreds of PC's that rely on automatic updates, are now stuck on this commit. Is this expected? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 13:22:30 2024 Received: (at 49610) by debbugs.gnu.org; 4 Apr 2024 17:22:30 +0000 Received: from localhost ([127.0.0.1]:34673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsQnG-0000Fx-81 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 13:22:30 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsQnE-0000Fj-Bu for 49610@debbugs.gnu.org; Thu, 04 Apr 2024 13:22:29 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33e9115d501so535221f8f.0 for <49610@debbugs.gnu.org>; Thu, 04 Apr 2024 10:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712251337; x=1712856137; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NEbrB10/9hE8FRSwAqsIKMwLgOMm+jY7NZ8NdBc781o=; b=HvzbqbUvq+l42mf14+cCCavuxNiK9zO5wA9C9Fedf5x9hWMa7W2/URviEbhQpMRJf2 apOkVLNGsCSl48FYwkeLc8kc6RlDeFck4ErlIHIjwYdogq4uTRxrs+1S8zoDWUtrUjJ2 9MYWt8lv8HhE3RobjDYol4ZDG/1fdPEKgc56mwC+v6c4UTDSuDxqidFyuStUDBTK2YJV B7sPny+2znbrLvLLJ5Kow/y7tC4NR1D1vnuvzxgRaHLvkPkY2LJk1XCXicqDV9NBAp7C z4Z4iKNZCj/BYfdvAJrnt9MzSHzRzg6A6AJAtAJkxoVTulO+VmkUczRJEj+EV6Fx23gz 1KKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712251337; x=1712856137; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=NEbrB10/9hE8FRSwAqsIKMwLgOMm+jY7NZ8NdBc781o=; b=xB28P6Lkbqu4jKB6V9SeOjEZBirOBy6zU9/YACR78NEfBqee6Vbtgkk2fD+/J5Wd+c gbAFYNBLmqyMWfwXZpstUOsjdoYdbg0rs8oOdyFcaEHDQL53x/sWeMg5lS4hPkY57FvP i6C9FrH/ZEo6BvP3wbm0oqpr5IXsDqvalLJuIZmPdZj3/wvrzyYOosrXx1CSlvtYt59T zywC9oMUQ0LtFrS8dGkeibyWUdK9Cz2uKRY/88or2JfGNCSmOBTkZVDbAD8tffzKB9rV kIgywI5Zy2DpqgQcLoUX36UiH46swdE79xomWVWlU2yRne2IkQESbcSrSTE7dqWQ13jo dq5Q== X-Forwarded-Encrypted: i=1; AJvYcCX9ATcJrcb2Gqyj6+emcO1YM8HIynISoLC6WifMUmvsu8Kh3B89w1snmass/M1Zv2nng7OwfZU+61gPhFLYUjwCxX27mNc= X-Gm-Message-State: AOJu0YzPfZtFetm3shWkHk2eNTlFG0ApdR/9Pjg8io54MdPBjm+hjDNc Kd6Rylg6W168dpy5ihRGfk4Bzut2D1bVMhJH235RJsmTokCsVRCfkNRJ0oVq X-Google-Smtp-Source: AGHT+IEjSTzuuN6oETuXN9wdh0iM3DSpTp4cnup7k4ZSHO7wicP6oldxjgzcyyRvLtz6T1YCsGUCNg== X-Received: by 2002:a05:600c:3b0a:b0:416:2b72:1f5b with SMTP id m10-20020a05600c3b0a00b004162b721f5bmr1478915wms.2.1712251337030; Thu, 04 Apr 2024 10:22:17 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:9b40:6e4a:4036:fc35]) by smtp.gmail.com with ESMTPSA id h15-20020a05600c314f00b004155afe0c11sm3389217wmo.15.2024.04.04.10.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:22:16 -0700 (PDT) From: Simon Tournier To: Franz Geffke , 49610@debbugs.gnu.org Subject: Re: [bug#49610] [PATCH 0/2] Add channels field to guix-configuration In-Reply-To: <43aa186b-ee8e-3fea-0833-50a604a35e30@pantherx.org> References: <20210717205819.380-1-brice@waegenei.re> <43aa186b-ee8e-3fea-0833-50a604a35e30@pantherx.org> Date: Thu, 04 Apr 2024 10:03:49 +0200 Message-ID: <877chd4kre.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, On dim., 24 mars 2024 at 10:24, Franz Geffke wrote: > As of yesterday the channels file on my computer has been replaced by a symlink > to the default channels; I guess hundreds of PC's that rely on [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 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:42d listed in] [list.dnswl.org] X-Debbugs-Envelope-To: 49610 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, On dim., 24 mars 2024 at 10:24, Franz Geffke wrote: > As of yesterday the channels file on my computer has been replaced by a s= ymlink=20 > to the default channels; I guess hundreds of PC's that rely on automatic= =20 > updates, are now stuck on this commit. > > Is this expected? I guess yes, as mentioned in [1]: I think this will be a unexpected/breaking change for Guix System u= sers. If they have /etc/guix/channels.scm customized manually, on their next 'gui= x system reconfigure', it will move that file and use the channels field, un= less they modify guix-configuration. Maybe this change should have a NEWS en= try? But the =E2=80=99reconfigure=E2=80=99 should be smooth. Is it still an iss= ue for you? Cheers, simon 1: [bug#49610] [PATCH v3] services: guix: Add channels field. Antero Mejr via Guix-patches via Thu, 25 May 2023 20:12:16 +0000 id:20230525201216.16870-1-antero@mailbox.org https://issues.guix.gnu.org/49610 https://issues.guix.gnu.org/msgid/20230525201216.16870-1-antero@mailbox.org https://yhetil.org/guix/20230525201216.16870-1-antero@mailbox.org From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 09 04:45:38 2024 Received: (at 49610) by debbugs.gnu.org; 9 Apr 2024 08:45:38 +0000 Received: from localhost ([127.0.0.1]:48241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ru76m-0000Fw-DK for submit@debbugs.gnu.org; Tue, 09 Apr 2024 04:45:38 -0400 Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]:33293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ru76h-0000FT-QQ for 49610@debbugs.gnu.org; Tue, 09 Apr 2024 04:45:34 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.west.internal (Postfix) with ESMTP id EDC22180010D; Tue, 9 Apr 2024 04:45:16 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute4.internal (MEProxy); Tue, 09 Apr 2024 04:45:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1712652316; x=1712738716; bh=yCNFOPf4LX VFk09okpyFNvoCKZeV1V7GnPWy2TrUty4=; b=yN/rACd1+mBhiBedrrhbrsQoAw Df70Mg/oxP7M82ZrkN90gZFUCsZ/uBbuyICVE/KzxTraQIpU5aRSgxOEVWQm2Apd NLCJ4P8i+2Dz5U/tmp1qU5bHRXSYElkOUwhmFyZWHDeHFwgMgKz6/jcJMirf6lGu SdTCXy+PDFmm0Wq0R8rl6cNuUHPHDlML1jmSOaDmfR7BSHMSyjOFh1R0Sc+ODzDC pGu2PSflv/7TSyVVdpbpo8epEsNHP51XaDCpVeX0E3y7tCZScNN2oW9sbYTHaB6X NZ7lfUIYe/BLK+dA5GDe3jMW08RQ/6ukEQX4FaY4NCnns3gTfSvK7AmwkYiw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712652316; x=1712738716; bh=yCNFOPf4LXVFk09okpyFNvoCKZeV 1V7GnPWy2TrUty4=; b=fw5IzeD2qpRwTIxDR11CoSqr0KQ841VzWalPXIAhTwAS qZ3UYVkrZKV5quFKKqUs5UCcfet7Y8cbwZ9pz0CgnKxrVuU/6ekUf8WJ4cNyv4fa miexqWKj6Uh1x2gbkzqEY9yxcAsFHux5fPkdaTL9drUHuROxAz5F4EliQCyIcEi0 om5iDc9Wzj5+17KYs2SOGG3ApdvkZnxKuBXaQKiXTWcoEneXf/GmUPPh3qKw8tuf AbsyKryIsYVwrTwBSOZCOqgAGdjXTRzt65glkldM9reGjuURloGzNTxYtkrhP4JU hvjhrjpSK8EMlRPRbBaevxMyd0baH8dZDHh4tOAWZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeglecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtreerre erjeenucfhrhhomhepfdfhrhgrnhiiucfivghffhhkvgdfuceofhhrrghniiesphgrnhht hhgvrhigrdhorhhgqeenucggtffrrghtthgvrhhnpefgfeffgfegkedvieegjeelleefle fhgedtkeekgeetffehteetvdeltdfghfehudenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehfrhgrnhiisehprghnthhhvghrgidrohhrgh X-ME-Proxy: Feedback-ID: i477944df:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B0FB636A0076; Tue, 9 Apr 2024 04:45:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-379-gabd37849b7-fm-20240408.001-gabd37849 MIME-Version: 1.0 Message-Id: <407c098b-ddca-49dc-9e3c-0f9ce3639247@app.fastmail.com> In-Reply-To: <877chd4kre.fsf@gmail.com> References: <20210717205819.380-1-brice@waegenei.re> <43aa186b-ee8e-3fea-0833-50a604a35e30@pantherx.org> <877chd4kre.fsf@gmail.com> Date: Tue, 09 Apr 2024 09:44:55 +0100 From: "Franz Geffke" To: "Simon Tournier" , 49610@debbugs.gnu.org Subject: Re: [bug#49610] [PATCH 0/2] Add channels field to guix-configuration Content-Type: multipart/alternative; boundary=02c5f02020fa4981b1c37c40c05ade42 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49610 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.7 (-) --02c5f02020fa4981b1c37c40c05ade42 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable > But the =E2=80=99reconfigure=E2=80=99 should be smooth. Is it still a= n issue for you? You're totally right; I suspect the issue was caused by a wrapper we hav= e around the system configuration, to automate some stuff. It's working = perfectly now, and I very much appreciate these changes. --02c5f02020fa4981b1c37c40c05ade42 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
> But the =E2= =80=99reconfigure=E2=80=99 should be smooth.  Is it still an issue = for you?

You're totally right; I suspect th= e issue was caused by a wrapper we have around the system configuration,= to automate some stuff. It's working perfectly now, and I very much app= reciate these changes.
--02c5f02020fa4981b1c37c40c05ade42-- From unknown Wed Jun 18 23:06:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 May 2024 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