From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8BWlCfULxmH3TwAAgWs5BA (envelope-from ) for ; Fri, 24 Dec 2021 19:05:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SGxLBfULxmEKWAAA1q6Kng (envelope-from ) for ; Fri, 24 Dec 2021 18:05:41 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C25B6284AD for ; Fri, 24 Dec 2021 19:05:40 +0100 (CET) Received: from localhost ([::1]:51972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0owl-0007mV-U6 for larch@yhetil.org; Fri, 24 Dec 2021 13:05:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0owA-0007kL-TX for guix-patches@gnu.org; Fri, 24 Dec 2021 13:05:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0owA-0001O7-L6 for guix-patches@gnu.org; Fri, 24 Dec 2021 13:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0owA-0004wf-E9 for guix-patches@gnu.org; Fri, 24 Dec 2021 13:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#47979] [PATCH v5 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems. References: In-Reply-To: Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Dec 2021 18:05: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: 47979@debbugs.gnu.org Received: via spool by 47979-submit@debbugs.gnu.org id=B47979.164036909318972 (code B ref 47979); Fri, 24 Dec 2021 18:05:02 +0000 Received: (at 47979) by debbugs.gnu.org; 24 Dec 2021 18:04:53 +0000 Received: from localhost ([127.0.0.1]:38010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0ow1-0004vr-84 for submit@debbugs.gnu.org; Fri, 24 Dec 2021 13:04:53 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:43651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0ovz-0004vb-Ah for 47979@debbugs.gnu.org; Fri, 24 Dec 2021 13:04:51 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B2721320187F; Fri, 24 Dec 2021 13:04:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 24 Dec 2021 13:04:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mesmtp; bh=ITjdwy6X/ot6Wq7hPo7oPVE 0pyphwLn0/q/gZGuffxU=; b=gF1TsYDNOPmPOiKtE8mowT03SI7lTfwqVSKLKPv pmGvIVIPhAyJXWcItCRwOHLkrLqKf035AmPUvey503+P2SQF4P86MUBadjIczuuP Qemxkofq7QAZULBI94Qp0mpm5LZE/hklVAfCv8Ax1U9xUXUXFhcWLUPOM4mMb1ZI HMAI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ITjdwy 6X/ot6Wq7hPo7oPVE0pyphwLn0/q/gZGuffxU=; b=ZgikOMOQfsjgwHpCVVHwD9 7epr0bdYclhBPaa9/r2EyeN0SH7m8mkLiMSw1lvKs2IQgdDyRGCvk8TCY7abMV/D KkISDAWGZ9RaJFOuCAcoDba0MFExgb/xLnjQLEDxqClzefNSrjkvubtZtnp0Xbj7 N8aORf/5v2x5TYCEYr3frb4BZVNoAt0l1/ftGFuU/u2QFz6VuC31kQGv2iVIkVJr URfULp3/j22zJjXag8W+B/so601rbPoBbeYN27aS7MNIT+SS7takMJlNahyPyDfG K5+FusseT8t8eSL/Jlp6YtLuEBtL0ZxvPhVaeV963iTWUafVJybVMIHZtpt+hplA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddutddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffogggtgfesthekre dtredtjeenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepgfetjeetjedtfefggfelheevleejte fhleevveetkedtheeugedtgfekueekheejnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for <47979@debbugs.gnu.org>; Fri, 24 Dec 2021 13:04:44 -0500 (EST) From: Leo Famulari Date: Fri, 24 Dec 2021 13:04:40 -0500 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640369140; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ITjdwy6X/ot6Wq7hPo7oPVE0pyphwLn0/q/gZGuffxU=; b=o41uVWNrk2/zzPV/PxdKAq+CJ5q2UciqCIkwh1CqkGf3q0KzAfGTH6ypCM9BbPZ7SaQwjF F7nw8oC9KrwGocMba9EBxEMTDYv77NVPF2os6i+I/c+9k9fujSRFvLh8xcWDe5x2hxrCTa RP0jWd+4UBEPGMUniaUDV3jZcrq6SxcM4HyO9FwS45g55vqfy72g/Y6cZBgJlPFaEdMBny cLHoWOFkUND0HgMbseuzbF6xNXTQ7yQCaYZfCChONZ/MqqK7WtqeKyLrGMUDzlstj/2xqd G69ie4QS6Bi47hzhjq4IJcGvsAZ8S81Pva/BOjMygRqw0BUftY+HJT5gexkkhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640369140; a=rsa-sha256; cv=none; b=eFsoPmxrf+e1EbrvG74qHK0BH3HKv2ZVV0gL2LP+LCKlymGljQxRsqT2NJZgNGReoK09A0 m4qBZ4Xz/LcYLDK7GMJpwAnJKfqS0cyPEALWLKvnfqcZntkNxJspNj14f9kHKxOuSEGQVC 4L5q9GQyFkMnP4AGarlQDyXuBX1Rnq9KfPJ4vr6ACALyAGnQJsQo1qjajk8/0JlDUgfF6v ytQ/L99aJ8BtliJfqiOab48wk7L++M/CGhcx2OqvrjRf3QrHZHifetS2SlszJaQWVZcIiz 1wMfrBHEiLk1DBHizDCMgwTgViUC7EOOxfAniXPNGgPm7R7tOfRcYROHqD7amA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=gF1TsYDN; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=ZgikOMOQ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=gF1TsYDN; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=ZgikOMOQ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C25B6284AD X-Spam-Score: -1.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: pGxS5qkACvcs 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): 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 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Tobias Geerinckx-Rice +;;; Copyright © 2021 Leo Famulari ;;; ;;; 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 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Tobias Geerinckx-Rice +;;; Copyright © 2021 Leo Famulari ;;; ;;; 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