GNU bug report logs - #47979
[PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Fri, 23 Apr 2021 18:54:01 UTC

Severity: important

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

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

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

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


Report forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 23 Apr 2021 18:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 23 Apr 2021 18:54:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] installer: Recommend 'ntp-service-type' for non-graphical
 systems.
Date: Fri, 23 Apr 2021 14:53:15 -0400
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 <at> gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 23 Apr 2021 18:57:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 23 Apr 2021 14:56:40 -0400
[Message part 1 (text/plain, inline)]
Hey everyone, please disregard this patch.

It doesn't do what I meant. Sorry for being hasty and sending the wrong
thing.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 23 Apr 2021 22:47:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 23 Apr 2021 18:45:59 -0400
[Message part 1 (text/plain, inline)]
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.
[0001-installer-Recommend-ntp-service-type-for-non-graphic.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 23 Apr 2021 23:21:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 23 Apr 2021 19:20:35 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sat, 24 Apr 2021 14:51:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH v3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 23 Apr 2021 20:56:43 -0400
[Message part 1 (text/plain, inline)]
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
[0001-installer-Recommend-ntp-service-type-for-non-graphic.patch (text/plain, attachment)]
[0002-installer-Offer-gpm-service-type-for-non-graphical-s.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 02 May 2021 04:37:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH v3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Sun, 2 May 2021 00:36:14 -0400
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 <at> 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.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 02 May 2021 09:26:01 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type'
 for non-graphical systems.
Date: Sun, 02 May 2021 11:25:05 +0200
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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 02 May 2021 15:23:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v3] installer: Recommend 'ntp-service-type'
 for non-graphical systems.
Date: Sun, 2 May 2021 11:22:11 -0400
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 13:00:03 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 14:58:48 +0200
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




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 13:38:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 09:37:10 -0400
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 14:23:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 10:21:50 -0400
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`...




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 14:27:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 10:26:02 -0400
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`.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 14:40:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 16:39:39 +0200
> 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




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 21:02:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 17:01:36 -0400
[Message part 1 (text/plain, inline)]
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...
[v4-installer-Recommend-ntp-service-for-non-graphical-systems.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 21 May 2021 21:45:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 21 May 2021 17:44:37 -0400
[Message part 1 (text/plain, inline)]
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 :/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Tue, 01 Jun 2021 09:51:01 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: bug#47979: [PATCH] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Tue, 01 Jun 2021 11:49:55 +0200
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




Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Jun 2021 08:31:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 24 Dec 2021 18:05:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v5] gnu: binutils: Fix CVE-2021-45078.
Date: Fri, 24 Dec 2021 13:04:15 -0500
* 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 <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 24 Dec 2021 18:05:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 24 Dec 2021 13:04:40 -0500
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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 24 Dec 2021 18:05:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v5 2/2] installer: Offer 'gpm-service-type' for non-graphical
 systems.
Date: Fri, 24 Dec 2021 13:04:41 -0500
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Fri, 24 Dec 2021 18:15:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Fri, 24 Dec 2021 13:14:13 -0500
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 26 Dec 2021 20:32:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v6 1/3] installer: Offer the CUPS printing service on a
 dedicated page.
Date: Sun, 26 Dec 2021 15:31:29 -0500
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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 26 Dec 2021 20:32:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Sun, 26 Dec 2021 15:31:30 -0500
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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 26 Dec 2021 20:32:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v6 3/3] installer: Offer 'gpm-service-type' for non-graphical
 systems.
Date: Sun, 26 Dec 2021 15:31:31 -0500
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 26 Dec 2021 20:34:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH v6 2/3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Sun, 26 Dec 2021 15:33:40 -0500
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Sun, 26 Dec 2021 21:07:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v6 2/3] installer: Recommend
 'ntp-service-type' for non-graphical systems.
Date: Sun, 26 Dec 2021 22:06:09 +0100
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




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Mon, 27 Dec 2021 00:58:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v6 2/3] installer: Recommend
 'ntp-service-type' for non-graphical systems.
Date: Sun, 26 Dec 2021 19:57:48 -0500
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Mon, 27 Dec 2021 22:25:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v7 1/3] installer: Offer the CUPS printing service on a
 dedicated page.
Date: Mon, 27 Dec 2021 17:24:08 -0500
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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Mon, 27 Dec 2021 22:25:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Mon, 27 Dec 2021 17:24:09 -0500
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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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 <at> gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Leo Famulari <leo <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Mon, 27 Dec 2021 22:25:03 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: [PATCH v7 3/3] installer: Offer 'gpm-service-type' for non-graphical
 systems.
Date: Mon, 27 Dec 2021 17:24:10 -0500
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Mon, 27 Dec 2021 23:54:03 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Cc: othacehe <at> gnu.org
Subject: Re: [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Mon, 27 Dec 2021 18:53:03 -0500
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?




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Tue, 28 Dec 2021 04:56:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 47979 <at> debbugs.gnu.org
Subject: Re: [PATCH v7 2/3] installer: Recommend 'ntp-service-type' for
 non-graphical systems.
Date: Mon, 27 Dec 2021 23:54:52 -0500
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...




Information forwarded to guix-patches <at> gnu.org:
bug#47979; Package guix-patches. (Tue, 28 Dec 2021 08:28:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47979 <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v7 2/3] installer: Recommend
 'ntp-service-type' for non-graphical systems.
Date: Tue, 28 Dec 2021 09:27:29 +0100
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




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Tue, 28 Dec 2021 20:35:01 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Tue, 28 Dec 2021 20:35:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47979-done <at> debbugs.gnu.org
Subject: Re: [bug#47979] [PATCH v7 2/3] installer: Recommend
 'ntp-service-type' for non-graphical systems.
Date: Tue, 28 Dec 2021 15:34:24 -0500
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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Jan 2022 12:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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