[arch-commits] Commit in geoclue/trunk (7 files)

Jan Steffens heftig at archlinux.org
Tue Oct 1 16:12:10 UTC 2019


    Date: Tuesday, October 1, 2019 @ 16:12:09
  Author: heftig
Revision: 363614

update patches

Added:
  geoclue/trunk/0002-config-Improve-config-lookup-error-messages.patch
    (from rev 363613, geoclue/trunk/0002-config-Don-t-warn-when-wifi-URL-unset.patch)
  geoclue/trunk/0003-config-Clear-error-after-submission-URL-lookup-fails.patch
    (from rev 363613, geoclue/trunk/0003-config-Don-t-crash-when-submission-url-unset.patch)
  geoclue/trunk/0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch
Modified:
  geoclue/trunk/0001-config-Make-the-Mozilla-API-key-configurable.patch
  geoclue/trunk/PKGBUILD
Deleted:
  geoclue/trunk/0002-config-Don-t-warn-when-wifi-URL-unset.patch
  geoclue/trunk/0003-config-Don-t-crash-when-submission-url-unset.patch

-----------------------------------------------------------------+
 0001-config-Make-the-Mozilla-API-key-configurable.patch         |    8 -
 0002-config-Don-t-warn-when-wifi-URL-unset.patch                |   25 ----
 0002-config-Improve-config-lookup-error-messages.patch          |   58 ++++++++++
 0003-config-Clear-error-after-submission-URL-lookup-fails.patch |   27 ++++
 0003-config-Don-t-crash-when-submission-url-unset.patch         |   25 ----
 0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch |   33 +++++
 PKGBUILD                                                        |   16 +-
 7 files changed, 130 insertions(+), 62 deletions(-)

Modified: 0001-config-Make-the-Mozilla-API-key-configurable.patch
===================================================================
--- 0001-config-Make-the-Mozilla-API-key-configurable.patch	2019-10-01 14:14:39 UTC (rev 363613)
+++ 0001-config-Make-the-Mozilla-API-key-configurable.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -1,7 +1,7 @@
-From 0b4fa24bb9cc62557de7ec3d14c27316af658f61 Mon Sep 17 00:00:00 2001
+From 95c9ad4dc176860c85a07d0db4cb4179929bdb54 Mon Sep 17 00:00:00 2001
 From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
 Date: Tue, 1 Oct 2019 13:27:41 +0000
-Subject: [PATCH 1/3] config: Make the Mozilla API key configurable
+Subject: [PATCH 1/4] config: Make the Mozilla API key configurable
 
 And do not expose it in the configuration file.
 ---
@@ -12,7 +12,7 @@
  4 files changed, 16 insertions(+), 10 deletions(-)
 
 diff --git a/data/geoclue.conf.in b/data/geoclue.conf.in
-index fb111de..5b1819e 100644
+index fb111de..bebe471 100644
 --- a/data/geoclue.conf.in
 +++ b/data/geoclue.conf.in
 @@ -42,13 +42,13 @@ enable=true
@@ -22,7 +22,7 @@
 -# URL to the wifi geolocation service. The key can currenty be anything, just
 -# needs to be present but that is likely going to change in future.
 -url=https://location.services.mozilla.com/v1/geolocate?key=geoclue
-+# URL to the wifi geolocation service. If not set, defaults to Mozilla's
++# URL to the WiFi geolocation service. If not set, defaults to Mozilla's
 +# Location Service with a hardcoded key. To use a custom key, uncomment this URL
 +# while changing YOUR_KEY to your MLS API key.
 +#url=https://location.services.mozilla.com/v1/geolocate?key=YOUR_KEY

Deleted: 0002-config-Don-t-warn-when-wifi-URL-unset.patch
===================================================================
--- 0002-config-Don-t-warn-when-wifi-URL-unset.patch	2019-10-01 14:14:39 UTC (rev 363613)
+++ 0002-config-Don-t-warn-when-wifi-URL-unset.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -1,25 +0,0 @@
-From b93c2581e5f98b4826e7c645d873efa746e269d4 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-Date: Tue, 1 Oct 2019 13:41:52 +0000
-Subject: [PATCH 2/3] config: Don't warn when wifi URL unset
-
----
- src/gclue-config.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gclue-config.c b/src/gclue-config.c
-index df4adcc..f09e897 100644
---- a/src/gclue-config.c
-+++ b/src/gclue-config.c
-@@ -232,7 +232,7 @@ load_wifi_config (GClueConfig *config)
-                                                 "url",
-                                                 &error);
-         if (error != NULL) {
--                g_warning ("%s", error->message);
-+                g_debug ("No wifi URL: %s", error->message);
-                 g_clear_error (&error);
-                 priv->wifi_url = g_strdup (DEFAULT_WIFI_URL);
-         }
--- 
-2.23.0
-

Copied: geoclue/trunk/0002-config-Improve-config-lookup-error-messages.patch (from rev 363613, geoclue/trunk/0002-config-Don-t-warn-when-wifi-URL-unset.patch)
===================================================================
--- 0002-config-Improve-config-lookup-error-messages.patch	                        (rev 0)
+++ 0002-config-Improve-config-lookup-error-messages.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -0,0 +1,58 @@
+From d0c1759bb2e45c649b0c323054973443e13b6cc4 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 1 Oct 2019 14:06:10 +0000
+Subject: [PATCH 2/4] config: Improve config lookup error messages
+
+Match the message for wifi/submit-data and add some quotes.
+
+Downgrade the message for wifi/url from a warning to a debug message.
+---
+ src/gclue-config.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/src/gclue-config.c b/src/gclue-config.c
+index df4adcc..00dd52e 100644
+--- a/src/gclue-config.c
++++ b/src/gclue-config.c
+@@ -232,7 +232,8 @@ load_wifi_config (GClueConfig *config)
+                                                 "url",
+                                                 &error);
+         if (error != NULL) {
+-                g_warning ("%s", error->message);
++                g_debug ("Failed to get config \"wifi/url\": %s",
++                         error->message);
+                 g_clear_error (&error);
+                 priv->wifi_url = g_strdup (DEFAULT_WIFI_URL);
+         }
+@@ -242,7 +243,7 @@ load_wifi_config (GClueConfig *config)
+                                                     "submit-data",
+                                                     &error);
+         if (error != NULL) {
+-                g_debug ("Failed to get config wifi/submit-data: %s",
++                g_debug ("Failed to get config \"wifi/submit-data\": %s",
+                          error->message);
+                 g_error_free (error);
+ 
+@@ -254,7 +255,8 @@ load_wifi_config (GClueConfig *config)
+                                                        "submission-url",
+                                                        &error);
+         if (error != NULL) {
+-                g_debug ("No wifi submission URL: %s", error->message);
++                g_debug ("Failed to get config \"wifi/submission-url\": %s",
++                         error->message);
+                 g_error_free (error);
+                 priv->wifi_submit_url = g_strdup (DEFAULT_WIFI_SUBMIT_URL);
+         }
+@@ -264,7 +266,8 @@ load_wifi_config (GClueConfig *config)
+                                                         "submission-nick",
+                                                         &error);
+         if (error != NULL) {
+-                g_debug ("No wifi submission nick: %s", error->message);
++                g_debug ("Failed to get config \"wifi/submission-nick\": %s",
++                         error->message);
+                 g_error_free (error);
+         }
+ }
+-- 
+2.23.0
+

Copied: geoclue/trunk/0003-config-Clear-error-after-submission-URL-lookup-fails.patch (from rev 363613, geoclue/trunk/0003-config-Don-t-crash-when-submission-url-unset.patch)
===================================================================
--- 0003-config-Clear-error-after-submission-URL-lookup-fails.patch	                        (rev 0)
+++ 0003-config-Clear-error-after-submission-URL-lookup-fails.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -0,0 +1,27 @@
+From 7301c9e13c9c684fd4fe706ac1558854a7819a54 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 1 Oct 2019 13:42:11 +0000
+Subject: [PATCH 3/4] config: Clear error after submission URL lookup fails
+
+Otherwise we have a dangling pointer causing a crash when the error
+value is reused.
+---
+ src/gclue-config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gclue-config.c b/src/gclue-config.c
+index 00dd52e..76222ff 100644
+--- a/src/gclue-config.c
++++ b/src/gclue-config.c
+@@ -257,7 +257,7 @@ load_wifi_config (GClueConfig *config)
+         if (error != NULL) {
+                 g_debug ("Failed to get config \"wifi/submission-url\": %s",
+                          error->message);
+-                g_error_free (error);
++                g_clear_error (&error);
+                 priv->wifi_submit_url = g_strdup (DEFAULT_WIFI_SUBMIT_URL);
+         }
+ 
+-- 
+2.23.0
+

Deleted: 0003-config-Don-t-crash-when-submission-url-unset.patch
===================================================================
--- 0003-config-Don-t-crash-when-submission-url-unset.patch	2019-10-01 14:14:39 UTC (rev 363613)
+++ 0003-config-Don-t-crash-when-submission-url-unset.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -1,25 +0,0 @@
-From ef10d555fa4b1c27a0cfd17e00331db3643828b0 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-Date: Tue, 1 Oct 2019 13:42:11 +0000
-Subject: [PATCH 3/3] config: Don't crash when submission-url unset
-
----
- src/gclue-config.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gclue-config.c b/src/gclue-config.c
-index f09e897..eab0b6f 100644
---- a/src/gclue-config.c
-+++ b/src/gclue-config.c
-@@ -255,7 +255,7 @@ load_wifi_config (GClueConfig *config)
-                                                        &error);
-         if (error != NULL) {
-                 g_debug ("No wifi submission URL: %s", error->message);
--                g_error_free (error);
-+                g_clear_error (&error);
-                 priv->wifi_submit_url = g_strdup (DEFAULT_WIFI_SUBMIT_URL);
-         }
- 
--- 
-2.23.0
-

Added: 0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch
===================================================================
--- 0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch	                        (rev 0)
+++ 0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch	2019-10-01 16:12:09 UTC (rev 363614)
@@ -0,0 +1,33 @@
+From 1a00809a0d89b0849a57647c878d192354247a33 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 1 Oct 2019 14:07:55 +0000
+Subject: [PATCH 4/4] config: Fall back to a default submission nick if lookup
+ fails
+
+---
+ src/gclue-config.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/gclue-config.c b/src/gclue-config.c
+index 76222ff..95f78df 100644
+--- a/src/gclue-config.c
++++ b/src/gclue-config.c
+@@ -218,6 +218,7 @@ load_enable_source_config (GClueConfig *config,
+ 
+ #define DEFAULT_WIFI_URL "https://location.services.mozilla.com/v1/geolocate?key=" MOZILLA_API_KEY
+ #define DEFAULT_WIFI_SUBMIT_URL "https://location.services.mozilla.com/v1/submit?key=" MOZILLA_API_KEY
++#define DEFAULT_WIFI_SUBMIT_NICK "geoclue"
+ 
+ static void
+ load_wifi_config (GClueConfig *config)
+@@ -269,6 +270,7 @@ load_wifi_config (GClueConfig *config)
+                 g_debug ("Failed to get config \"wifi/submission-nick\": %s",
+                          error->message);
+                 g_error_free (error);
++                priv->wifi_submit_nick = g_strdup (DEFAULT_WIFI_SUBMIT_NICK);
+         }
+ }
+ 
+-- 
+2.23.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-10-01 14:14:39 UTC (rev 363613)
+++ PKGBUILD	2019-10-01 16:12:09 UTC (rev 363614)
@@ -18,12 +18,14 @@
 _commit=9519d67c7a9a0e97a75115f9ff99d4fb0bb81b21  # tags/2.5.5^0
 source=("git+https://gitlab.freedesktop.org/geoclue/geoclue.git#commit=$_commit"
         0001-config-Make-the-Mozilla-API-key-configurable.patch
-        0002-config-Don-t-warn-when-wifi-URL-unset.patch
-        0003-config-Don-t-crash-when-submission-url-unset.patch)
+        0002-config-Improve-config-lookup-error-messages.patch
+        0003-config-Clear-error-after-submission-URL-lookup-fails.patch
+        0004-config-Fall-back-to-a-default-submission-nick-if-loo.patch)
 sha256sums=('SKIP'
-            '9ab573d38a555f4e95c44031ba14b50e0ae929dd297335db38402d7cf6bf14c0'
-            '057104bbe3e08d6c258af2a3c61b5c81e1e9cf72c14646eaac2029d94d675ad1'
-            '38b3d34093afbb048bfab2c10df0873ebb4b8209eee9ff7c5fb43d3406351e15')
+            '4b5540f55fee97cb275b781d7f80a56685025fadfd3a79fe5244d79b2635dc6f'
+            '31d69df4f6da470c06cd03f3d5f40345902c246322437d77d618b0fa7659620e'
+            '9146ad2ff101602249c09dd3bc688bb0a2f151dcd646200d329359e8c687adc3'
+            'ca496af7d50e138e17cd9a69a16f729a7c5ae731f4dc93f32027be6852c7cdce')
 
 # Mozilla API keys (see https://location.services.mozilla.com/api)
 # Note: These are for Arch Linux use ONLY. For your own distribution, please
@@ -38,9 +40,7 @@
 
 prepare() {
   cd $pkgname
-  git apply -3 ../0001-config-Make-the-Mozilla-API-key-configurable.patch
-  git apply -3 ../0002-config-Don-t-warn-when-wifi-URL-unset.patch
-  git apply -3 ../0003-config-Don-t-crash-when-submission-url-unset.patch
+  git apply -3 ../*.patch
 }
 
 build() {



More information about the arch-commits mailing list