From 2b7cc014a2eb9bbb7a5d70b69ffb5d492ce35c625005e2dc0a55ea225bab2e5f Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 1 Jun 2022 09:20:35 +0000 Subject: [PATCH] Accepting request 980122 from home:dimstar:Factory - Update to version 2.6.0: + Stop the client for system applications when accuracy is set to NONE. + NMEA: add a unix socket file option. + Client info: support cgroup v2. + Don't compute movements for low accuracy sources. + Add an option to generate vapi. + Send the 3G tower type as part of the Mozilla location service requests. + Add phosh & lipstick as allowed agents. + Use GeoIP when no WiFi device is available. + Modem manager: add polkit rule to allow GPS access. + Allow disabling compass at build and at runtime. + Fix heading computation for identical locations. + Be strict with time and distance threshold. + Fix the XDG location portal integration. + Replace agent wait timeout with a queue. + Other bugs fixes. - Drop geoclue2-geoip-when-wifi-unavailable.patch: fixed upstream. - Minor tweaks to rpmlintrc file: systemd_service changed from warnings to error (but still don't apply here, as it's a dbus enabled service). OBS-URL: https://build.opensuse.org/request/show/980122 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/geoclue2?expand=0&rev=93 --- geoclue-2.5.7.tar.bz2 | 3 - geoclue-2.6.0.tar.bz2 | 3 + geoclue2-geoip-when-wifi-unavailable.patch | 99 ---------------------- geoclue2-rpmlintrc | 10 +-- geoclue2.changes | 26 ++++++ geoclue2.spec | 17 ++-- 6 files changed, 42 insertions(+), 116 deletions(-) delete mode 100644 geoclue-2.5.7.tar.bz2 create mode 100644 geoclue-2.6.0.tar.bz2 delete mode 100644 geoclue2-geoip-when-wifi-unavailable.patch diff --git a/geoclue-2.5.7.tar.bz2 b/geoclue-2.5.7.tar.bz2 deleted file mode 100644 index add0cb3..0000000 --- a/geoclue-2.5.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6cc7dbe4177b4e7f3532f7fe42262049789a3cd6c55afe60a3564d7394119c27 -size 85764 diff --git a/geoclue-2.6.0.tar.bz2 b/geoclue-2.6.0.tar.bz2 new file mode 100644 index 0000000..99f4ea0 --- /dev/null +++ b/geoclue-2.6.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdc9efcb98ce81284d7a6c3c899330481ffdca44bba3c18b9e530618298aa4a0 +size 94890 diff --git a/geoclue2-geoip-when-wifi-unavailable.patch b/geoclue2-geoip-when-wifi-unavailable.patch deleted file mode 100644 index e425c48..0000000 --- a/geoclue2-geoip-when-wifi-unavailable.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 2abc9d544dbf3678bdac10c969d677b792a7622d Mon Sep 17 00:00:00 2001 -From: Dor Askayo -Date: Wed, 11 Aug 2021 17:53:54 +0300 -Subject: [PATCH] gclue-wifi: Use GeoIP when a WiFi device isn't available - -Query for GeoIP when a WiFi device isn't available, instead of -treating this case as a failure. This restores the functionality -which regressed by 715cfbf. - -Fixes https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/142. ---- - src/gclue-wifi.c | 38 +++++++++++++++++--------------------- - 1 file changed, 17 insertions(+), 21 deletions(-) - -diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c -index 3ca5de9..3fc78d0 100644 ---- a/src/gclue-wifi.c -+++ b/src/gclue-wifi.c -@@ -990,19 +990,10 @@ gclue_wifi_get_accuracy_level (GClueWifi *wifi) - return wifi->priv->accuracy_level; - } - --/* Can return NULL without setting @error, signifying an empty BSS list. */ -+/* Can return NULL, signifying an empty BSS list. */ - static GList * --get_bss_list (GClueWifi *wifi, -- GError **error) -+get_bss_list (GClueWifi *wifi) - { -- if (wifi->priv->interface == NULL) { -- g_set_error_literal (error, -- G_IO_ERROR, -- G_IO_ERROR_FAILED, -- "No WiFi devices available"); -- return NULL; -- } -- - return g_hash_table_get_values (wifi->priv->bss_proxies); - } - -@@ -1010,16 +1001,16 @@ static SoupMessage * - gclue_wifi_create_query (GClueWebSource *source, - GError **error) - { -- GList *bss_list; /* As in Access Points */ -+ GClueWifi *wifi = GCLUE_WIFI (source); -+ GList *bss_list = NULL; /* As in Access Points */ - SoupMessage *msg; -- g_autoptr(GError) local_error = NULL; - -- bss_list = get_bss_list (GCLUE_WIFI (source), &local_error); -- if (local_error != NULL) { -- g_propagate_error (error, g_steal_pointer (&local_error)); -- return NULL; -+ if (wifi->priv->interface == NULL) { -+ goto create_query; - } - -+ bss_list = get_bss_list (wifi); -+ - /* Empty list? */ - if (bss_list == NULL) { - g_set_error_literal (error, -@@ -1029,6 +1020,7 @@ gclue_wifi_create_query (GClueWebSource *source, - return NULL; - } - -+create_query: - msg = gclue_mozilla_create_query (bss_list, NULL, error); - g_list_free (bss_list); - return msg; -@@ -1047,16 +1039,20 @@ gclue_wifi_create_submit_query (GClueWebSource *source, - GClueLocation *location, - GError **error) - { -+ GClueWifi *wifi = GCLUE_WIFI (source); - GList *bss_list; /* As in Access Points */ - SoupMessage * msg; -- g_autoptr(GError) local_error = NULL; - -- bss_list = get_bss_list (GCLUE_WIFI (source), &local_error); -- if (local_error != NULL) { -- g_propagate_error (error, g_steal_pointer (&local_error)); -+ if (wifi->priv->interface == NULL) { -+ g_set_error_literal (error, -+ G_IO_ERROR, -+ G_IO_ERROR_FAILED, -+ "No WiFi devices available"); - return NULL; - } - -+ bss_list = get_bss_list (wifi); -+ - /* Empty list? */ - if (bss_list == NULL) { - g_set_error_literal (error, --- -GitLab - diff --git a/geoclue2-rpmlintrc b/geoclue2-rpmlintrc index fd2928f..c6a3aaf 100644 --- a/geoclue2-rpmlintrc +++ b/geoclue2-rpmlintrc @@ -1,8 +1,6 @@ # note: do not use systemd macros for geoclue2.service, they are not meant for dbus unit files. -addFilter("W: systemd-service-without-service_del_preun") -addFilter("W: systemd-service-without-service_del_postun") -addFilter("W: systemd-service-without-service_add_pre") -addFilter("W: systemd-service-without-service_add_post") +addFilter("[EW]: systemd-service-without-service_del_preun") +addFilter("[EW]: systemd-service-without-service_del_postun") +addFilter("[EW]: systemd-service-without-service_add_pre") +addFilter("[EW]: systemd-service-without-service_add_post") addFilter("W: non-standard-uid /var/lib/srvGeoClue srvGeoClue") -# This is a dbus activated service, no human should ever call it. -addFilter("W: suse-missing-rclink geoclue") diff --git a/geoclue2.changes b/geoclue2.changes index 66adc3c..c3b43e5 100644 --- a/geoclue2.changes +++ b/geoclue2.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Fri May 20 09:44:27 UTC 2022 - Dominique Leuenberger + +- Update to version 2.6.0: + + Stop the client for system applications when accuracy is set to + NONE. + + NMEA: add a unix socket file option. + + Client info: support cgroup v2. + + Don't compute movements for low accuracy sources. + + Add an option to generate vapi. + + Send the 3G tower type as part of the Mozilla location service + requests. + + Add phosh & lipstick as allowed agents. + + Use GeoIP when no WiFi device is available. + + Modem manager: add polkit rule to allow GPS access. + + Allow disabling compass at build and at runtime. + + Fix heading computation for identical locations. + + Be strict with time and distance threshold. + + Fix the XDG location portal integration. + + Replace agent wait timeout with a queue. + + Other bugs fixes. +- Drop geoclue2-geoip-when-wifi-unavailable.patch: fixed upstream. +- Minor tweaks to rpmlintrc file: systemd_service changed from + warnings to error (but still don't apply here, as it's a dbus + enabled service). + ------------------------------------------------------------------- Sun Mar 20 19:25:46 UTC 2022 - Callum Farmer diff --git a/geoclue2.spec b/geoclue2.spec index 87cafa8..19e536c 100644 --- a/geoclue2.spec +++ b/geoclue2.spec @@ -1,7 +1,7 @@ # # spec file for package geoclue2 # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define _name geoclue Name: geoclue2 -Version: 2.5.7 +Version: 2.6.0 Release: 0 Summary: GeoLocation Framework License: GPL-2.0-or-later @@ -28,8 +28,6 @@ URL: https://gitlab.freedesktop.org/geoclue/geoclue Source0: %{url}/-/archive/%{version}/geoclue-%{version}.tar.bz2 Source1: srvGeoClue.conf Source99: geoclue2-rpmlintrc -# PATCH-FIX-UPSTREAM geoclue2-geoip-when-wifi-unavailable.patch glfo#geoclue/geoclue#142 badshah400@gmail.com -- gclue-wifi: Use GeoIP when a WiFi device isn't available -Patch0: geoclue2-geoip-when-wifi-unavailable.patch BuildRequires: intltool >= 0.40.0 BuildRequires: meson >= 0.47.2 BuildRequires: pkgconfig @@ -62,6 +60,7 @@ communication mechanism to provide location information %package -n system-user-srvGeoClue Summary: System user for the geoclue service Group: System/Base +BuildArch: noarch %sysusers_requires %description -n system-user-srvGeoClue @@ -100,15 +99,16 @@ communication mechanism to provide location information %install %meson_install + +# Rename polkit rule to have specific ordering capabilities - boo#1199767#c1 +mv %{buildroot}/usr/share/polkit-1/rules.d/org.freedesktop.GeoClue2.rules \ + %{buildroot}/usr/share/polkit-1/rules.d/50-org.freedesktop.GeoClue2.rules + install -d %{buildroot}%{_localstatedir}/lib/srvGeoClue mkdir -p %{buildroot}%{_sysusersdir} install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-srvGeoClue.conf -# Remove desktop file, we do not build the demos # Upstream is explicitly asking us to package these, so lets give it a go. -#find %%{buildroot} -type f -name "geoclue-demo-agent.desktop" -delete -print - # note: do not use systemd macros for geoclue2.service, they are not meant for dbus unit files. - %pre -n system-user-srvGeoClue -f srvGeoClue.pre %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -131,6 +131,7 @@ install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-srvGeoClue.con %{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Manager.xml %dir %{_datadir}/dbus-1/system-services %{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service +%{_datadir}/polkit-1/rules.d/50-org.freedesktop.GeoClue2.rules %dir %{_sysconfdir}/dbus-1 %dir %{_sysconfdir}/dbus-1/system.d %dir %{_sysconfdir}/geoclue/