Accepting request 859610 from home:iznogood:branches:Application:Geo
- Update to version 2.5.7: + A bug fix release, mainly fixing a bunch of memory leaks. - Add geoclue2-revert-2-faulty.patch: Revert two broken commits. https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/142 OBS-URL: https://build.opensuse.org/request/show/859610 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/geoclue2?expand=0&rev=88
This commit is contained in:
parent
ad3c85f2cf
commit
ca31deb3e2
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b310e6ea86c695046e6069a728a2dd65989619827a730f90ec4bfdab4a1f0329
|
|
||||||
size 85533
|
|
3
geoclue-2.5.7.tar.bz2
Normal file
3
geoclue-2.5.7.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6cc7dbe4177b4e7f3532f7fe42262049789a3cd6c55afe60a3564d7394119c27
|
||||||
|
size 85764
|
111
geoclue2-revert-2-faulty.patch
Normal file
111
geoclue2-revert-2-faulty.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
From 194529c7e7123b06d41eb8025cd4375aba271068 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Philip Withnall <pwithnall@endlessos.org>
|
||||||
|
Date: Mon, 30 Nov 2020 15:20:01 +0000
|
||||||
|
Subject: [PATCH] gclue-wifi: Fix returning NULL error if BSS list is empty
|
||||||
|
|
||||||
|
This fixes a critical warning (and accompanying leak of the `GTask`) if
|
||||||
|
the BSS list is empty, which causes `create_query()` to return NULL
|
||||||
|
with no error set.
|
||||||
|
|
||||||
|
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
||||||
|
---
|
||||||
|
src/gclue-wifi.c | 33 +++++++++++++++++++++++++++++----
|
||||||
|
1 file changed, 29 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c
|
||||||
|
index 0bb166c..b06737d 100644
|
||||||
|
--- a/src/gclue-wifi.c
|
||||||
|
+++ b/src/gclue-wifi.c
|
||||||
|
@@ -837,6 +837,7 @@ gclue_wifi_get_accuracy_level (GClueWifi *wifi)
|
||||||
|
return wifi->priv->accuracy_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Can return NULL without setting @error, signifying an empty BSS list. */
|
||||||
|
static GList *
|
||||||
|
get_bss_list (GClueWifi *wifi,
|
||||||
|
GError **error)
|
||||||
|
@@ -858,10 +859,22 @@ gclue_wifi_create_query (GClueWebSource *source,
|
||||||
|
{
|
||||||
|
GList *bss_list; /* As in Access Points */
|
||||||
|
SoupMessage *msg;
|
||||||
|
+ g_autoptr(GError) local_error = NULL;
|
||||||
|
|
||||||
|
- bss_list = get_bss_list (GCLUE_WIFI (source), error);
|
||||||
|
- if (bss_list == 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;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Empty list? */
|
||||||
|
+ if (bss_list == NULL) {
|
||||||
|
+ g_set_error_literal (error,
|
||||||
|
+ G_IO_ERROR,
|
||||||
|
+ G_IO_ERROR_FAILED,
|
||||||
|
+ "No WiFi networks found");
|
||||||
|
return NULL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
msg = gclue_mozilla_create_query (bss_list, NULL, error);
|
||||||
|
g_list_free (bss_list);
|
||||||
|
@@ -883,10 +896,22 @@ gclue_wifi_create_submit_query (GClueWebSource *source,
|
||||||
|
{
|
||||||
|
GList *bss_list; /* As in Access Points */
|
||||||
|
SoupMessage * msg;
|
||||||
|
+ g_autoptr(GError) local_error = NULL;
|
||||||
|
|
||||||
|
- bss_list = get_bss_list (GCLUE_WIFI (source), error);
|
||||||
|
- if (bss_list == 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;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Empty list? */
|
||||||
|
+ if (bss_list == NULL) {
|
||||||
|
+ g_set_error_literal (error,
|
||||||
|
+ G_IO_ERROR,
|
||||||
|
+ G_IO_ERROR_FAILED,
|
||||||
|
+ "No WiFi networks found");
|
||||||
|
return NULL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
msg = gclue_mozilla_create_submit_query (location,
|
||||||
|
bss_list,
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
|
|
||||||
|
From 715cfbf5bec8002fb1e9759b6c34bc070f977807 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Philip Withnall <pwithnall@endlessos.org>
|
||||||
|
Date: Mon, 9 Nov 2020 17:47:44 +0000
|
||||||
|
Subject: [PATCH] gclue-wifi: Handle errors getting the BSS list
|
||||||
|
|
||||||
|
Without this, we can submit empty requests to the Mozilla geolocation
|
||||||
|
service.
|
||||||
|
|
||||||
|
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
||||||
|
---
|
||||||
|
src/gclue-wifi.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c
|
||||||
|
index fecfd08..5ab4501 100644
|
||||||
|
--- a/src/gclue-wifi.c
|
||||||
|
+++ b/src/gclue-wifi.c
|
||||||
|
@@ -840,7 +840,9 @@ gclue_wifi_create_query (GClueWebSource *source,
|
||||||
|
GList *bss_list; /* As in Access Points */
|
||||||
|
SoupMessage *msg;
|
||||||
|
|
||||||
|
- bss_list = get_bss_list (GCLUE_WIFI (source), NULL);
|
||||||
|
+ bss_list = get_bss_list (GCLUE_WIFI (source), error);
|
||||||
|
+ if (bss_list == NULL)
|
||||||
|
+ return NULL;
|
||||||
|
|
||||||
|
msg = gclue_mozilla_create_query (bss_list, NULL, error);
|
||||||
|
g_list_free (bss_list);
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 31 13:10:06 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 2.5.7:
|
||||||
|
+ A bug fix release, mainly fixing a bunch of memory leaks.
|
||||||
|
- Add geoclue2-revert-2-faulty.patch: Revert two broken commits.
|
||||||
|
https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/142
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 13 13:01:31 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
Sun Dec 13 13:01:31 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%define _name geoclue
|
%define _name geoclue
|
||||||
|
|
||||||
Name: geoclue2
|
Name: geoclue2
|
||||||
Version: 2.5.6
|
Version: 2.5.7
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: GeoLocation Framework
|
Summary: GeoLocation Framework
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@ -29,6 +29,9 @@ Source0: %{url}/-/archive/%{version}/geoclue-%{version}.tar.bz2
|
|||||||
Source1: srvGeoClue.conf
|
Source1: srvGeoClue.conf
|
||||||
Source99: geoclue2-rpmlintrc
|
Source99: geoclue2-rpmlintrc
|
||||||
|
|
||||||
|
# PATCH-FIX-UPSTREAM geoclue2-revert-2-faulty.patch -- Revert two broken commits
|
||||||
|
Patch0: geoclue2-revert-2-faulty.patch
|
||||||
|
|
||||||
BuildRequires: intltool >= 0.40.0
|
BuildRequires: intltool >= 0.40.0
|
||||||
BuildRequires: meson >= 0.47.2
|
BuildRequires: meson >= 0.47.2
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -89,7 +92,8 @@ awareness in applications. GeoClue uses the D-Bus inter-process
|
|||||||
communication mechanism to provide location information
|
communication mechanism to provide location information
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{_name}-%{version} -p1
|
%autosetup -n %{_name}-%{version} -N
|
||||||
|
%patch0 -p1 -R
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson \
|
%meson \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user