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
index acd6009..3045571 100644
--- a/src/gclue-config.c
+++ b/src/gclue-config.c
@@ -26,8 +26,8 @@
#include "gclue-config.h"
-#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 ();
+
+ char *env_config_file = g_getenv ("GEOCLUE_CONFIG_FILE");
+ if (env_config_file) {
+ 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);
/*
diff --git a/src/gclue-static-source.c b/src/gclue-static-source.c
index 1c35cea..7957797 100644
--- a/src/gclue-static-source.c
+++ b/src/gclue-static-source.c
@@ -26,7 +26,7 @@
#include "gclue-enum-types.h"
#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
put class='txt' type='search' size='10' name='q' value=''/>
Age Commit message (Expand ) Author
2023-01-08 gnu: Remove linux-libre 4.9. ...This kernel series is no longer supported upstream:
https://lkml.iu.edu/hypermail/linux/kernel/2301.0/06398.html
https://www.kernel.org/category/releases.html
* gnu/packages/aux-files/linux-libre/4.9-i686.conf,
gnu/packages/aux-files/linux-libre/4.9-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.
* gnu/packages/linux.scm (linux-libre-4.9-version, linux-libre-4.9-gnu-revision,
deblob-scripts-4.9, linux-libre-4.9-pristine-source, linux-libre-4.9-source,
linux-libre-headers-4.9, linux-libre-4.9): Remove variables.
* gnu/tests/base.scm (%test-linux-libre-4.9): Likewise.
Leo Famulari
2022-12-12 tests: Add system tests for each supported kernel version. ...* gnu/tests/base.scm (%test-basic-os): Rename to ...
(test-basic-os): ... this, and turn into procedure that takes optional KERNEL
argument.
(%test-basic-os): Use that procedure.
(%test-linux-libre-5.15, %test-linux-libre-5.10, %test-linux-libre-5.4,
%test-linux-libre-4.19, %test-linux-libre-4.14, %test-linux-libre-4.9): New
tests.
Marius Bakke
2022-12-12 Merge branch 'version-1.4.0' Ludovic Courtès