From unknown Sat Aug 09 04:53:19 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#45919 <45919@debbugs.gnu.org> To: bug#45919 <45919@debbugs.gnu.org> Subject: Status: [PATCH 0/8] Exporting a manifest and channels from a profile Reply-To: bug#45919 <45919@debbugs.gnu.org> Date: Sat, 09 Aug 2025 11:53:19 +0000 retitle 45919 [PATCH 0/8] Exporting a manifest and channels from a profile reassign 45919 guix-patches submitter 45919 Ludovic Court=C3=A8s severity 45919 normal tag 45919 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:30:06 2021 Received: (at submit) by debbugs.gnu.org; 16 Jan 2021 18:30:06 +0000 Received: from localhost ([127.0.0.1]:44009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qKs-0002Mh-CA for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:30:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:57778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qKr-0002MZ-97 for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:30:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0qKr-00026V-2G for guix-patches@gnu.org; Sat, 16 Jan 2021 13:30:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57074) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qKq-0004So-Qv; Sat, 16 Jan 2021 13:30:04 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36368 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qKq-0004pQ-3L; Sat, 16 Jan 2021 13:30:04 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/8] Exporting a manifest and channels from a profile Date: Sat, 16 Jan 2021 19:29:57 +0100 Message-Id: <20210116182957.31075-1-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi there! Here’s a simple but oft-requested feature (I remember discussing with Pierre and Simon a year ago at the Guix Days about ways to implement it—time flies!): these patches provide ‘guix package --export-manifest’ and ‘--export-channels’. These options spit a manifest and a channel spec, respectively, with the goal of helping users who wish to migrate to the declarative model. ‘--export-manifest’ honors transformations: if entries in the profile have associated transformations, those are preserved in the generated manifest. It also honors version specifiers (to some extent); for example, if you have guile@2.2 in your profile, it’ll put “guile@2.2” in the manifest, where “2.2” is the shortest prefix to disambiguate it from the other available versions of “guile”. ‘--export-channels’ does what you expect. When several commits of the same channel were used to build your profile, it picks the last one and adds the other one in a comment. There’s a catch though: it’s easy to get a large number of commits. For example, my main profile contains ~300 packages. I usually upgrade everything at once, so you’d expect to see a single commit for the ‘guix’ channel. But that’s not the case: when running ‘guix upgrade’, entries that do not need to be upgraded are left unchanged, and thus they carry their original commit. For my profile, the result is: --8<---------------cut here---------------start------------->8--- $ guix package --export-channels ;; This channel file can be passed to 'guix pull -C' or to ;; 'guix time-machine -C' to obtain the Guix revision that was ;; used to populate this profile. (list ;; Note: these other commits were also used to install some of the packages in this profile: ;; "458cb25b9e7e7c954f468023abea2bebb5d8c75b" ;; "4969b51d175497bfcc354c91803e9d70542b7113" ;; "3d85c3ec652feb22824f355538b51e6955ded361" ;; "3462678bc346c2f6ea81245d6842264b6dccd945" ;; "74eeb11daee906cb012f10b6bb3afd254f9ea5c2" ;; "e1f5c2292b88525414b5d0336a00bfa6741d4f14" ;; "3bdb2a026bc9d3967a31a2ccbcd670c018f85d3d" ;; "bf986c3e4325594c1c6a43cf0b67b92262842863" ;; "7607ace5091aea0157ba5c8a508129cc5fc4f931" ;; "98b89f432103b66efacee0bcba41a94148b8e870" ;; "7090159c23d6345992ab976d71fefeb1583cfcdf" ;; "c6872990b51971922f3064cba54ab752fcdc1559" ;; "6ee7468758d7c043692ae8c0b5e130fa4eabe94c" ;; "9744cc7b4636fafb772c94adb8f05961b5b39f16" ;; "d8feee9f18ede0d1ea4d0e4876f09a0dab770295" ;; "b76b1d3fb65fec98b96a2b4cfa984316dd956a29" (channel (name 'guix) (url "/home/ludo/src/guix") (commit "c6ca0fceb715340cfb2ba01bfec128aa8d385b92") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) ) --8<---------------cut here---------------end--------------->8--- The long commit list doesn’t look great, but in fact the chosen commit is almost certainly good enough. I looked into ‘guix package’ to see if we could update provenance data for manifest entries that are not upgraded because they’re already up-to-date (so that we end up with fewer different commits), and it’s tricky to do that, and maybe not desirable. So I left it at that. Anyway, for me the goal of these options is not “disassemble” the profile and provide its exact source code, but rather to help migrate to the declarative model. I think it does a good job at that. Thoughts? Ludo’. Ludovic Courtès (8): profiles: Add 'manifest->code'. utils: Add 'version-unique-prefix'. guix package: Add '--export-manifest'. channels: Factorize 'manifest-entry-channel' and channel serialization. channels: Add the channel name to channel sexps. guix describe: Use 'manifest-entry-channel'. channels: Add 'channel->code'. guix package: Add '--export-channels'. build-aux/build-self.scm | 3 + doc/guix.texi | 45 +++++++++++++ guix/build/profiles.scm | 6 +- guix/channels.scm | 134 ++++++++++++++++++++++++++------------ guix/describe.scm | 34 +++++++++- guix/profiles.scm | 86 +++++++++++++++++++++++- guix/scripts/describe.scm | 52 +++++---------- guix/scripts/package.scm | 118 ++++++++++++++++++++++++++++++++- guix/utils.scm | 35 +++++++++- tests/guix-package.sh | 10 ++- tests/profiles.scm | 30 ++++++++- tests/utils.scm | 8 ++- 12 files changed, 471 insertions(+), 90 deletions(-) -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:27 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:27 +0000 Received: from localhost ([127.0.0.1]:44022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP5-0002Ug-7p for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP3-0002UB-2t for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57158) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qOx-0006AR-9z; Sat, 16 Jan 2021 13:34:19 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qOw-0000li-IB; Sat, 16 Jan 2021 13:34:19 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 1/8] profiles: Add 'manifest->code'. Date: Sat, 16 Jan 2021 19:34:02 +0100 Message-Id: <20210116183409.31229-1-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/profiles.scm (manifest->code): New procedure. * tests/profiles.scm ("manifest->code, simple") ("manifest->code, simple, versions") ("manifest->code, transformations"): New tests. --- guix/profiles.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++- tests/profiles.scm | 30 +++++++++++++++- 2 files changed, 114 insertions(+), 2 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 59a313ea08..ea8bc6e593 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2016 Alex Kost ;;; Copyright © 2015 Mark H Weaver @@ -107,6 +107,8 @@ manifest-search-paths check-for-collisions + manifest->code + manifest-transaction manifest-transaction? manifest-transaction-install @@ -667,6 +669,88 @@ including the search path specification for $PATH." (append-map manifest-entry-search-paths (manifest-entries manifest))))) +(define* (manifest->code manifest + #:key (entry-package-version (const ""))) + "Return an sexp representing code to build an approximate version of +MANIFEST; the code is wrapped in a top-level 'begin' form. Call +ENTRY-PACKAGE-VERSION to determine the version number to use in the spec for a +given entry; it can be set to 'manifest-entry-version' for fully-specified +version numbers, or to some other procedure to disambiguate versions for +packages for which several versions are available." + (define (entry-transformations entry) + ;; Return the transformations that apply to ENTRY. + (assoc-ref (manifest-entry-properties entry) 'transformations)) + + (define transformation-procedures + ;; List of transformation options/procedure name pairs. + (let loop ((entries (manifest-entries manifest)) + (counter 1) + (result '())) + (match entries + (() result) + ((entry . tail) + (match (entry-transformations entry) + (#f + (loop tail counter result)) + (options + (if (assoc-ref result options) + (loop tail counter result) + (loop tail (+ 1 counter) + (alist-cons options + (string->symbol + (format #f "transform~a" counter)) + result))))))))) + + (define (qualified-name entry) + ;; Return the name of ENTRY possibly with "@" followed by a version. + (match (entry-package-version entry) + ("" (manifest-entry-name entry)) + (version (string-append (manifest-entry-name entry) + "@" version)))) + + (if (null? transformation-procedures) + `(begin ;simplest case + (specifications->manifest + (list ,@(map (lambda (entry) + (match (manifest-entry-output entry) + ("out" (qualified-name entry)) + (output (string-append (qualified-name entry) + ":" output)))) + (manifest-entries manifest))))) + (let* ((transform (lambda (options exp) + (if (not options) + exp + (let ((proc (assoc-ref transformation-procedures + options))) + `(,proc ,exp)))))) + `(begin ;transformations apply + (use-modules (guix transformations)) + + ,@(map (match-lambda + ((options . name) + `(define ,name + (options->transformation ',options)))) + transformation-procedures) + + (packages->manifest + (list ,@(map (lambda (entry) + (define options + (entry-transformations entry)) + + (define name + (qualified-name entry)) + + (match (manifest-entry-output entry) + ("out" + (transform options + `(specification->package ,name))) + (output + `(list ,(transform + options + `(specification->package ,name)) + ,output)))) + (manifest-entries manifest)))))))) + ;;; ;;; Manifest transactions. diff --git a/tests/profiles.scm b/tests/profiles.scm index 2dec42bec1..ce77711d63 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014 Alex Kost ;;; ;;; This file is part of GNU Guix. @@ -154,6 +154,34 @@ (manifest-entries (manifest-add (manifest '()) (list guile-2.0.9 guile-2.0.9)))) +(test-equal "manifest->code, simple" + '(begin + (specifications->manifest (list "guile" "guile:debug" "glibc"))) + (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc)))) + +(test-equal "manifest->code, simple, versions" + '(begin + (specifications->manifest (list "guile@2.0.9" "guile@2.0.9:debug" + "glibc@2.19"))) + (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc)) + #:entry-package-version manifest-entry-version)) + +(test-equal "manifest->code, transformations" + '(begin + (use-modules (guix transformations)) + + (define transform1 + (options->transformation '((foo . "bar")))) + + (packages->manifest + (list (transform1 (specification->package "guile")) + (specification->package "glibc")))) + (manifest->code (manifest (list (manifest-entry + (inherit guile-2.0.9) + (properties `((transformations + . ((foo . "bar")))))) + glibc)))) + (test-assert "manifest-perform-transaction" (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug))) (t1 (manifest-transaction -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:28 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:28 +0000 Received: from localhost ([127.0.0.1]:44024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP5-0002Un-N7 for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP3-0002UD-8V for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57159) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qOy-0006Aa-25; Sat, 16 Jan 2021 13:34:20 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qOx-0000li-Jw; Sat, 16 Jan 2021 13:34:19 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 2/8] utils: Add 'version-unique-prefix'. Date: Sat, 16 Jan 2021 19:34:03 +0100 Message-Id: <20210116183409.31229-2-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/utils.scm (version-unique-prefix): New procedure. * tests/utils.scm ("version-unique-prefix"): New test. --- guix/utils.scm | 35 ++++++++++++++++++++++++++++++++++- tests/utils.scm | 8 +++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/guix/utils.scm b/guix/utils.scm index f8b05e7e80..a85e2f495c 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013, 2014, 2015 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2014 Ian Denhardt @@ -88,6 +88,7 @@ version-major+minor+point version-major+minor version-major + version-unique-prefix guile-version>? version-prefix? string-replace-substring @@ -589,6 +590,38 @@ minor version numbers from version-string." "Return the major version number as string from the version-string." (version-prefix version-string 1)) +(define (version-unique-prefix version versions) + "Return the shortest version prefix to unambiguously identify VERSION among +VERSIONS. For example: + + (version-unique-prefix \"2.0\" '(\"3.0\" \"2.0\")) + => \"2\" + + (version-unique-prefix \"2.2\" '(\"3.0.5\" \"2.0.9\" \"2.2.7\")) + => \"2.2\" + + (version-unique-prefix \"27.1\" '(\"27.1\")) + => \"\" +" + (define not-dot + (char-set-complement (char-set #\.))) + + (define other-versions + (delete version versions)) + + (let loop ((prefix '()) + (components (string-tokenize version not-dot))) + (define prefix-str + (string-join prefix ".")) + + (if (any (cut string-prefix? prefix-str <>) other-versions) + (match components + ((head . tail) + (loop `(,@prefix ,head) tail)) + (() + version)) + prefix-str))) + (define (version>? a b) "Return #t when A denotes a version strictly newer than B." (eq? '> (version-compare a b))) diff --git a/tests/utils.scm b/tests/utils.scm index 9bce446d98..62ec7e8b4c 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; @@ -78,6 +78,12 @@ (not (version-prefix? "4.1" "4.16.2")) (not (version-prefix? "4.1" "4")))) +(test-equal "version-unique-prefix" + '("2" "2.2" "") + (list (version-unique-prefix "2.0" '("3.0" "2.0")) + (version-unique-prefix "2.2" '("3.0.5" "2.0.9" "2.2.7")) + (version-unique-prefix "27.1" '("27.1")))) + (test-equal "string-tokenize*" '(("foo") ("foo" "bar" "baz") -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:30 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:30 +0000 Received: from localhost ([127.0.0.1]:44029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP8-0002VH-6W for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP4-0002UE-1A for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57160) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qOy-0006BQ-Qk; Sat, 16 Jan 2021 13:34:20 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qOy-0000li-C2; Sat, 16 Jan 2021 13:34:20 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 3/8] guix package: Add '--export-manifest'. Date: Sat, 16 Jan 2021 19:34:04 +0100 Message-Id: <20210116183409.31229-3-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/scripts/package.scm (export-manifest): New procedure. (show-help, %options): Add '--export-manifest'. (process-query): Honor it. * guix/build/profiles.scm (build-profile): Mention it. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it. --- doc/guix.texi | 21 +++++++++++++++ guix/build/profiles.scm | 6 +++-- guix/scripts/package.scm | 57 +++++++++++++++++++++++++++++++++++++++- tests/guix-package.sh | 10 ++++++- 4 files changed, 90 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cea7f8a8cf..e524464e9f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3269,6 +3269,9 @@ objects, like this: '("emacs" "guile@@2.2" "guile@@2.2:debug")) @end lisp +@xref{export-manifest, @option{--export-manifest}}, to learn how to +obtain a manifest file from an existing profile. + @item --roll-back @cindex rolling back @cindex undoing transactions @@ -3571,6 +3574,24 @@ zeroth generation is never deleted. Note that deleting generations prevents rolling back to them. Consequently, this command must be used with care. +@cindex manifest, exporting +@anchor{export-manifest} +@item --export-manifest +Write to standard output a manifest suitable for @option{--manifest} +corresponding to the chosen profile(s). + +This option is meant to help you migrate from the ``imperative'' +operating mode---running @command{guix install}, @command{guix upgrade}, +etc.---to the declarative mode that @option{--manifest} offers. + +Be aware that the resulting manifest @emph{approximates} what your +profile actually contains; for instance, depending on how your profile +was created, it can refer to packages or package versions that are not +exactly what you specified. + +Keep in mind that a manifest is purely symbolic: it only contains +package names and possibly versions, and their meaning varies over time. + @end table Finally, since @command{guix package} may actually start build diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index 67ee9b665a..b42f498a80 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -169,7 +169,9 @@ SEARCH-PATHS." (lambda (p) (display "\ ;; This file was automatically generated and is for internal use only. -;; It cannot be passed to the '--manifest' option.\n\n" +;; It cannot be passed to the '--manifest' option. +;; Run 'guix package --export-manifest' if to export a file suitable +;; for '--manifest'.\n\n" p) (pretty-print manifest p))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 6faf2adb7a..2b52016c67 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2013, 2015 Mark H Weaver ;;; Copyright © 2014, 2016 Alex Kost @@ -48,6 +48,7 @@ #:select (directory-exists? mkdir-p)) #:use-module (ice-9 format) #:use-module (ice-9 match) + #:autoload (ice-9 pretty-print) (pretty-print) #:use-module (ice-9 regex) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) @@ -320,6 +321,48 @@ GUIX_PROFILE=\"~a\" Alternately, see @command{guix package --search-paths -p ~s}.") profile profile))))) + +;;; +;;; Export a manifest. +;;; + +(define* (export-manifest manifest + #:optional (port (current-output-port))) + "Write to PORT a manifest corresponding to MANIFEST." + (define (version-spec entry) + (let ((name (manifest-entry-name entry))) + (match (map package-version (find-packages-by-name name)) + ((_) + ;; A single version of NAME is available, so do not specify the + ;; version number, even if the available version doesn't match ENTRY. + "") + (versions + ;; If ENTRY uses the latest version, don't specify any version. + ;; Otherwise return the shortest unique version prefix. Note that + ;; this is based on the currently available packages, which could + ;; differ from the packages available in the revision that was used + ;; to build MANIFEST. + (let ((current (manifest-entry-version entry))) + (if (every (cut version>? current <>) + (delete current versions)) + "" + (version-unique-prefix (manifest-entry-version entry) + versions))))))) + + (match (manifest->code manifest + #:entry-package-version version-spec) + (('begin exp ...) + (format port (G_ "\ +;; This \"manifest\" file can be passed to 'guix package -m' to reproduce +;; the content of your profile. This is \"symbolic\": it only specifies +;; package names. To reproduce the exact same profile, you also need to +;; capture the channels being used, as returned by \"guix describe\". +;; See the \"Replicating Guix\" section in the manual.\n")) + (for-each (lambda (exp) + (newline port) + (pretty-print exp port)) + exp)))) + ;;; ;;; Command-line options. @@ -373,6 +416,8 @@ Install, remove, or upgrade packages in a single transaction.\n")) (display (G_ " -S, --switch-generation=PATTERN switch to a generation matching PATTERN")) + (display (G_ " + --export-manifest print a manifest for the chosen profile")) (display (G_ " -p, --profile=PROFILE use PROFILE instead of the user's default profile")) (display (G_ " @@ -507,6 +552,10 @@ kind of search path~%") (values (cons `(query search-paths ,kind) result) #f)))) + (option '("export-manifest") #f #f + (lambda (opt name arg result arg-handler) + (values (cons `(query export-manifest) result) + #f))) (option '(#\p "profile") #t #f (lambda (opt name arg result arg-handler) (values (alist-cons 'profile (canonicalize-profile arg) @@ -827,6 +876,12 @@ processed, #f otherwise." (format #t "~{~a~%~}" settings) #t)) + (('export-manifest) + (let* ((manifest (concatenate-manifests + (map profile-manifest profiles)))) + (export-manifest manifest (current-output-port)) + #t)) + (_ #f)))) diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 3e5fa71d20..7eaad6823f 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès # Copyright © 2013 Nikita Karetnikov # # This file is part of GNU Guix. @@ -395,6 +395,14 @@ EOF guix package --bootstrap -m "$module_dir/manifest.scm" guix package -I | grep guile test `guix package -I | wc -l` -eq 1 + +# Export a manifest, instantiate it, and make sure we get the same profile. +profile_directory="$(readlink -f "$default_profile")" +guix package --export-manifest > "$tmpfile" +guix package --rollback --bootstrap +guix package --bootstrap -m "$tmpfile" +test "$(readlink -f "$default_profile")" = "$profile_directory" + guix package --rollback --bootstrap # Applying two manifests. -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:31 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:31 +0000 Received: from localhost ([127.0.0.1]:44032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP8-0002VJ-OC for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP4-0002UG-Su for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57161) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qOz-0006BX-MX; Sat, 16 Jan 2021 13:34:21 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qOz-0000li-4X; Sat, 16 Jan 2021 13:34:21 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 4/8] channels: Factorize 'manifest-entry-channel' and channel serialization. Date: Sat, 16 Jan 2021 19:34:05 +0100 Message-Id: <20210116183409.31229-4-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/channels.scm (sexp->channel, manifest-entry-channel): New procedures. (profile-channels): Replace lambda by 'manifest-entry-channel'. (channel-instance->sexp): New procedure. (channel-instances->manifest)[instance->entry]: Use 'channel-instance->sexp' instead of inline code. --- guix/channels.scm | 106 +++++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 0c84eed477..65a0d849ec 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; @@ -802,13 +802,35 @@ derivation." (derivation-input-derivation input)))) (derivation-inputs drv)))) +(define (channel-instance->sexp instance) + "Return an sexp representation of INSTANCE, a channel instance." + (let* ((commit (channel-instance-commit instance)) + (channel (channel-instance-channel instance)) + (intro (channel-introduction channel))) + `(repository + (version 0) + (url ,(channel-url channel)) + (branch ,(channel-branch channel)) + (commit ,commit) + ,@(if intro + `((introduction + (channel-introduction + (version 0) + (commit + ,(channel-introduction-first-signed-commit + intro)) + (signer + ,(openpgp-format-fingerprint + (channel-introduction-first-commit-signer + intro)))))) + '())))) + (define (channel-instances->manifest instances) "Return a profile manifest with entries for all of INSTANCES, a list of channel instances." (define (instance->entry instance drv) - (let* ((commit (channel-instance-commit instance)) - (channel (channel-instance-channel instance)) - (intro (channel-introduction channel))) + (let ((commit (channel-instance-commit instance)) + (channel (channel-instance-channel instance))) (manifest-entry (name (symbol->string (channel-name channel))) (version (string-take commit 7)) @@ -819,23 +841,7 @@ channel instances." drv) drv)) (properties - `((source (repository - (version 0) - (url ,(channel-url channel)) - (branch ,(channel-branch channel)) - (commit ,commit) - ,@(if intro - `((introduction - (channel-introduction - (version 0) - (commit - ,(channel-introduction-first-signed-commit - intro)) - (signer - ,(openpgp-format-fingerprint - (channel-introduction-first-commit-signer - intro)))))) - '())))))))) + `((source ,(channel-instance->sexp instance))))))) (mlet* %store-monad ((derivations (channel-instance-derivations instances)) (entries -> (map instance->entry instances derivations))) @@ -900,31 +906,45 @@ to 'latest-channel-instances'." validate-pull))) (channel-instances->derivation instances))) +(define* (sexp->channel sexp #:optional (name 'channel)) + "Read SEXP, a provenance sexp as created by 'channel-instance->sexp', +and return a channel called NAME. Return #f if the sexp does not have the +expected structure." + (match sexp + (('repository ('version 0) + ('url url) + ('branch branch) + ('commit commit) + rest ...) + (channel (name name) + (url url) + (commit commit) + (introduction + (match (assq 'introduction rest) + (#f #f) + (('introduction intro) + (sexp->channel-introduction intro)))))) + + (_ #f))) + +(define (manifest-entry-channel entry) + "Return the channel ENTRY corresponds to, or #f if that information is +missing or unreadable. ENTRY must be an entry created by +'channel-instances->manifest', with the 'source' property." + (let ((name (string->symbol (manifest-entry-name entry)))) + (match (assq-ref (manifest-entry-properties entry) 'source) + ((sexp) + (sexp->channel sexp name)) + (_ + ;; No channel information for this manifest entry. + ;; XXX: Pre-0.15.0 Guix did not provide that information, + ;; but there's not much we can do in that case. + #f)))) + (define (profile-channels profile) "Return the list of channels corresponding to entries in PROFILE. If PROFILE is not a profile created by 'guix pull', return the empty list." - (filter-map (lambda (entry) - (match (assq 'source (manifest-entry-properties entry)) - (('source ('repository ('version 0) - ('url url) - ('branch branch) - ('commit commit) - rest ...)) - (channel (name (string->symbol - (manifest-entry-name entry))) - (url url) - (commit commit) - (introduction - (match (assq 'introduction rest) - (#f #f) - (('introduction intro) - (sexp->channel-introduction intro)))))) - - ;; No channel information for this manifest entry. - ;; XXX: Pre-0.15.0 Guix did not provide that information, - ;; but there's not much we can do in that case. - (_ #f))) - + (filter-map manifest-entry-channel ;; Show most recently installed packages last. (reverse (manifest-entries (profile-manifest profile))))) -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:31 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:31 +0000 Received: from localhost ([127.0.0.1]:44034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP9-0002VS-Bq for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP5-0002UI-Qg for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57163) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qP0-0006Bl-Kj; Sat, 16 Jan 2021 13:34:22 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qP0-0000li-0B; Sat, 16 Jan 2021 13:34:22 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 5/8] channels: Add the channel name to channel sexps. Date: Sat, 16 Jan 2021 19:34:06 +0100 Message-Id: <20210116183409.31229-5-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/channels.scm (channel-instance->sexp): Add 'name'. (sexp->channel): Extract the name from SEXP, using the optional argument as a fallback. --- guix/channels.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 65a0d849ec..6449221c3f 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -812,6 +812,7 @@ derivation." (url ,(channel-url channel)) (branch ,(channel-branch channel)) (commit ,commit) + (name ,(channel-name channel)) ,@(if intro `((introduction (channel-introduction @@ -907,16 +908,22 @@ to 'latest-channel-instances'." (channel-instances->derivation instances))) (define* (sexp->channel sexp #:optional (name 'channel)) - "Read SEXP, a provenance sexp as created by 'channel-instance->sexp', -and return a channel called NAME. Return #f if the sexp does not have the -expected structure." + "Read SEXP, a provenance sexp as created by 'channel-instance->sexp'; use +NAME as the channel name if SEXP does not specify it. Return #f if the sexp +does not have the expected structure." (match sexp (('repository ('version 0) ('url url) ('branch branch) ('commit commit) rest ...) - (channel (name name) + ;; Historically channel sexps did not include the channel name. It's OK + ;; for channels created by 'channel-instances->manifest' because the + ;; entry name is the channel name, but it was missing for entries created + ;; by 'manifest-entry-with-provenance'. + (channel (name (match (assq 'name rest) + (#f name) + (('name name) name))) (url url) (commit commit) (introduction -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:32 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:32 +0000 Received: from localhost ([127.0.0.1]:44036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP9-0002Ve-Qj for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP6-0002UK-Kt for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57164) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qP1-0006CR-Eo; Sat, 16 Jan 2021 13:34:23 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qP0-0000li-Ul; Sat, 16 Jan 2021 13:34:23 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 6/8] guix describe: Use 'manifest-entry-channel'. Date: Sat, 16 Jan 2021 19:34:07 +0100 Message-Id: <20210116183409.31229-6-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/channels.scm (manifest-entry-channel): Export. * guix/scripts/describe.scm (display-profile-content): Use it. --- guix/channels.scm | 1 + guix/scripts/describe.scm | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 6449221c3f..743b4a25b7 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -91,6 +91,7 @@ ensure-forward-channel-update profile-channels + manifest-entry-channel channel-news-entry? channel-news-entry-commit diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index c3667516eb..b7ec029ba8 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Ekaitz Zarraga ;;; @@ -237,23 +237,17 @@ way and displaying details about the channel's source code." (format #t " ~a ~a~%" (manifest-entry-name entry) (manifest-entry-version entry)) - (match (assq 'source (manifest-entry-properties entry)) - (('source ('repository ('version 0) - ('url url) - ('branch branch) - ('commit commit) - _ ...)) - (let ((channel (channel (name 'nameless) - (url url) - (branch branch) - (commit commit)))) - (format #t (G_ " repository URL: ~a~%") url) - (when branch - (format #t (G_ " branch: ~a~%") branch)) - (format #t (G_ " commit: ~a~%") - (if (supports-hyperlinks?) - (channel-commit-hyperlink channel commit) - commit)))) + (match (manifest-entry-channel entry) + ((? channel? channel) + (format #t (G_ " repository URL: ~a~%") + (channel-url channel)) + (when (channel-branch channel) + (format #t (G_ " branch: ~a~%") + (channel-branch channel))) + (format #t (G_ " commit: ~a~%") + (if (supports-hyperlinks?) + (channel-commit-hyperlink channel) + (channel-commit channel)))) (_ #f))) ;; Show most recently installed packages last. -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:32 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:32 +0000 Received: from localhost ([127.0.0.1]:44038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qPA-0002Vl-Bp for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP7-0002UL-CW for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57165) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qP2-0006Cn-6c; Sat, 16 Jan 2021 13:34:24 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qP1-0000li-OV; Sat, 16 Jan 2021 13:34:24 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 7/8] channels: Add 'channel->code'. Date: Sat, 16 Jan 2021 19:34:08 +0100 Message-Id: <20210116183409.31229-7-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/channels.scm (channel->code): New procedure, taken from... * guix/scripts/describe.scm (channel->sexp): ... here. Adjust callers accordingly. --- guix/channels.scm | 19 +++++++++++++++++++ guix/scripts/describe.scm | 22 +++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 743b4a25b7..cdef77637d 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -92,6 +92,7 @@ profile-channels manifest-entry-channel + channel->code channel-news-entry? channel-news-entry-commit @@ -957,6 +958,24 @@ PROFILE is not a profile created by 'guix pull', return the empty list." (reverse (manifest-entries (profile-manifest profile))))) +(define* (channel->code channel #:key (include-introduction? #t)) + "Return code (an sexp) to build CHANNEL. When INCLUDE-INTRODUCTION? is +true, include its introduction, if any." + (let ((intro (and include-introduction? + (channel-introduction channel)))) + `(channel + (name ',(channel-name channel)) + (url ,(channel-url channel)) + (commit ,(channel-commit channel)) + ,@(if intro + `((introduction (make-channel-introduction + ,(channel-introduction-first-signed-commit intro) + (openpgp-fingerprint + ,(openpgp-format-fingerprint + (channel-introduction-first-commit-signer + intro)))))) + '())))) + ;;; ;;; News. diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index b7ec029ba8..e47d207ee0 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -113,22 +113,6 @@ Display information about the channels currently in use.\n")) (_ (warning (G_ "'GUIX_PACKAGE_PATH' is set but it is not captured~%"))))))) -(define* (channel->sexp channel #:key (include-introduction? #t)) - (let ((intro (and include-introduction? - (channel-introduction channel)))) - `(channel - (name ',(channel-name channel)) - (url ,(channel-url channel)) - (commit ,(channel-commit channel)) - ,@(if intro - `((introduction (make-channel-introduction - ,(channel-introduction-first-signed-commit intro) - (openpgp-fingerprint - ,(openpgp-format-fingerprint - (channel-introduction-first-commit-signer - intro)))))) - '())))) - (define (channel->json channel) (scm->json-string (let ((intro (channel-introduction channel))) @@ -183,7 +167,7 @@ string is ~a.~%") (format #t (G_ " branch: ~a~%") (reference-shorthand head)) (format #t (G_ " commit: ~a~%") commit)) ('channels - (pretty-print `(list ,(channel->sexp (channel (name 'guix) + (pretty-print `(list ,(channel->code (channel (name 'guix) (url (dirname directory)) (commit commit)))))) ('json @@ -213,9 +197,9 @@ in the format specified by FMT." ('human (display-profile-content profile number)) ('channels - (pretty-print `(list ,@(map channel->sexp channels)))) + (pretty-print `(list ,@(map channel->code channels)))) ('channels-sans-intro - (pretty-print `(list ,@(map (cut channel->sexp <> + (pretty-print `(list ,@(map (cut channel->code <> #:include-introduction? #f) channels)))) ('json -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 13:34:39 2021 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:39 +0000 Received: from localhost ([127.0.0.1]:44040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qPG-0002W4-OE for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP8-0002UT-MH for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57166) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qP2-0006Cu-Vl; Sat, 16 Jan 2021 13:34:25 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qP2-0000li-Gd; Sat, 16 Jan 2021 13:34:24 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: [PATCH 8/8] guix package: Add '--export-channels'. Date: Sat, 16 Jan 2021 19:34:09 +0100 Message-Id: <20210116183409.31229-8-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45919 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/channels.scm (sexp->channel): Export. * guix/describe.scm: Use (guix channels). (manifest-entry-provenance): New procedure. * guix/scripts/package.scm (channel=?, export-channels): New procedures. (show-help, %options): Add '--export-channels'. (process-query): Honor it. * build-aux/build-self.scm (build-program)[select?]: Exclude (guix channels) to account for the (guix describe) change above. * doc/guix.texi (Invoking guix package): Document it. --- build-aux/build-self.scm | 3 ++ doc/guix.texi | 24 ++++++++++++++++ guix/channels.scm | 1 + guix/describe.scm | 34 ++++++++++++++++++++-- guix/scripts/package.scm | 61 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 2 deletions(-) diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 4b6e2bfae5..d5bc5fb46e 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -245,8 +245,11 @@ interface (FFI) of Guile.") "Return a program that computes the derivation to build Guix from SOURCE." (define select? ;; Select every module but (guix config) and non-Guix modules. + ;; Also exclude (guix channels): it is autoloaded by (guix describe), but + ;; only for peripheral functionality. (match-lambda (('guix 'config) #f) + (('guix 'channels) #f) (('guix _ ...) #t) (('gnu _ ...) #t) (_ #f))) diff --git a/doc/guix.texi b/doc/guix.texi index e524464e9f..cfb2f8a296 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3591,7 +3591,31 @@ exactly what you specified. Keep in mind that a manifest is purely symbolic: it only contains package names and possibly versions, and their meaning varies over time. +If you wish to ``pin'' channels to the revisions that were used to build +the profile(s), see @option{--export-channels} below. +@cindex pinning, channel revisions of a profile +@item --export-channels +Write to standard output the list of channels used by the chosen +profile(s), in a format suitable for @command{guix pull --channels} or +@command{guix time-machine --channels} (@pxref{Channels}). + +Together with @option{--export-manifest}, this option provides +information allowing you to replicate the current profile +(@pxref{Replicating Guix}). + +However, note that the output of this command @emph{approximates} what +was actually used to build this profile. In particular, a single +profile might have been built from several different revisions of the +same channel. In that case, @option{--export-manifest} chooses the last +one and writes the list of other revisions in a comment. If you really +need to pick packages from different channel revisions, you can use +inferiors in your manifest to do so (@pxref{Inferiors}). + +Together with @option{--export-manifest}, this is a good starting point +if you are willing to migrate from the ``imperative'' model to the fully +declarative model consisting of a manifest file along with a channels +file pinning the exact channel revision(s) you want. @end table Finally, since @command{guix package} may actually start build diff --git a/guix/channels.scm b/guix/channels.scm index cdef77637d..e7e1eb6fd0 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -92,6 +92,7 @@ profile-channels manifest-entry-channel + sexp->channel channel->code channel-news-entry? diff --git a/guix/describe.scm b/guix/describe.scm index 05bf99eb58..ac89fc0d7c 100644 --- a/guix/describe.scm +++ b/guix/describe.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,6 +23,7 @@ #:use-module ((guix utils) #:select (location-file)) #:use-module ((guix store) #:select (%store-prefix store-path?)) #:use-module ((guix config) #:select (%state-directory)) + #:autoload (guix channels) (sexp->channel) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (current-profile @@ -31,7 +32,8 @@ package-path-entries package-provenance - manifest-entry-with-provenance)) + manifest-entry-with-provenance + manifest-entry-provenance)) ;;; Commentary: ;;; @@ -166,3 +168,31 @@ there." (#f properties) (sexp `((provenance ,@sexp) ,@properties))))))))) + +(define (manifest-entry-provenance entry) + "Return the list of channels ENTRY comes from. Return the empty list if +that information is missing." + (match (assq-ref (manifest-entry-properties entry) 'provenance) + ((main extras ...) + ;; XXX: Until recently, channel sexps lacked the channel name. For + ;; entries created by 'manifest-entry-with-provenance', the first sexp + ;; is known to be the 'guix channel, and for the other ones, invent a + ;; fallback name (it's OK as the name is just a "pet name"). + (match (sexp->channel main 'guix) + (#f '()) + (channel + (let loop ((extras extras) + (counter 1) + (channels (list channel))) + (match extras + (() + (reverse channels)) + ((head . tail) + (let* ((name (string->symbol + (format #f "channel~a" counter))) + (extra (sexp->channel head name))) + (if extra + (loop tail (+ 1 counter) (cons extra channels)) + (loop tail counter channels))))))))) + (_ + '()))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 2b52016c67..8234a1703d 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -43,6 +43,7 @@ #:use-module (guix scripts build) #:use-module (guix transformations) #:use-module (guix describe) + #:autoload (guix channels) (channel-name channel-commit channel->code) #:autoload (guix store roots) (gc-roots user-owned?) #:use-module ((guix build utils) #:select (directory-exists? mkdir-p)) @@ -363,6 +364,54 @@ Alternately, see @command{guix package --search-paths -p ~s}.") (pretty-print exp port)) exp)))) +(define (channel=? a b) + (and (channel-commit a) (channel-commit b) + (string=? (channel-commit a) (channel-commit b)))) + +(define* (export-channels manifest + #:optional (port (current-output-port))) + (define channels + (delete-duplicates + (append-map manifest-entry-provenance (manifest-entries manifest)) + channel=?)) + + (define channel-names + (delete-duplicates (map channel-name channels))) + + (define table + (fold (lambda (channel table) + (vhash-consq (channel-name channel) channel table)) + vlist-null + channels)) + + (when (null? channels) + (leave (G_ "no provenance information for this profile~%"))) + + (format port (G_ "\ +;; This channel file can be passed to 'guix pull -C' or to +;; 'guix time-machine -C' to obtain the Guix revision that was +;; used to populate this profile.\n")) + (newline port) + (display "(list\n" port) + (for-each (lambda (name) + (define indent " ") + (match (vhash-foldq* cons '() name table) + ((channel extra ...) + (unless (null? extra) + (display indent port) + (format port (G_ "\ +;; Note: these other commits were also used to install \ +some of the packages in this profile:~%")) + (for-each (lambda (channel) + (format port "~a;; ~s~%" + indent (channel-commit channel))) + extra)) + (pretty-print (channel->code channel) port + #:per-line-prefix indent)))) + channel-names) + (display ")\n" port) + #t) + ;;; ;;; Command-line options. @@ -418,6 +467,8 @@ Install, remove, or upgrade packages in a single transaction.\n")) switch to a generation matching PATTERN")) (display (G_ " --export-manifest print a manifest for the chosen profile")) + (display (G_ " + --export-channels print channels for the chosen profile")) (display (G_ " -p, --profile=PROFILE use PROFILE instead of the user's default profile")) (display (G_ " @@ -556,6 +607,10 @@ kind of search path~%") (lambda (opt name arg result arg-handler) (values (cons `(query export-manifest) result) #f))) + (option '("export-channels") #f #f + (lambda (opt name arg result arg-handler) + (values (cons `(query export-channels) result) + #f))) (option '(#\p "profile") #t #f (lambda (opt name arg result arg-handler) (values (alist-cons 'profile (canonicalize-profile arg) @@ -882,6 +937,12 @@ processed, #f otherwise." (export-manifest manifest (current-output-port)) #t)) + (('export-channels) + (let ((manifest (concatenate-manifests + (map profile-manifest profiles)))) + (export-channels manifest (current-output-port)) + #t)) + (_ #f)))) -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 08:15:00 2021 Received: (at 45919) by debbugs.gnu.org; 27 Jan 2021 13:15:00 +0000 Received: from localhost ([127.0.0.1]:44040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4key-0001pB-0I for submit@debbugs.gnu.org; Wed, 27 Jan 2021 08:15:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4kev-0001oy-Vi for 45919@debbugs.gnu.org; Wed, 27 Jan 2021 08:14:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46747) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4keq-0000V9-R3; Wed, 27 Jan 2021 08:14:52 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46796 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4kep-0005ui-1z; Wed, 27 Jan 2021 08:14:51 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 45919@debbugs.gnu.org Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> Date: Wed, 27 Jan 2021 14:14:49 +0100 In-Reply-To: <20210116182957.31075-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Sat, 16 Jan 2021 19:29:57 +0100") Message-ID: <87wnvyv7w6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 45919 Cc: guix-devel X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi there! Ludovic Court=C3=A8s skribis: > Here=E2=80=99s a simple but oft-requested feature (I remember discussing > with Pierre and Simon a year ago at the Guix Days about ways to > implement it=E2=80=94time flies!): these patches provide =E2=80=98guix pa= ckage > --export-manifest=E2=80=99 and =E2=80=98--export-channels=E2=80=99. Thes= e options spit > a manifest and a channel spec, respectively, with the goal of > helping users who wish to migrate to the declarative model. I=E2=80=99m rather happy with this patch set but since this is something we= =E2=80=99ve discussed several times in the past, I think it=E2=80=99d be great if those interested could chime in and comment: https://issues.guix.gnu.org/45919 I=E2=80=99ll leave a few more days and then=E2=80=A6 push! TIA, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 16:11:09 2021 Received: (at 45919) by debbugs.gnu.org; 27 Jan 2021 21:11:09 +0000 Received: from localhost ([127.0.0.1]:46259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4s5l-0003OA-47 for submit@debbugs.gnu.org; Wed, 27 Jan 2021 16:11:09 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:54682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4s5i-0003Nf-HL for 45919@debbugs.gnu.org; Wed, 27 Jan 2021 16:11:07 -0500 Received: by mail-wm1-f44.google.com with SMTP id u14so2623371wml.4 for <45919@debbugs.gnu.org>; Wed, 27 Jan 2021 13:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=h9pWelzjrRwe1ELDjdIMsUwqX6IBSfqz1K/7oE4qPyY=; b=syRN5lArGgfLqil5LTWNgLm1Gi+rMmsCPEYXKVja+lzGAxMIfGktYRESzN46U8sbSg eFSnZjHs2Dig/11x4D3Yy1cgElLazpB1V/3h7EB8lBw/tJTpaas6RG+t+hDEwFJNoKmF 8GAuUCaNBswcvfK0CxmjPyO6QY73C3ujVKedng55nxnLy1d4yd5dPc7t19MZxosl+oP1 GuBcf5x7eNDv0XHDwMDDE1+LOg4uagMAzTgpR9AGxrX5HJknXhpNKnYvbKwpO4KRsu1H CR5CEJJFd3NInU/KZWLWu1xVzO2oxAOnj/i3M8hRwLRNCpBFSpKOovPDZsgA6H5aBehn j0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=h9pWelzjrRwe1ELDjdIMsUwqX6IBSfqz1K/7oE4qPyY=; b=NR+8X9fRzlq6VFHFQaSSNN4+YiZlIvBjcRgSQWeLRoES+YbWmnUbnHmGFMxCx6FMpw u7djBLup7VsWWaKBi24lwPRK40hcwfugCcGGmRfRkmeK91b9IFCV8DwVeBmNDt5Ipwqs Cvp0CIQj4EGJjqEmw744Q7MoOoFnZ6raR97KkF75JGx3yeKx+sXvIEaDzko8IT2laLCQ iUFJup9B0p0Mrixv8r+GvDJ8B6ECgmpH+4FHgF3Hl+f6ELZXLu5pBlij1OCQnZ6g7k4r 9Pdb7+7K7TY3KnUdkJkbgzzjPpOUj3KgMUi46nWLfvewlWW+77WAZRGfTPDEh0hi1Tt+ EAIw== X-Gm-Message-State: AOAM531/9uZ7FP4n16BOI8odgbTWlmrNLwDrjfUCkuQPLlIYBGSb/igY T3Qx/PAJ8Mmhhbr1NCAjcDYM/bDetz0= X-Google-Smtp-Source: ABdhPJy0nofYDlriN3PBTGN6CTbx4hxj1sdrV9iMOiZBng309cRFWs5OdKGiyewcTXMa9WzYkjmstg== X-Received: by 2002:a1c:730f:: with SMTP id d15mr5691776wmb.135.1611781860381; Wed, 27 Jan 2021 13:11:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u142sm3795618wmu.3.2021.01.27.13.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 13:10:59 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> Date: Wed, 27 Jan 2021 22:02:53 +0100 In-Reply-To: <87wnvyv7w6.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 27 Jan 2021 14:14:49 +0100") Message-ID: <86bldahz42.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45919 Cc: guix-devel , 45919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Wed, 27 Jan 2021 at 14:14, Ludovic Court=C3=A8s wrote: > Ludovic Court=C3=A8s skribis: > >> Here=E2=80=99s a simple but oft-requested feature (I remember discussing >> with Pierre and Simon a year ago at the Guix Days about ways to >> implement it=E2=80=94time flies!): these patches provide =E2=80=98guix p= ackage >> --export-manifest=E2=80=99 and =E2=80=98--export-channels=E2=80=99. The= se options spit >> a manifest and a channel spec, respectively, with the goal of >> helping users who wish to migrate to the declarative model. > > I=E2=80=99m rather happy with this patch set but since this is something = we=E2=80=99ve > discussed several times in the past, I think it=E2=80=99d be great if tho= se > interested could chime in and comment: > > https://issues.guix.gnu.org/45919 > > I=E2=80=99ll leave a few more days and then=E2=80=A6 push! You are looking at me? :-) Well, the feature is nice! At first, I thought that it could be a bit smarter than using only one commit. But as you said, the aim is for transitioning. Maybe a future improvement should to list somewhere in the comments which commit provides which set of packages. It could help=E2=80=A6 or not. :-) Using Docker, it works. Let describe how in case people are interested. On machine A, I have: --8<---------------cut here---------------start------------->8--- $ guix describe -f channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "cb68ae668af2ade4b0777d82f227e5462768e9e5") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) $ cat ~/.config/guix/manifests/python.scm (specifications->manifest (append '("python" ) (map (lambda (pkg) (string-append "python-" pkg)) '("ipython" "numpy" "matplotlib" "scipy" "biopython" )))) --8<---------------cut here---------------end--------------->8--- And I generate a Docker pack with: --8<---------------cut here---------------start------------->8--- $ guix pack -f docker --save-provenance -m ~/.config/guix/manifests/python.= scm /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz --8<---------------cut here---------------end--------------->8--- Then on machine B, after fetching this tarball, I run: --8<---------------cut here---------------start------------->8--- $ docker load < /tmp/img/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz $ docker images REPOSITORY TAG IMAGE ID = CREATED SIZE python-python-ipython-python-numpy latest 49ddfedf1e27 = 51 years ago 1.45GB --8<---------------cut here---------------end--------------->8--- And it works as expected: --8<---------------cut here---------------start------------->8--- $ docker run -ti python-python-ipython-python-numpy:latest python3 Python 3.8.2 (default, Jan 1 1970, 00:00:01) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! >>> import numpy as np >>> A =3D np.array([[1,0,1],[0,1,0],[0,0,1]]) >>> _, s, _ =3D np.linalg.svd(A); s; abs(s[0] - 1./s[2]) array([1.61803399, 1. , 0.61803399]) 0.0 >>> --8<---------------cut here---------------end--------------->8--- Neat! So far, so good. Well, let extract the =E2=80=99manifest=E2=80=99 from thi= s Docker blob. --8<---------------cut here---------------start------------->8--- $ docker export -o /tmp/img/re-pack.tar $(docker ps -a --format "{{.ID}}" |= head -n1) $ tar -xf /tmp/img/re-pack.tar $(tar -tf /tmp/img/re-pack.tar | grep 'profi= le/manifest') $ cat gnu/store/7frdchgf5sqw8b83azsml3lw0h52gfbk-profile/manifest | grep -E= "(\(\"python|cb68ae)" | head -n5 (("python" "cb68ae668af2ade4b0777d82f227e5462768e9e5") ("python-ipython" (("python-backcall" ("python-pyzmq" --8<---------------cut here---------------end--------------->8--- Now, a trick to get the channels and specifications: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3l= w0h52gfbk-profile --export-channels ;; This channel file can be passed to 'guix pull -C' or to ;; 'guix time-machine -C' to obtain the Guix revision that was ;; used to populate this profile. (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "cb68ae668af2ade4b0777d82f227e5462768e9e5") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) ) $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3l= w0h52gfbk-profile --export-manifest $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3l= w0h52gfbk-profile --export-manifest ;; This "manifest" file can be passed to 'guix package -m' to reproduce ;; the content of your profile. This is "symbolic": it only specifies ;; package names. To reproduce the exact same profile, you also need to ;; capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. (specifications->manifest (list "python" "python-ipython" "python-numpy" "python-matplotlib" "python-scipy" "python-biopython")) --8<---------------cut here---------------end--------------->8--- Awesome! The unexpected is this channels and manifests files do not reproduce the same Docker pack tarball: --8<---------------cut here---------------start------------->8--- $ guix describe Generation 99 Jan 05 2021 16:56:39 (current) guix-past 829923f repository URL: https://gitlab.inria.fr/guix-hpc/guix-past branch: master commit: 829923f01f894f1e687735627025ada26230832f guix-bimsb a8b539d repository URL: https://github.com/BIMSBbioinfo/guix-bimsb branch: master commit: a8b539d61a359060c35f3cb34c7edd1d9d14241d bimsb-nonfree 4084e63 repository URL: https://github.com/BIMSBbioinfo/guix-bimsb-nonfree.git branch: master commit: 4084e63c9c0d662780870aded9f5a6ca1b063780 guix-science cf87b05 repository URL: https://github.com/guix-science/guix-science.git branch: master commit: cf87b0501c4a38b96edf41025a27bf1cb91f521a guix 957f0c4 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 957f0c40327ce00f53db22737e3775ce616ac258 $ guix time-machine -C /tmp/img/channels.scm -- pack -f docker --save-prove= nance -m /tmp/img/manifest.scm Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or= g/git/guix.git'... /gnu/store/xzk604g8gysv4azn7sf9nylr6iah97gl-docker-pack.tar.gz --8<---------------cut here---------------end--------------->8--- To compare with /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz. On a third machine, I get: /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz Well, that=E2=80=99s another story and I have not inspected yet the derivations and what could be wrong on the machine B. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 16:54:29 2021 Received: (at control) by debbugs.gnu.org; 27 Jan 2021 21:54:29 +0000 Received: from localhost ([127.0.0.1]:46312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4slh-0004RS-3s for submit@debbugs.gnu.org; Wed, 27 Jan 2021 16:54:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4slf-0004RG-Qg for control@debbugs.gnu.org; Wed, 27 Jan 2021 16:54:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4sla-0004PM-7J for control@debbugs.gnu.org; Wed, 27 Jan 2021 16:54:22 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51266 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4slZ-0006So-Qg for control@debbugs.gnu.org; Wed, 27 Jan 2021 16:54:22 -0500 Date: Wed, 27 Jan 2021 22:54:20 +0100 Message-Id: <87lfceujub.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #45896 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 (---) block 45896 by 45919 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 10:54:38 2021 Received: (at 45919) by debbugs.gnu.org; 28 Jan 2021 15:54:38 +0000 Received: from localhost ([127.0.0.1]:49532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59cz-0002ik-Ub for submit@debbugs.gnu.org; Thu, 28 Jan 2021 10:54:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59cv-0002iW-K9 for 45919@debbugs.gnu.org; Thu, 28 Jan 2021 10:54:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44846) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l59cq-0000Gh-CF; Thu, 28 Jan 2021 10:54:28 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58392 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l59cp-0002py-Sx; Thu, 28 Jan 2021 10:54:28 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <86bldahz42.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 229 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: Thu, 28 Jan 2021 16:54:26 +0100 In-Reply-To: <86bldahz42.fsf@gmail.com> (zimoun's message of "Wed, 27 Jan 2021 22:02:53 +0100") Message-ID: <8735ylm4zx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 45919 Cc: guix-devel , 45919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > On Wed, 27 Jan 2021 at 14:14, Ludovic Court=C3=A8s wrote: >> Ludovic Court=C3=A8s skribis: >> >>> Here=E2=80=99s a simple but oft-requested feature (I remember discussing >>> with Pierre and Simon a year ago at the Guix Days about ways to >>> implement it=E2=80=94time flies!): these patches provide =E2=80=98guix = package >>> --export-manifest=E2=80=99 and =E2=80=98--export-channels=E2=80=99. Th= ese options spit >>> a manifest and a channel spec, respectively, with the goal of >>> helping users who wish to migrate to the declarative model. >> >> I=E2=80=99m rather happy with this patch set but since this is something= we=E2=80=99ve >> discussed several times in the past, I think it=E2=80=99d be great if th= ose >> interested could chime in and comment: >> >> https://issues.guix.gnu.org/45919 >> >> I=E2=80=99ll leave a few more days and then=E2=80=A6 push! > > You are looking at me? :-) Yes, but not just. :-) > Well, the feature is nice! At first, I thought that it could be a bit > smarter than using only one commit. But as you said, the aim is for > transitioning. Maybe a future improvement should to list somewhere in > the comments which commit provides which set of packages. It could > help=E2=80=A6 or not. :-) > > Using Docker, it works. Let describe how in case people are interested. [...] > Awesome! Woow, thanks for explaining the experiment, it=E2=80=99s a nice one! Would= be worth turning into a blog post, maybe for hpc.guix.info? > The unexpected is this channels and manifests files do not reproduce the > same Docker pack tarball: > > $ guix describe > Generation 99 Jan 05 2021 16:56:39 (current) > guix-past 829923f > repository URL: https://gitlab.inria.fr/guix-hpc/guix-past > branch: master > commit: 829923f01f894f1e687735627025ada26230832f > guix-bimsb a8b539d > repository URL: https://github.com/BIMSBbioinfo/guix-bimsb > branch: master > commit: a8b539d61a359060c35f3cb34c7edd1d9d14241d > bimsb-nonfree 4084e63 > repository URL: https://github.com/BIMSBbioinfo/guix-bimsb-nonfree.git > branch: master > commit: 4084e63c9c0d662780870aded9f5a6ca1b063780 > guix-science cf87b05 > repository URL: https://github.com/guix-science/guix-science.git > branch: master > commit: cf87b0501c4a38b96edf41025a27bf1cb91f521a > guix 957f0c4 > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 957f0c40327ce00f53db22737e3775ce616ac258 > > $ guix time-machine -C /tmp/img/channels.scm -- pack -f docker --save-pro= venance -m /tmp/img/manifest.scm > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.= org/git/guix.git'... > /gnu/store/xzk604g8gysv4azn7sf9nylr6iah97gl-docker-pack.tar.gz > > To compare with > /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz. > > On a third machine, I get: > /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz > > Well, that=E2=80=99s another story and I have not inspected yet the > derivations and what could be wrong on the machine B. You=E2=80=99d have to check the differences. It may be that provenance data differs, for example because the second attempt includes data about channels that are actually unused. (That=E2=80=99s the whole problem of provenance data: it=E2=80=99s not a one-to-one mapping and it=E2=80=99s not= a bijection either.) Thanks for trying it out! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 12:04:39 2021 Received: (at 45919) by debbugs.gnu.org; 28 Jan 2021 17:04:40 +0000 Received: from localhost ([127.0.0.1]:49779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Ail-0004eN-Ip for submit@debbugs.gnu.org; Thu, 28 Jan 2021 12:04:39 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:63535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Aih-0004e2-FH for 45919@debbugs.gnu.org; Thu, 28 Jan 2021 12:04:38 -0500 X-Originating-IP: 86.247.16.87 Received: from bababa (lfbn-idf2-1-709-87.w86-247.abo.wanadoo.fr [86.247.16.87]) (Authenticated sender: mail@ambrevar.xyz) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 55C8040017; Thu, 28 Jan 2021 17:04:27 +0000 (UTC) From: Pierre Neidhardt To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <87wnvyv7w6.fsf@gnu.org> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> Date: Thu, 28 Jan 2021 18:04:27 +0100 Message-ID: <871re5t2lg.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Ludo! Ludovic Courtès writes: > Ludovic Courtès skribis: > >> Here’s a simple but oft-requested feature (I remember discussing >> with Pierre and Simon a year ago at the Guix Days about ways to >> implement it— [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.194 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.194 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 45919 Cc: guix-devel 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.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Ludo! Ludovic Courtès writes: > Ludovic Courtès skribis: > >> Here’s a simple but oft-requested feature (I remember discussing >> with Pierre and Simon a year ago at the Guix Days about ways to >> implement it— [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.194 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.194 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo! Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> Here=E2=80=99s a simple but oft-requested feature (I remember discussing >> with Pierre and Simon a year ago at the Guix Days about ways to >> implement it=E2=80=94time flies!): these patches provide =E2=80=98guix p= ackage >> --export-manifest=E2=80=99 and =E2=80=98--export-channels=E2=80=99. The= se options spit >> a manifest and a channel spec, respectively, with the goal of >> helping users who wish to migrate to the declarative model. > > I=E2=80=99m rather happy with this patch set but since this is something = we=E2=80=99ve > discussed several times in the past, I think it=E2=80=99d be great if tho= se > interested could chime in and comment: > > https://issues.guix.gnu.org/45919 > > I=E2=80=99ll leave a few more days and then=E2=80=A6 push! Thanks a lot for working on this, I'll try to give it a shot tomorrow! :) =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmAS7psSHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/8k4H/RhP9Brl8kKyC0zMkrVBeykF1GxpMQhQ hf0kN50frG0INgoS+HN1Fl2xFulzn+6nkRayTfqons3iZFAZQW2lD/v5TURH9sFo 85G+KiGDDpzSUSn5mnn+wW6IKXWkphtuvUFiNTbpADSM/BGrHMJV/4QBuKlLOkRm Q5dIuJv+H0UrFQP3ZvfSpRhMXp87IrMl4eU6f3JxBkN41kXUsFsFYaZVdMdKWMmM AsfkQsLZDBLHD6m9zqQHjA6iYtLlQIU/AixMyz7obuhn2dwYx0yWh7B/zzQieHCA Rx0lm1FBBLPC9iBX9shA9tSOHKwDPIKDDFAdfo9YoUklq4MDXgerqcg= =FB6Z -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 12:57:42 2021 Received: (at 45919) by debbugs.gnu.org; 28 Jan 2021 17:57:42 +0000 Received: from localhost ([127.0.0.1]:50041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5BY5-00068X-Uh for submit@debbugs.gnu.org; Thu, 28 Jan 2021 12:57:42 -0500 Received: from imta-35.everyone.net ([216.200.145.35]:39550 helo=imta-38.everyone.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5BY3-00068M-Hx for 45919@debbugs.gnu.org; Thu, 28 Jan 2021 12:57:40 -0500 Received: from pps.filterd (omta001.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 10SHqSeI032512; Thu, 28 Jan 2021 09:57:38 -0800 X-Eon-Originating-Account: sZmo-_lEo0LYIuDnHC4zhDaDuN00SeUdHNK1KAl8zsI X-Eon-Dm: m0117124.ppops.net Received: by m0117124.mta.everyone.net (EON-AUTHRELAY2 - 5a81c1f0) id m0117124.6000aa74.26677f; Thu, 28 Jan 2021 09:57:36 -0800 X-Eon-Sig: AQMHrIJgEvsQjdJm9gIAAAAE,2478aea8f351adb52dbca534d6a0a273 X-Eip: Qyzh6u-AtIgBhEMWTGHCMBdWTebWEk7dnVOexLnLoOs Date: Thu, 28 Jan 2021 18:57:26 +0100 From: Bengt Richter To: zimoun Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile Message-ID: <20210128175726.GA6094@LionPure> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <86bldahz42.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86bldahz42.fsf@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-28_12:2021-01-28, 2021-01-28 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 clxscore=1034 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280086 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 45919 Cc: guix-devel , Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@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: , Reply-To: Bengt Richter Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi zimoun, Thank you for your tutorial-style and resource-reference-footnoted posts! I don't know about others, but I save many on my hard disk as reference examples. I hope this provides positive feedback for your efforts. Thank you. On +2021-01-27 22:02:53 +0100, zimoun wrote: > Hi Ludo, > > On Wed, 27 Jan 2021 at 14:14, Ludovic Courtès wrote: > > Ludovic Courtès skribis: > > > >> Here’s a simple but oft-requested feature (I remember discussing > >> with Pierre and Simon a year ago at the Guix Days about ways to > >> implement it—time flies!): these patches provide ‘guix package > >> --export-manifest’ and ‘--export-channels’. These options spit > >> a manifest and a channel spec, respectively, with the goal of > >> helping users who wish to migrate to the declarative model. > > > > I’m rather happy with this patch set but since this is something we’ve > > discussed several times in the past, I think it’d be great if those > > interested could chime in and comment: > > > > https://issues.guix.gnu.org/45919 > > > > I’ll leave a few more days and then… push! > > You are looking at me? :-) > > Well, the feature is nice! At first, I thought that it could be a bit > smarter than using only one commit. But as you said, the aim is for > transitioning. Maybe a future improvement should to list somewhere in > the comments which commit provides which set of packages. It could > help… or not. :-) > > Using Docker, it works. Let describe how in case people are interested. > > > On machine A, I have: > > --8<---------------cut here---------------start------------->8--- > $ guix describe -f channels > (list (channel > (name 'guix) > (url "https://git.savannah.gnu.org/git/guix.git") > (commit > "cb68ae668af2ade4b0777d82f227e5462768e9e5") > (introduction > (make-channel-introduction > "9edb3f66fd807b096b48283debdcddccfea34bad" > (openpgp-fingerprint > "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) > > $ cat ~/.config/guix/manifests/python.scm > (specifications->manifest > (append > '("python" > ) > (map > (lambda (pkg) > (string-append "python-" pkg)) > '("ipython" > "numpy" > "matplotlib" > "scipy" > "biopython" > )))) > --8<---------------cut here---------------end--------------->8--- > > And I generate a Docker pack with: > > --8<---------------cut here---------------start------------->8--- > $ guix pack -f docker --save-provenance -m ~/.config/guix/manifests/python.scm > /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz > --8<---------------cut here---------------end--------------->8--- > > > Then on machine B, after fetching this tarball, I run: > > --8<---------------cut here---------------start------------->8--- > $ docker load < /tmp/img/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz > $ docker images > REPOSITORY TAG IMAGE ID CREATED SIZE > python-python-ipython-python-numpy latest 49ddfedf1e27 51 years ago 1.45GB > --8<---------------cut here---------------end--------------->8--- > > And it works as expected: > > --8<---------------cut here---------------start------------->8--- > $ docker run -ti python-python-ipython-python-numpy:latest python3 > Python 3.8.2 (default, Jan 1 1970, 00:00:01) > [GCC 7.5.0] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import this > The Zen of Python, by Tim Peters > > Beautiful is better than ugly. > Explicit is better than implicit. > Simple is better than complex. > Complex is better than complicated. > Flat is better than nested. > Sparse is better than dense. > Readability counts. > Special cases aren't special enough to break the rules. > Although practicality beats purity. > Errors should never pass silently. > Unless explicitly silenced. > In the face of ambiguity, refuse the temptation to guess. > There should be one-- and preferably only one --obvious way to do it. > Although that way may not be obvious at first unless you're Dutch. > Now is better than never. > Although never is often better than *right* now. > If the implementation is hard to explain, it's a bad idea. > If the implementation is easy to explain, it may be a good idea. > Namespaces are one honking great idea -- let's do more of those! > >>> import numpy as np > >>> A = np.array([[1,0,1],[0,1,0],[0,0,1]]) > >>> _, s, _ = np.linalg.svd(A); s; abs(s[0] - 1./s[2]) > array([1.61803399, 1. , 0.61803399]) > 0.0 > >>> > --8<---------------cut here---------------end--------------->8--- > > Neat! > > So far, so good. Well, let extract the ’manifest’ from this Docker > blob. > > --8<---------------cut here---------------start------------->8--- > $ docker export -o /tmp/img/re-pack.tar $(docker ps -a --format "{{.ID}}" | head -n1) > $ tar -xf /tmp/img/re-pack.tar $(tar -tf /tmp/img/re-pack.tar | grep 'profile/manifest') > $ cat gnu/store/7frdchgf5sqw8b83azsml3lw0h52gfbk-profile/manifest | grep -E "(\(\"python|cb68ae)" | head -n5 > (("python" > "cb68ae668af2ade4b0777d82f227e5462768e9e5") > ("python-ipython" > (("python-backcall" > ("python-pyzmq" > --8<---------------cut here---------------end--------------->8--- > > Now, a trick to get the channels and specifications: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3lw0h52gfbk-profile --export-channels > ;; This channel file can be passed to 'guix pull -C' or to > ;; 'guix time-machine -C' to obtain the Guix revision that was > ;; used to populate this profile. > > (list > (channel > (name 'guix) > (url "https://git.savannah.gnu.org/git/guix.git") > (commit > "cb68ae668af2ade4b0777d82f227e5462768e9e5") > (introduction > (make-channel-introduction > "9edb3f66fd807b096b48283debdcddccfea34bad" > (openpgp-fingerprint > "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) > ) > > $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3lw0h52gfbk-profile --export-manifest > $ ./pre-inst-env guix package -p /tmp/img/gnu/store/7frdchgf5sqw8b83azsml3lw0h52gfbk-profile --export-manifest > ;; This "manifest" file can be passed to 'guix package -m' to reproduce > ;; the content of your profile. This is "symbolic": it only specifies > ;; package names. To reproduce the exact same profile, you also need to > ;; capture the channels being used, as returned by "guix describe". > ;; See the "Replicating Guix" section in the manual. > > (specifications->manifest > (list "python" > "python-ipython" > "python-numpy" > "python-matplotlib" > "python-scipy" > "python-biopython")) > --8<---------------cut here---------------end--------------->8--- > > Awesome! > > > The unexpected is this channels and manifests files do not reproduce the > same Docker pack tarball: > > --8<---------------cut here---------------start------------->8--- > $ guix describe > Generation 99 Jan 05 2021 16:56:39 (current) > guix-past 829923f > repository URL: https://gitlab.inria.fr/guix-hpc/guix-past > branch: master > commit: 829923f01f894f1e687735627025ada26230832f > guix-bimsb a8b539d > repository URL: https://github.com/BIMSBbioinfo/guix-bimsb > branch: master > commit: a8b539d61a359060c35f3cb34c7edd1d9d14241d > bimsb-nonfree 4084e63 > repository URL: https://github.com/BIMSBbioinfo/guix-bimsb-nonfree.git > branch: master > commit: 4084e63c9c0d662780870aded9f5a6ca1b063780 > guix-science cf87b05 > repository URL: https://github.com/guix-science/guix-science.git > branch: master > commit: cf87b0501c4a38b96edf41025a27bf1cb91f521a > guix 957f0c4 > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 957f0c40327ce00f53db22737e3775ce616ac258 > > $ guix time-machine -C /tmp/img/channels.scm -- pack -f docker --save-provenance -m /tmp/img/manifest.scm > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'... > /gnu/store/xzk604g8gysv4azn7sf9nylr6iah97gl-docker-pack.tar.gz > --8<---------------cut here---------------end--------------->8--- > > To compare with > /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz. > > On a third machine, I get: > /gnu/store/wxymmnxdvdvf08ifsfy39xjaxilhrigk-docker-pack.tar.gz > > Well, that’s another story and I have not inspected yet the > derivations and what could be wrong on the machine B. > > > Cheers, > simon > KUTGW ;-) -- Regards, Bengt Richter From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 12:57:59 2021 Received: (at 45919) by debbugs.gnu.org; 29 Jan 2021 17:57:59 +0000 Received: from localhost ([127.0.0.1]:52910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Y1v-000501-Jw for submit@debbugs.gnu.org; Fri, 29 Jan 2021 12:57:59 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Y1s-0004zi-6Q for 45919@debbugs.gnu.org; Fri, 29 Jan 2021 12:57:58 -0500 X-Originating-IP: 86.247.16.87 Received: from bababa (lfbn-idf2-1-709-87.w86-247.abo.wanadoo.fr [86.247.16.87]) (Authenticated sender: mail@ambrevar.xyz) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id E54D01C0004; Fri, 29 Jan 2021 17:57:48 +0000 (UTC) From: Pierre Neidhardt To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <871re5t2lg.fsf@ambrevar.xyz> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> Date: Fri, 29 Jan 2021 18:57:48 +0100 Message-ID: <874kizsk0z.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.8 (+) 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 again! I just had a cursory look, and my main concern is that maybe exposing commands is one more thing to learn for the user, and one more step to run to get a simple file. Instead, what about doing what system profiles already do with Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.197 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.197 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 45919 Cc: guix-devel 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.8 (+) 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 again! I just had a cursory look, and my main concern is that maybe exposing commands is one more thing to learn for the user, and one more step to run to get a simple file. Instead, what about doing what system profiles already do with Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.197 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.197 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi again! I just had a cursory look, and my main concern is that maybe exposing commands is one more thing to learn for the user, and one more step to run to get a simple file. Instead, what about doing what system profiles already do with /run/current-system/channels.scm /run/current-system/configuration.scm and store the result of the proposed commands directly in $PROFILE/channels.scm and $PROFILE/manifest-spec.scm, on each profile upgrade? We could add a warning comment at the top, explaining the limitations of these files (that it does not represent the profile faithfully). Thoughts? Last, just a nit: what about listing the packages corresponding to the commented commits next to them? For instance =2D-8<---------------cut here---------------start------------->8--- (list ;; Note: these other commits were also used to install some of the package= s in this profile: ;; "458cb25b9e7e7c954f468023abea2bebb5d8c75b" monolith obs calibre ;; "4969b51d175497bfcc354c91803e9d70542b7113" 0ad augustus ;; "3d85c3ec652feb22824f355538b51e6955ded361" nyxt ;; ... ;; "b76b1d3fb65fec98b96a2b4cfa984316dd956a29" tectonic (channel (name 'guix) ... =2D-8<---------------cut here---------------end--------------->8--- Thanks for working on this, Ludo! Cheers! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmAUTJwSHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/TAYIAKloQaP2C57nFZ637r9ODf4xO7pi9QC/ bclXp6brbCFE6k7oGsfUZk/nwrnO6KKGrAiuW5cdkefNdDtqCVG2qz4+VOEhbPOc X5ZJKiXMgK0B6Ry0kXmbnD1K/iPB5fXssgZPq0tudzAUHfHBHkaljPZ+kLhkqLH1 /RBSUMErdQYeQr26MCTqK/iDcdqYKM0/JjsZWB1PQAH2GCLUOLbTiqru8m/hkryQ tucYaVbB6MWyPm9lyacHwCU8ujste/9p/y4pHPRuaJuOweI5WId2SmtpJk8ld/sm A894BRzo756BrqpOjSKUGAfoVBi0qZxhxZUtEVZ+jjjnzrszHXKPOWA= =0xwb -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 14:01:09 2021 Received: (at 45919) by debbugs.gnu.org; 29 Jan 2021 19:01:09 +0000 Received: from localhost ([127.0.0.1]:52963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Z13-0006wd-0u for submit@debbugs.gnu.org; Fri, 29 Jan 2021 14:01:09 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:43843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Z10-0006vz-9S for 45919@debbugs.gnu.org; Fri, 29 Jan 2021 14:01:08 -0500 Received: by mail-wr1-f54.google.com with SMTP id z6so9837698wrq.10 for <45919@debbugs.gnu.org>; Fri, 29 Jan 2021 11:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=MB9A46oWGfHr550GNWygrOQNpHJIHiYqkh/DXO6FnGo=; b=sJdxUUZ4hLWDS2xj3szTSosJoR2U9/M2Q6PbHAmJV6P55uIbIpDKkBjeBQV/lYRqCk XsGAmN8DuPyq3DbZW7uqLAdVDbUm+eDH5zyrNWp1eCq+V5ih202jxW4tsO7ohQhM5849 3iHNAIdASwTFjmaSpV1Ab8qH4RDnf8MBdnaaPPI0pIjLb6t2/Pj8qTSVAiM1qNaWNgRg Yu2ei7FIx0/CNHNmWIktjVPFtyg7IDKN+aehEbBzt0s/AB5BclLgonLasraWPStURrko 90Y7MpV1WhHm71+BauVJ3kWMxRevHTGWF6T22/uwY/hhKWWVrbiWM6ndCr3VF7yb7NtZ ZLhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=MB9A46oWGfHr550GNWygrOQNpHJIHiYqkh/DXO6FnGo=; b=pb8YlLVB7crEFpS7L7X2ipShPu+u0WTT5gAFKd06AjXNed06tivRtkQzLeq1e95Sc3 yy0bljDlCTr7OD+LeRze/uCUyftoud+P+/7BewKvnPIV6d0DB6KeWs71/ds5x8JeQJyE B8neOFZNHktC/BVpm9LEBktBAzaR668rHqydOnX/dsGaZxmsmDNIkfTLlKdx0KEVgx8j THYh0O6CIyD8sePujsiFeYn3i26kUP9KHFpMs+iVPOQhq30Nxry9QscJfU6v+ym0haD8 BLRv/ClFuu7wF03FMI27noZvkEQuM1Uj/vFJ/dnejY1rqJOEli09ToA+Q7e7KrWiqwsA P9nA== X-Gm-Message-State: AOAM531LfhxtlvBxaRvSlXQDyVFfgQdN/alJ+Fqe0/CQbTUiqRVv2zG6 nc1WwgI/3aL9bPHZXG9hZa4= X-Google-Smtp-Source: ABdhPJyJVpaUSN8OFUpSUg/2O1X042FBpXSwQJ8JJcPk5pE7i9NsOjtoGArHFaDa0dVsSGnPeCUGPQ== X-Received: by 2002:adf:f9d0:: with SMTP id w16mr6118174wrr.137.1611946860311; Fri, 29 Jan 2021 11:01:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id v1sm10929198wmj.31.2021.01.29.11.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 11:00:59 -0800 (PST) From: zimoun To: Pierre Neidhardt , Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <874kizsk0z.fsf@ambrevar.xyz> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> Date: Fri, 29 Jan 2021 19:57:40 +0100 Message-ID: <865z3fh8pn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) 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 Pierre and Ludo, On Fri, 29 Jan 2021 at 18:57, Pierre Neidhardt wrote: > Hi again! > > I just had a cursory look, and my main concern is that maybe exposing > commands is one more thing to learn for the user, and on [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.54 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.54 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 45919 Cc: guix-devel 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 Pierre and Ludo, On Fri, 29 Jan 2021 at 18:57, Pierre Neidhardt wrote: > Hi again! > > I just had a cursory look, and my main concern is that maybe exposing > commands is one more thing to learn for the user, and one more step to > run to get a simple file. > > Instead, what about doing what system profiles already do with > > /run/current-system/channels.scm > /run/current-system/configuration.scm > > and store the result of the proposed commands directly in > $PROFILE/channels.scm and $PROFILE/manifest-spec.scm, on each profile > upgrade? If I understand correctly, Pierre, you are proposing 2 things: 1) only one command and 2) export by default in $PROFILE. Right? Yeah, sounds a good idea to me. Even if #2 seems a bit of re-work for the patch set. :-) > Last, just a nit: what about listing the packages corresponding to the > commented commits next to them? For instance > > --8<---------------cut here---------------start------------->8--- > (list > ;; Note: these other commits were also used to install some of the packages in this profile: > ;; "458cb25b9e7e7c954f468023abea2bebb5d8c75b" monolith obs calibre > ;; "4969b51d175497bfcc354c91803e9d70542b7113" 0ad augustus > ;; "3d85c3ec652feb22824f355538b51e6955ded361" nyxt > ;; ... > ;; "b76b1d3fb65fec98b96a2b4cfa984316dd956a29" tectonic > (channel > (name 'guix) > ... > --8<---------------cut here---------------end--------------->8--- I agree. I did the same note. :-) Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 14:23:10 2021 Received: (at 45919) by debbugs.gnu.org; 29 Jan 2021 19:23:10 +0000 Received: from localhost ([127.0.0.1]:52976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5ZML-0007S0-Qd for submit@debbugs.gnu.org; Fri, 29 Jan 2021 14:23:10 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:38479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5ZMI-0007RH-0w for 45919@debbugs.gnu.org; Fri, 29 Jan 2021 14:23:08 -0500 Received: by mail-wr1-f52.google.com with SMTP id s7so6953122wru.5 for <45919@debbugs.gnu.org>; Fri, 29 Jan 2021 11:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=lE0qtRcj3JUWAEYrohoRlZx7yfxsyPl0QLteYKL0wAk=; b=OPVT0Re0NaCIntDgcj7oR451pUoIvu29YbKyTwdYpZhopJ8hOTD9Jx2H5T694t1oyJ hs7rntwV53MVRmTNn0pJ4YizRCgvcl5ckeOWfn3eRKftIsS8PN5MrD3yUYqNBUKpkC4s s9yOcJToizFJN7ExPgNHAK/PIOw8e+7yL69Ep/hT+DY6F4Mns626I0boz0J788ALC2p7 h0YqEBW9fmAZJAgb6PKGfHYfvQXf9WohMT60a+73pFu1Pfs+QR/Z9aRW8nPTvY6zCwJ2 NdBUtemKKiNKsZfkDED3yIuraXUp/KUyVE0Ui0od4F4PD2Bhttp5Kt8qjHlEZsZKiMX9 wu3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=lE0qtRcj3JUWAEYrohoRlZx7yfxsyPl0QLteYKL0wAk=; b=T6Xjz02a/btQr/8HLCisykrPs7OTx9ceW/CSmSndQA/Y0ZaJQt3UGIkawyimUZ4zYF SHFdF6WauDrdfY3bmfXpMhfrPDy4JPQUAq7xjJjetKm42L6QlyQtA07m5lpzpv6cgi3O o9LWlt6KmTevMwl51oJ8iwjzAtZHA77xWCFvXH7lButccIUfIHD4euvPayWd5PhW3UJ5 Wwfo5Ja5viEZfwDvOvUbjxpY9bauT14PlU+L45UabKE0qp6IyGydTjFFWyg0yWX2Yg8E Qyq7CCpp1qB7U3+pKJQglmedeg6iGEsFbLJ4XcUht1a5QdTim+yHDajAD1shRYHh+SzM G2PA== X-Gm-Message-State: AOAM5320ZOd7PnKdh3ySvCd2mrn9lhjQ/K3woAmKgSBb/9bP1koSXAhT YGemdphQWCraZMqywT8O79aMIgXNd1M= X-Google-Smtp-Source: ABdhPJx+0b0XMoa4f71NELim37lQyQr67k2QHl21qQrpwCRCKRUlk+AGZDMWdGwnSpBrP8pOl5tUsA== X-Received: by 2002:adf:ec52:: with SMTP id w18mr6198924wrn.65.1611948180263; Fri, 29 Jan 2021 11:23:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id a27sm13664352wrc.94.2021.01.29.11.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 11:22:59 -0800 (PST) From: zimoun To: Bengt Richter Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <20210128175726.GA6094@LionPure> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <86bldahz42.fsf@gmail.com> <20210128175726.GA6094@LionPure> Date: Fri, 29 Jan 2021 20:13:34 +0100 Message-ID: <8635yjh7z5.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: 45919 Cc: guix-devel , Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bengt, On Thu, 28 Jan 2021 at 18:57, Bengt Richter wrote: > Thank you for your tutorial-style and resource-reference-footnoted > posts! Thanks! I am happy if it helps. =C2=ABD=C3=A9formation professionnelle=C2= =BB=C2=B9 :-) Cheers, simon =C2=B9: French pun with =C2=ABprofessional training=C2=BB and =C2=ABstretch= ed profession=C2=BB. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 16:52:14 2021 Received: (at 45919) by debbugs.gnu.org; 29 Jan 2021 21:52:14 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5bgY-0004kH-5d for submit@debbugs.gnu.org; Fri, 29 Jan 2021 16:52:14 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5bgT-0004jg-Qd for 45919@debbugs.gnu.org; Fri, 29 Jan 2021 16:52:08 -0500 X-Originating-IP: 86.247.16.87 Received: from mimimi (lfbn-idf2-1-709-87.w86-247.abo.wanadoo.fr [86.247.16.87]) (Authenticated sender: mail@ambrevar.xyz) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 93B1AFF803; Fri, 29 Jan 2021 21:51:58 +0000 (UTC) From: Pierre Neidhardt To: zimoun , Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <865z3fh8pn.fsf@gmail.com> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <865z3fh8pn.fsf@gmail.com> Date: Fri, 29 Jan 2021 22:51:57 +0100 Message-ID: <87eei3quma.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.8 (+) 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: zimoun writes: >> I just had a cursory look, and my main concern is that maybe exposing >> commands is one more thing to learn for the user, and one more step to >> run to get a simple file. >> >> Instead, what abou [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.199 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.199 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 45919 Cc: guix-devel 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.8 (+) 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: zimoun writes: >> I just had a cursory look, and my main concern is that maybe exposing >> commands is one more thing to learn for the user, and one more step to >> run to get a simple file. >> >> Instead, what abou [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.199 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.199 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable zimoun writes: >> I just had a cursory look, and my main concern is that maybe exposing >> commands is one more thing to learn for the user, and one more step to >> run to get a simple file. >> >> Instead, what about doing what system profiles already do with >> >> /run/current-system/channels.scm >> /run/current-system/configuration.scm >> >> and store the result of the proposed commands directly in >> $PROFILE/channels.scm and $PROFILE/manifest-spec.scm, on each profile >> upgrade? > > If I understand correctly, Pierre, you are proposing 2 things: 1) only > one command and 2) export by default in $PROFILE. Right? > > Yeah, sounds a good idea to me. Even if #2 seems a bit of re-work for > the patch set. :-) Sorry, misunderstanding :) I'm proposing: 1) Zero command :p 2) On every profile modification (install, upgrade, removal), store the channel description and the manifest specification (as produced by this patch commands) to $GUIX_PROFILE/channels.scm and $GUIX_PROFILE/manifest-spec.scm, respectively. ($GUIX_PROFILE being the target profile, of course.) Does that make more sense? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmAUg30SHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/xSMH+wQAfaDedrAByhqFG/MoSBu5hIypZ+Bg JMKWOgiFoCEyfsIlSlzaoPZ9NpFjjQgT+vFCAgwKY87xm+r//jsps4is+1uaCpL7 887pyqYtCXdTHT1GoxugcHMT2i9QhXxMg6D1z9qgxcfd3pe6icR3VS5EXLPNYlXK JkhPwKeonphRQwde7s7/GZRjI2OWlTEDIQwzsg/xWZsPuCCM1md9E8BNfZxeuFMQ o3YVK1Tlf+2YpfNpEwN80UGubA+2Rjkjz9vlzAZmmbF9hJyprER6UXdcv5vXUSAn FrOgwZsSXzM/IQnFOiKXhxiVWZbTVkrhAQ141cZuJK0RF2byyAfciXo= =c0vu -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 08:55:45 2021 Received: (at 45919) by debbugs.gnu.org; 30 Jan 2021 13:55:45 +0000 Received: from localhost ([127.0.0.1]:54146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5qj0-0006RX-FL for submit@debbugs.gnu.org; Sat, 30 Jan 2021 08:55:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5qiy-0006RJ-Ce for 45919@debbugs.gnu.org; Sat, 30 Jan 2021 08:55:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44533) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5qir-0006qc-UF; Sat, 30 Jan 2021 08:55:33 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35344 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l5qic-0005Oq-2h; Sat, 30 Jan 2021 08:55:31 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Neidhardt Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> Date: Sat, 30 Jan 2021 14:55:16 +0100 In-Reply-To: <874kizsk0z.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 29 Jan 2021 18:57:48 +0100") Message-ID: <87o8h6fs1n.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.3 (+) 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 Pierre, Pierre Neidhardt skribis: > I just had a cursory look, and my main concern is that maybe exposing > commands is one more thing to learn for the user, and one more step to > run to get a simple file. > > Instead, what about doi [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.92 listed in list.dnswl.org] X-Debbugs-Envelope-To: 45919 Cc: guix-devel , 45919@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.3 (/) Hi Pierre, Pierre Neidhardt skribis: > I just had a cursory look, and my main concern is that maybe exposing > commands is one more thing to learn for the user, and one more step to > run to get a simple file. > > Instead, what about doing what system profiles already do with > > /run/current-system/channels.scm > /run/current-system/configuration.scm > > and store the result of the proposed commands directly in > $PROFILE/channels.scm and $PROFILE/manifest-spec.scm, on each profile > upgrade? > > We could add a warning comment at the top, explaining the limitations of > these files (that it does not represent the profile faithfully). > > Thoughts? Here are practical issues that come to mind: =E2=80=A2 It would only work for newer profiles, created after the featur= e has been implemented (maybe that=E2=80=99s okay). =E2=80=A2 The generated files might use APIs that, in the meantime, got deprecated or changed somehow. This is in contrast with =E2=80=98--export-profile=E2=80=99, which interprets =E2=80=98manifest= =E2=80=99 (a versioned file format) and produces code that can use the API du jour. =E2=80=A2 One would still have to learn about these two files, and pick t= he right =E2=80=9Cmanifest=E2=80=9D file. =E2=80=A2 For users of =E2=80=98-m my-manifest.scm=E2=80=99, we would nee= d to store =E2=80=98my-manifest.scm=E2=80=99 as is instead of generating an approx= imation thereof. We already discussed these issues at length earlier. :-) Again, I agree that following what we do with /run/current-system would be nice, but the situation is different due to imperative operations. Hmm, needs more thought=E2=80=A6 > Last, just a nit: what about listing the packages corresponding to the > commented commits next to them? For instance > > (list > ;; Note: these other commits were also used to install some of the packa= ges in this profile: > ;; "458cb25b9e7e7c954f468023abea2bebb5d8c75b" monolith obs calibre > ;; "4969b51d175497bfcc354c91803e9d70542b7113" 0ad augustus > ;; "3d85c3ec652feb22824f355538b51e6955ded361" nyxt > ;; ... > ;; "b76b1d3fb65fec98b96a2b4cfa984316dd956a29" tectonic > (channel > (name 'guix) > ... Would be nice. Thanks for your feedback! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 09:38:08 2021 Received: (at 45919) by debbugs.gnu.org; 30 Jan 2021 14:38:08 +0000 Received: from localhost ([127.0.0.1]:54348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rO4-0007dq-Fq for submit@debbugs.gnu.org; Sat, 30 Jan 2021 09:38:08 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:35789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rO2-0007dL-OK for 45919@debbugs.gnu.org; Sat, 30 Jan 2021 09:38:07 -0500 Received: by mail-wr1-f49.google.com with SMTP id l12so11774974wry.2 for <45919@debbugs.gnu.org>; Sat, 30 Jan 2021 06:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=Ie12wll6oVHMYNVSHyOsJ358qnjUO8dLPnpMyEQbFgs=; b=rO5Paq4EIzTN+KB8bD56FXP4XFZS42zfRDLkYKnhySBdYhB0ixcGNaXI0Th9rlS6H0 06VmZiGsHGGcYit2XxSPzGrhBS9bSNBANKxruoTil1Z3J4D7GxdrTX5Vi1boakLaVsad UoKzJScHjmL6/E89q2BUOSyL6bRN/KM51MTlCD5tM+fohDVQlBgcMGNizIeplBYw/+SJ k1zlAoReCl3TXy0zz27W2aygZcandtv8c87X7OP6zbTOAUuBuzrZfchXEQISWSJSbomO ANRTHM7pkCIbgscS9SlhCYPt81UyHqHMW55jh6o6GRo0V0+3d553CPss9rg+XRBK5Uip /Udg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=Ie12wll6oVHMYNVSHyOsJ358qnjUO8dLPnpMyEQbFgs=; b=PB5f5xxBU5lf587TzfEF0kELBCfcanHiw7SJESS1rIUu8+/dv2xCd5r4H6DzRFa9N3 9ue8LUuHFl8f1GIyoj8ebdArZo/aPOb1IxCNznv+Cv9C7w7Euuf0ylbPrdfnJpAzx6dW gjDZugeEC/dwtAgxKmZ7fuIfa//rWEdVJ9W77LBKebdi8q9r7JvaoVsOq6YW/I0rhQ2s KMjYke6P1LunzSQ1YhxAJgQR5DAQ+o8OXqJ/eIvyrpFiMeQ6pH1pSUnjEeFQcpFBFEyi 5Oxprc0CV120G+g7KK3inXWtswNZ9uOp4hJW+7S8CwqNtmS9jSt++ta3bqKU12eMmghj 7+Mg== X-Gm-Message-State: AOAM530K3lm36Kw6vWzsyIP4VF/3lt+2jycIt4MzKqtG9iXMLzEWPMDx rkySltcX+/2PHAX11eE8498= X-Google-Smtp-Source: ABdhPJxu+JUAe7XRzAai4hR/bTxaPUHgaAL8d1T093N7kpBFEuO6F6zej+XrHeWqMJznh+HvvTZNAQ== X-Received: by 2002:adf:ee09:: with SMTP id y9mr9762268wrn.74.1612017480640; Sat, 30 Jan 2021 06:38:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x128sm14967223wmb.29.2021.01.30.06.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 06:38:00 -0800 (PST) From: zimoun To: Pierre Neidhardt , Ludovic =?utf-8?Q?Court=C3=A8s?= , 45919@debbugs.gnu.org Subject: Re: [bug#45919] [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <87eei3quma.fsf@ambrevar.xyz> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <865z3fh8pn.fsf@gmail.com> <87eei3quma.fsf@ambrevar.xyz> Date: Sat, 30 Jan 2021 15:31:27 +0100 Message-ID: <86sg6ifqdc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.0 (++) 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 Fri, 29 Jan 2021 at 22:51, Pierre Neidhardt wrote: > Sorry, misunderstanding :) Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.49 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 45919 Cc: guix-devel X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi, On Fri, 29 Jan 2021 at 22:51, Pierre Neidhardt wrote: > Sorry, misunderstanding :) Have a drink together is missing because these times we have communication issues. :-) > I'm proposing: > > 1) Zero command :p > > 2) On every profile modification (install, upgrade, removal), store the > channel description and the manifest specification (as produced by this > patch commands) to $GUIX_PROFILE/channels.scm and > $GUIX_PROFILE/manifest-spec.scm, respectively. > > ($GUIX_PROFILE being the target profile, of course.) > > Does that make more sense? Yes, but it needs a lot of re-work and change, IMHO. And we ends with 3 files: $GUIX_PROFILE/manifest capturing the states of $GUIX_PROFILE and the 2 others deducing an approximation of these states. Well, IMHO, automatically produce this approximation at each =C2=ABaction=C2=BB on the = profile adds complexity and I am not convinced it is worth. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 16:23:54 2021 Received: (at 45919) by debbugs.gnu.org; 30 Jan 2021 21:23:54 +0000 Received: from localhost ([127.0.0.1]:55914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5xik-0007Kp-5p for submit@debbugs.gnu.org; Sat, 30 Jan 2021 16:23:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5xih-0007KZ-47 for 45919@debbugs.gnu.org; Sat, 30 Jan 2021 16:23:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51602) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5xia-00026Y-Rf; Sat, 30 Jan 2021 16:23:44 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48868 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l5xia-0004aw-Cr; Sat, 30 Jan 2021 16:23:44 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <865z3fh8pn.fsf@gmail.com> <87eei3quma.fsf@ambrevar.xyz> <86sg6ifqdc.fsf@gmail.com> Date: Sat, 30 Jan 2021 22:23:42 +0100 In-Reply-To: <86sg6ifqdc.fsf@gmail.com> (zimoun's message of "Sat, 30 Jan 2021 15:31:27 +0100") Message-ID: <87wnvup19d.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 45919 Cc: guix-devel , Pierre Neidhardt , 45919@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 (-) Hi, zimoun skribis: > Yes, but it needs a lot of re-work and change, IMHO. And we ends with 3 > files: $GUIX_PROFILE/manifest capturing the states of $GUIX_PROFILE and > the 2 others deducing an approximation of these states. Well, IMHO, > automatically produce this approximation at each =C2=ABaction=C2=BB on th= e profile > adds complexity and I am not convinced it is worth. Yeah. Actually, part of the code would be shared anyway, so we could always go with =E2=80=98--export-manifest=E2=80=99 first and think about adding the e= xtra files later. (Though I=E2=80=99m still unsure about these extra files, TBH.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 31 03:57:08 2021 Received: (at 45919) by debbugs.gnu.org; 31 Jan 2021 08:57:08 +0000 Received: from localhost ([127.0.0.1]:56369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l68Xb-0000dI-Nl for submit@debbugs.gnu.org; Sun, 31 Jan 2021 03:57:08 -0500 Received: from 101b.relay.hey.com ([204.62.115.196]:59765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l64yD-0001Kz-27 for 45919@debbugs.gnu.org; Sun, 31 Jan 2021 00:08:21 -0500 Received: from hey.com (bigip-vip-new.rw-ash-int.37signals.com [10.20.0.24]) by 101.relay.hey.com (Postfix) with ESMTP id 91239A1075; Sun, 31 Jan 2021 05:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hey.com; s=heymail; t=1612069700; 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; bh=F4z9/KJWmbxJcSuGT+5ldHm3EVwv029KXWFk+6Manlw=; b=PfX3gSUPh1RnrNo+ci5ESVzbMyU6lQNg3vXKafX2B68qABZC56uw/so2Oif5L9kr3S8UgV 5v/FKdRc1C/ymFZ8mwm5hMJl0volxn92B//R30vMLccKNbU/dXNj7YgEvDZCKvHX68K7Kq Pz5SjrbXq1Q+W5EVd33Bgy544CHw8vnph5ZE4UNW9Kpf9oCL4PBebHR5iWPA3r6or2kCcn OyTNqs+dZn9gNpycgnYRBFfTrtf3Rz3bYJPi4wheQTzL37D7Mx+sDimTBaBjuHazaWuYd8 vOpqgh/setFGLVn5yKlwCIMAt89J+rOw67jAXsMIV28V+aSnVliYLzpsZnBd1Q== Date: Sun, 31 Jan 2021 05:08:20 +0000 From: Ryan Prior To: zimoun , =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Message-ID: <896b9daa9aa2a999e30ab09736679408ebb41d9b@hey.com> In-Reply-To: <87wnvup19d.fsf_-_@gnu.org> Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_60163b448d53e_2e9e3020515de"; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 45919 X-Mailman-Approved-At: Sun, 31 Jan 2021 03:57:06 -0500 Cc: Development of GNU Guix and the GNU System distribution , 45919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ----==_mimepart_60163b448d53e_2e9e3020515de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On January 30, 2021, "Ludovic Court=C3=A8s" wrote:=0D > Actually, part of the code would be shared anyway, so we could always=0D= > go=0D > with =E2=80=98--export-manifest=E2=80=99 first and think about adding t= he extra files=0D > later. (Though I=E2=80=99m still unsure about these extra files, TBH.)=0D= =0D I do like the extra files. It feels cozy to me, like you have your=0D little profile directory and it has a manifest and a list of channels in=0D= it, that makes it feel more complete. Like having the family pictures on=0D= the wall.=0D =0D The question of what happens if you don't update a profile for a long=0D time and how Guix handles those files moves on is a good one. I think=0D those files should have an indication in there of what version of Guix=0D= was used to produce them, such that you can time-machine back to ensure=0D= you're compatible.=0D =0D I don't think there's much drawback to having both the auto-generated=0D files and a command that generates them. That seems more discoverable -=0D= you might happen across the files when you poke into a profile, or you=0D= might notice the command while reading the docs or the help output.=0D =0D Glad to see this capability land any which way, this is something that=0D= comes up often!=0D =0D While we're considering putting a manifest in the profile, is this a=0D good time to also bring up the idea of renaming the "manifest" file? It=0D= confuses more people all the time. I'd be inclined to rename it=0D "profile-metadata" or "lockfile".=C2=A0=0D ----==_mimepart_60163b448d53e_2e9e3020515de Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =0D =0D =0D =0D =0D =0D =0D =0D =0D =0D
=0D
=0D
On January 30, 2021, "Ludovic Court=C3=A8s" <ludo@gnu= .org> wrote:
Actually, part of the code would be shar= ed anyway, so we could always go
with =E2=80=98--export-manifest=E2=80= =99 first and think about adding the extra files
later. (Though I=E2=80= =99m still unsure about these extra files, TBH.)

I d= o like the extra files. It feels cozy to me, like you have your little pr= ofile directory and it has a manifest and a list of channels in it, that = makes it feel more complete. Like having the family pictures on the wall.=

The question of what happens if you don't update a profile for a = long time and how Guix handles those files moves on is a good one. I thin= k those files should have an indication in there of what version of Guix = was used to produce them, such that you can time-machine back to ensure y= ou're compatible.

I don't think there's much drawback to having bo= th the auto-generated files and a command that generates them. That seems= more discoverable - you might happen across the files when you poke into= a profile, or you might notice the command while reading the docs or the= help output.

Glad to see this capability land any which way, this= is something that comes up often!

While we're considering putting= a manifest in the profile, is this a good time to also bring up the idea= of renaming the "manifest" file? It confuses more people all t= he time. I'd be inclined to rename it "profile-metadata" or &qu= ot;lockfile".=C2=A0
=0D
=0D =0D =0D
=0D =0D =0D ----==_mimepart_60163b448d53e_2e9e3020515de-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 31 12:26:23 2021 Received: (at 45919) by debbugs.gnu.org; 31 Jan 2021 17:26:23 +0000 Received: from localhost ([127.0.0.1]:57884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6GUQ-0000tn-NR for submit@debbugs.gnu.org; Sun, 31 Jan 2021 12:26:22 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6GUM-0000tX-J0 for 45919@debbugs.gnu.org; Sun, 31 Jan 2021 12:26:21 -0500 X-Originating-IP: 86.247.16.87 Received: from mimimi (lfbn-idf2-1-709-87.w86-247.abo.wanadoo.fr [86.247.16.87]) (Authenticated sender: mail@ambrevar.xyz) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 467F9C0005; Sun, 31 Jan 2021 17:26:10 +0000 (UTC) From: Pierre Neidhardt To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <87o8h6fs1n.fsf_-_@gnu.org> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <87o8h6fs1n.fsf_-_@gnu.org> Date: Sun, 31 Jan 2021 18:26:10 +0100 Message-ID: <875z3dqaq5.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.8 (+) 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! Ludovic Courtès writes: > Here are practical issues that come to mind: > > • It would only work for newer profiles, created after the feature has > been implemented (maybe that’s okay). Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.198 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 45919 Cc: guix-devel , 45919@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.8 (+) 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! Ludovic Courtès writes: > Here are practical issues that come to mind: > > • It would only work for newer profiles, created after the feature has > been implemented (maybe that’s okay). Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.198 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Ludovic Court=C3=A8s writes: > Here are practical issues that come to mind: > > =E2=80=A2 It would only work for newer profiles, created after the feat= ure has > been implemented (maybe that=E2=80=99s okay). Indeed, I think it's OK! :) > =E2=80=A2 The generated files might use APIs that, in the meantime, got > deprecated or changed somehow. This is in contrast with > =E2=80=98--export-profile=E2=80=99, which interprets =E2=80=98manifes= t=E2=80=99 (a versioned file > format) and produces code that can use the API du jour. /run/current-system/configuration.scm suffers from the same problem. But with the manifest we could do better, we could include a version number one way or another. Besides, since it comes together with channels.scm, we know which Guix was used, so we always have access to the Guix with the right API to install the manifest. All in all, I think this is not a problem. > =E2=80=A2 One would still have to learn about these two files, and pick= the > right =E2=80=9Cmanifest=E2=80=9D file. I think it would be easier than a command. See below. > =E2=80=A2 For users of =E2=80=98-m my-manifest.scm=E2=80=99, we would n= eed to store > =E2=80=98my-manifest.scm=E2=80=99 as is instead of generating an appr= oximation > thereof. Which seems easy to do, isn't it? Another use-case which I find useful and comes close to this feature is that of channel/manifest versioning, in the sense of keeping these files under version control for instance in a Git repository. This can be useful to keep the history of everything, even deleted generations, or even in case of hardware failure. To that end, it'd be nice if we could export these files automatically to a designated location. Example: I update ~/my-profile and it automatically produces / overwrite ~/repos/guix-profile-metadata.git/my-profile/channels.scm and ~/repos/guix-profile-metadata.git/my-profile/manifest.scm. This way I can commit these 2 files in my guix-profile-metadata.git repository. Food for thoughts :) =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmAW6DISHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/R7IH/26U4TsZz/vZ0XE4s2/ck3ZnUaYJIMNA pjx3wsbrRnxDqh8a5CGB+kq1NpEysIMgDhNQY3GbxnGCoZDBILzKQ3sheF72IdAq HS3rxax7Yv4blvDYm959920KGqltIfpcHOHrow7X9HigJKI1fP/gIeHB7UiPEA7J 66OEK2CsagMnhxM7/Emp639a09FcTq8abonUw5yY+L6fvzk75bPdApQVg8KdtaKN JXmU49toilgUvo2nbGGVjKDiO3GY7jA2uq09/y1QD09JH5Ol3XjTfIGrgfyyltwJ qxrX3BnFVPx7qT/5Tg7VWDD6n+fHB/qZMshscnX6y18da6stbybX/wg= =DCrG -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 08:26:13 2021 Received: (at 45919) by debbugs.gnu.org; 1 Feb 2021 13:26:13 +0000 Received: from localhost ([127.0.0.1]:59375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ZDV-0003hK-Vp for submit@debbugs.gnu.org; Mon, 01 Feb 2021 08:26:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ZDS-0003gm-AX for 45919@debbugs.gnu.org; Mon, 01 Feb 2021 08:26:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ZDM-0002Hq-Ff; Mon, 01 Feb 2021 08:26:00 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55304 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6ZDI-0003WJ-Lv; Mon, 01 Feb 2021 08:25:58 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Neidhardt Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <87o8h6fs1n.fsf_-_@gnu.org> <875z3dqaq5.fsf@ambrevar.xyz> Date: Mon, 01 Feb 2021 14:25:54 +0100 In-Reply-To: <875z3dqaq5.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 31 Jan 2021 18:26:10 +0100") Message-ID: <8735yfhqcd.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.3 (+) 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, Pierre Neidhardt skribis: > Ludovic Courtès writes: Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.92 listed in list.dnswl.org] X-Debbugs-Envelope-To: 45919 Cc: guix-devel , 45919@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.3 (/) Hi, Pierre Neidhardt skribis: > Ludovic Court=C3=A8s writes: [...] >> =E2=80=A2 The generated files might use APIs that, in the meantime, got >> deprecated or changed somehow. This is in contrast with >> =E2=80=98--export-profile=E2=80=99, which interprets =E2=80=98manife= st=E2=80=99 (a versioned file >> format) and produces code that can use the API du jour. > > /run/current-system/configuration.scm suffers from the same problem. Not really because it=E2=80=99s precisely the file that you gave to build t= he system. So you know you can run: cd /run/current-system guix time-machine -C channels.scm -- system reconfigure configuration.scm and it=E2=80=99ll work (modulo the documented caveats). > But with the manifest we could do better, we could include a version > number one way or another. > Besides, since it comes together with channels.scm, we know which Guix > was used, so we always have access to the Guix with the right API to > install the manifest. Right. >> =E2=80=A2 One would still have to learn about these two files, and pic= k the >> right =E2=80=9Cmanifest=E2=80=9D file. > > I think it would be easier than a command. See below. > >> =E2=80=A2 For users of =E2=80=98-m my-manifest.scm=E2=80=99, we would = need to store >> =E2=80=98my-manifest.scm=E2=80=99 as is instead of generating an app= roximation >> thereof. > > Which seems easy to do, isn't it? I take it that you=E2=80=99re volunteering? :-) Nothing=E2=80=99s difficult, but in this case we=E2=80=99d need to pass the= original manifest down to =E2=80=98profile-generation=E2=80=99. Requires some redes= ign. > Another use-case which I find useful and comes close to this feature is > that of channel/manifest versioning, in the sense of keeping these files > under version control for instance in a Git repository. This can be > useful to keep the history of everything, even deleted generations, or > even in case of hardware failure. > > To that end, it'd be nice if we could export these files automatically > to a designated location. > > Example: I update ~/my-profile and it automatically produces / overwrite > ~/repos/guix-profile-metadata.git/my-profile/channels.scm and > ~/repos/guix-profile-metadata.git/my-profile/manifest.scm. > > This way I can commit these 2 files in my guix-profile-metadata.git > repository. I guess you could do that either with =E2=80=98cp ~/.guix-profile/{channels,manifest.scm =E2=80=A6=E2=80=99 or with =E2=80=98= guix package --export-manifest =E2=80=A6 > =E2=80=A6=E2=80=99. But again, that=E2=80=99s not really the goal here. The goal is to help us= ers willing to migrate from the =E2=80=9Cimperative=E2=80=9D mode to the declar= ative mode. Once you=E2=80=99re using a manifest, probably you=E2=80=99ll want to put t= hat under version control, but that=E2=80=99s already the case. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 08:30:57 2021 Received: (at 45919) by debbugs.gnu.org; 1 Feb 2021 13:30:57 +0000 Received: from localhost ([127.0.0.1]:59383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ZI8-0003px-8I for submit@debbugs.gnu.org; Mon, 01 Feb 2021 08:30:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ZI6-0003pg-RU for 45919@debbugs.gnu.org; Mon, 01 Feb 2021 08:30:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52190) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ZI1-0004Xs-Ed; Mon, 01 Feb 2021 08:30:49 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55306 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6ZHz-00037R-M6; Mon, 01 Feb 2021 08:30:48 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ryan Prior Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <896b9daa9aa2a999e30ab09736679408ebb41d9b@hey.com> Date: Mon, 01 Feb 2021 14:30:45 +0100 In-Reply-To: <896b9daa9aa2a999e30ab09736679408ebb41d9b@hey.com> (Ryan Prior's message of "Sun, 31 Jan 2021 05:08:20 +0000") Message-ID: <87v9bbgbju.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 45919 Cc: Development of GNU Guix and the GNU System distribution , 45919@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, Ryan Prior skribis: > I don't think there's much drawback to having both the auto-generated > files and a command that generates them. That seems more discoverable - > you might happen across the files when you poke into a profile, or you > might notice the command while reading the docs or the help output. Note that the =E2=80=98manifest=E2=80=99 file starts with a comment. This = patch set updates this comment so it mentions =E2=80=98--export-channels=E2=80=99. > Glad to see this capability land any which way, this is something that > comes up often! Heh, good. :-) > While we're considering putting a manifest in the profile, is this a > good time to also bring up the idea of renaming the "manifest" file? It > confuses more people all the time. I'd be inclined to rename it > "profile-metadata" or "lockfile".=C2=A0 It=E2=80=99s the kind of thing that can=E2=80=99t really be changed, or at = least not without a looong transition period, because older =E2=80=98guix package=E2= =80=99 commands wouldn=E2=80=99t recognize profiles that lack a =E2=80=98manifest= =E2=80=99 file. Thanks for your feedback, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 10:32:35 2021 Received: (at 45919) by debbugs.gnu.org; 1 Feb 2021 15:32:35 +0000 Received: from localhost ([127.0.0.1]:32904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6bBr-0007Ti-JO for submit@debbugs.gnu.org; Mon, 01 Feb 2021 10:32:35 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6bBp-0007TT-9f for 45919@debbugs.gnu.org; Mon, 01 Feb 2021 10:32:34 -0500 X-Originating-IP: 86.247.16.87 Received: from bababa (lfbn-idf2-1-709-87.w86-247.abo.wanadoo.fr [86.247.16.87]) (Authenticated sender: mail@ambrevar.xyz) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2A4F81C0017; Mon, 1 Feb 2021 15:32:25 +0000 (UTC) From: Pierre Neidhardt To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile In-Reply-To: <8735yfhqcd.fsf_-_@gnu.org> References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <87o8h6fs1n.fsf_-_@gnu.org> <875z3dqaq5.fsf@ambrevar.xyz> <8735yfhqcd.fsf_-_@gnu.org> Date: Mon, 01 Feb 2021 16:32:25 +0100 Message-ID: <87v9bbolbq.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.8 (+) 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: Ludovic Courtès writes: > Hi, > > Pierre Neidhardt skribis: > >> Ludovic Courtès writes: > > [...] > >>> • The generated files might use APIs that, in the meantime, got >>> deprecated or [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.197 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.197 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 45919 Cc: guix-devel , 45919@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.8 (+) 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: Ludovic Courtès writes: > Hi, > > Pierre Neidhardt skribis: > >> Ludovic Courtès writes: > > [...] > >>> • The generated files might use APIs that, in the meantime, got >>> deprecated or [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.197 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.197 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ambrevar.xyz (xyz)] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Pierre Neidhardt skribis: > >> Ludovic Court=C3=A8s writes: > > [...] > >>> =E2=80=A2 The generated files might use APIs that, in the meantime, g= ot >>> deprecated or changed somehow. This is in contrast with >>> =E2=80=98--export-profile=E2=80=99, which interprets =E2=80=98manif= est=E2=80=99 (a versioned file >>> format) and produces code that can use the API du jour. >> >> /run/current-system/configuration.scm suffers from the same problem. > > Not really because it=E2=80=99s precisely the file that you gave to build= the > system. So you know you can run: > > cd /run/current-system > guix time-machine -C channels.scm -- system reconfigure configuration.s= cm > > and it=E2=80=99ll work (modulo the documented caveats). Ha, actually no, it won't always work! :) Configuration.scm is only the file passed to `guix system reconfigure`, but is this file inherits from other user Guile modules, then the configuration.scm won't be sufficient to regenerate the system. You could argue that it's a user problem, but still, there is an "impurity" here! :p > But again, that=E2=80=99s not really the goal here. The goal is to help = users > willing to migrate from the =E2=80=9Cimperative=E2=80=9D mode to the decl= arative mode. Sure, but my thinking is that we could hit two birds we one stone here. If we only think one half of the problem, we might end up with too many commands or an interface that's not flexible enough. > Once you=E2=80=99re using a manifest, probably you=E2=80=99ll want to put= that under > version control, but that=E2=80=99s already the case. The channels.scm files are missing though. My two cents! :) Cheers! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmAYHwkSHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/hF0H/2PSKRAV4jasUfhGEW1dv+oht2GRMwiD YrNZUtw92UW9FoP7PoO43Lp/asWbHg1gJzoGfFXmBvIuOs/GxqG+SR3NUyStoHkH Ii4UNVTvdDhF9X6sK9p4RiEjybQ+sDtgnK7oFn+W+NnYvKt5B4BgGw50ZcQoKo3u 8jpsCFitaQAvtTB+m+mcoZMRZiDEEIe9swAV/Vjm5J9CL9ukl/6XguOzJHlYu5NG v+pwWAY/F+aYO/Tm89A99Sj6+U8mkf3KZEHtK1k7fxMTYplzLFDM5itAgIwdbdII 9ktEvQcyHwgvgyc0YrsnsOKcKr6h76DU/MA1xMuU/JrEz2pgGSsGhaE= =S9uH -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 12:04:20 2021 Received: (at 45919-done) by debbugs.gnu.org; 1 Feb 2021 17:04:20 +0000 Received: from localhost ([127.0.0.1]:33021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6cce-0003Q1-GU for submit@debbugs.gnu.org; Mon, 01 Feb 2021 12:04:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ccc-0003Po-8c for 45919-done@debbugs.gnu.org; Mon, 01 Feb 2021 12:04:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55901) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ccU-00027j-9S; Mon, 01 Feb 2021 12:04:10 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51648 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6ccQ-0005ZF-MG; Mon, 01 Feb 2021 12:04:08 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Neidhardt , zimoun Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <87o8h6fs1n.fsf_-_@gnu.org> <875z3dqaq5.fsf@ambrevar.xyz> <8735yfhqcd.fsf_-_@gnu.org> <87v9bbolbq.fsf@ambrevar.xyz> Date: Mon, 01 Feb 2021 18:04:05 +0100 In-Reply-To: <87v9bbolbq.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Mon, 01 Feb 2021 16:32:25 +0100") Message-ID: <87im7bk9dm.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 45919-done Cc: guix-devel , 45919-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi! So I went ahead and pushed this patch series as 15078567c17851ef0f2b017119f305e0d5e8a140. We can always improve from here, and hopefully getting actual user feedback will help us see the pros and cons of this option. Thanks! Ludo=E2=80=99. From unknown Sat Aug 09 04:53:19 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, 02 Mar 2021 12: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