From 5cfaad390a48997043a0ed341bd32b85af4a6eca Mon Sep 17 00:00:00 2001 From: David King Date: Jan 30 2019 09:11:40 +0000 Subject: Fix VAPI file for recent Vala (#1668410) --- diff --git a/zeitgeist-1.0.1-fix-vapi.patch b/zeitgeist-1.0.1-fix-vapi.patch new file mode 100644 index 0000000..9c1507f --- /dev/null +++ b/zeitgeist-1.0.1-fix-vapi.patch @@ -0,0 +1,135 @@ +From 131a84f1a65a4ce8bffd94f52746425f7e96b7ae Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Tue, 5 Jun 2018 23:23:26 +0200 +Subject: [PATCH] Asynchronous out-parameters are only allowed at the end of + argument lists + +This will not result in an ABI/API change on the c-level. +--- + extensions/fts++/zeitgeist-fts.vala | 8 ++++---- + extensions/fts.vala | 4 ++-- + libzeitgeist/index.vala | 6 +++--- + libzeitgeist/remote.vala | 7 ++++--- + 4 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/extensions/fts++/zeitgeist-fts.vala b/extensions/fts++/zeitgeist-fts.vala +index e408ff34..0f8ecbc6 100644 +--- a/extensions/fts++/zeitgeist-fts.vala ++++ b/extensions/fts++/zeitgeist-fts.vala +@@ -118,8 +118,8 @@ namespace Zeitgeist + public async void search (string query_string, Variant time_range, + Variant filter_templates, + uint offset, uint count, uint result_type, +- out Variant events, out uint matches, +- Cancellable? cancellable=null) ++ Cancellable? cancellable, ++ out Variant events, out uint matches) + throws Error + { + var tr = new TimeRange.from_variant (time_range); +@@ -140,9 +140,9 @@ namespace Zeitgeist + Variant filter_templates, + uint storage_state, uint offset, + uint count, uint result_type, ++ Cancellable? cancellable, + out Variant events, out double[] relevancies, +- out uint matches, +- Cancellable? cancellable=null) ++ out uint matches) + throws Error + { + var tr = new TimeRange.from_variant (time_range); +diff --git a/extensions/fts.vala b/extensions/fts.vala +index 0b8d81b7..359cd030 100644 +--- a/extensions/fts.vala ++++ b/extensions/fts.vala +@@ -183,7 +183,7 @@ namespace Zeitgeist + + var timer = new Timer (); + yield siin.search (query_string, time_range, filter_templates, +- offset, count, result_type, ++ offset, count, result_type, null, + out events, out matches); + debug ("Got %u[/%u] results from indexer (in %f seconds)", + (uint) events.n_children (), matches, timer.elapsed ()); +@@ -201,7 +201,7 @@ namespace Zeitgeist + var timer = new Timer (); + yield siin.search_with_relevancies ( + query_string, time_range, filter_templates, +- storage_state, offset, count, result_type, ++ storage_state, offset, count, result_type, null, + out events, out relevancies, out matches); + + debug ("Got %u[/%u] results from indexer (in %f seconds)", +diff --git a/libzeitgeist/index.vala b/libzeitgeist/index.vala +index e19621a5..458247ad 100644 +--- a/libzeitgeist/index.vala ++++ b/libzeitgeist/index.vala +@@ -137,7 +137,7 @@ public class Index : QueuedProxyWrapper + + yield proxy.search (query, time_range.to_variant (), + Events.to_variant (event_templates_cp), offset, num_events, +- result_type, out result, out matches, cancellable); ++ result_type, cancellable, out result, out matches); + + return new SimpleResultSet.with_num_matches ( + Events.from_variant (result), matches); +@@ -195,8 +195,8 @@ public class Index : QueuedProxyWrapper + + yield proxy.search_with_relevancies (query, time_range.to_variant (), + Events.to_variant (event_templates_cp), storage_state, offset, +- num_events, result_type, out relevancies_variant, out result, +- out matches, cancellable); ++ num_events, result_type, cancellable, out relevancies_variant, ++ out result, out matches); + + relevancies = new double[relevancies_variant.n_children ()]; + VariantIter iter = relevancies_variant.iterator (); +diff --git a/libzeitgeist/remote.vala b/libzeitgeist/remote.vala +index 0035e154..677aef5f 100644 +--- a/libzeitgeist/remote.vala ++++ b/libzeitgeist/remote.vala +@@ -141,16 +141,17 @@ namespace Zeitgeist + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, +- out uint matches, Cancellable? cancellable=null) throws Error; ++ out uint matches) throws Error; + public abstract async void search_with_relevancies ( + string query_string, + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint storage_state, uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, +- out double[] relevancies, out uint matches, +- Cancellable? cancellable=null) throws Error; ++ out double[] relevancies, out uint matches) throws Error; + } + + /* FIXME: Remove this! Only here because of a bug +--- a/src/ext-fts.vala ++++ b/src/ext-fts.vala +@@ -183,7 +183,7 @@ namespace Zeitgeist + + var timer = new Timer (); + yield siin.search (query_string, time_range, filter_templates, +- offset, count, result_type, ++ offset, count, result_type, null, + out events, out matches); + debug ("Got %u[/%u] results from indexer (in %f seconds)", + (uint) events.n_children (), matches, timer.elapsed ()); +@@ -201,7 +201,7 @@ namespace Zeitgeist + var timer = new Timer (); + yield siin.search_with_relevancies ( + query_string, time_range, filter_templates, +- storage_state, offset, count, result_type, ++ storage_state, offset, count, result_type, null, + out events, out relevancies, out matches); + + debug ("Got %u[/%u] results from indexer (in %f seconds)", +-- +2.18.1 + diff --git a/zeitgeist-1.0.1-fts-vala-fix.patch b/zeitgeist-1.0.1-fts-vala-fix.patch new file mode 100644 index 0000000..aacd691 --- /dev/null +++ b/zeitgeist-1.0.1-fts-vala-fix.patch @@ -0,0 +1,122 @@ +From 4cd7031da14d4a2a291f7a176b3e6c08c49ddcef Mon Sep 17 00:00:00 2001 +From: David King +Date: Wed, 30 Jan 2019 07:55:44 +0000 +Subject: [PATCH] fts: Adapt fully for commit 131a84f1 + +--- + extensions/fts.vala | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/extensions/fts.vala b/extensions/fts.vala +index 359cd030..72404e5f 100644 +--- a/extensions/fts.vala ++++ b/extensions/fts.vala +@@ -29,6 +29,7 @@ namespace Zeitgeist + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, + out uint matches) throws Error; + public abstract async void search_with_relevancies ( +@@ -36,6 +37,7 @@ namespace Zeitgeist + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint storage_state, uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, + out double[] relevancies, + out uint matches) throws Error; +@@ -177,13 +179,14 @@ namespace Zeitgeist + + public async void search (string query_string, Variant time_range, + Variant filter_templates, uint offset, uint count, uint result_type, +- out Variant events, out uint matches) throws Error ++ Cancellable? cancellable, out Variant events, ++ out uint matches) throws Error + { + if (siin == null) yield wait_for_proxy (); + + var timer = new Timer (); + yield siin.search (query_string, time_range, filter_templates, +- offset, count, result_type, null, ++ offset, count, result_type, cancellable, + out events, out matches); + debug ("Got %u[/%u] results from indexer (in %f seconds)", + (uint) events.n_children (), matches, timer.elapsed ()); +@@ -193,15 +196,15 @@ namespace Zeitgeist + string query_string, Variant time_range, + Variant filter_templates, uint storage_state, + uint offset, uint count, uint result_type, +- out Variant events, out double[] relevancies, out uint matches) +- throws Error ++ Cancellable? cancellable, out Variant events, ++ out double[] relevancies, out uint matches) throws Error + { + if (siin == null) yield wait_for_proxy (); + + var timer = new Timer (); + yield siin.search_with_relevancies ( + query_string, time_range, filter_templates, +- storage_state, offset, count, result_type, null, ++ storage_state, offset, count, result_type, cancellable, + out events, out relevancies, out matches); + + debug ("Got %u[/%u] results from indexer (in %f seconds)", +--- a/src/ext-fts.vala ++++ b/src/ext-fts.vala +@@ -29,6 +29,7 @@ namespace Zeitgeist + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, + out uint matches) throws Error; + public abstract async void search_with_relevancies ( +@@ -36,6 +37,7 @@ namespace Zeitgeist + [DBus (signature = "(xx)")] Variant time_range, + [DBus (signature = "a(asaasay)")] Variant filter_templates, + uint storage_state, uint offset, uint count, uint result_type, ++ Cancellable? cancellable, + [DBus (signature = "a(asaasay)")] out Variant events, + out double[] relevancies, + out uint matches) throws Error; +@@ -177,13 +179,14 @@ namespace Zeitgeist + + public async void search (string query_string, Variant time_range, + Variant filter_templates, uint offset, uint count, uint result_type, +- out Variant events, out uint matches) throws Error ++ Cancellable? cancellable, out Variant events, ++ out uint matches) throws Error + { + if (siin == null) yield wait_for_proxy (); + + var timer = new Timer (); + yield siin.search (query_string, time_range, filter_templates, +- offset, count, result_type, null, ++ offset, count, result_type, cancellable, + out events, out matches); + debug ("Got %u[/%u] results from indexer (in %f seconds)", + (uint) events.n_children (), matches, timer.elapsed ()); +@@ -193,15 +196,15 @@ namespace Zeitgeist + string query_string, Variant time_range, + Variant filter_templates, uint storage_state, + uint offset, uint count, uint result_type, +- out Variant events, out double[] relevancies, out uint matches) +- throws Error ++ Cancellable? cancellable, out Variant events, ++ out double[] relevancies, out uint matches) throws Error + { + if (siin == null) yield wait_for_proxy (); + + var timer = new Timer (); + yield siin.search_with_relevancies ( + query_string, time_range, filter_templates, +- storage_state, offset, count, result_type, null, ++ storage_state, offset, count, result_type, cancellable, + out events, out relevancies, out matches); + + debug ("Got %u[/%u] results from indexer (in %f seconds)", +-- +2.20.1 + diff --git a/zeitgeist.spec b/zeitgeist.spec index d9073a6..46ffd91 100644 --- a/zeitgeist.spec +++ b/zeitgeist.spec @@ -13,6 +13,10 @@ License: LGPLv2+ and LGPLv3+ and GPLv2+ URL: https://launchpad.net/zeitgeist Source0: http://launchpad.net/%{name}/1.0/%{version}/+download/%{name}-%{version}.tar.xz Patch0: zeitgeist-1.0.1-fix-ontology-vala-syntax.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1668410 +Patch1: zeitgeist-1.0.1-fix-vapi.patch +# https://gitlab.freedesktop.org/zeitgeist/zeitgeist/merge_requests/1 +Patch2: zeitgeist-1.0.1-fts-vala-fix.patch BuildRequires: gcc-c++ BuildRequires: pkgconfig(dee-icu-1.0) @@ -144,6 +148,7 @@ make check || true %changelog * Tue Jan 29 2019 David King - 1.0.1-1 - Update to 1.0.1 +- Fix VAPI file for recent Vala (#1668410) * Sat Jul 14 2018 Fedora Release Engineering - 1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild