From patchwork Sat Apr 24 00:56:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 28845 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 74FF327BC7D; Sat, 24 Apr 2021 15:51:09 +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 E15C927BC7C for ; Sat, 24 Apr 2021 15:51:08 +0100 (BST) Received: from localhost ([::1]:56730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laJci-0003ac-5U for patchwork@mira.cbaines.net; Sat, 24 Apr 2021 10:51:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laJcc-0003aV-BF for guix-patches@gnu.org; Sat, 24 Apr 2021 10:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laJcc-0000XB-4L for guix-patches@gnu.org; Sat, 24 Apr 2021 10:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laJcc-0007O9-3C for guix-patches@gnu.org; Sat, 24 Apr 2021 10:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47979] [PATCH v3] 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: Sat, 24 Apr 2021 14:51: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.161927583228364 (code B ref 47979); Sat, 24 Apr 2021 14:51:02 +0000 Received: (at 47979) by debbugs.gnu.org; 24 Apr 2021 14:50:32 +0000 Received: from localhost ([127.0.0.1]:41284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laJc8-0007NP-C1 for submit@debbugs.gnu.org; Sat, 24 Apr 2021 10:50:32 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:52099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laJc5-0007NA-Rn for 47979@debbugs.gnu.org; Sat, 24 Apr 2021 10:50:31 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 17BDF1B23; Sat, 24 Apr 2021 10:50:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 24 Apr 2021 10:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=TBdTQy4eXOmdNVe48HQ/6/pT puwn+/CJuZWnq9UZM80=; b=Nz82fCNzVAsWLPvNwhtGHXEH66KCmavNKS5h3/NZ b+ZlE63HJIAVxfaGi7fcpsBfs6kfbkKCddGxfIiHh+cUofwp790D1oS/yL2d5Tfu tDcfzBucywcHLpiuEa4g0N961G45m4hRbJqYJqFWV3TnKP/AgGwtQ8S2T7yz/JkH auQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=TBdTQy 4eXOmdNVe48HQ/6/pTpuwn+/CJuZWnq9UZM80=; b=ugwfYW+MOOyy04ivqM6mve mf/byAJf+vEdQLhW63rH+inCa0MyxDCoyqzKcLQMP63oca05h7Sra3olXRNpTzc/ 0OcKYqDii0RgX2AqIE0DRriI5a9xT16GTFsK/GcJGIcnfJVj8QX19Me+wMG5VKgI VDIrPy4V6nZhBTJ49dTNYuva7OmHvrh8mplGjTodQRiHm82C3By/L/a6PKrS1CXN ANFeo8vUcyixx95vMEESAuJDPAoLPWoHS5TraWYHJmMsOvvOFYiP0BJLmE/8gJE0 xdf6w1uMzpe9WaDu/XKCZGn+h/F6hQacondEcWcZtwirCuqPU52XuusMP4OPHShw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddugedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepvdevgeekudeivdeileduveekuefgue euleehtdffgefftdefkeevleffueefudeknecuffhomhgrihhnpehgnhhurdhorhhgnecu kfhppedutddtrdduuddrudeiledruddukeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv 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 id 774B9240066 for <47979@debbugs.gnu.org>; Sat, 24 Apr 2021 10:50:22 -0400 (EDT) Date: Fri, 23 Apr 2021 20:56:43 -0400 From: Leo Famulari Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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, 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): (#< 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 From 6f2f131551247aa20794007c43ae61b82f6e34d6 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 23 Apr 2021 14:50:15 -0400 Subject: [PATCH 1/2] installer: Recommend 'ntp-service-type' for non-graphical systems. We had several bug reports with a root cause of "the clock was incorrect" from users who used the installer to install a non-graphical Guix System. * gnu/installer/services.scm (%system-services): Add the ntp-service-type. * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New variable. (run-services-page): Use run-system-administration-cbt-page when not installing a desktop. --- gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++- gnu/installer/services.scm | 8 ++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm index 74f28e41ba..ee003b24b1 100644 --- a/gnu/installer/newt/services.scm +++ b/gnu/installer/newt/services.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019, 2020 Ludovic Courtès ;;; 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..b50bd3e412 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, 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"))