Package: release.debian.org
Followup-For: Bug #1091367

Hello,

I ofcourse forgot the debdiff...

Please find the diff here

Kind Regards,
Laurent Bigonville
diff -Nru geoclue-2.0-2.6.0/debian/changelog geoclue-2.0-2.6.0/debian/changelog
--- geoclue-2.0-2.6.0/debian/changelog  2022-09-14 17:46:47.000000000 +0200
+++ geoclue-2.0-2.6.0/debian/changelog  2024-12-24 18:06:58.000000000 +0100
@@ -1,3 +1,11 @@
+geoclue-2.0 (2.6.0-2+deb12u1) bookworm; urgency=medium
+
+  * Switch to beaconDB instead of the new retired MLS (Closes: #1074427)
+  * d/README.Debian: Update the README to explicitly state we are using 
beaconDB
+  * Add SSID to queries, cherry-picked from upstream for beaconDB
+
+ -- Laurent Bigonville <bi...@debian.org>  Tue, 24 Dec 2024 18:06:58 +0100
+
 geoclue-2.0 (2.6.0-2) unstable; urgency=medium
 
   [ Laurent Bigonville ]
diff -Nru 
geoclue-2.0-2.6.0/debian/patches/0003-PATCH-Mozilla-Include-SSID-for-geolocate-and-submiss.patch
 
geoclue-2.0-2.6.0/debian/patches/0003-PATCH-Mozilla-Include-SSID-for-geolocate-and-submiss.patch
--- 
geoclue-2.0-2.6.0/debian/patches/0003-PATCH-Mozilla-Include-SSID-for-geolocate-and-submiss.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
geoclue-2.0-2.6.0/debian/patches/0003-PATCH-Mozilla-Include-SSID-for-geolocate-and-submiss.patch
    2024-12-24 18:06:58.000000000 +0100
@@ -0,0 +1,50 @@
+From: Chris Talbot <ch...@talbothome.com>
+Date: Tue, 24 Dec 2024 17:01:30 +0100
+Subject: [PATCH] Mozilla: Include SSID for geolocate and submission requests
+
+---
+ src/gclue-mozilla.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/gclue-mozilla.c b/src/gclue-mozilla.c
+index 3ee02c8..1f83f47 100644
+--- a/src/gclue-mozilla.c
++++ b/src/gclue-mozilla.c
+@@ -209,6 +209,7 @@ gclue_mozilla_create_query (GList        *bss_list, /* As 
in Access Points */
+                 for (iter = bss_list; iter != NULL; iter = iter->next) {
+                         WPABSS *bss = WPA_BSS (iter->data);
+                         char mac[BSSID_STR_LEN + 1] = { 0 };
++                        char ssid[MAX_SSID_LEN + 1] = { 0 };
+                         gint16 strength_dbm;
+ 
+                         if (gclue_mozilla_should_ignore_bss (bss))
+@@ -219,6 +220,10 @@ gclue_mozilla_create_query (GList        *bss_list, /* As 
in Access Points */
+                         get_bssid_from_bss (bss, mac);
+                         json_builder_add_string_value (builder, mac);
+ 
++                        json_builder_set_member_name (builder, "ssid");
++                        get_ssid_from_bss (bss, ssid);
++                        json_builder_add_string_value (builder, ssid);
++
+                         json_builder_set_member_name (builder, 
"signalStrength");
+                         strength_dbm = wpa_bss_get_signal (bss);
+                         json_builder_add_int_value (builder, strength_dbm);
+@@ -386,6 +391,7 @@ gclue_mozilla_create_submit_query (GClueLocation   
*location,
+                 for (iter = bss_list; iter != NULL; iter = iter->next) {
+                         WPABSS *bss = WPA_BSS (iter->data);
+                         char mac[BSSID_STR_LEN + 1] = { 0 };
++                        char ssid[MAX_SSID_LEN + 1] = { 0 };
+                         gint16 strength_dbm;
+                         guint16 frequency;
+ 
+@@ -397,6 +403,10 @@ gclue_mozilla_create_submit_query (GClueLocation   
*location,
+                         get_bssid_from_bss (bss, mac);
+                         json_builder_add_string_value (builder, mac);
+ 
++                        json_builder_set_member_name (builder, "ssid");
++                        get_ssid_from_bss (bss, ssid);
++                        json_builder_add_string_value (builder, ssid);
++
+                         json_builder_set_member_name (builder, "signal");
+                         strength_dbm = wpa_bss_get_signal (bss);
+                         json_builder_add_int_value (builder, strength_dbm);
diff -Nru geoclue-2.0-2.6.0/debian/patches/beacondb.patch 
geoclue-2.0-2.6.0/debian/patches/beacondb.patch
--- geoclue-2.0-2.6.0/debian/patches/beacondb.patch     1970-01-01 
01:00:00.000000000 +0100
+++ geoclue-2.0-2.6.0/debian/patches/beacondb.patch     2024-12-24 
18:06:58.000000000 +0100
@@ -0,0 +1,53 @@
+From: Laurent Bigonville <bi...@debian.org>
+Date: Tue, 24 Dec 2024 16:53:00 +0100
+Subject: Switch to beaconDB
+
+---
+ data/geoclue.conf.in | 11 ++++-------
+ src/gclue-config.c   |  4 ++--
+ 2 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/data/geoclue.conf.in b/data/geoclue.conf.in
+index 650470d..db542dc 100644
+--- a/data/geoclue.conf.in
++++ b/data/geoclue.conf.in
+@@ -45,10 +45,8 @@ enable=true
+ # Enable WiFi source
+ enable=true
+ 
+-# 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
++# URL to the WiFi geolocation service. If not set, defaults to beaconsDB
++#url=https://api.beacondb.net/v1/geolocate?key=geoclue_debian
+ 
+ # To use the Google geolocation service instead of Mozilla's, uncomment this 
URL
+ # while changing YOUR_KEY to your Google API key.
+@@ -67,9 +65,8 @@ enable=true
+ submit-data=false
+ 
+ # URL to submission API of Mozilla Location Service. If not set, defaults to
+-# Mozilla's API with a hardcoded key. To use a custom key, uncomment this URL
+-# while changing YOUR_KEY to your MLS API key.
+-#submission-url=https://location.services.mozilla.com/v1/submit?key=YOUR_KEY
++# beacondb
++#submission-url=https://api.beacondb.net/v2/geosubmit?key=geoclue_debian
+ 
+ # A nickname to submit network data with. A nickname must be 2-32 characters 
long.
+ submission-nick=geoclue
+diff --git a/src/gclue-config.c b/src/gclue-config.c
+index 8c1cc3d..db1d755 100644
+--- a/src/gclue-config.c
++++ b/src/gclue-config.c
+@@ -219,8 +219,8 @@ load_enable_source_config (GClueConfig *config,
+         return enable;
+ }
+ 
+-#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_URL 
"https://api.beacondb.net/v1/geolocate?key=geoclue_debian";
++#define DEFAULT_WIFI_SUBMIT_URL 
"https://api.beacondb.net/v2/geosubmit?key=geoclue_debian";
+ #define DEFAULT_WIFI_SUBMIT_NICK "geoclue"
+ 
+ static void
diff -Nru geoclue-2.0-2.6.0/debian/patches/series 
geoclue-2.0-2.6.0/debian/patches/series
--- geoclue-2.0-2.6.0/debian/patches/series     2022-09-14 17:46:47.000000000 
+0200
+++ geoclue-2.0-2.6.0/debian/patches/series     2024-12-24 18:06:58.000000000 
+0100
@@ -1 +1,3 @@
 Add-support-for-building-with-libsoup3.patch
+beacondb.patch
+0003-PATCH-Mozilla-Include-SSID-for-geolocate-and-submiss.patch
diff -Nru geoclue-2.0-2.6.0/debian/README.Debian 
geoclue-2.0-2.6.0/debian/README.Debian
--- geoclue-2.0-2.6.0/debian/README.Debian      2022-09-14 17:46:47.000000000 
+0200
+++ geoclue-2.0-2.6.0/debian/README.Debian      2024-12-24 18:06:58.000000000 
+0100
@@ -1,8 +1,8 @@
 geoclue-2.0 for Debian
 ---------------------
 
-geoclue uses the Mozilla Location Service (MLS) to estimate the location of
-your computer. Please refer to the Privacy Notice on the Mozilla website for
-all privacy concerns: https://location.services.mozilla.com/privacy
+geoclue uses beaconDB to estimate the location of your computer.
+Please refer to the Privacy Notice on the beaconDB website for all privacy
+concerns: https://beacondb.net/privacy/
 
- -- Laurent Bigonville <bi...@debian.org>  Thu, 23 Apr 2020 14:28:03 +0200
+ -- Laurent Bigonville <bi...@debian.org>  Thu, 24 Dec 2024 14:44:03 +0100
diff -Nru geoclue-2.0-2.6.0/debian/rules geoclue-2.0-2.6.0/debian/rules
--- geoclue-2.0-2.6.0/debian/rules      2022-09-14 17:46:47.000000000 +0200
+++ geoclue-2.0-2.6.0/debian/rules      2024-12-24 18:06:58.000000000 +0100
@@ -16,22 +16,12 @@
   BUILD_DOC := -Dgtk-doc=false
 endif
 
-# The following API key has been allocated for Debian only
-# If you are a derivative, please request your own key as discussed here:
-# https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/136
-# See also: https://location.services.mozilla.com/api and
-# 
https://blog.mozilla.org/services/2019/09/03/a-new-policy-for-mozilla-location-service/
-ifeq ($(shell dpkg-vendor --query vendor),Debian)
-  MLS_API_KEY := -Dmozilla-api-key=484bfbac-6433-4492-aed3-16cc094eff93
-endif
-
 override_dh_auto_configure:
        dh_auto_configure -- --libexecdir=/usr/libexec \
                              -Ddbus-srv-user=geoclue \
                              -Dsystemd-system-unit-dir=/lib/systemd/system \
                             ${BUILD_DOC} \
-                             ${MM_NM_FLAGS} \
-                             ${MLS_API_KEY}
+                             ${MM_NM_FLAGS}
 
 override_dh_auto_test:
        # testsuite fails on missing latitude (et.al)

Reply via email to