gnu: geoclue: Update to 2.7.2.

* gnu/packages/gnome.scm (geoclue): Update to 2.7.2.
* gnu/packages/patches/geoclue-config.patch: Adjust.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Sergey Trofimov 2024-11-24 14:50:00 +01:00 committed by Liliana Marie Prikler
parent d1dd176af5
commit e5c1a708f5
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87
2 changed files with 50 additions and 22 deletions

View file

@ -5760,7 +5760,7 @@ output devices.")
(define-public geoclue (define-public geoclue
(package (package
(name "geoclue") (name "geoclue")
(version "2.6.0") (version "2.7.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -5768,7 +5768,7 @@ output devices.")
(string-append "https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/" (string-append "https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/"
version "/geoclue-" version ".tar.bz2")) version "/geoclue-" version ".tar.bz2"))
(sha256 (sha256
(base32 "1854i8lih1jkks5w38xv8k5gs7s8629qjg3cg96ji0ffk35yzjfd")) (base32 "1ljn4k1zlfx0ymmdz8ycfb976vx8r61sx68q854r0xinl124mlh1"))
(patches (search-patches "geoclue-config.patch")))) (patches (search-patches "geoclue-config.patch"))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
@ -5786,7 +5786,7 @@ output devices.")
`(,glib "bin") `(,glib "bin")
glib-networking glib-networking
json-glib json-glib
libsoup-minimal-2)) libsoup-minimal))
(home-page "https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home") (home-page "https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home")
(synopsis "Geolocation service") (synopsis "Geolocation service")
(description "Geoclue is a D-Bus service that provides location (description "Geoclue is a D-Bus service that provides location

View file

@ -1,27 +1,55 @@
Allow the configuration file to be specified via an environment variable. Allow the configuration file to be specified via an environment variable.
---
src/gclue-config.c | 13 ++++++++++---
src/gclue-static-source.c | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/gclue-config.c b/src/gclue-config.c diff --git a/src/gclue-config.c b/src/gclue-config.c
index 7ab2a67..e41f3df 100644 index acd6009..3045571 100644
--- a/src/gclue-config.c --- a/src/gclue-config.c
+++ b/src/gclue-config.c +++ b/src/gclue-config.c
@@ -332,6 +332,11 @@ static void @@ -26,8 +26,8 @@
gclue_config_init (GClueConfig *config)
{ #include "gclue-config.h"
GError *error = NULL;
+ const char *config_file_path; -#define CONFIG_FILE_PATH SYSCONFDIR "/geoclue/geoclue.conf"
-#define CONFIG_D_DIRECTORY SYSCONFDIR "/geoclue/conf.d/"
+#define CONFIG_FILE_PATH "/etc/geoclue/geoclue.conf"
+#define CONFIG_D_DIRECTORY "/etc/geoclue/conf.d/"
/* This class will be responsible for fetching configuration. */
@@ -546,8 +546,15 @@ gclue_config_init (GClueConfig *config)
priv->wifi_submit_url = g_strdup (DEFAULT_WIFI_SUBMIT_URL);
priv->wifi_submit_nick = g_strdup (DEFAULT_WIFI_SUBMIT_NICK);
- /* Load config file from default path, log all missing parameters */
priv->key_file = g_key_file_new ();
+ +
+ config_file_path = g_getenv ("GEOCLUE_CONFIG_FILE"); + char *env_config_file = g_getenv ("GEOCLUE_CONFIG_FILE");
+ if (!config_file_path) + if (env_config_file) {
+ config_file_path = CONFIG_FILE_PATH; + load_config_file (config, env_config_file);
+ goto out; // don't load conf.d
+ }
+
+ /* Load config file from default path, log all missing parameters */
load_config_file (config, CONFIG_FILE_PATH);
config->priv = gclue_config_get_instance_private(config); /*
config->priv->key_file = g_key_file_new (); diff --git a/src/gclue-static-source.c b/src/gclue-static-source.c
@@ -341,7 +346,7 @@ gclue_config_init (GClueConfig *config) index 1c35cea..7957797 100644
&error); --- a/src/gclue-static-source.c
if (error != NULL) { +++ b/src/gclue-static-source.c
g_critical ("Failed to load configuration file '%s': %s", @@ -26,7 +26,7 @@
- CONFIG_FILE_PATH, error->message); #include "gclue-enum-types.h"
+ config_file_path, error->message);
g_error_free (error); #define GEO_FILE_NAME "geolocation"
-#define GEO_FILE_PATH SYSCONFDIR "/" GEO_FILE_NAME
+#define GEO_FILE_PATH "/etc/" GEO_FILE_NAME
/* Rate limit of geolocation file monitoring.
* In milliseconds.
--
2.46.0
return;