From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GE4UK1TdJ2RORgAASxT56A (envelope-from ) for ; Sat, 01 Apr 2023 09:29:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eFsqKlTdJ2ToSwAAG6o9tA (envelope-from ) for ; Sat, 01 Apr 2023 09:29:24 +0200 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 2A3EB20CA9 for ; Sat, 1 Apr 2023 09:29:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piVfc-00033c-5A; Sat, 01 Apr 2023 03:29:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piVfa-00033Q-S9 for guix-patches@gnu.org; Sat, 01 Apr 2023 03:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1piVfa-0004sh-KA for guix-patches@gnu.org; Sat, 01 Apr 2023 03:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1piVfa-0002CP-9z for guix-patches@gnu.org; Sat, 01 Apr 2023 03:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62584] [PATCH] services: Add error/success service type. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Apr 2023 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62584 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62584@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16803341398440 (code B ref -1); Sat, 01 Apr 2023 07:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2023 07:28:59 +0000 Received: from localhost ([127.0.0.1]:35329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piVfX-0002C2-0x for submit@debbugs.gnu.org; Sat, 01 Apr 2023 03:28:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:58084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piVfU-0002Bt-Ct for submit@debbugs.gnu.org; Sat, 01 Apr 2023 03:28:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piVfT-00033C-J7 for guix-patches@gnu.org; Sat, 01 Apr 2023 03:28:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piVfS-0004sM-6c; Sat, 01 Apr 2023 03:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=HIL3cEws7tBQsTpgUK1ud+sZCAgwJuwDjq9rH0Ut1vg=; b=Kca8b57CKshigT CK0/g9geGzjWDIF8Ym4yxvGX715hcftCmYsAqAUj2la8heuubTH6b0q6VjHKRkYZFGORBeY/4ZQSW iEFa0Hp7DhjQjjVxKmZ6IK+Wev2NLYAO78cbfbvX6VUEtEk/BYaKZSkvC2eBn1YU4bQkbWE24DtGi OxhLus8HnoO5c2wy57HS+iLtmXGAtIgWGqyoDWEliL6U9625qvbKI9p/5q37eqF4GgrMbjd4OF2n3 aQWNKeRqsLBgB4CI79yC0oEerQ9QdSBp8HL8S7YprUXuFG1jIVKwwJGZ0MjuUosIedbKeQC/uDmCt rPjpdaXK/yPhhmPtSUbw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1piVfR-0002vL-Ly; Sat, 01 Apr 2023 03:28:53 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 1 Apr 2023 09:28:42 +0200 Message-Id: <20230401072842.13315-1-ludo@gnu.org> X-Mailer: git-send-email 2.39.2 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680334164; a=rsa-sha256; cv=none; b=th6AW+vg8ARw14u4XsHWWiadGTyj8B7y76xbmb8WSPC108/GI59Spaj2fdjCo8Ag8SDLB0 na8kAdqO92EzWMQSODwaCAWa6KgaMLKSVBrYzjGufHOrsEOkMGqAW9gOVnCJzzoZY0ZWnX waI9GS+vpJh1Owglrw6c5EmrvDmczMzUQMZXq7qc28EYnngGFllV7lPCtm/ztZNDf5amlF KNA2XVV3WA9GwX8Hg++HGL675j7+TQchontPNYYc6jTUiCVA9mvXkge8QePXfSGhlt7iQX 4oPRzcvVl0XWDkJuJQcKabZGVne0KS9/3+TwInRpdJ3B8TPf1R2+MuwANZiXag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=Kca8b57C; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680334164; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=M487CNNKnwota7va8vu253sXZqB5QEt9yjs/7VJENio=; b=RBvNB1nlD4axLscd4/esPkdtdZFqXAGZs06+XoGpVaLh+lwpRwIKiFyoxsUHOkaB5P5kEc OmIPHjXfvOLcPofcsFHUDpOty8KeZPQCwS4UUkOEFEIQIKnV31AViks7WIE0JjvgMsBQTP EydVQwXF9uOSrckYp130ZDcYDXYox44fYI3ByOUZAwtQcpcKOhhREmf2kTsj4c6qytZIJq ABPX0DcbTSk3kIXftnJslSMzGom0b31Na05sINpgRVBL5ulKyJNcpxrUG+LscZuM3Ul/3o UkvO8RL5Fhxwe9dUXg5HlCXdwNs+jWgsUENHKqMHIc1JY8fgzDuf6GT/DRIEcQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=Kca8b57C; dmarc=pass (policy=none) header.from=gnu.org; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.63 X-Spam-Score: -3.63 X-Migadu-Queue-Id: 2A3EB20CA9 X-TUID: xcMnCPijGqC7 * gnu/services/base.scm (error/success-boot-gexp): New procedure. (error/success-service-type): New variable. (%base-services): Add an instance of it. * doc/guix.texi (Base Services): Document it. --- doc/guix.texi | 26 ++++++++++++++++++++++++++ gnu/services/base.scm | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) Hello Guix! A while back, we committed a change that removed the boot-time message we’d been seeing, “error in finalization thread: Success”: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=168a7933c0e138dc7061a3f0dc96871e16da5c5f This change was not universally acclaimed. Some complained that the boot process had seemingly become opaque because it’s now harder to tell whether it’s making progress successfully, while others were disappointed that their newly acquired sticker had become obsolete. This patch reinstates that message. The previous implementation worked by closing a file descriptor that Guile relied on internally. The new implementation takes a different approach, with the error-reporting device implemented right into the service, which should give us more flexibility—e.g., the service could be extended to report other error codes. The new ‘error/success-service-type’ is added to ‘%base-services’, the default list of system services. I think it’s good to have it by default, but that’s something we can discuss. Feedback welcome! Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index a58ea8f9ec..605ed648c4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19007,6 +19007,32 @@ about the Pluggable Authentication Module (PAM) limits, refer to the @samp{pam_limits} man page from the @code{linux-pam} package. @end defvar +@cindex success, and error (service type) +@cindex error, and success (service type) + +@defvar error/success-service-type +This is the service type for the iconic ``error in finalization thread: +Success'' boot-time message that long-time Guix System users are +familiar with. It is part of @code{%base-services} (enabled by +default). + +New users who do not feel the need for this service can disable it by +filtering it out of their service list. For instance, if you are using +@code{%desktop-services}, you can change your operating system +configuration like so (@pxref{Service Reference, +@code{modify-services}}): + +@lisp +(operating-system + ;; @dots{} + (services (modify-services %desktop-services + (delete error/success-service-type)))) +@end lisp + +However, we do not recommend it as you could lose sight of how weird and +beautiful your system is. +@end defvar + @defvar greetd-service-type @uref{https://git.sr.ht/~kennylevinsen/greetd, @code{greetd}} is a minimal and flexible login manager daemon, that makes no assumptions about what you diff --git a/gnu/services/base.scm b/gnu/services/base.scm index e063828d3b..5479cd63cf 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -248,6 +248,8 @@ (define-module (gnu services base) pam-limits-service-type pam-limits-service ; deprecated + error/success-service-type + greetd-service-type greetd-configuration greetd-terminal-configuration @@ -2990,6 +2992,29 @@ (define %qemu-static-networking (provision '(networking)) (name-servers '("10.0.2.3")))) + +;;; +;;; The iconic error/success message service. +;;; + +(define (error/success-boot-gexp _) + #~(begin + (display "error in finalization thread: Success\n" + (current-error-port)) + (sleep 2))) ;let the user notice--all this hasn't been in vain + +(define error/success-service-type + (service-type + (name 'error/success) + (extensions + (list (service-extension boot-service-type + error/success-boot-gexp))) + (default-value 42) + (description + "This service prints the iconic error/success message at boot time. The +message acts as a lighthouse for seasoned users--and seasoned users to +be!--who immediately know, when they see it, that everything's alright."))) + ;;; ;;; greetd-service-type -- minimal and flexible login manager daemon @@ -3364,6 +3389,8 @@ (define %base-services (service sysctl-service-type) + (service error/success-service-type) + (service special-files-service-type `(("/bin/sh" ,(file-append bash "/bin/sh")) ("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) -- 2.39.2