unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
@ 2021-04-23 18:53 Leo Famulari
  2021-04-23 18:56 ` Leo Famulari
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Leo Famulari @ 2021-04-23 18:53 UTC (permalink / raw)
  To: 47979

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
---
 gnu/installer/services.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index ec5ea30594..440b8c67db 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -103,6 +104,11 @@
       (type 'networking)
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
+     (system-service
+       (name (G_ "Network time service, to set the clock automatically"))
+       (type 'network-management)
+       (snippet '((service ntp-service-type)))
+       (recommended? #t))
 
      ;; Network connectivity management.
      (system-service
-- 
2.31.1





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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-04-23 18:56 ` Leo Famulari
  2021-04-23 22:45   ` Leo Famulari
  2021-12-24 18:04 ` [bug#47979] [PATCH v5] gnu: binutils: Fix CVE-2021-45078 Leo Famulari
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 33+ messages in thread
From: Leo Famulari @ 2021-04-23 18:56 UTC (permalink / raw)
  To: 47979

[-- Attachment #1: Type: text/plain, Size: 123 bytes --]

Hey everyone, please disregard this patch.

It doesn't do what I meant. Sorry for being hasty and sending the wrong
thing.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-23 18:56 ` Leo Famulari
@ 2021-04-23 22:45   ` Leo Famulari
  2021-04-23 23:20     ` Leo Famulari
  2021-04-24  0:56     ` [bug#47979] [PATCH v3] " Leo Famulari
  0 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-04-23 22:45 UTC (permalink / raw)
  To: 47979


[-- Attachment #1.1: Type: text/plain, Size: 2752 bytes --]

Okay, here is a patch that does what I want.

That is, when the user does not select any desktop environments, it
prompts them about enabling NTP, with the checkbox already checked.

However, with this patch, the installer crashes after partitioning, like
this:

------
In ./gnu/installer/services.scm:
     38:0 19 (%system-service-snippet-procedure (#<<system-service> name: "Network time service, to set the clock automatically" type: administration recommended?: #t snippet: ((service ntp-servi…>))
In ice-9/boot-9.scm:
  1669:16 18 (raise-exception _ #:continuable? _)
  1667:16 17 (raise-exception _ #:continuable? _)
  1667:16 16 (raise-exception _ #:continuable? _)
  1667:16 15 (raise-exception _ #:continuable? _)
  1667:16 14 (raise-exception _ #:continuable? _)
  1667:16 13 (raise-exception _ #:continuable? _)
  1667:16 12 (raise-exception _ #:continuable? _)
  1667:16 11 (raise-exception _ #:continuable? _)
  1667:16 10 (raise-exception _ #:continuable? _)
  1667:16  9 (raise-exception _ #:continuable? _)
  1667:16  8 (raise-exception _ #:continuable? _)
  1667:16  7 (raise-exception _ #:continuable? _)
  1764:13  6 (_ #<&compound-exception components: (#<&assertion-failure> #<&origin origin: "struct-vtable"> #<&message message: "Wrong type argument in position 1 (expecting struct): ~S"> #<&irrit…>)
In ice-9/eval.scm:
    619:8  5 (_ #(#(#<directory (guile-user) 7f8be12f4c80> #<<installer> name: newt init: #<procedure init ()> exit: #<procedure exit ()> exit-error: #<procedure exit-error (file key args)> f…>) …))
    619:8  4 (_ #(#(#(#<directory (guile-user) 7f8be12f4c80> #<<installer> name: newt init: #<procedure init ()> exit: #<procedure exit ()> exit-error: #<procedure exit-error (file key arg…>) …) #))
In ice-9/ports.scm:
   463:17  3 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7f8be12f4c80> wrong-type-arg ("struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" ((#<<system-service> name: "Network …>)) …)) #))
    159:9  1 (_ #(#(#<directory (guile-user) 7f8be12f4c80> wrong-type-arg ("struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" ((#<<system-service> name: "Network …>)) …)) #))
In unknown file:
           0 (make-stack #t)
ice-9/eval.scm:159:9: In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): (#<<system-service> name: "Network time service, to set the clock automatically" type: administration recommended?: #t snippet: ((service ntp-service-type)) packages: ()>)
------

So, I've done something wrong. But I don't know what :)

I'm going to keep trying but hopefully somebody can help me.

[-- Attachment #1.2: 0001-installer-Recommend-ntp-service-type-for-non-graphic.patch --]
[-- Type: text/plain, Size: 3698 bytes --]

From c70ed1b6ed621a56ab258cf5cfce45c50cb1831f Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Fri, 23 Apr 2021 14:50:15 -0400
Subject: [PATCH] installer: Recommend 'ntp-service-type' for non-graphical
 systems.

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
---
 gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 74f28e41ba..60c62a52b1 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,6 +69,25 @@ system.")
         (condition
          (&installer-step-abort)))))))
 
+(define (run-system-administration-cbt-page)
+  "Run a page to select various system adminstrative services."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Miscellaneous services")
+      #:info-text (G_ "Select miscellaneous system services to run on your system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -99,5 +119,6 @@ client may be enough for a server.")
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (list (run-network-management-page)
+                      (run-system-administration-cbt-page))
                 '()))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index ec5ea30594..17ff31d2ec 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; System administration
+     (system-service
+       (name (G_ "Network time service, to set the clock automatically"))
+       (type 'administration)
+       (snippet '((service ntp-service-type)))
+       (recommended? #t))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
-- 
2.31.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-23 22:45   ` Leo Famulari
@ 2021-04-23 23:20     ` Leo Famulari
  2021-04-24  0:56     ` [bug#47979] [PATCH v3] " Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-04-23 23:20 UTC (permalink / raw)
  To: 47979

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

On Fri, Apr 23, 2021 at 06:45:59PM -0400, Leo Famulari wrote:
> However, with this patch, the installer crashes after partitioning, like
> this:

By the way, I'm testing this by building the installer in the same way
as our Makefile:

$ guix environment guix -- ./pre-inst-env guix system image -t iso9660 --label="GUIX_x86_64-linux-leo" --system=x86_64-linux gnu/system/install.scm

I create a QEMU disk:

$ qemu-img create -f qcow2 guix-system.img 50G

And then I use the ISO I built, after copying it out of the store:

$ qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm -nic user,model=virtio-net-pci -boot menu=on,order=d -drive file=guix-system.img -drive media=cdrom,file=image.iso

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-23 22:45   ` Leo Famulari
  2021-04-23 23:20     ` Leo Famulari
@ 2021-04-24  0:56     ` Leo Famulari
  2021-05-02  4:36       ` Leo Famulari
  2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
  1 sibling, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-04-24  0:56 UTC (permalink / raw)
  To: 47979


[-- Attachment #1.1: Type: text/plain, Size: 576 bytes --]

On Fri, Apr 23, 2021 at 06:45:59PM -0400, Leo Famulari wrote:
> ice-9/eval.scm:159:9: In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): (#<<system-service> name: "Network time service, to set the clock automatically" type: administration recommended?: #t snippet: ((service ntp-service-type)) packages: ()>)

With Leo Prikler's help on #guix [0], I got it to work :)

I've attached the working patch, as well as a patch to offer the GPM
"console mouse" service on non-graphical systems.

[0] http://logs.guix.gnu.org/guix/2021-04-24.log#012921

[-- Attachment #1.2: 0001-installer-Recommend-ntp-service-type-for-non-graphic.patch --]
[-- Type: text/plain, Size: 3719 bytes --]

From 6f2f131551247aa20794007c43ae61b82f6e34d6 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Fri, 23 Apr 2021 14:50:15 -0400
Subject: [PATCH 1/2] installer: Recommend 'ntp-service-type' for non-graphical
 systems.

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
---
 gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 74f28e41ba..ee003b24b1 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,6 +69,25 @@ system.")
         (condition
          (&installer-step-abort)))))))
 
+(define (run-system-administration-cbt-page)
+  "Run a page to select various system adminstration services."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Miscellaneous services")
+      #:info-text (G_ "Select miscellaneous services to run on your system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -99,5 +119,6 @@ client may be enough for a server.")
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (cons (run-network-management-page)
+                      (run-system-administration-cbt-page))
                 '()))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index ec5ea30594..b50bd3e412 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; Miscellaneous system administration services.
+     (system-service
+       (name (G_ "Network time service, to set the clock automatically"))
+       (type 'administration)
+       (recommended? #t)
+       (snippet '((service ntp-service-type))))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
-- 
2.31.1


[-- Attachment #1.3: 0002-installer-Offer-gpm-service-type-for-non-graphical-s.patch --]
[-- Type: text/plain, Size: 963 bytes --]

From a00274e70d700b9325ad9ab7cd1804d444a5dc37 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Fri, 23 Apr 2021 20:42:28 -0400
Subject: [PATCH 2/2] installer: Offer 'gpm-service-type' for non-graphical
 systems.

* gnu/installer/services.scm (%system-services): Add the gpm-service-type.
---
 gnu/installer/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index b50bd3e412..27beb5da66 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -111,6 +111,10 @@
        (type 'administration)
        (recommended? #t)
        (snippet '((service ntp-service-type))))
+     (system-service
+       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
+       (type 'administration)
+       (snippet '((service gpm-service-type))))
 
      ;; Network connectivity management.
      (system-service
-- 
2.31.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-24  0:56     ` [bug#47979] [PATCH v3] " Leo Famulari
@ 2021-05-02  4:36       ` Leo Famulari
  2021-05-02  9:25         ` Mathieu Othacehe
  2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
  1 sibling, 1 reply; 33+ messages in thread
From: Leo Famulari @ 2021-05-02  4:36 UTC (permalink / raw)
  To: 47979

On Fri, Apr 23, 2021 at 08:56:43PM -0400, Leo Famulari wrote:
> With Leo Prikler's help on #guix [0], I got it to work :)
> 
> I've attached the working patch, as well as a patch to offer the GPM
> "console mouse" service on non-graphical systems.
> 
> [0] http://logs.guix.gnu.org/guix/2021-04-24.log#012921

> From 6f2f131551247aa20794007c43ae61b82f6e34d6 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Fri, 23 Apr 2021 14:50:15 -0400
> Subject: [PATCH 1/2] installer: Recommend 'ntp-service-type' for non-graphical
>  systems.
> 
> We had several bug reports with a root cause of "the clock was
> incorrect" from users who used the installer to install a non-graphical
> Guix System.
> 
> * gnu/installer/services.scm (%system-services): Add the ntp-service-type.
> * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
> variable.
> (run-services-page): Use run-system-administration-cbt-page when not
> installing a desktop.

Ping!

I suppose it's too late for 1.3.0, due to the string freeze.

But I am asking for review anyways.




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

* [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-02  4:36       ` Leo Famulari
@ 2021-05-02  9:25         ` Mathieu Othacehe
  2021-05-02 15:22           ` Leo Famulari
  0 siblings, 1 reply; 33+ messages in thread
From: Mathieu Othacehe @ 2021-05-02  9:25 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


Hey Leo,

> I suppose it's too late for 1.3.0, due to the string freeze.

It looks rather nice, but I'll test it more thoroughly after the
release. Did you make sure that the installer tests are passing with:

make check-system TESTS="gui-installed-os gui-uefi-installed-os
gui-installed-os-encrypted gui-installed-desktop-os-encrypted"

Thanks,

Mathieu





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

* [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-02  9:25         ` Mathieu Othacehe
@ 2021-05-02 15:22           ` Leo Famulari
  0 siblings, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-02 15:22 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

On Sun, May 02, 2021 at 11:25:05AM +0200, Mathieu Othacehe wrote:
> 
> Hey Leo,
> 
> > I suppose it's too late for 1.3.0, due to the string freeze.
> 
> It looks rather nice, but I'll test it more thoroughly after the
> release. Did you make sure that the installer tests are passing with:
> 
> make check-system TESTS="gui-installed-os gui-uefi-installed-os
> gui-installed-os-encrypted gui-installed-desktop-os-encrypted"

I tested it on "bare metal", but I will run the systems tests, too.




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-24  0:56     ` [bug#47979] [PATCH v3] " Leo Famulari
  2021-05-02  4:36       ` Leo Famulari
@ 2021-05-21 12:58       ` Mathieu Othacehe
  2021-05-21 13:37         ` Leo Famulari
                           ` (2 more replies)
  1 sibling, 3 replies; 33+ messages in thread
From: Mathieu Othacehe @ 2021-05-21 12:58 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


Hey Leo,

> +(define (run-system-administration-cbt-page)
> +  "Run a page to select various system adminstration services."
> +  (let ((items (filter (lambda (service)
> +                         (eq? 'administration
> +                              (system-service-type service)))
> +                       %system-services)))
> +    (run-checkbox-tree-page
> +      #:title (G_ "Miscellaneous services")
> +      #:info-text (G_ "Select miscellaneous services to run on your system.")
> +      #:items items
> +      #:selection (map system-service-recommended? items)
> +      #:item->text (compose G_ system-service-name)
> +      #:checkbox-tree-height 5
> +      #:exit-button-callback-procedure
> +      (lambda ()
> +        (raise
> +          (condition
> +            (&installer-step-abort)))))))

Indentation is off here, 

> +     ;; Miscellaneous system administration services.
> +     (system-service
> +       (name (G_ "Network time service, to set the clock automatically"))
> +       (type 'administration)
> +       (recommended? #t)
> +       (snippet '((service ntp-service-type))))
> +

here, 

> +     (system-service
> +       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
> +       (type 'administration)
> +       (snippet '((service gpm-service-type))))

and here. Those patches are breaking the installer tests because they
introduce a new dialog. You need to add something like:

--8<---------------cut here---------------start------------->8---
    ((checkbox-list (title "Miscellaneous services") (text _)
                    (items ,services))
     (filter choose-misc-service? services))
--8<---------------cut here---------------end--------------->8---

in the (gnu installer tests) module, to fix this error:

--8<---------------cut here---------------start------------->8---
conversation expecting pattern ((quote list-selection) ((quote title) "Partitioning method") ((quote multiple-choices?) #f) ((quote items) (not-encrypted encrypted _ ...)))
/gnu/store/h38i2hvaqy9bd0sbn9isdfzl7m56mngr-shepherd-marionette.scm:1:1718: ERROR:
  1. &pattern-not-matched:
      pattern: ((quote list-selection) ((quote title) "Partitioning method") ((quote multiple-choices?) #f) ((quote items) (not-encrypted encrypted _ ...)))
      sexp: (checkbox-list (title "Miscellaneous services") (text "Select miscellaneous services to run on your system.") (items ("Network time service, to set the clock automatically" "GPM mouse daemon, to use the mouse in the console")))
May 21 14:53:11 localhost instaBacktrace:
ller[180]: running form #<newt-form 79dc20> ("Miscellaneous services") with 1 clients 
           2 (primitive-load "/gnu/store/9vzfy688gawwn2p06nn75kiqqz3?")
In ice-9/eval.scm:
   191:35  1 (_ #f)
    619:8  0 (_ #(#<directory (guile-user) 7ffff3bb3f00> #<variabl?>))
--8<---------------cut here---------------end--------------->8---

Otherwise, it looks fine :)

Thanks,

Mathieu




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
@ 2021-05-21 13:37         ` Leo Famulari
  2021-05-21 14:21         ` Leo Famulari
  2021-05-21 21:01         ` Leo Famulari
  2 siblings, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-21 13:37 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

Thanks for the review.

On Fri, May 21, 2021 at 02:58:48PM +0200, Mathieu Othacehe wrote:
> > +(define (run-system-administration-cbt-page)
> > +  "Run a page to select various system adminstration services."
> > +  (let ((items (filter (lambda (service)
> > +                         (eq? 'administration
> > +                              (system-service-type service)))
> > +                       %system-services)))
> > +    (run-checkbox-tree-page
> > +      #:title (G_ "Miscellaneous services")
> > +      #:info-text (G_ "Select miscellaneous services to run on your system.")
> > +      #:items items
> > +      #:selection (map system-service-recommended? items)
> > +      #:item->text (compose G_ system-service-name)
> > +      #:checkbox-tree-height 5
> > +      #:exit-button-callback-procedure
> > +      (lambda ()
> > +        (raise
> > +          (condition
> > +            (&installer-step-abort)))))))
> 
> Indentation is off here, 
> 
> > +     ;; Miscellaneous system administration services.
> > +     (system-service
> > +       (name (G_ "Network time service, to set the clock automatically"))
> > +       (type 'administration)
> > +       (recommended? #t)
> > +       (snippet '((service ntp-service-type))))
> > +
> 
> here, 
> 
> > +     (system-service
> > +       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
> > +       (type 'administration)
> > +       (snippet '((service gpm-service-type))))
> 
> and here.

I don't see the problems. I copied from existing pieces of similar code
and I don't really have a sense of what's right and wrong for indenting
this kind of thing.

> Those patches are breaking the installer tests because they
> introduce a new dialog. You need to add something like:
> 
> --8<---------------cut here---------------start------------->8---
>     ((checkbox-list (title "Miscellaneous services") (text _)
>                     (items ,services))
>      (filter choose-misc-service? services))
> --8<---------------cut here---------------end--------------->8---
> 
> in the (gnu installer tests) module, to fix this error:

Okay, I'll work on that.




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
  2021-05-21 13:37         ` Leo Famulari
@ 2021-05-21 14:21         ` Leo Famulari
  2021-05-21 14:26           ` Leo Famulari
  2021-05-21 14:39           ` Mathieu Othacehe
  2021-05-21 21:01         ` Leo Famulari
  2 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-21 14:21 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

On Fri, May 21, 2021 at 02:58:48PM +0200, Mathieu Othacehe wrote:
> Those patches are breaking the installer tests because they
> introduce a new dialog. You need to add something like:
> 
> --8<---------------cut here---------------start------------->8---
>     ((checkbox-list (title "Miscellaneous services") (text _)
>                     (items ,services))
>      (filter choose-misc-service? services))
> --8<---------------cut here---------------end--------------->8---
> 
> in the (gnu installer tests) module, to fix this error:

How do I run this test? I can never figure out the names of the tests
used by `make check-system`...




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 14:21         ` Leo Famulari
@ 2021-05-21 14:26           ` Leo Famulari
  2021-05-21 14:39           ` Mathieu Othacehe
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-21 14:26 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

On Fri, May 21, 2021 at 10:21:50AM -0400, Leo Famulari wrote:
> On Fri, May 21, 2021 at 02:58:48PM +0200, Mathieu Othacehe wrote:
> > Those patches are breaking the installer tests because they
> > introduce a new dialog. You need to add something like:
> > 
> > --8<---------------cut here---------------start------------->8---
> >     ((checkbox-list (title "Miscellaneous services") (text _)
> >                     (items ,services))
> >      (filter choose-misc-service? services))
> > --8<---------------cut here---------------end--------------->8---
> > 
> > in the (gnu installer tests) module, to fix this error:
> 
> How do I run this test? I can never figure out the names of the tests
> used by `make check-system`...

With informed use of grep I found it:

`make check-system TESTS=iso-image-installer`.




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 14:21         ` Leo Famulari
  2021-05-21 14:26           ` Leo Famulari
@ 2021-05-21 14:39           ` Mathieu Othacehe
  1 sibling, 0 replies; 33+ messages in thread
From: Mathieu Othacehe @ 2021-05-21 14:39 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


> How do I run this test? I can never figure out the names of the tests
> used by `make check-system`...

The installer tests are defined in the (gnu tests install) module. You
can then search for "%test-gui" for all the graphical installation
tests.

You can run all of them by typing:

--8<---------------cut here---------------start------------->8---
make check-system TESTS="gui-installed-os gui-uefi-installed-os
gui-installed-os-encrypted gui-installed-desktop-os-encrypted"
--8<---------------cut here---------------end--------------->8---

Fixing the "gui-installed-os" test should be enough to fix all of them
though.

Thanks,

Mathieu




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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
  2021-05-21 13:37         ` Leo Famulari
  2021-05-21 14:21         ` Leo Famulari
@ 2021-05-21 21:01         ` Leo Famulari
  2021-05-21 21:44           ` Leo Famulari
  2021-06-01  9:49           ` Mathieu Othacehe
  2 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-21 21:01 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979


[-- Attachment #1.1: Type: text/plain, Size: 5187 bytes --]

On Fri, May 21, 2021 at 02:58:48PM +0200, Mathieu Othacehe wrote:
> Those patches are breaking the installer tests because they
> introduce a new dialog. You need to add something like:
> 
> --8<---------------cut here---------------start------------->8---
>     ((checkbox-list (title "Miscellaneous services") (text _)
>                     (items ,services))
>      (filter choose-misc-service? services))
> --8<---------------cut here---------------end--------------->8---
> 
> in the (gnu installer tests) module, to fix this error:

I started implementing this, in the attached v4 patch series.

I tried copying existing code, e.g. the choose-network-service?
part of the tests.

However, it now crashes in a different way when I do `guix environment
guix -- make check-system TESTS=gui-installed-os -j1`:

------
[...]
building /gnu/store/fr1m1ydzpylhm9psk4y9kavk8qb6maq5-Python-3.5.9.tar.xz.drv...
-builder for `/gnu/store/fr1m1ydzpylhm9psk4y9kavk8qb6maq5-Python-3.5.9.tar.xz.drv' failed to produce output path `/gnu/store/f99fblkzb6ip268sg096shhs7wzjyp55-Python-3.5.9.tar.xz'
build of /gnu/store/fr1m1ydzpylhm9psk4y9kavk8qb6maq5-Python-3.5.9.tar.xz.drv failed
View build log at '/var/log/guix/drvs/fr/1m1ydzpylhm9psk4y9kavk8qb6maq5-Python-3.5.9.tar.xz.drv.bz2'.
cannot build derivation `/gnu/store/s7q1xs3mkld23v8541bvrzmq5j5xw5ad-Python-3.5.9.tar.xz.drv': 1 dependencies couldn't be built 
building /gnu/store/1nnawddi9gw8k71figgphhrpn86dzsxl-activate-service.scm.drv...
cannot build derivation `/gnu/store/l2f280iinh1hfp19k49r9vlhnbmbbss8-python-minimal-3.5.9.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/k43m6gi372wzwz0xir1axms8vp2jyv1c-glibc-2.31.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/20flyxbjjl8as5aca4gzf3b54as1gr9z-ntp-4.2.8p15.drv': 1 dependencies couldn't be built 
cannot build derivation `/gnu/store/b1py4d1j3ym2k69zbzi0r3hh08afxkn9-shepherd-ntpd.scm.drv': 1 dependencies couldn't be built 
cannot build derivation `/gnu/store/mf7gj4cn0cb9ml3c4v1n1kg1293jjp57-shepherd-ntpd.go.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/gs4kgf2x2syj64zf6s2r02sclffmf48n-shepherd.conf.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/dy6w4vsvrxzsq9hg8pj7731k6p0z90cg-boot.drv': 1 dependencies couldn't be built
building /gnu/store/15j31c7b2kc4hf03yxpqjsibgkyi40rv-module-import-compiled.drv...
cannot build derivation `/gnu/store/5qkzfk7qmdnvhirsndj5n254y43yqgwz-system.drv': 1 dependencies couldn't be built 
guix system: error: build of `/gnu/store/5qkzfk7qmdnvhirsndj5n254y43yqgwz-system.drv' failed
conversation expecting pCommand failed with exit code 1.           
                                                                                                
Press Enter to continue.                                                                        
attern ((quote installation-complete))                                                          
May 21 22:47:26 localhost shepherd[1]: Service guix-daemon has been stopped. 
May 21 22:47:26 localhost shepherd[1]: Service guix-daemon has been started. 
May 21 22:47:27 localhost installer[219]: command ("guix" "system" "init" "--fallback" "--no-grafts" "--no-substitutes" "/mnt/etc/config.scm" "/mnt") failed with exit code 1                   
May 21 22:47:27 localhost installer[183]: unmounting "/mnt/"             
/gnu/store/5fwnbmlfq6bp37n94j36jdcfapm0mhbz-shepherd-marionette.scm:1:1718: ERROR:                                                                                                              
  1. &pattern-not-matched:                                                                      
      pattern: ((quote installation-complete))                                                  
      sexp: (installation-failure)                                                              
Backtrace:                                                                                      
           2 (primitive-load "/gnu/store/gpxpcz96pdckj3a69q5cjzxaxq5?")                       
In ice-9/eval.scm:                                                                              
   191:35  1 (_ #f)                                                                             
    619:8  0 (_ #(#<directory (guile-user) 7fffefbabf00> #<variabl?>))

ice-9/eval.scm:619:8: Throw to key `marionette-eval-failure' with args `((quote (complete-installation installer-socket)))'.
note: keeping build directory `/tmp/guix-build-installation.drv-8'
builder for `/gnu/store/nphpbnbm3z6xaq8fvl91ihh66n9hhm9m-installation.drv' failed with exit code 1
build of /gnu/store/nphpbnbm3z6xaq8fvl91ihh66n9hhm9m-installation.drv failed
View build log at '/var/log/guix/drvs/np/hpbnbm3z6xaq8fvl91ihh66n9hhm9m-installation.drv.gz'.
cannot build derivation `/gnu/store/50jjjmr51ml9p3qqd5f3kcpbjglmfv4s-gui-installed-os.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/50jjjmr51ml9p3qqd5f3kcpbjglmfv4s-gui-installed-os.drv' failed
make: *** [Makefile:6859: check-system] Error 1
------

I'm a little lost...

[-- Attachment #1.2: v4-installer-Recommend-ntp-service-for-non-graphical-systems.patch --]
[-- Type: text/plain, Size: 6186 bytes --]

From ef1dfe36130fa276ce1b2a4213cde14d649bfbf8 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Fri, 23 Apr 2021 14:50:15 -0400
Subject: [PATCH v4 1/2] installer: Recommend 'ntp-service-type' for
 non-graphical systems.

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
* gnu/installer/tests.scm (choose-services): Add and use a
choose-misc-service?  procedure.
---
 gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 gnu/installer/tests.scm         | 11 +++++++++--
 3 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 74f28e41ba..ee003b24b1 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,6 +69,25 @@ system.")
         (condition
          (&installer-step-abort)))))))
 
+(define (run-system-administration-cbt-page)
+  "Run a page to select various system adminstration services."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Miscellaneous services")
+      #:info-text (G_ "Select miscellaneous services to run on your system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -99,5 +119,6 @@ client may be enough for a server.")
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (cons (run-network-management-page)
+                      (run-system-administration-cbt-page))
                 '()))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index ec5ea30594..1dae40daec 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; Miscellaneous system administration services.
+     (system-service
+       (name (G_ "Network time service (NTP), to set the clock automatically"))
+       (type 'administration)
+       (recommended? #t)
+       (snippet '((service ntp-service-type))))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 8ccd327a7c..7a4989ef88 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -220,7 +220,11 @@ ROOT-PASSWORD, and USERS."
                                  (string-contains service "NSS"))))
                           (choose-network-management-tool?
                            (lambda (service)
-                             (string-contains service "DHCP"))))
+                             (string-contains service "DHCP")))
+                          (choose-misc-service?
+                           (lambda (service)
+                             (string-contains service "NTP"))))
+
   "Converse over PORT to choose networking services."
   (define desktop-environments '())
 
@@ -240,7 +244,10 @@ ROOT-PASSWORD, and USERS."
                      (multiple-choices? #f)
                      (items ,services))
      (null? desktop-environments)
-     (find choose-network-management-tool? services))))
+     (find choose-network-management-tool? services))
+    ((checkbox-list (title "Miscellaneous services") (text _)
+                     (items ,services))
+     (filter choose-misc-service? services))))
 
 (define (edit-configuration-file file)
   "Edit FILE, an operating system configuration file generated by the
-- 
2.31.1


From 8fa2cd50e36835358c0533ded36674d5499b76fe Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Fri, 23 Apr 2021 20:42:28 -0400
Subject: [PATCH v4 2/2] installer: Offer 'gpm-service-type' for non-graphical
 systems.

* gnu/installer/services.scm (%system-services): Add the gpm-service-type.
---
 gnu/installer/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 1dae40daec..91b22c6f19 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -111,6 +111,10 @@
        (type 'administration)
        (recommended? #t)
        (snippet '((service ntp-service-type))))
+     (system-service
+       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
+       (type 'administration)
+       (snippet '((service gpm-service-type))))
 
      ;; Network connectivity management.
      (system-service
-- 
2.31.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 21:01         ` Leo Famulari
@ 2021-05-21 21:44           ` Leo Famulari
  2021-06-01  9:49           ` Mathieu Othacehe
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-05-21 21:44 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

On Fri, May 21, 2021 at 05:01:36PM -0400, Leo Famulari wrote:
> I tried copying existing code, e.g. the choose-network-service?
> part of the tests.

The tests succeed when I amend the v4 patch to do "(choose-misc-service?
(const #f))" in (gnu installer tests).

I'm not really sure what it means :/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-05-21 21:01         ` Leo Famulari
  2021-05-21 21:44           ` Leo Famulari
@ 2021-06-01  9:49           ` Mathieu Othacehe
  1 sibling, 0 replies; 33+ messages in thread
From: Mathieu Othacehe @ 2021-06-01  9:49 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


Hey Leo,

> cannot build derivation `/gnu/store/20flyxbjjl8as5aca4gzf3b54as1gr9z-ntp-4.2.8p15.drv': 1 dependencies couldn't be built 

The installation tests are run in a network isolated environment. This
means that we need to make sure that every single derivation that will
be needed during the installation is made available.

It is for sure a tricky business. If you have a look to the error line I
pasted above, you will see that the installer tries to build the ntp
package because the ntp-service-type is now included.

The following patch fixes the "gui-installed-os" test by making sure
that the ntp package is available in the installation environment. I did
not check for the other installation tests.

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index b5263f5f0d..e9ebc63b64 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1608,8 +1608,9 @@ build (current-guix) and then store a couple of full system images.")
     (swap-devices (if encrypted?
                       '()
                       (list (uuid "11111111-2222-3333-4444-123456789abc"))))
-    (services (cons (service dhcp-client-service-type)
-                    (operating-system-user-services %minimal-os-on-vda)))))
+    (services (cons* (service dhcp-client-service-type)
+                     (service ntp-service-type)
+                     (operating-system-user-services %minimal-os-on-vda)))))
 
 (define* (installation-target-desktop-os-for-gui-tests
           #:key (encrypted? #f))
--8<---------------cut here---------------end--------------->8---

Thanks,

Mathieu




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

* [bug#47979] [PATCH v5] gnu: binutils: Fix CVE-2021-45078.
  2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-04-23 18:56 ` Leo Famulari
@ 2021-12-24 18:04 ` Leo Famulari
  2021-12-24 18:04 ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-24 18:04 UTC (permalink / raw)
  To: 47979

* gnu/packages/patches/binutils-CVE-2021-45078.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/base.scm (binutils)[source]: Use it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/base.scm                         |   3 +-
 .../patches/binutils-CVE-2021-45078.patch     | 257 ++++++++++++++++++
 3 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/binutils-CVE-2021-45078.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index aa0117a3f5..546b940eb6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -906,6 +906,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/binutils-loongson-workaround.patch	\
   %D%/packages/patches/binutils-mingw-w64-timestamp.patch	\
   %D%/packages/patches/binutils-mingw-w64-deterministic.patch	\
+  %D%/packages/patches/binutils-CVE-2021-45078.patch		\
   %D%/packages/patches/blender-2.79-gcc8.patch			\
   %D%/packages/patches/blender-2.79-gcc9.patch			\
   %D%/packages/patches/blender-2.79-newer-ffmpeg.patch		\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 12e4de52d4..be6fbf608d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -521,7 +521,8 @@ (define-public binutils
       (sha256
        (base32 "1m3b2rdfv1dmdpd0bzg1hy7i8a2qng53szc6livyi3nh6101mz37"))
       (patches (search-patches "binutils-loongson-workaround.patch"
-                               "binutils-2.37-file-descriptor-leak.patch"))))
+                               "binutils-2.37-file-descriptor-leak.patch"
+                               "binutils-CVE-2021-45078.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
diff --git a/gnu/packages/patches/binutils-CVE-2021-45078.patch b/gnu/packages/patches/binutils-CVE-2021-45078.patch
new file mode 100644
index 0000000000..fca692bdb5
--- /dev/null
+++ b/gnu/packages/patches/binutils-CVE-2021-45078.patch
@@ -0,0 +1,257 @@
+Fix CVE-2021-45078 (incomplete fix for CVE-2018-12699):
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45078
+https://sourceware.org/bugzilla/show_bug.cgi?id=28694
+
+Patch copied from upstream source repository:
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=161e87d12167b1e36193385485c1f6ce92f74f02
+
+From 161e87d12167b1e36193385485c1f6ce92f74f02 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 15 Dec 2021 11:48:42 +1030
+Subject: [PATCH] PR28694, Out-of-bounds write in stab_xcoff_builtin_type
+
+	PR 28694
+	* stabs.c (stab_xcoff_builtin_type): Make typenum unsigned.
+	Negate typenum earlier, simplifying bounds checking.  Correct
+	off-by-one indexing.  Adjust switch cases.
+---
+ binutils/stabs.c | 87 ++++++++++++++++++++++++------------------------
+ 1 file changed, 43 insertions(+), 44 deletions(-)
+
+diff --git a/binutils/stabs.c b/binutils/stabs.c
+index 274bfb0e7fa..83ee3ea5fa4 100644
+--- a/binutils/stabs.c
++++ b/binutils/stabs.c
+@@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *);
+ static bool stab_record_type
+   (void *, struct stab_handle *, const int *, debug_type);
+ static debug_type stab_xcoff_builtin_type
+-  (void *, struct stab_handle *, int);
++  (void *, struct stab_handle *, unsigned int);
+ static debug_type stab_find_tagged_type
+   (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
+ static debug_type *stab_demangle_argtypes
+@@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
+ 
+ static debug_type
+ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
+-			 int typenum)
++			 unsigned int typenum)
+ {
+   debug_type rettype;
+   const char *name;
+ 
+-  if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT)
++  typenum = -typenum - 1;
++  if (typenum >= XCOFF_TYPE_COUNT)
+     {
+-      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum);
++      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1);
+       return DEBUG_TYPE_NULL;
+     }
+-  if (info->xcoff_types[-typenum] != NULL)
+-    return info->xcoff_types[-typenum];
++  if (info->xcoff_types[typenum] != NULL)
++    return info->xcoff_types[typenum];
+ 
+-  switch (-typenum)
++  switch (typenum)
+     {
+-    case 1:
++    case 0:
+       /* The size of this and all the other types are fixed, defined
+ 	 by the debugging format.  */
+       name = "int";
+       rettype = debug_make_int_type (dhandle, 4, false);
+       break;
+-    case 2:
++    case 1:
+       name = "char";
+       rettype = debug_make_int_type (dhandle, 1, false);
+       break;
+-    case 3:
++    case 2:
+       name = "short";
+       rettype = debug_make_int_type (dhandle, 2, false);
+       break;
+-    case 4:
++    case 3:
+       name = "long";
+       rettype = debug_make_int_type (dhandle, 4, false);
+       break;
+-    case 5:
++    case 4:
+       name = "unsigned char";
+       rettype = debug_make_int_type (dhandle, 1, true);
+       break;
+-    case 6:
++    case 5:
+       name = "signed char";
+       rettype = debug_make_int_type (dhandle, 1, false);
+       break;
+-    case 7:
++    case 6:
+       name = "unsigned short";
+       rettype = debug_make_int_type (dhandle, 2, true);
+       break;
+-    case 8:
++    case 7:
+       name = "unsigned int";
+       rettype = debug_make_int_type (dhandle, 4, true);
+       break;
+-    case 9:
++    case 8:
+       name = "unsigned";
+       rettype = debug_make_int_type (dhandle, 4, true);
+       break;
+-    case 10:
++    case 9:
+       name = "unsigned long";
+       rettype = debug_make_int_type (dhandle, 4, true);
+       break;
+-    case 11:
++    case 10:
+       name = "void";
+       rettype = debug_make_void_type (dhandle);
+       break;
+-    case 12:
++    case 11:
+       /* IEEE single precision (32 bit).  */
+       name = "float";
+       rettype = debug_make_float_type (dhandle, 4);
+       break;
+-    case 13:
++    case 12:
+       /* IEEE double precision (64 bit).  */
+       name = "double";
+       rettype = debug_make_float_type (dhandle, 8);
+       break;
+-    case 14:
++    case 13:
+       /* This is an IEEE double on the RS/6000, and different machines
+ 	 with different sizes for "long double" should use different
+ 	 negative type numbers.  See stabs.texinfo.  */
+       name = "long double";
+       rettype = debug_make_float_type (dhandle, 8);
+       break;
+-    case 15:
++    case 14:
+       name = "integer";
+       rettype = debug_make_int_type (dhandle, 4, false);
+       break;
+-    case 16:
++    case 15:
+       name = "boolean";
+       rettype = debug_make_bool_type (dhandle, 4);
+       break;
+-    case 17:
++    case 16:
+       name = "short real";
+       rettype = debug_make_float_type (dhandle, 4);
+       break;
+-    case 18:
++    case 17:
+       name = "real";
+       rettype = debug_make_float_type (dhandle, 8);
+       break;
+-    case 19:
++    case 18:
+       /* FIXME */
+       name = "stringptr";
+       rettype = NULL;
+       break;
+-    case 20:
++    case 19:
+       /* FIXME */
+       name = "character";
+       rettype = debug_make_int_type (dhandle, 1, true);
+       break;
+-    case 21:
++    case 20:
+       name = "logical*1";
+       rettype = debug_make_bool_type (dhandle, 1);
+       break;
+-    case 22:
++    case 21:
+       name = "logical*2";
+       rettype = debug_make_bool_type (dhandle, 2);
+       break;
+-    case 23:
++    case 22:
+       name = "logical*4";
+       rettype = debug_make_bool_type (dhandle, 4);
+       break;
+-    case 24:
++    case 23:
+       name = "logical";
+       rettype = debug_make_bool_type (dhandle, 4);
+       break;
+-    case 25:
++    case 24:
+       /* Complex type consisting of two IEEE single precision values.  */
+       name = "complex";
+       rettype = debug_make_complex_type (dhandle, 8);
+       break;
+-    case 26:
++    case 25:
+       /* Complex type consisting of two IEEE double precision values.  */
+       name = "double complex";
+       rettype = debug_make_complex_type (dhandle, 16);
+       break;
+-    case 27:
++    case 26:
+       name = "integer*1";
+       rettype = debug_make_int_type (dhandle, 1, false);
+       break;
+-    case 28:
++    case 27:
+       name = "integer*2";
+       rettype = debug_make_int_type (dhandle, 2, false);
+       break;
+-    case 29:
++    case 28:
+       name = "integer*4";
+       rettype = debug_make_int_type (dhandle, 4, false);
+       break;
+-    case 30:
++    case 29:
+       /* FIXME */
+       name = "wchar";
+       rettype = debug_make_int_type (dhandle, 2, false);
+       break;
+-    case 31:
++    case 30:
+       name = "long long";
+       rettype = debug_make_int_type (dhandle, 8, false);
+       break;
+-    case 32:
++    case 31:
+       name = "unsigned long long";
+       rettype = debug_make_int_type (dhandle, 8, true);
+       break;
+-    case 33:
++    case 32:
+       name = "logical*8";
+       rettype = debug_make_bool_type (dhandle, 8);
+       break;
+-    case 34:
++    case 33:
+       name = "integer*8";
+       rettype = debug_make_int_type (dhandle, 8, false);
+       break;
+@@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
+     }
+ 
+   rettype = debug_name_type (dhandle, name, rettype);
+-
+-  info->xcoff_types[-typenum] = rettype;
+-
++  info->xcoff_types[typenum] = rettype;
+   return rettype;
+ }
+ 
+-- 
+2.27.0
+
-- 
2.34.0





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

* [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-04-23 18:56 ` Leo Famulari
  2021-12-24 18:04 ` [bug#47979] [PATCH v5] gnu: binutils: Fix CVE-2021-45078 Leo Famulari
@ 2021-12-24 18:04 ` Leo Famulari
  2021-12-24 18:04   ` [bug#47979] [PATCH v5 2/2] installer: Offer 'gpm-service-type' " Leo Famulari
  2021-12-24 18:14   ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' " Leo Famulari
  2021-12-26 20:31 ` [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
  2021-12-27 22:24 ` [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
  4 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-24 18:04 UTC (permalink / raw)
  To: 47979

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
* gnu/installer/tests.scm (choose-services): Add and use a
choose-misc-service?  procedure.
* gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add
ntp-service-type.
---
 gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 gnu/installer/tests.scm         | 10 +++++++++-
 gnu/tests/install.scm           |  5 +++--
 4 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 1af4e7df2d..56cb3f6787 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,6 +91,25 @@ (define (run-other-services-cbt-page)
         (condition
          (&installer-step-abort)))))))
 
+(define (run-system-administration-cbt-page)
+  "Run a page to select various system adminstration services."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Miscellaneous services")
+      #:info-text (G_ "Select miscellaneous services to run on your system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -121,6 +141,7 @@ (define (run-services-page)
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (cons (run-network-management-page)
+                      (run-system-administration-cbt-page))
                 '())
             (run-other-services-cbt-page))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 341d8b69c8..94c49307f0 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@ (define %system-services
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; Miscellaneous system administration services.
+     (system-service
+       (name (G_ "Network time service (NTP), to set the clock automatically"))
+       (type 'administration)
+       (recommended? #t)
+       (snippet '((service ntp-service-type))))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 12d1d91608..dc2371ce97 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -221,7 +221,11 @@ (define* (choose-services port
                           (choose-network-management-tool?
                            (lambda (service)
                              (string-contains service "DHCP")))
-                          (choose-other-service? (const #f)))
+                          (choose-other-service? (const #f))
+                          (choose-misc-service?
+                           (lambda (service)
+                             (string-contains service "NTP"))))
+
   "Converse over PORT to choose services."
   (define desktop-environments '())
 
@@ -243,6 +247,10 @@ (define desktop-environments '())
      (null? desktop-environments)
      (find choose-network-management-tool? services))
 
+    ((checkbox-list (title "Miscellaneous services") (text _)
+                     (items ,services))
+     (filter choose-misc-service? services))
+
     ((checkbox-list (title "Other services") (text _)
                     (items ,services))
      (filter choose-other-service? services))))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 154f98b2e1..ae8c6051f1 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1685,8 +1685,9 @@ (define* (installation-target-os-for-gui-tests
          (list
           (swap-space
            (target (uuid "11111111-2222-3333-4444-123456789abc"))))))
-    (services (cons (service dhcp-client-service-type)
-                    (operating-system-user-services %minimal-os-on-vda)))))
+    (services (cons* (service dhcp-client-service-type)
+                     (service ntp-service-type)
+                     (operating-system-user-services %minimal-os-on-vda)))))
 
 (define* (installation-target-desktop-os-for-gui-tests
           #:key (encrypted? #f))
-- 
2.34.0





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

* [bug#47979] [PATCH v5 2/2] installer: Offer 'gpm-service-type' for non-graphical systems.
  2021-12-24 18:04 ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-24 18:04   ` Leo Famulari
  2021-12-24 18:14   ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' " Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-24 18:04 UTC (permalink / raw)
  To: 47979

* gnu/installer/services.scm (%system-services): Add the gpm-service-type.
---
 gnu/installer/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 94c49307f0..be6e75cbc4 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -111,6 +111,10 @@ (define %system-services
        (type 'administration)
        (recommended? #t)
        (snippet '((service ntp-service-type))))
+     (system-service
+       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
+       (type 'administration)
+       (snippet '((service gpm-service-type))))
 
      ;; Network connectivity management.
      (system-service
-- 
2.34.0





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

* [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-24 18:04 ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-12-24 18:04   ` [bug#47979] [PATCH v5 2/2] installer: Offer 'gpm-service-type' " Leo Famulari
@ 2021-12-24 18:14   ` Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-24 18:14 UTC (permalink / raw)
  To: 47979; +Cc: Tobias Geerinckx-Rice, Maxim Cournoyer

On Fri, Dec 24, 2021 at 01:04:40PM -0500, Leo Famulari wrote:
> We had several bug reports with a root cause of "the clock was
> incorrect" from users who used the installer to install a non-graphical
> Guix System.
> 
> * gnu/installer/services.scm (%system-services): Add the ntp-service-type.
> * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
> variable.
> (run-services-page): Use run-system-administration-cbt-page when not
> installing a desktop.
> * gnu/installer/tests.scm (choose-services): Add and use a
> choose-misc-service?  procedure.
> * gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add
> ntp-service-type.

This v5 patch series is rebased on current master.

It passes `make check-system TESTS="gui-installed-os"`.

When a desktop environment is not selected, it adds a page to the
installer suggesting NTP, and offering GPM (console mouse).

I would have said that it's ready to go, but commit 6f13881f1e92
"installer: Offer the CUPS printing service." also added a page to the
installer offering NTP, unconditionally. That is because the
run-other-services page that it adds offers all recommended services.

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6f13881f1e92832023caadb3cb51ce393e685e58

However, that breaks the installation, because NTP is provided by
%desktop-services, and services may not be duplicated in config.scm.

So, we need to adjust the functionality added by 6f13881f1e92. I think
we should only offer NTP when the user does not choose any desktops.

If you'd like to test these patches, you can follow the steps described
previously:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47979#14

I still think we need to ensure that NTP is either enabled or suggested
for all installations. I remember the wave of bug reports due to "clock
is wrong" after 1.3.0.




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

* [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page.
  2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
                   ` (2 preceding siblings ...)
  2021-12-24 18:04 ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-26 20:31 ` Leo Famulari
  2021-12-26 20:31   ` [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-12-26 20:31   ` [bug#47979] [PATCH v6 3/3] installer: Offer 'gpm-service-type' " Leo Famulari
  2021-12-27 22:24 ` [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
  4 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-26 20:31 UTC (permalink / raw)
  To: 47979

Currently, this page of the installer offers to the user all installer services
that are not of the types 'desktop', 'network-management', or 'networking'.
Concretely, this means that it offers the CUPS printing service, because that
is the only service of a different type defined in the installer.

In later commits, we will add some services of a new type, and we only want them
to be offered when the user is installing a non-graphical system.

At least one of these new services (NTP) is part of %desktop-services. If it
were offered on run-other-services-cbt-page, and the user had configured a
system using %desktop-services, the user could accidentally add NTP to their
services twice, which is an error and would break installation.

So, this commit makes the run-other-services-cbt-page be more specific about
what services to offer. This allows us to later create a new checkbox page that
only runs when %desktop-services is not selected.

* gnu/installer/newt/services.scm (run-other-services-cbt-page): Rename to ...
(run-printing-services-cbt-page): ... new variable, and select only 'document' services.
(run-services-page): Adjust accordingly.
* gnu/installer/tests.scm (choose-services): Adjust accordingly.
---
 gnu/installer/newt/services.scm | 16 +++++++---------
 gnu/installer/tests.scm         |  2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 1af4e7df2d..b4b5219b20 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -68,18 +68,16 @@ (define (run-networking-cbt-page)
         (condition
          (&installer-step-abort)))))))
 
-(define (run-other-services-cbt-page)
-  "Run a page allowing the user to select other services."
+(define (run-printing-services-cbt-page)
+  "Run a page allowing the user to select document services such as CUPS."
   (let ((items (filter (lambda (service)
-                         (not (member (system-service-type service)
-                                      '(desktop
-                                        network-management
-                                        networking))))
+                         (eq? 'document
+                              (system-service-type service)))
                        %system-services)))
     (run-checkbox-tree-page
-     #:info-text (G_ "You can now select other services to run on your \
+     #:info-text (G_ "You can now select the CUPS printing service to run on your \
 system.")
-     #:title (G_ "Other services")
+     #:title (G_ "Printing and document services")
      #:items items
      #:selection (map system-service-recommended? items)
      #:item->text (compose G_ system-service-name)
@@ -123,4 +121,4 @@ (define (run-services-page)
             (if (null? desktop)
                 (list (run-network-management-page))
                 '())
-            (run-other-services-cbt-page))))
+            (run-printing-services-cbt-page))))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 12d1d91608..5d931149b8 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -243,7 +243,7 @@ (define desktop-environments '())
      (null? desktop-environments)
      (find choose-network-management-tool? services))
 
-    ((checkbox-list (title "Other services") (text _)
+    ((checkbox-list (title "Printing and document services") (text _)
                     (items ,services))
      (filter choose-other-service? services))))
 
-- 
2.34.0





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

* [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-26 20:31 ` [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
@ 2021-12-26 20:31   ` Leo Famulari
  2021-12-26 20:33     ` Leo Famulari
  2021-12-26 20:31   ` [bug#47979] [PATCH v6 3/3] installer: Offer 'gpm-service-type' " Leo Famulari
  1 sibling, 1 reply; 33+ messages in thread
From: Leo Famulari @ 2021-12-26 20:31 UTC (permalink / raw)
  To: 47979

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
* gnu/installer/tests.scm (choose-services): Add and use a
choose-misc-service?  procedure.
* gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add
ntp-service-type.
---
 gnu/installer/newt/services.scm | 25 ++++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 gnu/installer/tests.scm         | 10 +++++++++-
 gnu/tests/install.scm           |  5 +++--
 4 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index b4b5219b20..c218825813 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,27 @@ (define (run-printing-services-cbt-page)
         (condition
          (&installer-step-abort)))))))
 
+(define (run-console-services-cbt-page)
+  "Run a page to select various system adminstration services for non-graphical
+systems."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Console services")
+      #:info-text (G_ "Select miscellaneous services to run on your \
+non-graphical system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -119,6 +141,7 @@ (define (run-services-page)
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (cons (run-network-management-page)
+                      (run-console-services-cbt-page))
                 '())
             (run-printing-services-cbt-page))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 341d8b69c8..94c49307f0 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@ (define %system-services
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; Miscellaneous system administration services.
+     (system-service
+       (name (G_ "Network time service (NTP), to set the clock automatically"))
+       (type 'administration)
+       (recommended? #t)
+       (snippet '((service ntp-service-type))))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 5d931149b8..39be59f689 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -221,7 +221,11 @@ (define* (choose-services port
                           (choose-network-management-tool?
                            (lambda (service)
                              (string-contains service "DHCP")))
-                          (choose-other-service? (const #f)))
+                          (choose-other-service? (const #f))
+                          (choose-misc-service?
+                           (lambda (service)
+                             (string-contains service "NTP"))))
+
   "Converse over PORT to choose services."
   (define desktop-environments '())
 
@@ -243,6 +247,10 @@ (define desktop-environments '())
      (null? desktop-environments)
      (find choose-network-management-tool? services))
 
+    ((checkbox-list (title "Console services") (text _)
+                     (items ,services))
+     (filter choose-misc-service? services))
+
     ((checkbox-list (title "Printing and document services") (text _)
                     (items ,services))
      (filter choose-other-service? services))))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 154f98b2e1..ae8c6051f1 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1685,8 +1685,9 @@ (define* (installation-target-os-for-gui-tests
          (list
           (swap-space
            (target (uuid "11111111-2222-3333-4444-123456789abc"))))))
-    (services (cons (service dhcp-client-service-type)
-                    (operating-system-user-services %minimal-os-on-vda)))))
+    (services (cons* (service dhcp-client-service-type)
+                     (service ntp-service-type)
+                     (operating-system-user-services %minimal-os-on-vda)))))
 
 (define* (installation-target-desktop-os-for-gui-tests
           #:key (encrypted? #f))
-- 
2.34.0





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

* [bug#47979] [PATCH v6 3/3] installer: Offer 'gpm-service-type' for non-graphical systems.
  2021-12-26 20:31 ` [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
  2021-12-26 20:31   ` [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-26 20:31   ` Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-26 20:31 UTC (permalink / raw)
  To: 47979

* gnu/installer/services.scm (%system-services): Add the gpm-service-type.
---
 gnu/installer/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 94c49307f0..be6e75cbc4 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -111,6 +111,10 @@ (define %system-services
        (type 'administration)
        (recommended? #t)
        (snippet '((service ntp-service-type))))
+     (system-service
+       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
+       (type 'administration)
+       (snippet '((service gpm-service-type))))
 
      ;; Network connectivity management.
      (system-service
-- 
2.34.0





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

* [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-26 20:31   ` [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-26 20:33     ` Leo Famulari
  2021-12-26 21:06       ` Mathieu Othacehe
  0 siblings, 1 reply; 33+ messages in thread
From: Leo Famulari @ 2021-12-26 20:33 UTC (permalink / raw)
  To: 47979

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

On Sun, Dec 26, 2021 at 03:31:30PM -0500, Leo Famulari wrote:
> We had several bug reports with a root cause of "the clock was
> incorrect" from users who used the installer to install a non-graphical
> Guix System.
> 
> * gnu/installer/services.scm (%system-services): Add the ntp-service-type.
> * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
> variable.
> (run-services-page): Use run-system-administration-cbt-page when not
> installing a desktop.
> * gnu/installer/tests.scm (choose-services): Add and use a
> choose-misc-service?  procedure.
> * gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add
> ntp-service-type.

Here's v6 of this patch series.

With it, the installer successfully installs systems with and without
%desktop-services, and correctly chooses whether or not to offer NTP and
GPM.

It also passes `make check-system TESTS="gui-installed-os"`.

I think it's ready to go.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-26 20:33     ` Leo Famulari
@ 2021-12-26 21:06       ` Mathieu Othacehe
  2021-12-27  0:57         ` Leo Famulari
  0 siblings, 1 reply; 33+ messages in thread
From: Mathieu Othacehe @ 2021-12-26 21:06 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


Hello Leo,

> It also passes `make check-system TESTS="gui-installed-os"`.

Nice! You might also want to check that the
gui-installed-desktop-os-encrypted test is passing as it covers desktop
installation. Otherwise, it LGTM.

Thanks,

Mathieu




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

* [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-26 21:06       ` Mathieu Othacehe
@ 2021-12-27  0:57         ` Leo Famulari
  0 siblings, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-27  0:57 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979

On Sun, Dec 26, 2021 at 10:06:09PM +0100, Mathieu Othacehe wrote:
> Nice! You might also want to check that the
> gui-installed-desktop-os-encrypted test is passing as it covers desktop
> installation. Otherwise, it LGTM.

Good idea, these changes did break that test. I'm tweaking the patches
now and re-testing.




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

* [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page.
  2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
                   ` (3 preceding siblings ...)
  2021-12-26 20:31 ` [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
@ 2021-12-27 22:24 ` Leo Famulari
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 3/3] installer: Offer 'gpm-service-type' " Leo Famulari
  4 siblings, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-27 22:24 UTC (permalink / raw)
  To: 47979

Currently, this page of the installer offers to the user all installer services
that are not of the types 'desktop', 'network-management', or 'networking'.
Concretely, this means that it offers the CUPS printing service, because that
is the only service of a different type defined in the installer.

In later commits, we will add some services of a new type, and we only want them
to be offered when the user is installing a non-graphical system.

At least one of these new services (NTP) is part of %desktop-services. If it
were offered on run-other-services-cbt-page, and the user had configured a
system using %desktop-services, the user could accidentally add NTP to their
services twice, which is an error and would break installation.

So, this commit makes the run-other-services-cbt-page be more specific about
what services to offer. This allows us to later create a new checkbox page that
only runs when %desktop-services is not selected.

* gnu/installer/newt/services.scm (run-other-services-cbt-page): Rename to ...
(run-printing-services-cbt-page): ... new variable, and select only 'document' services.
(run-services-page): Adjust accordingly.
* gnu/installer/tests.scm (choose-services): Adjust accordingly.
---
 gnu/installer/newt/services.scm | 16 +++++++---------
 gnu/installer/tests.scm         |  2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 1af4e7df2d..b4b5219b20 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -68,18 +68,16 @@ (define (run-networking-cbt-page)
         (condition
          (&installer-step-abort)))))))
 
-(define (run-other-services-cbt-page)
-  "Run a page allowing the user to select other services."
+(define (run-printing-services-cbt-page)
+  "Run a page allowing the user to select document services such as CUPS."
   (let ((items (filter (lambda (service)
-                         (not (member (system-service-type service)
-                                      '(desktop
-                                        network-management
-                                        networking))))
+                         (eq? 'document
+                              (system-service-type service)))
                        %system-services)))
     (run-checkbox-tree-page
-     #:info-text (G_ "You can now select other services to run on your \
+     #:info-text (G_ "You can now select the CUPS printing service to run on your \
 system.")
-     #:title (G_ "Other services")
+     #:title (G_ "Printing and document services")
      #:items items
      #:selection (map system-service-recommended? items)
      #:item->text (compose G_ system-service-name)
@@ -123,4 +121,4 @@ (define (run-services-page)
             (if (null? desktop)
                 (list (run-network-management-page))
                 '())
-            (run-other-services-cbt-page))))
+            (run-printing-services-cbt-page))))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 12d1d91608..5d931149b8 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -243,7 +243,7 @@ (define desktop-environments '())
      (null? desktop-environments)
      (find choose-network-management-tool? services))
 
-    ((checkbox-list (title "Other services") (text _)
+    ((checkbox-list (title "Printing and document services") (text _)
                     (items ,services))
      (filter choose-other-service? services))))
 
-- 
2.34.0





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

* [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-27 22:24 ` [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
@ 2021-12-27 22:24   ` Leo Famulari
  2021-12-27 23:53     ` Leo Famulari
  2021-12-28  4:54     ` Leo Famulari
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 3/3] installer: Offer 'gpm-service-type' " Leo Famulari
  1 sibling, 2 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-27 22:24 UTC (permalink / raw)
  To: 47979

The system test "gui-installed-os" passes with this commit, but
"gui-installed-desktop-os-encrypted" fails like this:

------
[...]
conversation expecting pattern ((quote checkbox-list) ((quote title) "Network service") ((quote text) _) ((quote items) services))
Dec 27 23:03:44 localhost installer[194]: form #<newt-form 176e9c0> ("Network service"): client 19 replied () 
Dec 27 23:03:44 localhost installer[194]: running form #<newt-form 171ae70> ("Network management") with 1 clients 
conversation expecting pattern ((quote list-selection) ((quote title) "Network management") ((quote multiple-choices?) #f) ((quote items) services))
Dec 27 23:03:44 localhost installer[194]: form #<newt-form 171ae70> ("Network management"): client 19 replied "DHCP client (dynamic IP address assignment)" 
Dec 27 23:03:44 localhost installer[194]: running form #<newt-form 176fcb0> ("Console services") with 1 clients 
conversation expecting pattern ((quote checkbox-list) ((quote title) "Console services") ((quote text) _) ((quote items) services) ((quote null?) (quote desktop-environments)))
/gnu/store/bvbv7a5nfzqwq5d7z33kqr8yzx1q5x70-shepherd-marionette.scm:1:1718: ERROR:
  1. &pattern-not-matched:
      pattern: ((quote checkbox-list) ((quote title) "Console services") ((quote text) _) ((quote items) services) ((quote null?) (quote desktop-environments)))
      sexp: (checkbox-list (title "Console services") (text "Select miscellaneous services to run on your non-graphical system.") (items ("Network time service (NTP), to set the clock automat)
Backtrace:
           2 (primitive-load "/gnu/store/ipxa2igymg4j2b84ivka5qcp5bs?")
In ice-9/eval.scm:
   191:35  1 (_ #f)
    619:8  0 (_ #(#<directory (guile-user) 7ffff5fdbc80> #<variabl?>))

ice-9/eval.scm:619:8: Throw to key `marionette-eval-failure' with args `((quote (choose-services installer-socket #:choose-desktop-environment? (const #f) #:choose-network-service? (const #f).
note: keeping build directory `/tmp/guix-build-installation.drv-9'
builder for `/gnu/store/792rdywf5nzn6rs4as5v9la5sdbwqrjp-installation.drv' failed with exit code 1
build of /gnu/store/792rdywf5nzn6rs4as5v9la5sdbwqrjp-installation.drv failed
------

It seems that this page is being run even when a desktop is selected,
which does not happen when using the installer directly.

Can somebody help me write the system test correctly, so that it's not
run when a desktop is selected?

We had several bug reports with a root cause of "the clock was
incorrect" from users who used the installer to install a non-graphical
Guix System.

* gnu/installer/services.scm (%system-services): Add the ntp-service-type.
* gnu/installer/newt/services.scm (run-system-administration-cbt-page): New
variable.
(run-services-page): Use run-system-administration-cbt-page when not
installing a desktop.
* gnu/installer/tests.scm (choose-services): Add and use a
choose-misc-service?  procedure.
* gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add
ntp-service-type.
---
 gnu/installer/newt/services.scm | 25 ++++++++++++++++++++++++-
 gnu/installer/services.scm      |  8 ++++++++
 gnu/installer/tests.scm         |  9 +++++++++
 gnu/tests/install.scm           |  5 +++--
 4 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index b4b5219b20..c218825813 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,27 @@ (define (run-printing-services-cbt-page)
         (condition
          (&installer-step-abort)))))))
 
+(define (run-console-services-cbt-page)
+  "Run a page to select various system adminstration services for non-graphical
+systems."
+  (let ((items (filter (lambda (service)
+                         (eq? 'administration
+                              (system-service-type service)))
+                       %system-services)))
+    (run-checkbox-tree-page
+      #:title (G_ "Console services")
+      #:info-text (G_ "Select miscellaneous services to run on your \
+non-graphical system.")
+      #:items items
+      #:selection (map system-service-recommended? items)
+      #:item->text (compose G_ system-service-name)
+      #:checkbox-tree-height 5
+      #:exit-button-callback-procedure
+      (lambda ()
+        (raise
+          (condition
+            (&installer-step-abort)))))))
+
 (define (run-network-management-page)
   "Run a page to select among several network management methods."
   (let ((title (G_ "Network management")))
@@ -119,6 +141,7 @@ (define (run-services-page)
     (append desktop
             (run-networking-cbt-page)
             (if (null? desktop)
-                (list (run-network-management-page))
+                (cons (run-network-management-page)
+                      (run-console-services-cbt-page))
                 '())
             (run-printing-services-cbt-page))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 341d8b69c8..94c49307f0 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,13 @@ (define %system-services
       (packages '((specification->package "nss-certs")))
       (recommended? #t))
 
+     ;; Miscellaneous system administration services.
+     (system-service
+       (name (G_ "Network time service (NTP), to set the clock automatically"))
+       (type 'administration)
+       (recommended? #t)
+       (snippet '((service ntp-service-type))))
+
      ;; Network connectivity management.
      (system-service
       (name (G_ "NetworkManager network connection manager"))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 5d931149b8..4175feaed9 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -221,7 +221,11 @@ (define* (choose-services port
                           (choose-network-management-tool?
                            (lambda (service)
                              (string-contains service "DHCP")))
+                          (choose-misc-service?
+                           (lambda (service)
+                             (string-contains service "NTP")))
                           (choose-other-service? (const #f)))
+
   "Converse over PORT to choose services."
   (define desktop-environments '())
 
@@ -243,6 +247,11 @@ (define desktop-environments '())
      (null? desktop-environments)
      (find choose-network-management-tool? services))
 
+    ((checkbox-list (title "Console services") (text _)
+                     (items ,services)
+     (null? desktop-environments))
+     (filter choose-misc-service? services))
+
     ((checkbox-list (title "Printing and document services") (text _)
                     (items ,services))
      (filter choose-other-service? services))))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 154f98b2e1..ae8c6051f1 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1685,8 +1685,9 @@ (define* (installation-target-os-for-gui-tests
          (list
           (swap-space
            (target (uuid "11111111-2222-3333-4444-123456789abc"))))))
-    (services (cons (service dhcp-client-service-type)
-                    (operating-system-user-services %minimal-os-on-vda)))))
+    (services (cons* (service dhcp-client-service-type)
+                     (service ntp-service-type)
+                     (operating-system-user-services %minimal-os-on-vda)))))
 
 (define* (installation-target-desktop-os-for-gui-tests
           #:key (encrypted? #f))
-- 
2.34.0





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

* [bug#47979] [PATCH v7 3/3] installer: Offer 'gpm-service-type' for non-graphical systems.
  2021-12-27 22:24 ` [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-27 22:24   ` Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-27 22:24 UTC (permalink / raw)
  To: 47979

* gnu/installer/services.scm (%system-services): Add the gpm-service-type.
---
 gnu/installer/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 94c49307f0..be6e75cbc4 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -111,6 +111,10 @@ (define %system-services
        (type 'administration)
        (recommended? #t)
        (snippet '((service ntp-service-type))))
+     (system-service
+       (name (G_ "GPM mouse daemon, to use the mouse in the console"))
+       (type 'administration)
+       (snippet '((service gpm-service-type))))
 
      ;; Network connectivity management.
      (system-service
-- 
2.34.0





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

* [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
@ 2021-12-27 23:53     ` Leo Famulari
  2021-12-28  4:54     ` Leo Famulari
  1 sibling, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-27 23:53 UTC (permalink / raw)
  To: 47979; +Cc: othacehe

On Mon, Dec 27, 2021 at 05:24:09PM -0500, Leo Famulari wrote:
> The system test "gui-installed-os" passes with this commit, but
> "gui-installed-desktop-os-encrypted" fails like this:
> 
> ------
> [...]
> conversation expecting pattern ((quote checkbox-list) ((quote title) "Network service") ((quote text) _) ((quote items) services))
> Dec 27 23:03:44 localhost installer[194]: form #<newt-form 176e9c0> ("Network service"): client 19 replied () 
> Dec 27 23:03:44 localhost installer[194]: running form #<newt-form 171ae70> ("Network management") with 1 clients 
> conversation expecting pattern ((quote list-selection) ((quote title) "Network management") ((quote multiple-choices?) #f) ((quote items) services))
> Dec 27 23:03:44 localhost installer[194]: form #<newt-form 171ae70> ("Network management"): client 19 replied "DHCP client (dynamic IP address assignment)" 
> Dec 27 23:03:44 localhost installer[194]: running form #<newt-form 176fcb0> ("Console services") with 1 clients 
> conversation expecting pattern ((quote checkbox-list) ((quote title) "Console services") ((quote text) _) ((quote items) services) ((quote null?) (quote desktop-environments)))
> /gnu/store/bvbv7a5nfzqwq5d7z33kqr8yzx1q5x70-shepherd-marionette.scm:1:1718: ERROR:
>   1. &pattern-not-matched:
>       pattern: ((quote checkbox-list) ((quote title) "Console services") ((quote text) _) ((quote items) services) ((quote null?) (quote desktop-environments)))
>       sexp: (checkbox-list (title "Console services") (text "Select miscellaneous services to run on your non-graphical system.") (items ("Network time service (NTP), to set the clock automat)
> Backtrace:
>            2 (primitive-load "/gnu/store/ipxa2igymg4j2b84ivka5qcp5bs?")
> In ice-9/eval.scm:
>    191:35  1 (_ #f)
>     619:8  0 (_ #(#<directory (guile-user) 7ffff5fdbc80> #<variabl?>))
> 
> ice-9/eval.scm:619:8: Throw to key `marionette-eval-failure' with args `((quote (choose-services installer-socket #:choose-desktop-environment? (const #f) #:choose-network-service? (const #f).
> note: keeping build directory `/tmp/guix-build-installation.drv-9'
> builder for `/gnu/store/792rdywf5nzn6rs4as5v9la5sdbwqrjp-installation.drv' failed with exit code 1
> build of /gnu/store/792rdywf5nzn6rs4as5v9la5sdbwqrjp-installation.drv failed
> ------
> 
> It seems that this page is being run even when a desktop is selected,
> which does not happen when using the installer directly.
> 
> Can somebody help me write the system test correctly, so that it's not
> run when a desktop is selected?

Any ideas, Mathieu?




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

* [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-27 22:24   ` [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
  2021-12-27 23:53     ` Leo Famulari
@ 2021-12-28  4:54     ` Leo Famulari
  2021-12-28  8:27       ` Mathieu Othacehe
  1 sibling, 1 reply; 33+ messages in thread
From: Leo Famulari @ 2021-12-28  4:54 UTC (permalink / raw)
  To: 47979

On Mon, Dec 27, 2021 at 05:24:09PM -0500, Leo Famulari wrote:
>   1. &pattern-not-matched:
>       pattern: ((quote checkbox-list) ((quote title) "Console services") ((quote text) _) ((quote items) services) ((quote null?) (quote desktop-environments)))
>       sexp: (checkbox-list (title "Console services") (text "Select miscellaneous services to run on your non-graphical system.") (items ("Network time service (NTP), to set the clock automat)
[...]
> +    ((checkbox-list (title "Console services") (text _)
> +                     (items ,services)
> +     (null? desktop-environments))
                                    ^
                                    |
There's a typo here that could cause the error mentioned above.

> +     (filter choose-misc-service? services))

Rebuilding...




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

* [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-28  4:54     ` Leo Famulari
@ 2021-12-28  8:27       ` Mathieu Othacehe
  2021-12-28 20:34         ` bug#47979: " Leo Famulari
  0 siblings, 1 reply; 33+ messages in thread
From: Mathieu Othacehe @ 2021-12-28  8:27 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47979


Hey Leo,

>> +     (null? desktop-environments))
>                                     ^
>                                     |
> There's a typo here that could cause the error mentioned above.

Right. I have started a wip-harden-installer branch, and configured
Cuirass to run the system tests on it:
https://ci.guix.gnu.org/jobset/wip-harden-installer, to prevent my
laptop from burning.

Don't hesitate to push your commits there :).

Thanks,

Mathieu




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

* bug#47979: [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems.
  2021-12-28  8:27       ` Mathieu Othacehe
@ 2021-12-28 20:34         ` Leo Famulari
  0 siblings, 0 replies; 33+ messages in thread
From: Leo Famulari @ 2021-12-28 20:34 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47979-done

On Tue, Dec 28, 2021 at 09:27:29AM +0100, Mathieu Othacehe wrote:
> >> +     (null? desktop-environments))
> >                                     ^
> >                                     |
> > There's a typo here that could cause the error mentioned above.

I fixed this bug and pushed as 0d9d151424ab5823e441f056237819277b8aa072.

Thanks a lot for your help!

> Right. I have started a wip-harden-installer branch, and configured
> Cuirass to run the system tests on it:
> https://ci.guix.gnu.org/jobset/wip-harden-installer, to prevent my
> laptop from burning.

I found that the Guix test suite itself fails on berlin, even in the
build container as used when building current-guix-package in the system
tests, but maybe it succeeds when run on the build nodes via CI:

https://issues.guix.gnu.org/46413

That's why I spent a long time running the system tests on my own
computer.




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

end of thread, other threads:[~2021-12-28 20:35 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 18:53 [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
2021-04-23 18:56 ` Leo Famulari
2021-04-23 22:45   ` Leo Famulari
2021-04-23 23:20     ` Leo Famulari
2021-04-24  0:56     ` [bug#47979] [PATCH v3] " Leo Famulari
2021-05-02  4:36       ` Leo Famulari
2021-05-02  9:25         ` Mathieu Othacehe
2021-05-02 15:22           ` Leo Famulari
2021-05-21 12:58       ` [bug#47979] [PATCH] " Mathieu Othacehe
2021-05-21 13:37         ` Leo Famulari
2021-05-21 14:21         ` Leo Famulari
2021-05-21 14:26           ` Leo Famulari
2021-05-21 14:39           ` Mathieu Othacehe
2021-05-21 21:01         ` Leo Famulari
2021-05-21 21:44           ` Leo Famulari
2021-06-01  9:49           ` Mathieu Othacehe
2021-12-24 18:04 ` [bug#47979] [PATCH v5] gnu: binutils: Fix CVE-2021-45078 Leo Famulari
2021-12-24 18:04 ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
2021-12-24 18:04   ` [bug#47979] [PATCH v5 2/2] installer: Offer 'gpm-service-type' " Leo Famulari
2021-12-24 18:14   ` [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' " Leo Famulari
2021-12-26 20:31 ` [bug#47979] [PATCH v6 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
2021-12-26 20:31   ` [bug#47979] [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
2021-12-26 20:33     ` Leo Famulari
2021-12-26 21:06       ` Mathieu Othacehe
2021-12-27  0:57         ` Leo Famulari
2021-12-26 20:31   ` [bug#47979] [PATCH v6 3/3] installer: Offer 'gpm-service-type' " Leo Famulari
2021-12-27 22:24 ` [bug#47979] [PATCH v7 1/3] installer: Offer the CUPS printing service on a dedicated page Leo Famulari
2021-12-27 22:24   ` [bug#47979] [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for non-graphical systems Leo Famulari
2021-12-27 23:53     ` Leo Famulari
2021-12-28  4:54     ` Leo Famulari
2021-12-28  8:27       ` Mathieu Othacehe
2021-12-28 20:34         ` bug#47979: " Leo Famulari
2021-12-27 22:24   ` [bug#47979] [PATCH v7 3/3] installer: Offer 'gpm-service-type' " Leo Famulari

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).