unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63057] [PATCH core-updates 0/3] Some installer fixes
@ 2023-04-24 19:42 Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 1/3] system: guix: Use config's ACL file location Josselin Poiret via Guix-patches via
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-04-24 19:42 UTC (permalink / raw)
  To: 63057; +Cc: Josselin Poiret

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#63057] [PATCH core-updates 1/3] system: guix: Use config's ACL file location.
  2023-04-24 19:42 [bug#63057] [PATCH core-updates 0/3] Some installer fixes Josselin Poiret via Guix-patches via
@ 2023-04-24 19:59 ` Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 2/3] installer: Filter out C.UTF-8 from the list of locales Josselin Poiret via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-04-24 19:59 UTC (permalink / raw)
  To: Josselin Poiret, 63057

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#63057] [PATCH core-updates 2/3] installer: Filter out C.UTF-8 from the list of locales.
  2023-04-24 19:42 [bug#63057] [PATCH core-updates 0/3] Some installer fixes Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 1/3] system: guix: Use config's ACL file location Josselin Poiret via Guix-patches via
@ 2023-04-24 19:59 ` Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 3/3] doc: Add --sysconfdir=/etc to the recommended ./configure Josselin Poiret via Guix-patches via
  2023-04-30 21:12 ` bug#63057: [PATCH core-updates 0/3] Some installer fixes Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-04-24 19:59 UTC (permalink / raw)
  To: Josselin Poiret, 63057

* 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)))
 
 \f
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#63057] [PATCH core-updates 3/3] doc: Add --sysconfdir=/etc to the recommended ./configure.
  2023-04-24 19:42 [bug#63057] [PATCH core-updates 0/3] Some installer fixes Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 1/3] system: guix: Use config's ACL file location Josselin Poiret via Guix-patches via
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 2/3] installer: Filter out C.UTF-8 from the list of locales Josselin Poiret via Guix-patches via
@ 2023-04-24 19:59 ` Josselin Poiret via Guix-patches via
  2023-04-30 21:12 ` bug#63057: [PATCH core-updates 0/3] Some installer fixes Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-04-24 19:59 UTC (permalink / raw)
  To: Josselin Poiret, 63057

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#63057: [PATCH core-updates 0/3] Some installer fixes
  2023-04-24 19:42 [bug#63057] [PATCH core-updates 0/3] Some installer fixes Josselin Poiret via Guix-patches via
                   ` (2 preceding siblings ...)
  2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 3/3] doc: Add --sysconfdir=/etc to the recommended ./configure Josselin Poiret via Guix-patches via
@ 2023-04-30 21:12 ` Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-04-30 21:12 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 63057-done

Hi,

Josselin Poiret <dev@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-01  6:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-24 19:42 [bug#63057] [PATCH core-updates 0/3] Some installer fixes Josselin Poiret via Guix-patches via
2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 1/3] system: guix: Use config's ACL file location Josselin Poiret via Guix-patches via
2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 2/3] installer: Filter out C.UTF-8 from the list of locales Josselin Poiret via Guix-patches via
2023-04-24 19:59 ` [bug#63057] [PATCH core-updates 3/3] doc: Add --sysconfdir=/etc to the recommended ./configure Josselin Poiret via Guix-patches via
2023-04-30 21:12 ` bug#63057: [PATCH core-updates 0/3] Some installer fixes Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).