From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id /fznB8pU9WOTigAAbAwnHQ (envelope-from ) for ; Wed, 22 Feb 2023 00:33:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AFjxBspU9WMpRgEAauVa8A (envelope-from ) for ; Wed, 22 Feb 2023 00:33:30 +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 A8FD61891B for ; Wed, 22 Feb 2023 00:33:29 +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=1677022409; a=rsa-sha256; cv=none; b=B9K8Pyz1HvWvapc5HkxwEp6DNJowendYVw0BRg5fsmPIPpJxT4n6IargKpG4rmJFFbOazA o2WJzv9ludX1ajrv/ZrRTydTtmcOOevVqUYRn4fXwJ3UWmfyPHJ58jCdoNU2GtZnufjYcb aj6ZopwOswCf9Ei8SZ6eqMj9H/dRi4CXGZ45VpSFB6sglDlHly+MVsfYOV6f+i5zQlBoSN 7ls5gZ1WGQgLGZ6RL5T6E6VMnU2SXZtCVTmEW8SbOyk467LKNLk4RXnBpd2El5a1Q0TCly j+GlAHUof8ozRJ3vVVh5GgxO8pEkrtZuDGJdymk6gPbRS/JIw3SRvzBhrCgW9g== 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=1677022409; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Khtdlh0mu/i2K40j+xS8sascNpHHvrz9J7JFXq0DqOY=; b=pEYvDCXgWBo0Q/PAjGJ2HNPts0S0VjBJLvqkqo6zX3x5DYDWHlbTUZSdPYUa/GrTnLqPTf HLdkXilWkqyj8130BJZr9dJwKslk6jU5wSSoBjQXrSLUEcB+Z8uSvbg+/yhMPObTGGjbKv Z8pl75Nolxlear0BJ33gGhmcdUR9DVIuVwa/R1gNmM3UP+Hh/6ntwPAmMR7BxApR6/eA1c Nq9LYWQO1RJ5/iKkKaBY6b9ndm8sCAlYRoJFEygTKAXk3NOOKbJ4YWr4E8SFaoRhzHjvp7 pr0Mk2/GPSIwWWl2IR5e+EkWY2alPE4wLDVju5wC2S7DAoeEXJmttibyba9IMA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUc89-0004yB-TO; Tue, 21 Feb 2023 18:33:05 -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 1pUc86-0004xX-NR for guix-patches@gnu.org; Tue, 21 Feb 2023 18:33:02 -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 1pUc86-0003oz-Fh for guix-patches@gnu.org; Tue, 21 Feb 2023 18:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUc86-00015l-0G for guix-patches@gnu.org; Tue, 21 Feb 2023 18:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61692] [PATCH] services: dbus-service: Deprecate 'dbus-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Feb 2023 23:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61692@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16770223374135 (code B ref -1); Tue, 21 Feb 2023 23:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2023 23:32:17 +0000 Received: from localhost ([127.0.0.1]:57474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUc7M-00014c-RT for submit@debbugs.gnu.org; Tue, 21 Feb 2023 18:32:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:51552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUc7H-00014N-7S for submit@debbugs.gnu.org; Tue, 21 Feb 2023 18:32:14 -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 1pUc7G-00047E-W4 for guix-patches@gnu.org; Tue, 21 Feb 2023 18:32:11 -0500 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUc7E-0003dq-Ki for guix-patches@gnu.org; Tue, 21 Feb 2023 18:32:10 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 2CBA52077C for ; Wed, 22 Feb 2023 00:32:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C5FD580097; Wed, 22 Feb 2023 00:32:02 +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 OsEyJxwb1i8L; Wed, 22 Feb 2023 00:32:02 +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 2935780079; Wed, 22 Feb 2023 00:32:02 +0100 (CET) From: Bruno Victal Date: Tue, 21 Feb 2023 23:31:56 +0000 Message-Id: <5dab916f4cb3bc513d397e151107bea826294ead.1677022272.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.107.240; envelope-from=mirai@makinata.eu; helo=smtpmciv4.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: A8FD61891B X-Spam-Score: -3.76 X-Migadu-Spam-Score: -3.76 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: iw9prAiOZcgK * doc/guix.texi (Desktop Services): Replace with 'dbus-root-service-type'. Document dbus-configuration. * gnu/services/dbus.scm (dbus-service): Define with 'define-deprecated'. * gnu/services/desktop.scm (desktop-services-for-system): Replace with dbus-root-service-type. * gnu/system/install.scm (%installation-services): Ditto. * gnu/tests/base.scm (%avahi-os): Ditto. * gnu/tests/docker.scm (%docker-os): Ditto. * gnu/tests/lightdm.scm (minimal-desktop-services): Ditto. * gnu/tests/virtualization.scm (%libvirt-os): Ditto. --- doc/guix.texi | 49 +++++++++++++++++++++++------------- gnu/services/dbus.scm | 6 +++-- gnu/services/desktop.scm | 2 +- gnu/system/install.scm | 2 +- gnu/tests/base.scm | 2 +- gnu/tests/docker.scm | 2 +- gnu/tests/lightdm.scm | 2 +- gnu/tests/virtualization.scm | 2 +- 8 files changed, 41 insertions(+), 26 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 05615b9549..b85bef40c1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23141,24 +23141,37 @@ Desktop Services provided by @code{(gnu services dbus)} and @code{(gnu services desktop)} are described below. -@deffn {Scheme Procedure} dbus-service [#:dbus @var{dbus}] [#:services '()] @ - [#:verbose?] -Return a service that runs the ``system bus'', using @var{dbus}, with -support for @var{services}. When @var{verbose?} is true, it causes the -@samp{DBUS_VERBOSE} environment variable to be set to @samp{1}; a -verbose-enabled D-Bus package such as @code{dbus-verbose} should be -provided as @var{dbus} in this scenario. The verbose output is logged -to @file{/var/log/dbus-daemon.log}. - -@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process communication -facility. Its system bus is used to allow system services to communicate -and to be notified of system-wide events. - -@var{services} must be a list of packages that provide an -@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration -and policy files. For example, to allow avahi-daemon to use the system bus, -@var{services} must be equal to @code{(list avahi)}. -@end deffn +@defvar dbus-root-service-type +Type for a service that runs the D-Bus ``system bus''. +@footnote{@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process +communication facility. Its system bus is used to allow system services +to communicate and to be notified of system-wide events.} + +The value for this service type is a @code{} record. +@end defvar + +@deftp {Data Type} dbus-configuration +Data type representing the configuration for @code{dbus-root-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) (type: file-like) +Package object for dbus. + +@item @code{services} (default: @code{()}) (type: list) +List of packages that provide an @file{etc/dbus-1/system.d} directory +containing additional D-Bus configuration and policy files. +For example, to allow avahi-daemon to use the system bus, @var{services} +must be equal to @code{(list avahi)}. + +@item @code{verbose?} (default: @code{#f}) (type: boolean) +When @code{#t}, D-Bus is launched with environment variable +@samp{DBUS_VERBOSE} set to @samp{1}. A verbose-enabled D-Bus package +such as @code{dbus-verbose} should be provided to @var{dbus} in this +scenario. The verbose output is logged to +@file{/var/log/dbus-daemon.log}. + +@end table +@end deftp @deffn {Scheme Procedure} elogind-service [#:config @var{config}] Return a service that runs the @code{elogind} login and diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 5efd6bdadf..c08a91221f 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -28,6 +28,7 @@ (define-module (gnu services dbus) #:use-module ((gnu packages glib) #:select (dbus)) #:use-module (gnu packages polkit) #:use-module (gnu packages admin) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module ((guix packages) #:select (package-name)) #:use-module (guix records) @@ -37,7 +38,7 @@ (define-module (gnu services dbus) #:export (dbus-configuration dbus-configuration? dbus-root-service-type - dbus-service + dbus-service ; deprecated wrapped-dbus-service polkit-configuration @@ -244,7 +245,8 @@ (define dbus-root-service-type bus. It allows programs and daemons to communicate and is also responsible for spawning (@dfn{activating}) D-Bus services on demand."))) -(define* (dbus-service #:key (dbus dbus) (services '()) verbose?) +(define-deprecated (dbus-service #:key (dbus dbus) (services '()) verbose?) + dbus-root-service-type "Return a service that runs the \"system bus\", using @var{dbus}, with support for @var{services}. When @var{verbose?} is true, it causes the @samp{DBUS_VERBOSE} environment variable to be set to @samp{1}; a diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index fe1f0fd20a..0d3de32be6 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1804,7 +1804,7 @@ (define* (desktop-services-for-system #:optional (geoclue-service) (service polkit-service-type) (elogind-service) - (dbus-service) + (service dbus-root-service-type) (service ntp-service-type) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index b3cf7a1bd8..77ef577fd2 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -437,7 +437,7 @@ (define* (%installation-services #:key (system (or (and=> (list %loopback-static-networking)) (service wpa-supplicant-service-type) - (dbus-service) + (service dbus-root-service-type) (service connman-service-type (connman-configuration (disable-vpn? #t))) diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 3e72e193d7..97edbbc6ad 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -962,7 +962,7 @@ (define %avahi-os (name-service-switch %mdns-host-lookup-nss) (services (cons* (service avahi-service-type (avahi-configuration (debug? #t))) - (dbus-service) + (service dbus-root-service-type) (service dhcp-client-service-type) ;needed for multicast ;; Enable heavyweight debugging output. diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm index 4267ff89a8..37946b2fbc 100644 --- a/gnu/tests/docker.scm +++ b/gnu/tests/docker.scm @@ -48,7 +48,7 @@ (define-module (gnu tests docker) (define %docker-os (simple-operating-system (service dhcp-client-service-type) - (dbus-service) + (service dbus-root-service-type) (polkit-service) (service elogind-service-type) (service docker-service-type))) diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm index 57d029a75a..74c7b118a5 100644 --- a/gnu/tests/lightdm.scm +++ b/gnu/tests/lightdm.scm @@ -49,7 +49,7 @@ (define minimal-desktop-services (accountsservice-service) (service polkit-service-type) (elogind-service) - (dbus-service) + (service dbus-root-service-type) x11-socket-directory-service)) (define %lightdm-os diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index 60789fbb5b..9fe23aeeac 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -49,7 +49,7 @@ (define-module (gnu tests virtualization) (define %libvirt-os (simple-operating-system (service dhcp-client-service-type) - (dbus-service) + (service dbus-root-service-type) (polkit-service) (service libvirt-service-type))) base-commit: fbbbc2088ce933d83f5b0be75308fdcb6b40fa57 -- 2.39.1