Hello community,

here is the log from the commit of package AppStream for openSUSE:Factory 
checked in at 2019-06-22 11:16:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/AppStream (Old)
 and      /work/SRC/openSUSE:Factory/.AppStream.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "AppStream"

Sat Jun 22 11:16:44 2019 rev:14 rq:710910 version:0.12.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/AppStream/AppStream.changes      2019-03-21 
09:42:19.550952481 +0100
+++ /work/SRC/openSUSE:Factory/.AppStream.new.4615/AppStream.changes    
2019-06-22 11:16:45.804937934 +0200
@@ -1,0 +2,51 @@
+Wed Jun 19 09:26:25 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Update to 0.12.7:
+  Notes:
+   * This release changes the way AsPool caches components and will also
+     permanently keep components in an LMDB-based cache.
+     Additionally, the GVariant AsComponent serialization was removed.
+  Features:
+   * Depend on LMDB (Matthias Klumpp)
+   * tests: Test pool cache and XML read performance separately (Matthias 
Klumpp)
+   * Improvements to data caching and fulltext search (Matthias Klumpp)
+   * Add new LMDB based component cache (Matthias Klumpp)
+   * cache: Implicitly hash keys if they are too long for the database 
(Matthias Klumpp)
+   * cache: Implement all supported search modes (Matthias Klumpp)
+   * cache: Implement various performance optimizations and helpers (Matthias 
Klumpp)
+   * cache: Allow switch to nosync mode, make insertions threadsafe (Matthias 
Klumpp)
+   * Refactor component pool to make use of the mmap'ed caches by default 
(Matthias Klumpp)
+   * Don't limit term length in user search queries (Matthias Klumpp)
+   * Ignore one-letter search terms (Matthias Klumpp)
+   * pool: Mask removed components in readonly caches so they can not be 
queried (Matthias Klumpp)
+   * Remove component GVariant serialization (Matthias Klumpp)
+   * cache: Use binary representations for cache values (Matthias Klumpp)
+   * cache: Always refine launchable entries, to make them searchable 
(Matthias Klumpp)
+   * Make component scope API public (Matthias Klumpp)
+   * Handle LicenseRef URLs explicitly when extracing a license URL (Matthias 
Klumpp)
+   * Update static data (Matthias Klumpp)
+   * tests: Update perf test with test for the new cache implementation 
(Matthias Klumpp)
+   * its: Add "translatable" option in metainfo.its (fujiwarat)
+  Specification:
+   * Add a note about not dropping .desktop suffix from existing IDs (Kalev 
Lember)
+   * spec: clarify <translation/> purpose (Kamil Páral)
+   * docs: Explicitly rule out nested lists (Marius Vollmer)
+   * docs: Add link to project page to specification abstract (Matthias Klumpp)
+   * spec: Clarify format of the appstream: URI (Matthias Klumpp)
+   * spec: Clarify how to denote proprietary licenses (Matthias Klumpp)
+  Bugfixes:
+   * tests: Fix potential wrong output when two tests fail in parallel 
(Matthias Klumpp)
+   * validator: Allow some top-level tags to be empty (Matthias Klumpp)
+   * Only match all things for broad queries, for invalid ones return nothing 
(Matthias Klumpp)
+   * Determine system cache age correctly and don't needlessly refresh it 
(Matthias Klumpp)
+   * Never attempt to load the system cache when it is not needed (Matthias 
Klumpp)
+   * Assume "unknown" distribution ID by default (if /etc/os-release is 
missing) (Matthias Klumpp)
+   * cache: Ensure previous cache is closed before opening a new one (Matthias 
Klumpp)
+   * Put test data in alphabetical order (Robert Ancell)
+   * Generate XML and YAML in alphabetical order (Robert Ancell)
+- Add patch to work with vanilla lmdb:
+  * find-lmdb.patch
+- Add patch to fix build on Leap:
+  * 0001-Restore-compatibility-with-GLib-2.58.patch
+
+-------------------------------------------------------------------

Old:
----
  AppStream-0.12.6.tar.xz
  AppStream-0.12.6.tar.xz.asc

New:
----
  0001-Restore-compatibility-with-GLib-2.58.patch
  AppStream-0.12.7.tar.xz
  AppStream-0.12.7.tar.xz.asc
  find-lmdb.patch

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

Other differences:
------------------
++++++ AppStream.spec ++++++
--- /var/tmp/diff_new_pack.LovGaG/_old  2019-06-22 11:16:46.908939117 +0200
+++ /var/tmp/diff_new_pack.LovGaG/_new  2019-06-22 11:16:46.920939130 +0200
@@ -19,7 +19,7 @@
 %define libappstream_sover 4
 %define libAppStreamQt_sover 2
 Name:           AppStream
-Version:        0.12.6
+Version:        0.12.7
 Release:        0
 Summary:        Utilities to generate, maintain and access the AppStream 
Xapian database
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
@@ -28,10 +28,15 @@
 Source0:        
http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz
 Source1:        
http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz.asc
 Source2:        %{name}.keyring
+# PATCH-FIX-UPSTREAM
+Patch1:         0001-Restore-compatibility-with-GLib-2.58.patch
+# PATCH-FIX-UPSTREAM (https://github.com/ximion/appstream/issues/239)
+Patch1000:      find-lmdb.patch
 BuildRequires:  gettext
 BuildRequires:  gperf
 BuildRequires:  intltool
 BuildRequires:  itstool
+BuildRequires:  lmdb-devel
 BuildRequires:  meson >= 0.42
 BuildRequires:  pkgconfig
 BuildRequires:  xmlto
@@ -117,7 +122,7 @@
 %lang_package
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 %if "%{?_lib}" == "lib64"
@@ -160,11 +165,13 @@
 %files -n libappstream%{libappstream_sover}
 %doc NEWS
 %license LICENSE*
-%{_libdir}/libappstream.so.*
+%{_libdir}/libappstream.so.%{libappstream_sover}
+%{_libdir}/libappstream.so.%{version}
 
 %files -n libAppStreamQt%{libAppStreamQt_sover}
 %license LICENSE*
-%{_libdir}/libAppStreamQt.so.*
+%{_libdir}/libAppStreamQt.so.%{libAppStreamQt_sover}
+%{_libdir}/libAppStreamQt.so.%{version}
 
 %files -n libAppStreamQt-devel
 %{_includedir}/AppStreamQt/

++++++ 0001-Restore-compatibility-with-GLib-2.58.patch ++++++
>From 919bea53ada992d8f02b5e6e1e016c912ca9aadf Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <[email protected]>
Date: Mon, 17 Jun 2019 20:51:21 +0200
Subject: [PATCH] Restore compatibility with GLib < 2.58

Since g_ptr_array_steal_index_fast() does not exist in older GLib
versions, we do something that is - sort of - equivalent when building
against older versions (but slightly slower and uglier).
---
 src/as-cache.c         |  3 +--
 src/as-pool.c          | 21 +++++++--------------
 src/as-utils-private.h |  3 +++
 src/as-utils.c         | 25 +++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 16 deletions(-)

Index: AppStream-0.12.7/src/as-cache.c
===================================================================
--- AppStream-0.12.7.orig/src/as-cache.c
+++ AppStream-0.12.7/src/as-cache.c
@@ -1909,8 +1909,7 @@ as_cache_get_components_by_categories (A
                        return NULL;
                }
 
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        if (result == NULL) {
Index: AppStream-0.12.7/src/as-pool.c
===================================================================
--- AppStream-0.12.7.orig/src/as-pool.c
+++ AppStream-0.12.7/src/as-pool.c
@@ -1283,8 +1283,7 @@ as_pool_get_components (AsPool *pool)
                        g_warning ("Unable to retrieve all components from 
system cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1321,8 +1320,7 @@ as_pool_get_components_by_id (AsPool *po
                        g_warning ("Unable find components by ID in system 
cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1360,8 +1358,7 @@ as_pool_get_components_by_provided_item
                        g_warning ("Unable find components by provided item in 
system cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1396,8 +1393,7 @@ as_pool_get_components_by_kind (AsPool *
                        g_warning ("Unable find components by kind in system 
cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1439,8 +1435,7 @@ as_pool_get_components_by_categories (As
                        g_warning ("Unable find components by categories in 
system cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1481,8 +1476,7 @@ as_pool_get_components_by_launchable (As
                        g_warning ("Unable find components by launchable in 
system cache: %s", tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        return result;
@@ -1629,8 +1623,7 @@ as_pool_search (AsPool *pool, const gcha
                        g_warning ("Search in system cache failed: %s", 
tmp_error->message);
                        return result;
                }
-               while (tmp_res->len != 0)
-                       g_ptr_array_add (result, g_ptr_array_steal_index_fast 
(tmp_res, 0));
+               as_object_ptr_array_absorb (result, tmp_res);
        }
 
        /* sort the results by their priority (this was explicitly disabled for 
the caches before,
Index: AppStream-0.12.7/src/as-utils-private.h
===================================================================
--- AppStream-0.12.7.orig/src/as-utils-private.h
+++ AppStream-0.12.7/src/as-utils-private.h
@@ -93,6 +93,9 @@ gchar                 *as_utils_dns_to_rdns (const gch
 
 void                   as_utils_sort_components_by_score (GPtrArray *cpts);
 
+void                   as_object_ptr_array_absorb (GPtrArray *dest,
+                                                   GPtrArray *src);
+
 #pragma GCC visibility pop
 G_END_DECLS
 
Index: AppStream-0.12.7/src/as-utils.c
===================================================================
--- AppStream-0.12.7.orig/src/as-utils.c
+++ AppStream-0.12.7/src/as-utils.c
@@ -1261,3 +1261,28 @@ as_utils_sort_components_by_score (GPtrA
 {
        g_ptr_array_sort (cpts, as_sort_components_by_score_cb);
 }
+
+/**
+ * as_object_ptr_array_absorb:
+ *
+ * Append contents from source array of GObjects to destination array,
+ * transferring ownership to the destination and removing values
+ * from the source (effectively moving the data).
+ * The source array will be empty afterwards.
+ *
+ * This function assumes that a GDestroyNotify function is set on the
+ * GPtrArray if GLib < 2.58.
+ */
+void
+as_object_ptr_array_absorb (GPtrArray *dest, GPtrArray *src)
+{
+#if GLIB_CHECK_VERSION(2,58,0)
+       while (src->len != 0)
+               g_ptr_array_add (dest, g_ptr_array_steal_index_fast (src, 0));
+#else
+       while (src->len != 0) {
+               g_ptr_array_add (dest, g_object_ref (g_ptr_array_index (src, 
0)));
+               g_ptr_array_remove_index_fast (src, 0);
+       }
+#endif
+}
++++++ AppStream-0.12.6.tar.xz -> AppStream-0.12.7.tar.xz ++++++
++++ 24935 lines of diff (skipped)


++++++ find-lmdb.patch ++++++
From: Fabian Vogt <[email protected]>
Subject: Find LMDB without pkg-config or CMake

Upstream LMDB provides neither.

Index: AppStream-0.12.7/meson.build
===================================================================
--- AppStream-0.12.7.orig/meson.build
+++ AppStream-0.12.7/meson.build
@@ -66,7 +66,7 @@ gio_dep = dependency('gio-2.0', version
 gio_unix_dep = dependency('gio-unix-2.0', version : '>=2.54')
 xml2_dep = dependency('libxml-2.0')
 yaml_dep = dependency('yaml-0.1')
-lmdb_dep = dependency('lmdb')
+lmdb_dep = meson.get_compiler('c').find_library('lmdb')
 
 if get_option ('gir')
     # ensure we have a version of GIR that isn't broken with Meson

Reply via email to