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 ms11 with LMTPS id OLmiFq/knl+XRQAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 16:39:11 +0000 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 wHuJEq/knl+BDAAA1q6Kng (envelope-from ) for ; Sun, 01 Nov 2020 16:39: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 9ED9E9403E6 for ; Sun, 1 Nov 2020 16:39:10 +0000 (UTC) Received: from localhost ([::1]:45882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZGNo-0005L1-HB for larch@yhetil.org; Sun, 01 Nov 2020 11:39:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZGNi-0005Ko-5u for bug-guix@gnu.org; Sun, 01 Nov 2020 11:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZGNh-00070R-TD for bug-guix@gnu.org; Sun, 01 Nov 2020 11:39:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZGNh-0001Z9-Ox for bug-guix@gnu.org; Sun, 01 Nov 2020 11:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44347: mingetty --no-clear is hard-coded Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 01 Nov 2020 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44347 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jesse Gibbons , 44347@debbugs.gnu.org Received: via spool by 44347-submit@debbugs.gnu.org id=B44347.16042487316003 (code B ref 44347); Sun, 01 Nov 2020 16:39:01 +0000 Received: (at 44347) by debbugs.gnu.org; 1 Nov 2020 16:38:51 +0000 Received: from localhost ([127.0.0.1]:38333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZGNX-0001Yl-4J for submit@debbugs.gnu.org; Sun, 01 Nov 2020 11:38:51 -0500 Received: from world.peace.net ([64.112.178.59]:57586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZGNV-0001YZ-VX for 44347@debbugs.gnu.org; Sun, 01 Nov 2020 11:38:50 -0500 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZGNP-0007vV-Ev; Sun, 01 Nov 2020 11:38:43 -0500 From: Mark H Weaver In-Reply-To: <87zh413uq0.fsf@netris.org> References: <9da4da56-c557-19be-fac6-f8b9ab8541c5@gmail.com> <87zh413uq0.fsf@netris.org> Date: Sun, 01 Nov 2020 11:37:02 -0500 Message-ID: <87wnz53ueu.fsf@netris.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: HXxhdX7ptxyg --=-=-= Content-Type: text/plain Here's a revised patch, still untested, that also updates the documentation. Mark --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-UNTESTED-gnu-mingetty-shepherd-service-Make-clear-on.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] UNTESTED: gnu: mingetty-shepherd-service: Make 'clear-on-logout' configurable. >From 9229d0493cdbb521a2f7a821d47d60d2392b8447 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 1 Nov 2020 11:16:08 -0500 Subject: [PATCH] UNTESTED: gnu: mingetty-shepherd-service: Make 'clear-on-logout' configurable. Also change the default configuration to clear on logout, which is the upstream default. * gnu/services/base.scm (): Add 'clear-on-logout?' field. (mingetty-shepherd-service): Pass the "--noclear" option to mingetty only if 'clear-on-logout?' is #false. * doc/guix.texi (Base Services): Document the 'clear-on-logout?' field. --- doc/guix.texi | 3 +++ gnu/services/base.scm | 28 ++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 69e7d5f85c..6ef4350f97 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14494,6 +14494,9 @@ the name of the log-in program. When set to @code{#t} in conjunction with @var{auto-login}, the user will have to press a key before the log-in shell is launched. =20 +@item @code{clear-on-logout?} (default: @code{#t}) +When set to @code{#t}, the screen will be cleared after logout. + @item @code{mingetty} (default: @var{mingetty}) The Mingetty package to use. =20 diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 5a5c41d588..1f750670c9 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovi= c Court=C3=A8s ;;; Copyright =C2=A9 2015, 2016 Alex Kost -;;; Copyright =C2=A9 2015, 2016 Mark H Weaver +;;; Copyright =C2=A9 2015, 2016, 2020 Mark H Weaver ;;; Copyright =C2=A9 2015 Sou Bunnbu ;;; Copyright =C2=A9 2016, 2017 Leo Famulari ;;; Copyright =C2=A9 2016 David Craven @@ -1024,20 +1024,22 @@ the tty to run, among other things." (define-record-type* mingetty-configuration make-mingetty-configuration mingetty-configuration? - (mingetty mingetty-configuration-mingetty ; - (default mingetty)) - (tty mingetty-configuration-tty) ;string - (auto-login mingetty-auto-login ;string | #f - (default #f)) - (login-program mingetty-login-program ;gexp - (default #f)) - (login-pause? mingetty-login-pause? ;Boolean - (default #f))) + (mingetty mingetty-configuration-mingetty ; + (default mingetty)) + (tty mingetty-configuration-tty) ;string + (auto-login mingetty-auto-login ;string | #f + (default #f)) + (login-program mingetty-login-program ;gexp + (default #f)) + (login-pause? mingetty-login-pause? ;Boolean + (default #f)) + (clear-on-logout? mingetty-clear-on-logout? ;Boolean + (default #t))) =20 (define mingetty-shepherd-service (match-lambda (($ mingetty tty auto-login login-program - login-pause?) + login-pause? clear-on-logout?) (list (shepherd-service (documentation "Run mingetty on an tty.") @@ -1050,7 +1052,6 @@ the tty to run, among other things." =20 (start #~(make-forkexec-constructor (list #$(file-append mingetty "/sbin/mingetty") - "--noclear" =20 ;; Avoiding 'vhangup' allows us to avoid 'setfont' ;; errors down the path where various ioctls get @@ -1058,6 +1059,9 @@ the tty to run, among other things." ;; in Linux. "--nohangup" #$tty =20 + #$@(if clear-on-logout? + #~() + #~("--noclear")) #$@(if auto-login #~("--autologin" #$auto-login) #~()) --=20 2.28.0 --=-=-=--