From 8077cb67a121b47ec3d20b12be53b91677ccbe97 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Mon, 19 Jun 2017 10:51:26 +0200 Subject: [PATCH] Fix how UDisksClient filters property changes --- ...s-2.7.0-fix-changed-signal-filtering.patch | 35 +++++++++++++++++++ udisks2.spec | 7 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 udisks-2.7.0-fix-changed-signal-filtering.patch diff --git a/udisks-2.7.0-fix-changed-signal-filtering.patch b/udisks-2.7.0-fix-changed-signal-filtering.patch new file mode 100644 index 0000000..271a39c --- /dev/null +++ b/udisks-2.7.0-fix-changed-signal-filtering.patch @@ -0,0 +1,35 @@ +From 192a17d1a89d098a8df7e8b6d1e23c1005597fd5 Mon Sep 17 00:00:00 2001 +From: Vratislav Podzimek +Date: Fri, 16 Jun 2017 11:59:57 +0200 +Subject: [PATCH] Fix how UDisksClient filters property changes + +The value returned from g_strcmp0() is not a boolean. And a +GVariantIter has to be initialized before use. +--- + udisks/udisksclient.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/udisks/udisksclient.c b/udisks/udisksclient.c +index ae9364d6..e2cd9a38 100644 +--- a/udisks/udisksclient.c ++++ b/udisks/udisksclient.c +@@ -1566,14 +1566,15 @@ on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager, + UDisksClient *client = UDISKS_CLIENT (user_data); + UDisksClientClass *client_class = UDISKS_CLIENT_GET_CLASS (client); + +- GVariantIter *iter = NULL; +- const gchar *property_name = NULL; ++ GVariantIter iter; ++ gchar *property_name = NULL; + + /* never emit the change signal for Job objects */ +- if (g_strcmp0 (g_dbus_proxy_get_interface_name (interface_proxy), "org.freedesktop.UDisks2.Drive.Job")) ++ if (g_strcmp0 (g_dbus_proxy_get_interface_name (interface_proxy), "org.freedesktop.UDisks2.Drive.Job") == 0) + return; + +- while (g_variant_iter_next (iter, "{&sv}", &property_name, NULL)) ++ g_variant_iter_init (&iter, changed_properties); ++ while (g_variant_iter_next (&iter, "{&sv}", &property_name, NULL)) + { + if (! g_hash_table_contains (client_class->changed_blacklist, property_name)) + { diff --git a/udisks2.spec b/udisks2.spec index ff49c3b..e0576f9 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -16,11 +16,12 @@ Name: udisks2 Summary: Disk Manager Version: 2.7.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 +Patch0: udisks-2.7.0-fix-changed-signal-filtering.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -201,6 +202,7 @@ This package contains module for ZRAM configuration. %prep %setup -q -n udisks-%{version} +%patch0 -p1 %build autoreconf -ivf @@ -343,6 +345,9 @@ udevadm trigger %endif %changelog +* Mon Jun 19 2017 Vojtech Trefny - 2.7.0-2 +- Fix how UDisksClient filters property changes + * Fri Jun 02 2017 Vojtech Trefny - 2.7.0-1 - Version 2.7.0