From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 10:30:21 2019 Received: (at submit) by debbugs.gnu.org; 29 Jan 2019 15:30:21 +0000 Received: from localhost ([127.0.0.1]:50697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVKz-0001Rc-32 for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:30:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVKh-0001Im-Nz for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:30:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:40284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goVKZ-0007oy-PH for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:29:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goVKB-0001oC-6c for guix-patches@gnu.org; Tue, 29 Jan 2019 10:29:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goVJy-0007fn-Nm for guix-patches@gnu.org; Tue, 29 Jan 2019 10:29:15 -0500 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:41886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goVJy-0007dk-Gv for guix-patches@gnu.org; Tue, 29 Jan 2019 10:29:06 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id B423916AF7 for ; Tue, 29 Jan 2019 15:28:54 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 86de82ae for ; Tue, 29 Jan 2019 15:28:54 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH 0/3] Improve the upower-service style. Date: Tue, 29 Jan 2019 15:28:48 +0000 Message-ID: <877eenqy8f.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:7e00::f03c:91ff:fe69:8da9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain These patches update the style of the upower-service. Improving and documenting the record, and deprecating the upower-service procedure. Directly using record types as default values for service types, along with default values for the fields in the record type is generally more flexible and configurable than using procedures for service configuration. It means that the configuration for the service can be changed programatically by generating new configuration based off of the original configuration, rather than having to rerun the procedure that created the configuration in the first place. Christopher Baines (3): services: Improve the upower-configuration record. services: Improve the upower-service-type. services: desktop: Deprecate the upower-service procedure. doc/guix.texi | 79 ++++++++++++++++++++++++++-------- gnu/services/desktop.scm | 92 +++++++++++++++++++++++++++------------- 2 files changed, 123 insertions(+), 48 deletions(-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlxQcTBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeXPA/9HHoavcLLnNw7bcKWzjoGI6AxMkNLj+284FgucROMW/V7+uMw+w5aALhi THzSnnAXl4DWvSnWmm0EIyQ2Gw83weZqLlPu0GTsUIvyHqQb9UMqzVUy/S6YqUtA mwVZXU3oRgcd+jhSe+EC6qVYjY9GNlFTNYQE7rxZUyUos7QZoxPabhPgc1RCcvTk jm20Zu6SB5ERHD7mZI1rK+HrayQ3iCIKyses8bAjNekgk91q6Q4HykbGrVWJ2YkQ 3LkE0o9Zc4vaiisIWqcUhoTBL169N9QKZWstou+JovcpTdNZldYn/WTsjxUA607y PJ+EMpEne5pFwOzxyrOKHTjL0WmQIbE0JeP8JbeICh8V5die5qqKg0sO94zeZKj5 RTVf+wVqqWys5cAzFtJO769Qq5LSWqH6G3Xqcpd3chtEIKbFTnFFZrVjYxfAXXH9 KvWq5y6obQABJNzWK7PlqctuFs1chD802vJRwG5lCgI1g39GmQqvS3FuNOF7dGhW MVWWREiAl57E4AHKhtwueL1fvVhbspccb7uvr/nbQWP2Sr6a1+4rgYW0uyaJb/8V KXwYe/0ig4i4eMf3l8vI8g2L8/ztWULewkhqnbwi/KWV1sIvvzED9SuBQlQDFoJZ jKcdboBWWJ+YywjSCmnEGPAoSTDLImRBylHnewKFJq5xBE4oSH4= =fOnl -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 10:37:52 2019 Received: (at 34246) by debbugs.gnu.org; 29 Jan 2019 15:37:52 +0000 Received: from localhost ([127.0.0.1]:50709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVSS-0003X3-9u for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:52 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:60114 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVSQ-0003Wi-Lf for 34246@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:51 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 9F8A516AFB for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 6bceb931 for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (UTC) From: Christopher Baines To: 34246@debbugs.gnu.org Subject: [PATCH 3/3] services: desktop: Deprecate the upower-service procedure. Date: Tue, 29 Jan 2019 15:37:49 +0000 Message-Id: <20190129153749.10830-3-mail@cbaines.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129153749.10830-1-mail@cbaines.net> References: <877eenqy8f.fsf@cbaines.net> <20190129153749.10830-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34246 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This has now been replaced by the upower-service-type and record. * gnu/services/desktop.scm (upower-service): Deprecate this procedure. --- gnu/services/desktop.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 896084d2d5..2264a3e8aa 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -50,6 +50,7 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages mate) #:use-module (gnu packages enlightenment) + #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix packages) #:use-module (guix store) @@ -292,18 +293,18 @@ used by GNOME.") upower-package))) (default-value (upower-configuration))))) -(define* (upower-service #:key (upower upower) - (watts-up-pro? #f) - (poll-batteries? #t) - (ignore-lid? #f) - (use-percentage-for-policy? #f) - (percentage-low 10) - (percentage-critical 3) - (percentage-action 2) - (time-low 1200) - (time-critical 300) - (time-action 120) - (critical-power-action 'hybrid-sleep)) +(define-deprecated (upower-service #:key (upower upower) + (watts-up-pro? #f) + (poll-batteries? #t) + (ignore-lid? #f) + (use-percentage-for-policy? #f) + (percentage-low 10) + (percentage-critical 3) + (percentage-action 2) + (time-low 1200) + (time-critical 300) + (time-action 120) + (critical-power-action 'hybrid-sleep)) "Return a service that runs @uref{http://upower.freedesktop.org/, @command{upowerd}}, a system-wide monitor for power consumption and battery levels, with the given configuration settings. It implements the -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 10:37:53 2019 Received: (at 34246) by debbugs.gnu.org; 29 Jan 2019 15:37:53 +0000 Received: from localhost ([127.0.0.1]:50711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVSS-0003XA-Lt for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:53 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:60116 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVSQ-0003Wj-Od for 34246@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:51 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 8FC0D16AFA for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id c36970df for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (UTC) From: Christopher Baines To: 34246@debbugs.gnu.org Subject: [PATCH 2/3] services: Improve the upower-service-type. Date: Tue, 29 Jan 2019 15:37:48 +0000 Message-Id: <20190129153749.10830-2-mail@cbaines.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129153749.10830-1-mail@cbaines.net> References: <877eenqy8f.fsf@cbaines.net> <20190129153749.10830-1-mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34246 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Add a description and default value. Switch the documentation to mention the service-type and the configuration record, rather than the upower-service procedure. * gnu/services/desktop.scm (upower-service-type)[description, default-value]: Define these fields. (%desktop-services): Change (upower-service) to (service upower-service-type). * doc/guix.texi (Desktop Services): Update the upower service documentation. --- doc/guix.texi | 92 ++++++++++++++++++++++++++++++++-------- gnu/services/desktop.scm | 10 ++++- 2 files changed, 82 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 972a6a7762..2ff120d5a3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -34,6 +34,7 @@ Copyright @copyright{} 2016, 2017 Nils Gillmann@* Copyright @copyright{} 2016, 2017, 2018 Jan Nieuwenhuizen@* Copyright @copyright{} 2016 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* +Copyright @copyright{} 2016, 2017, 2018, 2019 Christopher Baines@* Copyright @copyright{} 2017, 2018 Clément Lassieur@* Copyright @copyright{} 2017, 2018 Mathieu Othacehe@* Copyright @copyright{} 2017 Federico Beffa@* @@ -14230,24 +14231,79 @@ capabilities to ordinary users. For example, an ordinary user can be granted the capability to suspend the system if the user is logged in locally. @end deffn -@deffn {Scheme Procedure} upower-service [#:upower @var{upower}] @ - [#:watts-up-pro? #f] @ - [#:poll-batteries? #t] @ - [#:ignore-lid? #f] @ - [#:use-percentage-for-policy? #f] @ - [#:percentage-low 10] @ - [#:percentage-critical 3] @ - [#:percentage-action 2] @ - [#:time-low 1200] @ - [#:time-critical 300] @ - [#:time-action 120] @ - [#:critical-power-action 'hybrid-sleep] -Return a service that runs @uref{http://upower.freedesktop.org/, -@command{upowerd}}, a system-wide monitor for power consumption and battery -levels, with the given configuration settings. It implements the -@code{org.freedesktop.UPower} D-Bus interface, and is notably used by -GNOME. -@end deffn +@defvr {Scheme Variable} upower-service-type +Service that runs @uref{http://upower.freedesktop.org/, @command{upowerd}}, a +system-wide monitor for power consumption and battery levels, with the given +configuration settings. + +It implements the @code{org.freedesktop.UPower} D-Bus interface, and is +notably used by GNOME. +@end defvr + +@deftp {Data Type} upower-configuration +Data type representation the configuration for UPower. + +@table @asis + +@item @code{upower} (default: @var{upower}) +Package to use for @code{upower}. + +@item @code{watts-up-pro?} (default: @code{#f}) +Enable the Watts Up Pro device. + +@item @code{poll-batteries?} (default: @code{#t}) +Enable polling the kernel for battery level changes. + +@item @code{ignore-lid?} (default: @code{#f}) +Ignore the lid state, this can be useful if it's incorrect on a device. + +@item @code{use-percentage-for-policy?} (default: @code{#f}) +Whether battery percentage based policy should be used. The default is to use +the time left, change to @code{#t} to use the percentage. + +@item @code{percentage-low} (default: @code{10}) +When @code{use-percentage-for-policy?} is @code{#t}, this sets the percentage +at which the battery is considered low. + +@item @code{percentage-critical} (default: @code{3}) +When @code{use-percentage-for-policy?} is @code{#t}, this sets the percentage +at which the battery is considered critical. + +@item @code{percentage-action} (default: @code{2}) +When @code{use-percentage-for-policy?} is @code{#t}, this sets the percentage +at which action will be taken. + +@item @code{time-low} (default: @code{1200}) +When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining in +seconds at which the battery is considered low. + +@item @code{time-critical} (default: @code{300}) +When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining in +seconds at which the battery is considered critical. + +@item @code{time-action} (default: @code{120}) +When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining in +seconds at which action will be taken. + +@item @code{critical-power-action} (default: @code{'hybrid-sleep}) +The action taken when @code{percentage-action} or @code{time-action} is +reached (depending on the configuration of @code{use-percentage-for-policy?}). + +Possible values are: + +@itemize @bullet +@item +@code{'power-off} + +@item +@code{'hibernate} + +@item +@code{'hybrid-sleep}. +@end itemize + +@end table +@end deftp @deffn {Scheme Procedure} udisks-service [#:udisks @var{udisks}] Return a service for @uref{http://udisks.freedesktop.org/docs/latest/, diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index f51ac4d74c..896084d2d5 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -272,6 +272,11 @@ is set to @var{value} when the bus daemon launches it." (define upower-service-type (let ((upower-package (compose list upower-configuration-upower))) (service-type (name 'upower) + (description + "Run @command{upowerd}}, a system-wide monitor for power +consumption and battery levels, with the given configuration settings. It +implements the @code{org.freedesktop.UPower} D-Bus interface, and is notably +used by GNOME.") (extensions (list (service-extension dbus-root-service-type upower-dbus-service) @@ -284,7 +289,8 @@ is set to @var{value} when the bus daemon launches it." ;; Make the 'upower' command visible. (service-extension profile-service-type - upower-package)))))) + upower-package))) + (default-value (upower-configuration))))) (define* (upower-service #:key (upower upower) (watts-up-pro? #f) @@ -1013,7 +1019,7 @@ as expected."))) (service wpa-supplicant-service-type) ;needed by NetworkManager (service avahi-service-type) (udisks-service) - (upower-service) + (service upower-service-type) (accountsservice-service) (colord-service) (geoclue-service) -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 10:37:53 2019 Received: (at 34246) by debbugs.gnu.org; 29 Jan 2019 15:37:53 +0000 Received: from localhost ([127.0.0.1]:50713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVST-0003XD-5K for submit@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:53 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:60118 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goVSQ-0003Wk-LC for 34246@debbugs.gnu.org; Tue, 29 Jan 2019 10:37:51 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 7E86816AF9 for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 48b3ab70 for <34246@debbugs.gnu.org>; Tue, 29 Jan 2019 15:37:49 +0000 (UTC) From: Christopher Baines To: 34246@debbugs.gnu.org Subject: [PATCH 1/3] services: Improve the upower-configuration record. Date: Tue, 29 Jan 2019 15:37:47 +0000 Message-Id: <20190129153749.10830-1-mail@cbaines.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <877eenqy8f.fsf@cbaines.net> References: <877eenqy8f.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34246 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Copy the defaults from the upower-service procedure to the record type. This will allow making it the default value for the upower-service-type, and deprecating the procedure. Export the field accessors so that the record type becomes more usable. * gnu/services/desktop.scm (): Export it. (upower-configuration-upower, upower-configuration-watts-up-pro?, upower-configuration-poll-batteries?, upower-configuration-ignore-lid?, upower-configuration-use-percentage-for-policy?, upower-configuration-percentage-low, upower-configuration-percentage-critical, upower-configuration-percentage-action, upower-configuration-time-low, upower-configuration-time-critical, upower-configuration-time-action, upower-configuration-critical-power-action): Add default and export. --- gnu/services/desktop.scm | 55 +++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index fbeabf1162..f51ac4d74c 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Nils Gillmann ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2017, 2019 Christopher Baines ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,8 +57,22 @@ #:use-module (guix gexp) #:use-module (srfi srfi-1) #:use-module (ice-9 match) - #:export (upower-configuration + #:export ( + upower-configuration upower-configuration? + upower-configuration-upower + upower-configuration-watts-up-pro? + upower-configuration-poll-batteries? + upower-configuration-ignore-lid? + upower-configuration-use-percentage-for-policy? + upower-configuration-percentage-low + upower-configuration-percentage-critical + upower-configuration-percentage-action + upower-configuration-time-low + upower-configuration-time-critical + upower-configuration-time-action + upower-configuration-critical-power-action + upower-service upower-service-type @@ -173,23 +188,33 @@ is set to @var{value} when the bus daemon launches it." ;;; Upower D-Bus service. ;;; -;; TODO: Export. (define-record-type* upower-configuration make-upower-configuration upower-configuration? - (upower upower-configuration-upower - (default upower)) - (watts-up-pro? upower-configuration-watts-up-pro?) - (poll-batteries? upower-configuration-poll-batteries?) - (ignore-lid? upower-configuration-ignore-lid?) - (use-percentage-for-policy? upower-configuration-use-percentage-for-policy?) - (percentage-low upower-configuration-percentage-low) - (percentage-critical upower-configuration-percentage-critical) - (percentage-action upower-configuration-percentage-action) - (time-low upower-configuration-time-low) - (time-critical upower-configuration-time-critical) - (time-action upower-configuration-time-action) - (critical-power-action upower-configuration-critical-power-action)) + (upower upower-configuration-upower + (default upower)) + (watts-up-pro? upower-configuration-watts-up-pro? + (default #f)) + (poll-batteries? upower-configuration-poll-batteries? + (default #t)) + (ignore-lid? upower-configuration-ignore-lid? + (default #f)) + (use-percentage-for-policy? upower-configuration-use-percentage-for-policy? + (default #f)) + (percentage-low upower-configuration-percentage-low + (default 10)) + (percentage-critical upower-configuration-percentage-critical + (default 3)) + (percentage-action upower-configuration-percentage-action + (default 2)) + (time-low upower-configuration-time-low + (default 1200)) + (time-critical upower-configuration-time-critical + (default 300)) + (time-action upower-configuration-time-action + (default 120)) + (critical-power-action upower-configuration-critical-power-action + (default 'hybrid-sleep))) (define* upower-configuration-file ;; Return an upower-daemon configuration file. -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 16:30:10 2019 Received: (at 34246) by debbugs.gnu.org; 16 Feb 2019 21:30:10 +0000 Received: from localhost ([127.0.0.1]:50572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv7XG-0006ZA-FE for submit@debbugs.gnu.org; Sat, 16 Feb 2019 16:30:10 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:60572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv7XE-0006Z0-NU for 34246@debbugs.gnu.org; Sat, 16 Feb 2019 16:30:09 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 103AE10778; Sat, 16 Feb 2019 22:30:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oE83SFk15DVz; Sat, 16 Feb 2019 22:30:06 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8616E10758; Sat, 16 Feb 2019 22:30:06 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#34246] [PATCH 0/3] Improve the upower-service style. References: <877eenqy8f.fsf@cbaines.net> Date: Sat, 16 Feb 2019 22:30:05 +0100 In-Reply-To: <877eenqy8f.fsf@cbaines.net> (Christopher Baines's message of "Tue, 29 Jan 2019 15:28:48 +0000") Message-ID: <8736onh15u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34246 Cc: 34246@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello! Christopher Baines skribis: > These patches update the style of the upower-service. Improving and > documenting the record, and deprecating the > upower-service procedure. > > Directly using record types as default values for service types, along > with default values for the fields in the record type is generally more > flexible and configurable than using procedures for service > configuration. It means that the configuration for the service can be > changed programatically by generating new configuration based off of the > original configuration, rather than having to rerun the procedure that > created the configuration in the first place. > > > Christopher Baines (3): > services: Improve the upower-configuration record. > services: Improve the upower-service-type. > services: desktop: Deprecate the upower-service procedure. All three patches LGTM. Thanks for taking the time to do this! :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 17:15:52 2019 Received: (at 34246-done) by debbugs.gnu.org; 16 Feb 2019 22:15:52 +0000 Received: from localhost ([127.0.0.1]:50581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv8FU-0007cU-Ex for submit@debbugs.gnu.org; Sat, 16 Feb 2019 17:15:52 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:46588 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv8FS-0007cJ-6h for 34246-done@debbugs.gnu.org; Sat, 16 Feb 2019 17:15:51 -0500 Received: from localhost (130.85.159.143.dyn.plus.net [143.159.85.130]) by mira.cbaines.net (Postfix) with ESMTPSA id 3181816BDC; Sat, 16 Feb 2019 22:15:47 +0000 (GMT) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 1f0b1359; Sat, 16 Feb 2019 22:15:46 +0000 (UTC) References: <877eenqy8f.fsf@cbaines.net> <8736onh15u.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34246] [PATCH 0/3] Improve the upower-service style. In-reply-to: <8736onh15u.fsf@gnu.org> Date: Sat, 16 Feb 2019 22:15:43 +0000 Message-ID: <87tvh34bxs.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34246-done Cc: 34246-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello! > > Christopher Baines skribis: > >> These patches update the style of the upower-service. Improving and >> documenting the record, and deprecating the >> upower-service procedure. >> >> Directly using record types as default values for service types, along >> with default values for the fields in the record type is generally more >> flexible and configurable than using procedures for service >> configuration. It means that the configuration for the service can be >> changed programatically by generating new configuration based off of the >> original configuration, rather than having to rerun the procedure that >> created the configuration in the first place. >> >> >> Christopher Baines (3): >> services: Improve the upower-configuration record. >> services: Improve the upower-service-type. >> services: desktop: Deprecate the upower-service procedure. > > All three patches LGTM. Thanks for taking the time to do this! :-) Great, I've pushed these patches to master now :) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlxoi49fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeDsA//V4gPXv9qfM/mVzni3DgRdWakvJNwqixhn6wpiIVU06AorwTetACh+8Aj CebA35QXeWrWAWSNdhGFYj3kB68ZONW5mKVlLncO/yGf2WF+6kbnHJOB9kt5pUZr xqacL+nkjIRDnwkAhGiT1FWh+iAHjjXmQsKsPTcAe90CuqK0P4CcJ2k+/UiVizrd VEurV/jRNZ8nMlsArdDODAmPLEldi2iLNcHauUSGWTNiMaHFy9ViUmIi8BhTApbk c5+fZOXFX7HXwJLXjx5xTR0W5zZtE9Mv0Gp4/tn4M5S640tHBF9EarZ3d/DSzNU7 sVMIh4pO3SdlQ24IXJCodkE/Uni+vyOlGiYiZvVvKTPLy+Re0YYZg9CB5+tEoucF ZErU95nHrAMP7SfQYrLWAwGfU1x++NMC/zsFJqbP0BxaerRYF2ybnVF+5xWSfGzI F5QHrwSVuqbLBpZ4sqUlBgEPtzW14uI3s955iMr4eLX1lamjmZkL0VxGdhhNiyhR 6IrbaKvhHw8s7LdCLkrG7Af/07WROXz+m8n4Cnnv/m3ShJ7YcQoRNp9OAIHtx6H+ 4EBhPkVHzzWqiL1jgFwkuiaAIWlmpAsFZ0ilt93LV+zyu5ep6L/t502gmzgGq5Dc TxfLgsP/RSOPLuDkjsyFpdwGxuSPHa7a8cl44irZbgqJNwhZL10= =1zYk -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 03:56:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 17 Mar 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator