Hello community,

here is the log from the commit of package gnome-software for openSUSE:Factory 
checked in at 2017-12-06 08:49:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-software (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-software.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-software"

Wed Dec  6 08:49:46 2017 rev:48 rq:548508 version:3.26.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-software/gnome-software.changes    
2017-11-30 16:31:58.045963300 +0100
+++ /work/SRC/openSUSE:Factory/.gnome-software.new/gnome-software.changes       
2017-12-06 08:49:49.492235413 +0100
@@ -1,0 +2,12 @@
+Sun Nov 26 12:27:37 UTC 2017 - [email protected]
+
+- Add gs-add-locking-to-the-repos-plugin.patch: Add locking to the
+  repos plugin so that we don't modify the priv->urls hash table
+  concurrently from multiple threads (rh#1516536).
+- Run spec-cleaner, modernize spec, use autosetup macro, no longer
+  rm la files, not needed as we are using meson buildsystem.
+- Drop update-desktop-files BuildRequires and no longer use
+  suse_update_desktop_file macro, no longer needed.
+- Explicitly pass enable-ubuntuone=false to meson.
+
+-------------------------------------------------------------------

New:
----
  gs-add-locking-to-the-repos-plugin.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-software.spec ++++++
--- /var/tmp/diff_new_pack.2qkQIb/_old  2017-12-06 08:49:50.380202903 +0100
+++ /var/tmp/diff_new_pack.2qkQIb/_new  2017-12-06 08:49:50.380202903 +0100
@@ -24,13 +24,14 @@
 License:        GPL-2.0+
 Group:          System/GUI/GNOME
 Url:            https://wiki.gnome.org/Design/Apps/Software
-Source:         
http://download.gnome.org/sources/gnome-software/3.26/%{name}-%{version}.tar.xz
+Source0:        
http://download.gnome.org/sources/gnome-software/3.26/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM gs-add-locking-to-the-repos-plugin.patch rh#1516536 
[email protected] -- Add locking to the repos plugin
+Patch0:         gs-add-locking-to-the-repos-plugin.patch
 BuildRequires:  gtk-doc
 BuildRequires:  intltool >= 0.35.0
 BuildRequires:  meson
 BuildRequires:  pkgconfig
 BuildRequires:  suse-xsl-stylesheets
-BuildRequires:  update-desktop-files
 BuildRequires:  pkgconfig(appstream-glib) >= 0.7.0
 BuildRequires:  pkgconfig(flatpak) >= 0.8.0
 BuildRequires:  pkgconfig(fwupd) >= 0.9.7
@@ -69,11 +70,12 @@
 %lang_package
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 %meson \
        -D enable-ubuntu-reviews=false \
+       -D enable-ubuntuone=false \
        -D enable-tests=false \
        -D enable-fwupd=true \
        %{nil}
@@ -81,15 +83,13 @@
 
 %install
 %meson_install
-find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
+
 # Test shipping gnome-software-local-file in GN
 # Currently not shipped, as this is not yet functional (boo#941862)
 rm %{buildroot}%{_datadir}/applications/gnome-software-local-file.desktop
-%suse_update_desktop_file org.gnome.Software
 %find_lang %{name}
 
 %files
-%defattr(-,root,root)
 %doc COPYING
 %{_bindir}/%{name}
 %{_bindir}/%{name}-editor
@@ -127,7 +127,6 @@
 %{_datadir}/applications/org.gnome.Software.Editor.desktop
 
 %files devel
-%defattr(-,root,root)
 %dir %{_includedir}/%{name}
 %{_datadir}/gtk-doc/html/%{name}/
 %dir %{_datadir}/doc/gnome-software

++++++ gs-add-locking-to-the-repos-plugin.patch ++++++
>From d39f372902875f2cd762df2489e761053e94c883 Mon Sep 17 00:00:00 2001
From: Kalev Lember <[email protected]>
Date: Wed, 22 Nov 2017 23:17:58 +0100
Subject: Add locking to the repos plugin

... so that we don't modify the priv->urls hash table concurrently from
multiple threads.

https://bugzilla.redhat.com/show_bug.cgi?id=1516536
---
 plugins/repos/gs-plugin-repos.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/plugins/repos/gs-plugin-repos.c b/plugins/repos/gs-plugin-repos.c
index 321f05c..468a6f3 100644
--- a/plugins/repos/gs-plugin-repos.c
+++ b/plugins/repos/gs-plugin-repos.c
@@ -26,6 +26,7 @@
 struct GsPluginData {
        GHashTable      *urls;          /* origin : url */
        GFileMonitor    *monitor;
+       GMutex           mutex;
        gchar           *reposdir;
        gboolean         valid;
 };
@@ -35,6 +36,8 @@ gs_plugin_initialize (GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_alloc_data (plugin, 
sizeof(GsPluginData));
 
+       g_mutex_init (&priv->mutex);
+
        /* for debugging and the self tests */
        priv->reposdir = g_strdup (g_getenv ("GS_SELF_TEST_REPOS_DIR"));
        if (priv->reposdir == NULL)
@@ -62,8 +65,10 @@ gs_plugin_destroy (GsPlugin *plugin)
                g_hash_table_unref (priv->urls);
        if (priv->monitor != NULL)
                g_object_unref (priv->monitor);
+       g_mutex_clear (&priv->mutex);
 }
 
+/* mutex must be held */
 static gboolean
 gs_plugin_repos_setup (GsPlugin *plugin, GCancellable *cancellable, GError 
**error)
 {
@@ -145,6 +150,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable 
*cancellable, GError **error)
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
        g_autoptr(GFile) file = g_file_new_for_path (priv->reposdir);
+       g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&priv->mutex);
 
        /* watch for changes */
        priv->monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, 
cancellable, error);
@@ -168,6 +174,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
        const gchar *tmp;
+       g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&priv->mutex);
 
        /* not required */
        if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME) == 0)
-- 
cgit v0.12


Reply via email to