GNU bug report logs - #63057
[PATCH core-updates 0/3] Some installer fixes

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Mon, 24 Apr 2023 19:43:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63057 in the body.
You can then email your comments to 63057 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63057; Package guix-patches. (Mon, 24 Apr 2023 19:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Poiret <dev <at> jpoiret.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 24 Apr 2023 19:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH core-updates 0/3] Some installer fixes
Date: Mon, 24 Apr 2023 21:42:19 +0200
Hello everyone,

This patchset contains one installer fix (the second patch), while both of the
other patches are fixes that should make installer debugging slightly easier.
Since (current-guix) inherits the system's sysconfdir, that config variable
needs to be set properly as well (so /etc for most installs, and not the
default /usr/local/etc).  Also, the acl file should be placed by the guix
service in the correct spot, to account for sysconfdirs different from /etc.

NB: I'm testing the new `mumi` CLI with this patchset.

Best,

Josselin Poiret (3):
  system: guix: Use config's ACL file location.
  installer: Filter out C.UTF-8 from the list of locales.
  doc: Add --sysconfdir=/etc to the recommended ./configure.

 doc/contributing.texi    |  2 +-
 gnu/installer/locale.scm |  7 ++++---
 gnu/services/base.scm    | 17 +++++++++--------
 3 files changed, 14 insertions(+), 12 deletions(-)


base-commit: 9e81b4da2d0626426d8d7b392b1e88caf5eb0161
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#63057; Package guix-patches. (Mon, 24 Apr 2023 20:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 63057 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>,
	63057 <at> debbugs.gnu.org
Subject: [PATCH core-updates 2/3] installer: Filter out C.UTF-8 from the list
 of locales.
Date: Mon, 24 Apr 2023 21:59:04 +0200
* gnu/installer/locale.scm (supported-locales->locales): Filter out C.UTF-8.  It
doesn't follow the other locales' format, and doesn't have a corresponding
iso639 code.
---
 gnu/installer/locale.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/installer/locale.scm b/gnu/installer/locale.scm
index ccffb6d8ef..2ec0598abb 100644
--- a/gnu/installer/locale.scm
+++ b/gnu/installer/locale.scm
@@ -93,9 +93,10 @@ (define (locale->locale-string locale)
 (define (supported-locales->locales supported-locales)
   "Given SUPPORTED-LOCALES, a file produced by 'glibc-supported-locales',
 return a list of locales where each locale is an alist."
-  (map (match-lambda
-         ((locale . codeset)
-          (locale-string->locale locale codeset)))
+  (filter-map (match-lambda
+                (("C.UTF-8" . codeset) #f)
+                ((locale . codeset)
+                 (locale-string->locale locale codeset)))
        (call-with-input-file supported-locales read)))
 
 
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#63057; Package guix-patches. (Mon, 24 Apr 2023 20:00:03 GMT) Full text and rfc822 format available.

Message #11 received at 63057 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>,
	63057 <at> debbugs.gnu.org
Subject: [PATCH core-updates 1/3] system: guix: Use config's ACL file location.
Date: Mon, 24 Apr 2023 21:59:03 +0200
* gnu/services/base.scm (substitute-key-authorization): Use %acl-file instead of
hardcoded "/etc/guix/acl".
---
 gnu/services/base.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e8eae72aa2..4adb551796 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -83,6 +83,7 @@ (define-module (gnu services base)
   #:use-module (guix gexp)
   #:use-module (guix records)
   #:use-module (guix modules)
+  #:use-module (guix pki)
   #:use-module ((guix self) #:select (make-config.scm))
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
@@ -1727,19 +1728,19 @@ (define keys
   (with-imported-modules '((guix build utils))
     #~(begin
         (use-modules (guix build utils))
-
+        (define acl-file #$%acl-file)
         ;; If the ACL already exists, move it out of the way.  Create a backup
         ;; if it's a regular file: it's likely that the user manually updated
         ;; it with 'guix archive --authorize'.
-        (if (file-exists? "/etc/guix/acl")
-            (if (and (symbolic-link? "/etc/guix/acl")
-                     (store-file-name? (readlink "/etc/guix/acl")))
-                (delete-file "/etc/guix/acl")
-                (rename-file "/etc/guix/acl" "/etc/guix/acl.bak"))
-            (mkdir-p "/etc/guix"))
+        (if (file-exists? acl-file)
+            (if (and (symbolic-link? acl-file)
+                     (store-file-name? (readlink acl-file)))
+                (delete-file acl-file)
+                (rename-file acl-file (string-append acl-file ".bak")))
+            (mkdir-p (dirname acl-file)))
 
         ;; Installed the declared ACL.
-        (symlink #+default-acl "/etc/guix/acl"))))
+        (symlink #+default-acl acl-file))))
 
 (define %default-authorized-guix-keys
   ;; List of authorized substitute keys.
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#63057; Package guix-patches. (Mon, 24 Apr 2023 20:00:03 GMT) Full text and rfc822 format available.

Message #14 received at 63057 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>,
	63057 <at> debbugs.gnu.org
Subject: [PATCH core-updates 3/3] doc: Add --sysconfdir=/etc to the
 recommended ./configure.
Date: Mon, 24 Apr 2023 21:59:05 +0200
* doc/contributing.texi (Building from Git): Add --sysconfdir=/etc to the
recommended ./configure invocation.
---
 doc/contributing.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 73d1cd2648..2a30b5055a 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -130,7 +130,7 @@ more information.
 Then, run:
 
 @example
-./configure --localstatedir=/var
+./configure --localstatedir=/var --sysconfdir=/etc
 @end example
 
 @noindent
-- 
2.39.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 30 Apr 2023 21:13:02 GMT) Full text and rfc822 format available.

Notification sent to Josselin Poiret <dev <at> jpoiret.xyz>:
bug acknowledged by developer. (Sun, 30 Apr 2023 21:13:02 GMT) Full text and rfc822 format available.

Message #19 received at 63057-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 63057-done <at> debbugs.gnu.org
Subject: Re: bug#63057: [PATCH core-updates 0/3] Some installer fixes
Date: Sun, 30 Apr 2023 23:12:01 +0200
Hi,

Josselin Poiret <dev <at> jpoiret.xyz> skribis:

> This patchset contains one installer fix (the second patch), while both of the
> other patches are fixes that should make installer debugging slightly easier.
> Since (current-guix) inherits the system's sysconfdir, that config variable
> needs to be set properly as well (so /etc for most installs, and not the
> default /usr/local/etc).  Also, the acl file should be placed by the guix
> service in the correct spot, to account for sysconfdirs different from /etc.

All good ideas.

> NB: I'm testing the new `mumi` CLI with this patchset.

Oh, I need to give it a spin!

>   system: guix: Use config's ACL file location.
>   installer: Filter out C.UTF-8 from the list of locales.
>   doc: Add --sysconfdir=/etc to the recommended ./configure.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 29 May 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.