From patchwork Fri May 21 21:01:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 29506 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5C5CD27BC81; Fri, 21 May 2021 22:02:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9929727BC78 for ; Fri, 21 May 2021 22:02:10 +0100 (BST) Received: from localhost ([::1]:58714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkCHZ-0005SE-Or for patchwork@mira.cbaines.net; Fri, 21 May 2021 17:02:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkCHS-0005Rn-Pr for guix-patches@gnu.org; Fri, 21 May 2021 17:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkCHS-00009M-Ib for guix-patches@gnu.org; Fri, 21 May 2021 17:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkCHS-0003Tc-FY for guix-patches@gnu.org; Fri, 21 May 2021 17:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47979] [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 May 2021 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47979 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 47979@debbugs.gnu.org Received: via spool by 47979-submit@debbugs.gnu.org id=B47979.162163091013344 (code B ref 47979); Fri, 21 May 2021 21:02:02 +0000 Received: (at 47979) by debbugs.gnu.org; 21 May 2021 21:01:50 +0000 Received: from localhost ([127.0.0.1]:37872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkCHF-0003T9-M9 for submit@debbugs.gnu.org; Fri, 21 May 2021 17:01:50 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkCHA-0003Sq-FA for 47979@debbugs.gnu.org; Fri, 21 May 2021 17:01:47 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7BC195C0097; Fri, 21 May 2021 17:01:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 21 May 2021 17:01:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=K8gOh46n6CfCh2yqokan4D7q E715S4XI0Ui+TTKhbpE=; b=FsNjUIiDX0lgbp2qavGDCl+YkPsh9v3Ux6zA6VfD xorHg/Tt8adIW7PKtPEA9FyVx3Z6lwRcNwL7/Zq76vJMsCylSJWCyxymd6kito75 xm06KgGFSNIPUv5V5IZD9AIqxpApTpsqDboz/rt7j5Gp63CfMRtCZGaer0mCktVj Of8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=K8gOh4 6n6CfCh2yqokan4D7qE715S4XI0Ui+TTKhbpE=; b=q0yweQqPHP09p+zokOVt1e qVq/MJ9wrLswa40el6HWIxE4U7m0AN58WNPBAMmaR5pxQz2DcLYEpgntsykAlKO6 izZSBcqA7Et/tHZ12Obq98juU0JDzXrKdgzrOT0ZcjbiMhB7PJwvHno8DQJVscdm psGJEVBMdAZnieMEZE7AHKLc5JuiJKA0gW+dFD8IqCpWZvbKfhFiRZuZ0S46TVuD 3Y3pnyrMzr9y8Pv2GSafjU92/AzYOblA9JR7iOQKnmTC08HxlVL9ASXwkK6w4dfu gNVxI8a/uqVPs7dWoUY+vIIt4YKUf9XWD2zbGj9+kEYaXCYLh9Jthi/D6SKuu/0g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejfedgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepudekveegteekleetgfeitdejgfejkeffudethedvhfeukeduleeikeejfeeh ffetnecukfhppedutddtrdduuddrudeiledruddukeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 May 2021 17:01:38 -0400 (EDT) Date: Fri, 21 May 2021 17:01:36 -0400 From: Leo Famulari Message-ID: References: <87lf88qm47.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87lf88qm47.fsf_-_@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 (_ #(# #)) 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... From ef1dfe36130fa276ce1b2a4213cde14d649bfbf8 Mon Sep 17 00:00:00 2001 From: Leo Famulari 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 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Tobias Geerinckx-Rice +;;; Copyright © 2021 Leo Famulari ;;; ;;; 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 ;;; Copyright © 2019 Ludovic Courtès ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2021 Leo Famulari ;;; ;;; 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 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