Accepting request 710906 from home:Vogtinator:branches:KDE:Frameworks5
- 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) OBS-URL: https://build.opensuse.org/request/show/710906 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/AppStream?expand=0&rev=47
This commit is contained in:
parent
84df02c58d
commit
66a87a2cfa
150
0001-Restore-compatibility-with-GLib-2.58.patch
Normal file
150
0001-Restore-compatibility-with-GLib-2.58.patch
Normal file
@ -0,0 +1,150 @@
|
||||
From 919bea53ada992d8f02b5e6e1e016c912ca9aadf Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
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
|
||||
+}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ab20067036207aa0708608f87d6e2043ec46fad0b55b411eb1f242b8b9ab0d14
|
||||
size 1953604
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAlx6ut0ACgkQSUyKX79N
|
||||
7OtKuxAAn7+ZNwxFZF1zuLm6pE/7ZWnALca3MrkA6//lgMkcovYC2vqZLM3oEdcq
|
||||
9TOj7yUTygya4TaVxVa9Zl3871vxZcJoYTR5ZdTysvZMgP/QKbsMvlb+Yw1Pb9SW
|
||||
uYrNya8jN85HxfsOQy8SqRSAMz6ncesvpgzQAnEcSTT8A3QcBKHjCaFxR9eGfx/a
|
||||
Ft7+Y9XDdU7ufqURQDBYbamWNu6xKrS2qgTdaEoCBiYzqOIVUsbSjCSiJdUk9MO0
|
||||
pYzy8w6JjJKuaNqvGExbwZIm80dWmWL0/0u6rL7ubxI2oeFtTieFtTmG+mudtgGF
|
||||
cRLWn6J35yF/1jn3DE0hs2ANHOq6Cp/aAoh77QwrMEiy/l+nLEYdVzBmGCZmFE74
|
||||
H5k2JDyzsUaQpOrYSwnKl8M5QHZy1+U92EWX+CVwcUpafCxLSccagP062OAw0guU
|
||||
qb2xWr1nl5JpqVRI1xw1wIDi++tUkNXRJjr/cjjb2SJ3nXl9dL9GEgdvwTAFPX83
|
||||
UgF1mDY+tx8QnLqMz/exzdENfbKceF4BZ2X3oK0tuTNLRDL6eodoS4UqLQwm8YcV
|
||||
HiQTeWuv/A8GqOmxy4Yd+oD+6nws0yz5Nrd0d9Hp2VbHsW6DMJDHMZHSufg4pBcY
|
||||
X7JJuIHwUOtCfZ808IfutsdQscsiRZpTyiPUOXmQHegLiUjZW8E=
|
||||
=Ww4Z
|
||||
-----END PGP SIGNATURE-----
|
3
AppStream-0.12.7.tar.xz
Normal file
3
AppStream-0.12.7.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:696d2f09187a8cdcb1e87a881a9634b5d921f8d24be08e4f41f2bcf11d8b57d5
|
||||
size 1958948
|
16
AppStream-0.12.7.tar.xz.asc
Normal file
16
AppStream-0.12.7.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAl0Gp4MACgkQSUyKX79N
|
||||
7OsCxg//aqKkpkUdIx51Tei12DtBi7m6sV86B8JpKzyFRMKKJYbG1SmTu8vNaWTh
|
||||
M+45UozPa8vWnr7yBYndyj65oqhcams8DMgGqrZZL7ziuq/VgmPkYzcCefKBEFkL
|
||||
PDIp0Af2zHnUA3XMO8Jhph0RkKRvn6dJyR3dEg1viP3Bhl6WsXqbQDkttkPvu5p0
|
||||
/MFi+Db20L0YkijNZa0wWfxD8mVoVRgAsMpCue1Kx7Z71qt4Qs0fvYDfig8faQ0S
|
||||
7TZuYi9GraRpoXgTOzxkon90dGJQ2jOXM0jg8TWpsiMy0wFt0ulJSE8u5Asb9rfo
|
||||
GiqzXZhO9XAXZwI/oVWMwGzgnGTgn/HiPUue3h9f1jL2d/crr/ptJjQHViAKsXqj
|
||||
ciPGX5w9sY4PVbcxfmBkWgRZLTMvOoPjivHChRcYOEHMIJzyfjeUY/tKwkdIspWy
|
||||
h1G0bcEePM8EBg0s2mLDtRr0NSEWvOmBRYsCxhjob5WXY7z3OyseIZ/f5GWvbZXz
|
||||
kUXQBAF0rjVf5rko7vG+mGMmKSyt7i12ITi8RFPNE1dkH/OAV0+H3vyittrPuNnd
|
||||
R6uFOCBCmkOCdiD+Lc1Hl0Gekg6+wBnVHf835kIy0hF5kf0CTfHmmGOuu/Qfnv+W
|
||||
a4hRnFIKermrjAufkBBiBiMHG5M/cNuqjhVhiHOKkvU8IgUz/AM=
|
||||
=Mini
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +1,54 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 19 09:26:25 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 17 10:01:27 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@ -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 @@ URL: https://www.freedesktop.org/software/appstream/docs/
|
||||
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 @@ suck less.
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%if "%{?_lib}" == "lib64"
|
||||
@ -160,11 +165,13 @@ appstreamcli refresh --force || true
|
||||
%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/
|
||||
|
18
find-lmdb.patch
Normal file
18
find-lmdb.patch
Normal file
@ -0,0 +1,18 @@
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
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
|
Loading…
Reference in New Issue
Block a user