[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61789] [PATCH 20/27] services: desktop: Deprecate 'geoclue-service'
From: |
Bruno Victal |
Subject: |
[bug#61789] [PATCH 20/27] services: desktop: Deprecate 'geoclue-service' procedure. |
Date: |
Sat, 25 Feb 2023 18:58:06 +0000 |
* doc/guix.texi (Desktop Services): Replace 'geoclue-service' with
'geoclue-service-type'.
* gnu/services/desktop.scm (<geoclue-configuration>): Set default values
based on the values from the now deprecated geoclue-service procedure.
(geoclue-service): Deprecate procedure.
(desktop-services-for-system): Use geoclue-service-type.
---
doc/guix.texi | 26 ++++++++---------
gnu/services/desktop.scm | 61 ++++++++++++++++++++++++----------------
2 files changed, 48 insertions(+), 39 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 2c9f55cd19..f9fb891df0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23625,20 +23625,18 @@ Desktop Services
know the user's location.
@end defvar
-@deffn {Scheme Procedure} geoclue-service [#:colord @var{colord}] @
- [#:whitelist '()] @
- [#:wifi-geolocation-url
"https://location.services.mozilla.com/v1/geolocate?key=geoclue"] @
- [#:submit-data? #f]
- [#:wifi-submission-url
"https://location.services.mozilla.com/v1/submit?key=geoclue"] @
- [#:submission-nick "geoclue"] @
- [#:applications %standard-geoclue-applications]
-Return a service that runs the GeoClue location service. This service
-provides a D-Bus interface to allow applications to request access to a
-user's physical location, and optionally to add information to online
-location databases. See
-@uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the GeoClue
-web site} for more information.
-@end deffn
+@defvar geoclue-service-type
+Type for the service that runs the
+@url{https://wiki.freedesktop.org/www/Software/GeoClue/, GeoClue}
+location service. This service provides a D-Bus interface to allow
+applications to request access to a user's physical location, and
+optionally to add information to online location databases.
+
+The value for this service is a @code{<geoclue-configuration>} object.
+@end defvar
+
+@c TODO: Document <geoclue-configuration>, preferably by refactoring this to
use
+@c define-configuration and generating documentation from it.
@deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @
[@w{#:auto-enable? #f}]
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 701c64a75d..c5212ee9aa 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -104,7 +104,7 @@ (define-module (gnu services desktop)
geoclue-configuration
geoclue-configuration?
%standard-geoclue-applications
- geoclue-service
+ geoclue-service ; deprecated
geoclue-service-type
bluetooth-service-type
@@ -304,19 +304,6 @@ (define upower-service-type
;;; GeoClue D-Bus service.
;;;
-;; TODO: Export.
-(define-record-type* <geoclue-configuration>
- geoclue-configuration make-geoclue-configuration
- geoclue-configuration?
- (geoclue geoclue-configuration-geoclue
- (default geoclue))
- (whitelist geoclue-configuration-whitelist)
- (wifi-geolocation-url geoclue-configuration-wifi-geolocation-url)
- (submit-data? geoclue-configuration-submit-data?)
- (wifi-submission-url geoclue-configuration-wifi-submission-url)
- (submission-nick geoclue-configuration-submission-nick)
- (applications geoclue-configuration-applications))
-
(define* (geoclue-application name #:key (allowed? #t) system? (users '()))
"Configure default GeoClue access permissions for an application. NAME is
the Desktop ID of the application, without the .desktop part. If ALLOWED? is
@@ -336,6 +323,28 @@ (define %standard-geoclue-applications
(geoclue-application "epiphany" #:system? #f)
(geoclue-application "firefox" #:system? #f)))
+;; TODO: Use define-configuration and export accessors.
+(define-record-type* <geoclue-configuration>
+ geoclue-configuration make-geoclue-configuration
+ geoclue-configuration?
+ (geoclue geoclue-configuration-geoclue
+ (default geoclue))
+ (whitelist geoclue-configuration-whitelist
+ (default '()))
+ (wifi-geolocation-url
+ geoclue-configuration-wifi-geolocation-url
+ ;; Mozilla geolocation service:
+ (default "https://location.services.mozilla.com/v1/geolocate?key=geoclue"))
+ (submit-data? geoclue-configuration-submit-data?
+ (default #f))
+ (wifi-submission-url
+ geoclue-configuration-wifi-submission-url
+ (default "https://location.services.mozilla.com/v1/submit?key=geoclue"))
+ (submission-nick geoclue-configuration-submission-nick
+ (default "geoclue"))
+ (applications geoclue-configuration-applications
+ (default %standard-geoclue-applications)))
+
(define* (geoclue-configuration-file config)
"Return a geoclue configuration file."
(plain-file "geoclue.conf"
@@ -383,16 +392,18 @@ (define geoclue-service-type
access to a user's physical location, and optionally to add information to
online location databases.")))
-(define* (geoclue-service #:key (geoclue geoclue)
- (whitelist '())
- (wifi-geolocation-url
- ;; Mozilla geolocation service:
-
"https://location.services.mozilla.com/v1/geolocate?key=geoclue")
- (submit-data? #f)
- (wifi-submission-url
-
"https://location.services.mozilla.com/v1/submit?key=geoclue")
- (submission-nick "geoclue")
- (applications %standard-geoclue-applications))
+(define-deprecated
+ (geoclue-service #:key (geoclue geoclue)
+ (whitelist '())
+ (wifi-geolocation-url
+ ;; Mozilla geolocation service:
+
"https://location.services.mozilla.com/v1/geolocate?key=geoclue")
+ (submit-data? #f)
+ (wifi-submission-url
+
"https://location.services.mozilla.com/v1/submit?key=geoclue")
+ (submission-nick "geoclue")
+ (applications %standard-geoclue-applications))
+ geoclue-service-type
"Return a service that runs the @command{geoclue} location service. This
service provides a D-Bus interface to allow applications to request access to
a user's physical location, and optionally to add information to online
@@ -1806,7 +1817,7 @@ (define* (desktop-services-for-system #:optional
(service accountsservice-service-type)
(service cups-pk-helper-service-type)
(service colord-service-type)
- (geoclue-service)
+ (service geoclue-service-type)
(service polkit-service-type)
(service elogind-service-type)
(dbus-service)
--
2.39.1
- [bug#61789] [PATCH 10/27] services: base: Deprecate 'pam-limits-service' procedure., (continued)
- [bug#61789] [PATCH 10/27] services: base: Deprecate 'pam-limits-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 26/27] services: dict: Deprecate 'dicod-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 03/27] services: base: Deprecate 'mingetty-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 09/27] services: base: Deprecate 'rngd-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 12/27] services: ssh: Deprecate 'lsh-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 04/27] services: base: Deprecate 'agetty-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 19/27] services: desktop: Deprecate 'udisks-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 11/27] services: tor: Deprecate 'tor-hidden-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 17/27] services: desktop: Deprecate 'accountsservice-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 24/27] services: lirc: Deprecate 'lirc-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 20/27] services: desktop: Deprecate 'geoclue-service' procedure.,
Bruno Victal <=
- [bug#61789] [PATCH 16/27] services: elogind-configuration: Do not ignore 'handle-hibernate-key' by default., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 22/27] services: mail: Deprecate 'dovecot-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 25/27] services: spice: Deprecate 'spice-vdagent-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 21/27] services: desktop: Deprecate 'bluetooth-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 15/27] services: desktop: Deprecate 'elogind-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 27/27] services: dbus: Deprecate 'dbus-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 13/27] services: ssh: Deprecate 'dropbear-service' procedure., Bruno Victal, 2023/02/25
- [bug#61789] [PATCH 06/27] services: base: Deprecate 'nscd-service' procedure., Bruno Victal, 2023/02/25