summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <andrew.shadura@collabora.co.uk>2016-09-26 23:00:46 +0200
committerAndrew Shadura <andrew.shadura@collabora.co.uk>2016-09-26 23:02:52 +0200
commit38ea448efd295ba3dc46c39c751be95fe27611fa (patch)
tree691af446fea3117589a588628a31f21b2807fad5
parent26598558b0ce3ff7b0aec5592f75f868fb95014f (diff)
parent07ac6d84f55e2fcf030c65638be2529a50bb0546 (diff)
Merge changes from Ubuntu:
- Make libzeitgeist-2.0-0 recommend zeitgeist-core over zeitgeist to stop python-zeitgeist being unnecessarily pulled into the default images (LP: #1440373) - Depend on python-gobject-2 and python-gi instead of python-gobject, because it's a transitional package (LP: #778054) - Skip failing tests. - Use dh-autoreconf. - Fix autocomplete. - Perform VACUUM operation on activity DB on startup (LP: #919801). - Ensure the log mainloop uses the current thread's context when waiting (LP: #1584849).
-rw-r--r--debian/changelog18
-rw-r--r--debian/control7
-rw-r--r--debian/patches/series3
-rw-r--r--debian/patches/skip-failing-tests.patch32
-rw-r--r--debian/patches/startup-database-vacuum.patch214
-rw-r--r--debian/patches/thread-default-context.patch14
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/zeitgeist-core.install1
8 files changed, 287 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 60dcfb8..2101128 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+zeitgeist (0.9.16-0.2) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Merge changes from Ubuntu:
+ - Make libzeitgeist-2.0-0 recommend zeitgeist-core over zeitgeist to stop
+ python-zeitgeist being unnecessarily pulled into the default images
+ (LP: #1440373)
+ - Depend on python-gobject-2 and python-gi instead of python-gobject,
+ because it's a transitional package (LP: #778054)
+ - Skip failing tests.
+ - Use dh-autoreconf.
+ - Fix autocomplete.
+ - Perform VACUUM operation on activity DB on startup (LP: #919801).
+ - Ensure the log mainloop uses the current thread's context
+ when waiting (LP: #1584849).
+
+ -- Andrew Shadura <andrewsh@debian.org> Mon, 26 Sep 2016 22:53:03 +0200
+
zeitgeist (0.9.16-0.1) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 483968c..2d2dde5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
Priority: optional
Maintainer: Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com>
Build-Depends: debhelper (>= 9),
- autotools-dev,
+ dh-autoreconf,
bash-completion (>= 1:1.0-1~),
dh-python,
gobject-introspection (>= 1.30.0),
@@ -70,7 +70,8 @@ Depends: ${misc:Depends},
${python:Depends},
python-xdg,
python-dbus,
- python-gobject (>= 2.16.0)
+ python-gobject-2,
+ python-gi
Replaces: zeitgeist-core (<< 0.8.99~alpha1)
Breaks: zeitgeist-core (<< 0.8.99~alpha1)
Description: event logging framework - Python bindings
@@ -90,7 +91,7 @@ Depends: ${shlibs:Depends},
${misc:Depends}
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
-Recommends: zeitgeist | zeitgeist-core
+Recommends: zeitgeist-core | zeitgeist
Description: library to access Zeitgeist - shared library
Zeitgeist is a service which logs the user's activities and events (files
opened, websites visited, conversations hold with other people, etc.) and
diff --git a/debian/patches/series b/debian/patches/series
index 330a142..6e4dda8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
fix_autocomplete.diff
fix-test-crash.patch
+skip-failing-tests.patch
+startup-database-vacuum.patch
+thread-default-context.patch
diff --git a/debian/patches/skip-failing-tests.patch b/debian/patches/skip-failing-tests.patch
new file mode 100644
index 0000000..1260eb4
--- /dev/null
+++ b/debian/patches/skip-failing-tests.patch
@@ -0,0 +1,32 @@
+Author: Jeremy Bicha <jbicha@ubuntu.com>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66338
+Description: Instead of not running tests at all, let's just skip the ones
+ that aren't working
+Index: zeitgeist-0.9.14/test/c/Makefile.am
+===================================================================
+--- zeitgeist-0.9.14.orig/test/c/Makefile.am 2013-06-17 02:40:08.000000000 -0400
++++ zeitgeist-0.9.14/test/c/Makefile.am 2013-06-28 13:46:18.641286216 -0400
+@@ -26,8 +26,6 @@
+ test-timerange \
+ test-timestamp \
+ test-symbols \
+- test-monitor \
+- test-log \
+ test-event \
+ test-datasource \
+ test-mimetypes \
+Index: zeitgeist-0.9.14/test/direct/Makefile.am
+===================================================================
+--- zeitgeist-0.9.14.orig/test/direct/Makefile.am 2013-06-28 13:46:06.181286737 -0400
++++ zeitgeist-0.9.14/test/direct/Makefile.am 2013-06-28 13:46:06.173286738 -0400
+@@ -47,10 +47,8 @@
+ datamodel-test \
+ datasource-test \
+ event-test \
+- log-test \
+ marshalling-test \
+ mimetype-test \
+- monitor-test \
+ query-operators-test \
+ symbol-test \
+ table-lookup-test \
diff --git a/debian/patches/startup-database-vacuum.patch b/debian/patches/startup-database-vacuum.patch
new file mode 100644
index 0000000..011deb9
--- /dev/null
+++ b/debian/patches/startup-database-vacuum.patch
@@ -0,0 +1,214 @@
+Description: Use execute a VACUUM operation on activity DB on startups every 10 days
+Author: Marco Trevisan <marco.trevisan@canonical.com>
+Bug-Ubuntu: https://launchpad.net/bugs/919801
+Forwarded: http://irclogs.ubuntu.com/2016/02/24/#ubuntu-desktop.html#t10:44
+
+Index: b/src/Makefile.am
+===================================================================
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,7 @@
+ NULL =
+
+ bin_PROGRAMS = zeitgeist-daemon
++pkglibexec_PROGRAMS = zeitgeist-vacuum
+ noinst_LTLIBRARIES = libzeitgeist-engine.la
+
+ AM_CPPFLAGS = \
+@@ -33,6 +34,7 @@
+ libzeitgeist_engine_la_vala.stamp \
+ extensions_vala.stamp \
+ zeitgeist_daemon_vala.stamp \
++ zeitgeist_vacuum_vala.stamp \
+ $(NULL)
+
+ # Make sure every extension has only one vala file!
+@@ -72,6 +74,17 @@
+ zeitgeist_daemon_LDADD = $(builddir)/libzeitgeist-engine.la $(top_builddir)/libzeitgeist/libzeitgeist-2.0.la $(ZEITGEIST_LIBS)
+ zeitgeist_daemon_LDFLAGS = -export-dynamic -no-undefined
+
++zeitgeist_vacuum_VALASOURCES = \
++ zeitgeist-vacuum.vala \
++ $(NULL)
++
++nodist_zeitgeist_vacuum_SOURCES = \
++ $(zeitgeist_vacuum_VALASOURCES:.vala=.c) \
++ $(NULL)
++
++zeitgeist_vacuum_LDADD = $(top_builddir)/libzeitgeist/libzeitgeist-2.0.la $(ZEITGEIST_LIBS)
++zeitgeist_vacuum_LDFLAGS = -export-dynamic -no-undefined
++
+ libzeitgeist_engine_la_LIBADD = $(ZEITGEIST_LIBS)
+ libzeitgeist_engine_la_LDFLAGS = -avoid-version -non_shared -static
+
+@@ -101,15 +114,23 @@
+ $(filter %.vala %.c,$^)
+ $(AM_V_at)touch $@
+
++zeitgeist_vacuum_vala.stamp: $(zeitgeist_vacuum_VALASOURCES) Makefile
++ $(AM_V_VALA)$(VALAC) \
++ $(AM_VALAFLAGS) \
++ $(filter %.vala %.c,$^)
++ $(AM_V_at)touch $@
++
+ EXTRA_DIST = \
+ $(libzeitgeist_engine_la_VALASOURCES) \
+ $(zeitgeist_daemon_VALASOURCES) \
++ $(zeitgeist_vacuum_VALASOURCES) \
+ $(extensions_VALASOURCES) \
+ $(NULL)
+
+ CLEANFILES = \
+ $(nodist_libzeitgeist_engine_la_SOURCES) \
+ $(nodist_zeitgeist_daemon_SOURCES) \
++ $(nodist_zeitgeist_vacuum_SOURCES) \
+ zeitgeist-engine.vapi \
+ zeitgeist-engine.h \
+ $(NULL)
+Index: b/src/zeitgeist-vacuum.vala
+===================================================================
+--- /dev/null
++++ b/src/zeitgeist-vacuum.vala
+@@ -0,0 +1,56 @@
++/* zeitgeist-vacuum.vala
++ *
++ * Copyright © 2015 Marco Trevisan <marco.trevisan@canonical.com>
++ *
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as published by
++ * the Free Software Foundation, either version 2.1 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ */
++
++using Zeitgeist;
++
++int main (string[] args)
++{
++ Sqlite.Database database;
++
++ if (Utils.using_in_memory_database ())
++ {
++ warning ("Using in-memory database, no VACUUM needed");
++ }
++
++ var db_path = Utils.get_database_file_path ();
++ debug (@"Opening database file at $db_path");
++
++ int rc = Sqlite.Database.open_v2 (db_path, out database, Sqlite.OPEN_READWRITE);
++
++ if (rc != Sqlite.OK)
++ {
++ warning ("Impossible to open database `%s': %s".printf (db_path, database.errmsg ()));
++ return rc;
++ }
++
++ print ("Performing VACUUM operation... ");
++ rc = database.exec ("VACUUM");
++
++ if (rc != Sqlite.OK)
++ {
++ print ("FAIL");
++ warning (database.errmsg ());
++ return rc;
++ }
++
++ print("OK\n");
++ return 0;
++}
++
++// vim:expandtab:ts=4:sw=4
+Index: b/data/Makefile.am
+===================================================================
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -8,9 +8,15 @@
+ service_DATA = org.gnome.zeitgeist.service
+
+ org.gnome.zeitgeist.service: org.gnome.zeitgeist.service.in
+- $(AM_V_GEN)sed -e s!\@prefix\@!$(prefix)! < $< > $@
++ $(AM_V_GEN)sed -e "s!\@prefix\@!$(prefix)!; s!\@pkglibexecdir\@!$(pkglibexecdir)!" < $< > $@
+ org.gnome.zeitgeist.service: Makefile
+
++pkglibexec_PROGRAMS = zeitgeist-maybe-vacuum
++
++zeitgeist-maybe-vacuum: zeitgeist-maybe-vacuum.in
++ $(AM_V_GEN)sed -e s!\@pkglibexecdir\@!$(pkglibexecdir)! < $< > $@
++zeitgeist-maybe-vacuum: Makefile
++
+ bashcompletiondir = $(datadir)/bash-completion/completions
+ dist_bashcompletion_DATA = completions/zeitgeist-daemon
+
+@@ -27,15 +33,17 @@
+ org.gnome.zeitgeist.service \
+ PythonSerializer.pyc \
+ zeitgeist-datahub.desktop \
++ zeitgeist-maybe-vacuum \
+ $(NULL)
+
+ EXTRA_DIST = \
+ org.gnome.zeitgeist.service.in \
+ ontology2code \
++ zeitgeist-maybe-vacuum.in \
+ $(xdgautostart_in_files) \
+ $(NULL)
+
+-all-local: org.gnome.zeitgeist.service
++all-local: org.gnome.zeitgeist.service zeitgeist-maybe-vacuum
+
+ clean:
+ rm -rf *.pyc *.~[0-9]~
+Index: b/data/zeitgeist-maybe-vacuum.in
+===================================================================
+--- /dev/null
++++ b/data/zeitgeist-maybe-vacuum.in
+@@ -0,0 +1,32 @@
++#!/bin/sh
++
++FREQUENCY=864000 # 10 days
++
++cache_dir="$HOME/.cache"
++
++if [ -n "$XDG_CACHE_HOME" ]; then
++ cache_dir="$XDG_CACHE_HOME"
++fi
++
++stamp_file="$cache_dir/zeitgeist-vacuum.stamp"
++timestamp=0
++
++if [ -f "$stamp_file" ]; then
++ timestamp="$(cat $stamp_file)"
++fi
++
++case $timestamp in
++ ''|*[!0-9]*) timestamp=0 ;;
++ *) ;;
++esac
++
++if [ $(($(date +%s) - $timestamp)) -lt $FREQUENCY ]; then
++ exit 0;
++fi
++
++if (@pkglibexecdir@/zeitgeist-vacuum); then
++ mkdir -p "$cache_dir"
++ date +%s > "$stamp_file"
++else
++ exit $?
++fi
+Index: b/data/org.gnome.zeitgeist.service.in
+===================================================================
+--- a/data/org.gnome.zeitgeist.service.in
++++ b/data/org.gnome.zeitgeist.service.in
+@@ -1,3 +1,3 @@
+ [D-BUS Service]
+ Name=org.gnome.zeitgeist.Engine
+-Exec=@prefix@/bin/zeitgeist-daemon
++Exec=/bin/sh -c "@pkglibexecdir@/zeitgeist-maybe-vacuum; @prefix@/bin/zeitgeist-daemon"
diff --git a/debian/patches/thread-default-context.patch b/debian/patches/thread-default-context.patch
new file mode 100644
index 0000000..8dcf2de
--- /dev/null
+++ b/debian/patches/thread-default-context.patch
@@ -0,0 +1,14 @@
+diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
+index 100f0cc..20d3961 100644
+--- a/libzeitgeist/log.vala
++++ b/libzeitgeist/log.vala
+@@ -86,7 +86,8 @@ public class Log : QueuedProxyWrapper
+ public Log ()
+ {
+ monitors = new HashTable<Monitor, uint> (direct_hash, direct_equal);
+- MainLoop mainloop = new MainLoop();
++ MainContext context = MainContext.get_thread_default();
++ MainLoop mainloop = new MainLoop(context);
+ allow_direct_read = Utils.log_may_read_directly ();
+
+ Bus.get_proxy.begin<RemoteLog> (BusType.SESSION, Utils.ENGINE_DBUS_NAME,
diff --git a/debian/rules b/debian/rules
index ead2d92..eec93b1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
%:
- dh $@ --with python2,gir,autotools_dev --parallel
+ dh $@ --with python2,gir,autoreconf --parallel
override_dh_auto_test:
VERBOSE=1 dh_auto_test || true
diff --git a/debian/zeitgeist-core.install b/debian/zeitgeist-core.install
index 4d11f4c..8d204ad 100644
--- a/debian/zeitgeist-core.install
+++ b/debian/zeitgeist-core.install
@@ -1,4 +1,5 @@
usr/lib/zeitgeist/zeitgeist-fts
+usr/lib/*/zeitgeist/
usr/bin/zeitgeist-daemon
usr/share/bash-completion/completions/zeitgeist-daemon
usr/share/dbus-1/services/org.gnome.zeitgeist.service