Bump release to 2.6.0

This commit is contained in:
Bilal Elmoussaoui 2022-02-16 15:40:41 +01:00
parent fe079808b1
commit e2792e26f8
2 changed files with 7 additions and 103 deletions

View File

@ -1,99 +0,0 @@
From 2abc9d544dbf3678bdac10c969d677b792a7622d Mon Sep 17 00:00:00 2001
From: Dor Askayo <dor.askayo@gmail.com>
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,
--
2.31.1

View File

@ -1,14 +1,12 @@
Name: geoclue2 Name: geoclue2
Version: 2.5.7 Version: 2.6.0
Release: 7%{?dist} Release: 1%{?dist}
Summary: Geolocation service Summary: Geolocation service
License: GPLv2+ License: GPLv2+
URL: http://www.freedesktop.org/wiki/Software/GeoClue/ URL: http://www.freedesktop.org/wiki/Software/GeoClue/
Source0: https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/%{version}/geoclue-%{version}.tar.bz2 Source0: https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/%{version}/geoclue-%{version}.tar.bz2
# Backported from upstream
Patch0: 0001-gclue-wifi-Use-GeoIP-when-a-WiFi-device-isn-t-availa.patch
BuildRequires: avahi-glib-devel BuildRequires: avahi-glib-devel
BuildRequires: gettext BuildRequires: gettext
@ -110,10 +108,12 @@ exit 0
%config %{_sysconfdir}/geoclue/ %config %{_sysconfdir}/geoclue/
%dir %{_libexecdir}/geoclue-2.0 %dir %{_libexecdir}/geoclue-2.0
%dir %{_libexecdir}/geoclue-2.0/demos %dir %{_libexecdir}/geoclue-2.0/demos
%dir %{_datadir}/polkit-1/rules.d
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.conf %{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.Agent.conf %{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.Agent.conf
%{_sysconfdir}/xdg/autostart/geoclue-demo-agent.desktop %{_sysconfdir}/xdg/autostart/geoclue-demo-agent.desktop
%{_libexecdir}/geoclue %{_libexecdir}/geoclue
%{_datadir}/polkit-1/rules.d/org.freedesktop.GeoClue2.rules
%{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service %{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service
%{_datadir}/applications/geoclue-demo-agent.desktop %{_datadir}/applications/geoclue-demo-agent.desktop
%{_mandir}/man5/geoclue.5* %{_mandir}/man5/geoclue.5*
@ -149,6 +149,9 @@ exit 0
%changelog %changelog
* Wed Feb 16 2022 Bilal Elmoussaoui <belmouss@redhat.com> - 2.6.0-1
- Bump to 2.6.0
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.7-7 * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild