From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sI3uCqta+mMcTQAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 19:59:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IE3TCqta+mMheAEAauVa8A (envelope-from ) for ; Sat, 25 Feb 2023 19:59:55 +0100 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 C8444211F for ; Sat, 25 Feb 2023 19:59:54 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677351594; a=rsa-sha256; cv=none; b=VIgW6ypNXuL0BOFU4OOk4F+rX6jUvIPnTQcvxyyxspeE0bbNOpBFTzpmEH7QPvL5K6yn11 rb4wUwsLBh5npiIC+HzCi6jCQkXxZHuoQ2EcqjzTvfQGHNMBGw45lUNDJeBFpQjKVLhvI/ vxOC0VaDg2JaboMkZTocfEwf7zkzXBEZSVpLh+AeVAP4mPZVC2p+vRWcSO7R75QVnwnUIb Of9ouVV67GiMZQ9CVqfrSASHaEiBEQXLhwCkcjJAo3/blRNB4bdFspjQrVySpCsX+B0LL7 hS4XvK5s91DvtEV4yhkhL38sTnfHU6YEcLgtePmu60ztTjTF5EO1/n13lFBmXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677351594; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=aJCbdg96zDo4VI1lhLdk+lQYk8phmravI2j3vzx6d4M=; b=OewfDQRcjU9IfMR4db9rxcqQP/iXmlnjL6CtWE9uxKDRnPaVfBFlZoQJdI1Rc5wRJjUnny mVm7EP0jhrhFEJEqoRTJ8Kf/r/CguRik4kikJrWSmzyASh74y6vc3skkzhs3w1A9ShpLPq aCY5ArWtWqpOEneL1VKBf/mtSr/ULKF/t0VtI8vaLNdRZx0HqGcXasANQUM/nTHxYLxS3B W+CyiHJE5VPW4C3g+zhFtNb536UtRpM47ldyz6vBASkIZomnKWZdvmHpuxmHv4eOg3jeTD 6ZVZWpZLsM+C+PwI057EwA79znKMaW2s9vrw7wIUmSi9ZwfKOXI6VXbfyUy6gw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sP-KR; Sat, 25 Feb 2023 13:59:09 -0500 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 1pVzlA-0001oX-0R for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 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 1pVzl9-0000bk-OL for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl9-0007wK-L5 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 14/27] services: xorg: Deprecate 'screen-locker-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151130313 (code B ref 61789); Sat, 25 Feb 2023 18:59:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:31 +0000 Received: from localhost ([127.0.0.1]:41436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkc-0007sk-P2 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:31 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:59546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkV-0007rL-TP for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:24 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 41D8E20EFB for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A70D680079; Sat, 25 Feb 2023 19:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BtaOX_Gwdrwq; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 5D93B800A0; Sat, 25 Feb 2023 19:58:21 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:00 +0000 Message-Id: <9e2b1d0ac1148daefe99a9075fdd99b440f11f74.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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: X-Migadu-Queue-Id: C8444211F X-Spam-Score: -3.18 X-Migadu-Spam-Score: -3.18 X-Migadu-Scanner: scn0.migadu.com 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: SBIiTUsjI4kn * doc/guix.texi (X Window): Replace 'screen-locker-service' with 'screen-locker-service-type'. Document . * gnu/services/desktop.scm (desktop-services-for-system): Use screen-locker-service-type. * gnu/services/xorg.scm: Export accessors for . (): Rename to ... (): ... this. ()[empty?]: Rename to ... ()[allow-empty-password?]: ... this. (screen-locker-pam-services): Update record name. (screen-locker-setuid-programs): Update accessor name. (screen-locker-service): Deprecate procedure. --- doc/guix.texi | 32 ++++++++++++++++++++++----- gnu/services/desktop.scm | 8 +++++-- gnu/services/xorg.scm | 47 +++++++++++++++++++++++++--------------- 3 files changed, 62 insertions(+), 25 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9f6f1f8794..05900d514a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22221,18 +22221,38 @@ X Window @end deffn -@deffn {Scheme Procedure} screen-locker-service @var{package} [@var{program}] -Add @var{package}, a package for a screen locker or screen saver whose -command is @var{program}, to the set of setuid programs and add a PAM entry -for it. For example: +@defvar screen-locker-service-type +Type for a service that adds a package for a screen locker or screen +saver to the set of setuid programs and add a PAM entry for it. The +value for this service is a @code{} object. + +For example, to make XlockMore usable: @lisp -(screen-locker-service xlockmore "xlock") +(service screen-locker-service-type + (screen-locker-configuration + "xlock" (file-append xlockmore "/bin/xlock") #f)) @end lisp makes the good ol' XlockMore usable. -@end deffn +@end defvar +@deftp {Data Type} screen-locker-configuration +Data type representing the configuration of +@code{screen-locker-service-type}. + +@table @asis +@item @code{name} (type: string) +Name of the screen locker. + +@item @code{program} (type: gexp) +Path to the executable for the screen locker as a G-Expression. + +@item @code{allow-empty-password?} (type: boolean) +Whether to allow empty passwords. + +@end table +@end deftp @node Printing Services @subsection Printing Services diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index fe1f0fd20a..d4ac88311f 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1755,8 +1755,12 @@ (define* (desktop-services-for-system #:optional (service sddm-service-type)) ;; Screen lockers are a pretty useful thing and these are small. - (screen-locker-service slock) - (screen-locker-service xlockmore "xlock") + (service screen-locker-service-type + (screen-locker-configuration + "slock" (file-append slock "/bin/slock") #f)) + (service screen-locker-service-type + (screen-locker-configuration + "xlock" (file-append xlockmore "/bin/xlock") #f)) ;; Add udev rules for MTP devices so that non-root users can access ;; them. diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 5f073d05d3..c4745cecf5 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -107,10 +107,13 @@ (define-module (gnu services xorg) slim-service-type - screen-locker - screen-locker? + screen-locker-configuration + screen-locker-configuration? + screen-locker-configuration-name + screen-locker-configuration-program + screen-locker-configuration-allow-empty-password? screen-locker-service-type - screen-locker-service + screen-locker-service ; deprecated localed-configuration localed-configuration? @@ -683,21 +686,30 @@ (define slim-service-type ;;; Screen lockers & co. ;;; -(define-record-type - (screen-locker name program empty?) +(define-record-type + (screen-locker-configuration name program allow-empty-password?) + screen-locker-configuration? + (name screen-locker-configuration-name) ;string + (program screen-locker-configuration-program) ;gexp + (allow-empty-password? + screen-locker-configuration-allow-empty-password?)) ;Boolean + +(define-deprecated/public-alias + screen-locker + screen-locker-configuration) + +(define-deprecated/public-alias screen-locker? - (name screen-locker-name) ;string - (program screen-locker-program) ;gexp - (empty? screen-locker-allows-empty-passwords?)) ;Boolean + screen-locker-configuration?) (define screen-locker-pam-services (match-lambda - (($ name _ empty?) + (($ name _ empty?) (list (unix-pam-service name #:allow-empty-passwords? empty?))))) (define screen-locker-setuid-programs - (compose list file-like->setuid-program screen-locker-program)) + (compose list file-like->setuid-program screen-locker-configuration-program)) (define screen-locker-service-type (service-type (name 'screen-locker) @@ -711,10 +723,11 @@ (define screen-locker-service-type the graphical server by making it setuid-root, so it can authenticate users, and by creating a PAM service for it."))) -(define* (screen-locker-service package - #:optional - (program (package-name package)) - #:key allow-empty-passwords?) +(define-deprecated (screen-locker-service package + #:optional + (program (package-name package)) + #:key allow-empty-passwords?) + screen-locker-service-type "Add @var{package}, a package for a screen locker or screen saver whose command is @var{program}, to the set of setuid programs and add a PAM entry for it. For example: @@ -725,9 +738,9 @@ (define* (screen-locker-service package makes the good ol' XlockMore usable." (service screen-locker-service-type - (screen-locker program - (file-append package "/bin/" program) - allow-empty-passwords?))) + (screen-locker-configuration program + (file-append package "/bin/" program) + allow-empty-passwords?))) ;;; -- 2.39.1