From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GHitOm9Og2ABQQAAgWs5BA (envelope-from ) for ; Sat, 24 Apr 2021 00:47:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +DtFNm9Og2CVJgAAbx9fmQ (envelope-from ) for ; Fri, 23 Apr 2021 22:47:11 +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 CD08620AFE for ; Sat, 24 Apr 2021 00:47:07 +0200 (CEST) Received: from localhost ([::1]:37486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la4Zn-00044w-0p for larch@yhetil.org; Fri, 23 Apr 2021 18:47:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la4Zi-00042u-CZ for guix-patches@gnu.org; Fri, 23 Apr 2021 18:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1la4Zi-0001w0-4h for guix-patches@gnu.org; Fri, 23 Apr 2021 18:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1la4Zi-0002S7-1F for guix-patches@gnu.org; Fri, 23 Apr 2021 18:47: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, 23 Apr 2021 22:47:01 +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.16192179719365 (code B ref 47979); Fri, 23 Apr 2021 22:47:01 +0000 Received: (at 47979) by debbugs.gnu.org; 23 Apr 2021 22:46:11 +0000 Received: from localhost ([127.0.0.1]:39131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1la4Yt-0002Qz-2j for submit@debbugs.gnu.org; Fri, 23 Apr 2021 18:46:11 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:52711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1la4Yr-0002Qe-4S for 47979@debbugs.gnu.org; Fri, 23 Apr 2021 18:46:10 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 216863628; Fri, 23 Apr 2021 18:46:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 23 Apr 2021 18:46:03 -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=jkVETC9nd3YaKb6TjDPg7IRk gQ6YElHsDINI9nv27yQ=; b=U9aZxA4PddFbyLUf6os6TIN92SM+yJ79K5yLm7oy bYJEPLy68byxJjxNzdpjxy/Idz87rJlbRg2SXim6vIiR3GNNkeZjpT/TJuXXHNjo xKtKOEdumWmIZClLheurC9S7Kc8P7HRxC8vSrmhyQTu7skKtiPffNtvj9/Cuy4ph Nv0= 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=jkVETC 9nd3YaKb6TjDPg7IRkgQ6YElHsDINI9nv27yQ=; b=nzfTzedfRh+OUDEamCH6VX g+R9MuoC0lchMZ9sZGIcAF3q59gsvmCcKPAkmMUPMI5glbVRWk61qdPNBoXUapBc LUyL2xkGbZjk2t+Kt7DOVRQ5O2Dmu82+xdZ07WItX0na61IX07hyqOAlLHVD0g0d UqeyB7zEijt+sfXNLCohro3dKZ82fCUJpv3+B019nfoSI8jJBZzxikNov/kaYYkP bebndygZkgxMp9H9KgX/R5XhLoLUZgx4FYhuZc4vXLwWaxf0XPoOdBCZ1ZmociFL y7yz7BRBqtwJQ+xcDMW3GmAz3OohN6Gx5r0Op1OAOUP4PsL/AoF/ZY59PFf+MPtw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddufedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtjeenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepiefghfeffedtffekveektddtieekfe ffledtgfevkeekteeufedtfefhgefhkeefnecukfhppedutddtrdduuddrudeiledruddu keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg hosehfrghmuhhlrghrihdrnhgrmhgv 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 5F09A24005D for <47979@debbugs.gnu.org>; Fri, 23 Apr 2021 18:46:02 -0400 (EDT) Date: Fri, 23 Apr 2021 18:45:59 -0400 From: Leo Famulari Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t0ubvqyjGjrAhPNs" 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619218028; 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: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=jkVETC9nd3YaKb6TjDPg7IRkgQ6YElHsDINI9nv27yQ=; b=Q2DUzH2xSEP5QOsmbsGOVUG5eVEeTepkyVr9PUU9GK/sKaaEpsL4oQrb1rbs2P0zgJJkxH oM17KKb150JJLOQkLgsIe8X5Lv3HmvJE8SXejBv/l3NZOwzYkJeqzxbBUXx1j6I1vBtlK8 8imuKCd1Z5f8knmILYv1MpUNEyxlpnIy2gLhqKAzuJp9xIWpFi1Td9HaIqKxA2CpfuZHMD +/b7CrDZfLr3a5PeI8MtDifrDu40o5HU+ysuafLD9vgdJlNM+ViTlrGnuHXvflL8L7C1NJ 6AWqZ1dGdBjwRp1ik+FLJ3F7itXAjYjqHabJ7NGCalPypnkJ9RBAb2oMZs9Trg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619218028; a=rsa-sha256; cv=none; b=dMVzs6R6bv1K+FH5Y8CtF6ZZhpvlPa5hu6mu3P+5An9yvgF8hiMuNmgmFKFWxgqOM1HKqD L1u05U/ddX7Jtsl4zbk4kowjxbu4bR2G5guvvAsprlUG2E5O7uisUeTc/FWMTxwW1F8spC qmd7azMFMFDi4aEfq3fGqHkFvlbP2w3mcFsHVBKgXhkH4OSrD4NDSeJMIyJ2c1eoXnaCIO v65wEX6hpSVodPe7CWScxeNWVtBmKQFENrf299s49OXa98MpVb0+2i+vw6SV/YIPzl54f2 d8OH3wUXi6bBrSwJRtzeArrHbv69feGow+Pk/lXp8LoUKHuxfzbXEIe2Kl08oA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=U9aZxA4P; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=nzfTzedf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=U9aZxA4P; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=nzfTzedf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: CD08620AFE X-Spam-Score: -3.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: w7TpfKnjq6GE --t0ubvqyjGjrAhPNs Content-Type: multipart/mixed; boundary="BKTfMUvwn05mzvcF" Content-Disposition: inline --BKTfMUvwn05mzvcF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 (#< name: "= Network time service, to set the clock automatically" type: administration = recommended?: #t snippet: ((service ntp-servi=E2=80=A6>)) 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 i= n position 1 (expecting struct): ~S"> #<&irrit=E2=80=A6>) In ice-9/eval.scm: 619:8 5 (_ #(#(# #< na= me: newt init: # exit: # exit-error: = # f=E2=80=A6>) =E2=80=A6)) 619:8 4 (_ #(#(#(# #< = name: newt init: # exit: # exit-error= : #) =E2=80=A6) #)) In ice-9/ports.scm: 463:17 3 (call-with-output-file _ _ #:binary _ #:encoding _) In ice-9/eval.scm: 619:8 2 (_ #(#(# wrong-type-arg (= "struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" = ((#< name: "Network =E2=80=A6>)) =E2=80=A6)) #)) 159:9 1 (_ #(#(# wrong-type-arg (= "struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" = ((#< name: "Network =E2=80=A6>)) =E2=80=A6)) #)) In unknown file: 0 (make-stack #t) ice-9/eval.scm:159:9: In procedure struct-vtable: Wrong type argument in po= sition 1 (expecting struct): (#< name: "Network time servic= e, to set the clock automatically" type: administration recommended?: #t sn= ippet: ((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. --BKTfMUvwn05mzvcF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-installer-Recommend-ntp-service-type-for-non-graphic.patch" Content-Transfer-Encoding: quoted-printable =46rom c70ed1b6ed621a56ab258cf5cfce45c50cb1831f Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Fri, 23 Apr 2021 14:50:15 -0400 Subject: [PATCH] installer: Recommend 'ntp-service-type' for non-graphical systems. We had several bug reports with a root cause of "the clock was incorrect" from users who used the installer to install a non-graphical Guix System. * gnu/installer/services.scm (%system-services): Add the ntp-service-type. * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New variable. (run-services-page): Use run-system-administration-cbt-page when not installing a desktop. --- gnu/installer/newt/services.scm | 23 ++++++++++++++++++++++- gnu/installer/services.scm | 8 ++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.= scm index 74f28e41ba..60c62a52b1 100644 --- a/gnu/installer/newt/services.scm +++ b/gnu/installer/newt/services.scm @@ -3,6 +3,7 @@ ;;; Copyright =A9 2019, 2020 Ludovic Court=E8s ;;; Copyright =A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =A9 2021 Tobias Geerinckx-Rice +;;; Copyright =A9 2021 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,6 +69,25 @@ system.") (condition (&installer-step-abort))))))) =20 +(define (run-system-administration-cbt-page) + "Run a page to select various system adminstrative services." + (let ((items (filter (lambda (service) + (eq? 'administration + (system-service-type service))) + %system-services))) + (run-checkbox-tree-page + #:title (G_ "Miscellaneous services") + #:info-text (G_ "Select miscellaneous system services to run on your= system.") + #:items items + #:selection (map system-service-recommended? items) + #:item->text (compose G_ system-service-name) + #:checkbox-tree-height 5 + #:exit-button-callback-procedure + (lambda () + (raise + (condition + (&installer-step-abort))))))) + (define (run-network-management-page) "Run a page to select among several network management methods." (let ((title (G_ "Network management"))) @@ -99,5 +119,6 @@ client may be enough for a server.") (append desktop (run-networking-cbt-page) (if (null? desktop) - (list (run-network-management-page)) + (list (run-network-management-page) + (run-system-administration-cbt-page)) '())))) diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm index ec5ea30594..17ff31d2ec 100644 --- a/gnu/installer/services.scm +++ b/gnu/installer/services.scm @@ -2,6 +2,7 @@ ;;; Copyright =A9 2018 Mathieu Othacehe ;;; Copyright =A9 2019 Ludovic Court=E8s ;;; Copyright =A9 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright =A9 2021 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -104,6 +105,13 @@ (packages '((specification->package "nss-certs"))) (recommended? #t)) =20 + ;; System administration + (system-service + (name (G_ "Network time service, to set the clock automatically")) + (type 'administration) + (snippet '((service ntp-service-type))) + (recommended? #t)) + ;; Network connectivity management. (system-service (name (G_ "NetworkManager network connection manager")) --=20 2.31.1 --BKTfMUvwn05mzvcF-- --t0ubvqyjGjrAhPNs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmCDTicACgkQJkb6MLrK fwjlRw/+MK0M4CWE8ia/QcGVtvBR4OBUVF+TE+cvTrpL+mmSKY+OND00IHOngicI mhh7qUZcwlIIYFseox+IPO4Yw29SxYGOctyE+k2DqTkYJ8QFUKVetO9WKIqYdQF9 LTEaG8wZQLakSPCvfZpw3FtD7D+//gwH9ncu42Z+4OXcGCugT2STurfzbTWioHnO 4q+ASbbqAqO2rRxTaJg4jhEeUOTV2hDwGmCegtvHYJfukbLiuZyq6MU/bB1tWaDl BN2Yb5Kn9Apn8Nere1xGA/+3cUonrP/v85+eZ4VnwCpSEJb/8jlhLQEqTWSTbZ63 1sODXTIJWrXwbl8LaKStV4NmhSOYje7HwHRnksWzBLa5Ht+Kg6pb+zEEBubs0E06 LFFT9akSestWqIngxDXCOUn9I3Cd3lXlpzvd4yT05zpbvJdzcOUtZbxb9R1hAdQ2 lYUpfP7LK9S2kbPLtTugqoppIGs6dlezhONbwym8nDXZup/btgv0xObp2UcPu2FY KCk/O/oD50gK7Gbnk8cXUoMNZhlhgngXYCc+JW1XE/FhLN6o32C2d5yQuavdFo56 DZ6JC2hVD+KfdmNcrwMRvlGb/euzu3R6AAJ27EAdrwGc8KD/Ba1v1fXhDWcHpg1l /KtCLKUrR7I1c21VopBjL4B9wvsu+Ti44rfXpMzxECNNK6FXGt0= =gQrc -----END PGP SIGNATURE----- --t0ubvqyjGjrAhPNs--