From fbaa094803e541145ef27411e7108202961e8b1d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 25 Jul 2017 13:19:37 +0200 Subject: [PATCH] Update to 1.99.0 Backport build fix for -Werror=format-security Drop upstreamed patch Drop tracker-needle Drop tracker-preferences Rebase autostart/OnlyShowIn patch Use %%make_build --- 0001-Only-autostart-in-GNOME-771601.patch | 42 ++---- ...Protect-sqlite3_bind-with-interface-.patch | 61 --------- ...acker-data-fix-format-security-issue.patch | 26 ++++ sources | 2 +- tracker.spec | 120 +++++------------- 5 files changed, 69 insertions(+), 182 deletions(-) delete mode 100644 0001-libtracker-data-Protect-sqlite3_bind-with-interface-.patch create mode 100644 0001-libtracker-data-fix-format-security-issue.patch diff --git a/0001-Only-autostart-in-GNOME-771601.patch b/0001-Only-autostart-in-GNOME-771601.patch index 7d83de0..41e70d0 100644 --- a/0001-Only-autostart-in-GNOME-771601.patch +++ b/0001-Only-autostart-in-GNOME-771601.patch @@ -1,32 +1,18 @@ -From 5b4d18d3f8b69773be59ccc45bd09e5fa84d5f1b Mon Sep 17 00:00:00 2001 -From: David King -Date: Fri, 28 Nov 2014 14:21:37 +0000 -Subject: [PATCH] Only autostart in GNOME (#771601) - -https://bugzilla.redhat.com/show_bug.cgi?id=771601 ---- - src/miners/fs/tracker-miner-fs.desktop.in.in | 2 +- - src/miners/rss/tracker-miner-rss.desktop.in.in | 2 +- - src/tracker-store/tracker-store.desktop.in.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/miners/fs/tracker-miner-fs.desktop.in.in b/src/miners/fs/tracker-miner-fs.desktop.in.in -index a1620f6..75dba52 100644 ---- a/src/miners/fs/tracker-miner-fs.desktop.in.in -+++ b/src/miners/fs/tracker-miner-fs.desktop.in.in -@@ -12,7 +12,7 @@ X-KDE-autostart-after=panel +diff -urNp tracker-1.99.0.orig/src/miners/fs/tracker-miner-fs.desktop.in.in tracker-1.99.0/src/miners/fs/tracker-miner-fs.desktop.in.in +--- tracker-1.99.0.orig/src/miners/fs/tracker-miner-fs.desktop.in.in 2017-07-25 15:13:38.672508354 +0200 ++++ tracker-1.99.0/src/miners/fs/tracker-miner-fs.desktop.in.in 2017-07-25 15:14:13.117687004 +0200 +@@ -11,7 +11,7 @@ X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true --OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +-OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; +OnlyShowIn=GNOME; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Miners -diff --git a/src/miners/rss/tracker-miner-rss.desktop.in.in b/src/miners/rss/tracker-miner-rss.desktop.in.in -index 49be401..505aec7 100644 ---- a/src/miners/rss/tracker-miner-rss.desktop.in.in -+++ b/src/miners/rss/tracker-miner-rss.desktop.in.in +diff -urNp tracker-1.99.0.orig/src/miners/rss/tracker-miner-rss.desktop.in.in tracker-1.99.0/src/miners/rss/tracker-miner-rss.desktop.in.in +--- tracker-1.99.0.orig/src/miners/rss/tracker-miner-rss.desktop.in.in 2017-07-25 15:13:38.673508360 +0200 ++++ tracker-1.99.0/src/miners/rss/tracker-miner-rss.desktop.in.in 2017-07-25 15:14:39.123821881 +0200 @@ -11,7 +11,7 @@ X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true @@ -36,19 +22,15 @@ index 49be401..505aec7 100644 X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Miners -diff --git a/src/tracker-store/tracker-store.desktop.in.in b/src/tracker-store/tracker-store.desktop.in.in -index 78e855d..aff4c16 100644 ---- a/src/tracker-store/tracker-store.desktop.in.in -+++ b/src/tracker-store/tracker-store.desktop.in.in +diff -urNp tracker-1.99.0.orig/src/tracker-store/tracker-store.desktop.in.in tracker-1.99.0/src/tracker-store/tracker-store.desktop.in.in +--- tracker-1.99.0.orig/src/tracker-store/tracker-store.desktop.in.in 2017-07-25 15:13:38.676508375 +0200 ++++ tracker-1.99.0/src/tracker-store/tracker-store.desktop.in.in 2017-07-25 15:15:09.963981832 +0200 @@ -11,7 +11,7 @@ X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true --OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +-OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; +OnlyShowIn=GNOME; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Store --- -2.1.0 - diff --git a/0001-libtracker-data-Protect-sqlite3_bind-with-interface-.patch b/0001-libtracker-data-Protect-sqlite3_bind-with-interface-.patch deleted file mode 100644 index 5b5f5ee..0000000 --- a/0001-libtracker-data-Protect-sqlite3_bind-with-interface-.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 79f3037391d4f00216af441f658d50f3753cc021 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Fri, 23 Jun 2017 18:48:06 +0200 -Subject: [PATCH] libtracker-data: Protect sqlite3_bind*() with interface lock - -There may be multiple cursors/db_statements from the same db interface -being accessed from multiple threads. This must be under the -TrackerDBInterface lock in order to prevent threading issues. - -https://bugzilla.redhat.com/show_bug.cgi?id=1404285 ---- - src/libtracker-data/tracker-db-interface-sqlite.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c -index 66e648743c1f..4b0994da008c 100644 ---- a/src/libtracker-data/tracker-db-interface-sqlite.c -+++ b/src/libtracker-data/tracker-db-interface-sqlite.c -@@ -2589,7 +2589,9 @@ tracker_db_statement_bind_double (TrackerDBStatement *stmt, - - g_assert (!stmt->stmt_is_used); - -+ tracker_db_interface_lock (stmt->db_interface); - sqlite3_bind_double (stmt->stmt, index + 1, value); -+ tracker_db_interface_unlock (stmt->db_interface); - } - - void -@@ -2601,7 +2603,9 @@ tracker_db_statement_bind_int (TrackerDBStatement *stmt, - - g_assert (!stmt->stmt_is_used); - -+ tracker_db_interface_lock (stmt->db_interface); - sqlite3_bind_int64 (stmt->stmt, index + 1, value); -+ tracker_db_interface_unlock (stmt->db_interface); - } - - void -@@ -2612,7 +2616,9 @@ tracker_db_statement_bind_null (TrackerDBStatement *stmt, - - g_assert (!stmt->stmt_is_used); - -+ tracker_db_interface_lock (stmt->db_interface); - sqlite3_bind_null (stmt->stmt, index + 1); -+ tracker_db_interface_unlock (stmt->db_interface); - } - - void -@@ -2624,7 +2630,9 @@ tracker_db_statement_bind_text (TrackerDBStatement *stmt, - - g_assert (!stmt->stmt_is_used); - -+ tracker_db_interface_lock (stmt->db_interface); - sqlite3_bind_text (stmt->stmt, index + 1, value, -1, SQLITE_TRANSIENT); -+ tracker_db_interface_unlock (stmt->db_interface); - } - - void --- -2.9.4 - diff --git a/0001-libtracker-data-fix-format-security-issue.patch b/0001-libtracker-data-fix-format-security-issue.patch new file mode 100644 index 0000000..db10c13 --- /dev/null +++ b/0001-libtracker-data-fix-format-security-issue.patch @@ -0,0 +1,26 @@ +From 43a0bf675d2745e629a6e3a0f89f36be9471374d Mon Sep 17 00:00:00 2001 +From: Jeremy Bicha +Date: Fri, 21 Jul 2017 17:03:08 -0400 +Subject: [PATCH] libtracker-data: fix format-security issue + +https://bugzilla.gnome.org/show_bug.cgi?id=785245 +--- + src/libtracker-data/tracker-db-interface-sqlite.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c +index 051f6d82c3f5..21cc0cf809df 100644 +--- a/src/libtracker-data/tracker-db-interface-sqlite.c ++++ b/src/libtracker-data/tracker-db-interface-sqlite.c +@@ -1887,7 +1887,7 @@ tracker_db_interface_sqlite_wal_checkpoint (TrackerDBInterface *interface, + g_set_error (error, + TRACKER_DB_INTERFACE_ERROR, + TRACKER_DB_QUERY_ERROR, +- sqlite3_errstr (return_val)); ++ "%s", sqlite3_errstr (return_val)); + return FALSE; + } + +-- +2.9.4 + diff --git a/sources b/sources index 7e639f7..6c019ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tracker-1.13.0.tar.xz) = da3a89583a6698254d90fb7a81dbf6e3804be7d7229e94f05e0fe02e2c2cc1a610d1a13e35e8f812c7d3aba6ec7dc267f177935b34d84a9b4cc54ff17badb434 +SHA512 (tracker-1.99.0.tar.xz) = e9b218f47beb15a2adfcca7d8d09f396461e17be3f1d40a5449591d44ffa38638948d496fda336724fa4a457e7a98c99dc99a29f99f735a058423d978eded2ad diff --git a/tracker.spec b/tracker.spec index cfea9b4..6fa139f 100644 --- a/tracker.spec +++ b/tracker.spec @@ -13,22 +13,20 @@ %global systemd_units tracker-extract.service tracker-miner-apps.service tracker-miner-fs.service tracker-miner-rss.service tracker-miner-user-guides.service tracker-store.service tracker-writeback.service Name: tracker -Version: 1.13.0 -Release: 2%{?dist} +Version: 1.99.0 +Release: 1%{?dist} Summary: Desktop-neutral search tool and indexer License: GPLv2+ URL: https://wiki.gnome.org/Projects/Tracker -Source0: https://download.gnome.org/sources/%{name}/1.13/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/%{name}/1.99/%{name}-%{version}.tar.xz # only autostart in Gnome, see also # https://bugzilla.redhat.com/show_bug.cgi?id=771601 Patch0: 0001-Only-autostart-in-GNOME-771601.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1404285 -Patch1: 0001-libtracker-data-Protect-sqlite3_bind-with-interface-.patch +Patch1: 0001-libtracker-data-fix-format-security-issue.patch -BuildRequires: desktop-file-utils BuildRequires: giflib-devel BuildRequires: graphviz BuildRequires: gtk-doc @@ -47,7 +45,6 @@ BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-pbutils-1.0) BuildRequires: pkgconfig(gstreamer-tag-1.0) -BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(icu-uc) BuildRequires: pkgconfig(json-glib-1.0) @@ -80,6 +77,8 @@ Obsoletes: compat-tracker018 < 0.17.2-2 Obsoletes: tracker-firefox-plugin < 1.11.3-2 Obsoletes: tracker-miner-flickr < 0.16.0 Obsoletes: tracker-nautilus-plugin < 0.17.2-2 +Obsoletes: tracker-needle < 1.99.0 +Obsoletes: tracker-preferences < 1.99.0 Obsoletes: tracker-thunderbird-plugin < 1.12.0-2 %if 0%{?fedora} @@ -110,24 +109,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package contains the static libraries and header files needed for developing with tracker -%package needle -Summary: Tracker search tool -Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: paperbox <= 0.4.4 -Obsoletes: tracker-ui-tools < 1.1.4 -Obsoletes: tracker-search-tool <= 0.12.0 - -%description needle -Graphical frontend to tracker search. - -%package preferences -Summary: Tracker preferences -Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: tracker-ui-tools < 1.1.4 - -%description preferences -Graphical frontend to tracker configuration. - %package docs Summary: Documentations for tracker BuildArch: noarch @@ -140,7 +121,7 @@ This package contains the documentation for tracker %setup -q %patch0 -p1 -b .autostart-gnome -%patch1 -p1 -b .sqlite3_bind +%patch1 -p1 -b .format-security %if 0%{?rhel} # Fix the build with sqlite 3.7 that doesn't support SQLITE_DETERMINISTIC @@ -153,56 +134,36 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure %build +# Disable the functional tests for now, they use python bytecodes. %configure --disable-static \ --enable-gtk-doc \ --enable-libflac \ --enable-libvorbis \ - --disable-miner-evolution \ - --disable-miner-firefox \ - --disable-miner-thunderbird \ --disable-mp3 \ - --disable-nautilus-extension \ --with-unicode-support=libicu \ - --disable-functional-tests -# Disable the functional tests for now, they use python bytecodes. - -make V=1 %{?_smp_mflags} + --disable-functional-tests \ + --disable-silent-rules +%make_build %install %make_install -# Update the screenshot shown in the software center -# -# NOTE: It would be *awesome* if this file was pushed upstream. -# -# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. -# -appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/tracker-needle.appdata.xml \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/tracker-needle/a.png - find %{buildroot} -type f -name "*.la" -delete rm -rf %{buildroot}%{_datadir}/tracker-tests # Remove .so symlinks for private libraries -- no external users are supposed # to link with them. -rm -f %{buildroot}%{_libdir}/tracker-1.0/*.so +rm -f %{buildroot}%{_libdir}/tracker-2.0/*.so %find_lang %{name} -%check -desktop-file-validate %{buildroot}%{_datadir}/applications/tracker-*.desktop - - %post /sbin/ldconfig %systemd_user_post %{systemd_units} -%post preferences -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - %preun %systemd_user_preun %{systemd_units} @@ -214,18 +175,9 @@ if [ $1 -eq 0 ]; then fi %systemd_user_postun_with_restart %{systemd_units} -%postun preferences -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - %posttrans glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : -%posttrans preferences -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %files -f %{name}.lang %license COPYING @@ -234,11 +186,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libexecdir}/tracker* %{_datadir}/tracker/ %{_datadir}/dbus-1/services/org.freedesktop.Tracker* -%{_libdir}/libtracker*-1.0.so.* -%{_libdir}/tracker-1.0/ -%{_libdir}/girepository-1.0/Tracker-1.0.typelib -%{_libdir}/girepository-1.0/TrackerControl-1.0.typelib -%{_libdir}/girepository-1.0/TrackerMiner-1.0.typelib +%{_libdir}/libtracker*-2.0.so.* +%{_libdir}/tracker-2.0/ +%{_libdir}/girepository-1.0/Tracker-2.0.typelib +%{_libdir}/girepository-1.0/TrackerControl-2.0.typelib +%{_libdir}/girepository-1.0/TrackerMiner-2.0.typelib %{_mandir}/*/tracker*.gz %config(noreplace) %{_sysconfdir}/xdg/autostart/tracker*.desktop %dir %{_datadir}/bash-completion @@ -246,36 +198,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/bash-completion/completions/tracker %{_datadir}/glib-2.0/schemas/* %{_userunitdir}/tracker-*.service -%exclude %{_bindir}/tracker-needle -%exclude %{_bindir}/tracker-preferences -%exclude %{_datadir}/tracker/tracker-needle.ui -%exclude %{_datadir}/tracker/tracker-preferences.ui -%exclude %{_mandir}/man1/tracker-preferences.1* -%exclude %{_mandir}/man1/tracker-needle.1* %files devel -%{_includedir}/tracker-1.0/ +%{_includedir}/tracker-2.0/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_datadir}/vala/vapi/tracker*.* -%{_datadir}/gir-1.0/Tracker-1.0.gir -%{_datadir}/gir-1.0/TrackerControl-1.0.gir -%{_datadir}/gir-1.0/TrackerMiner-1.0.gir - -%files needle -%{_bindir}/tracker-needle -%{_datadir}/appdata/tracker-needle.appdata.xml -%{_datadir}/applications/tracker-needle.desktop -%{_datadir}/tracker/tracker-needle.ui -%{_mandir}/man1/tracker-needle.1* - -%files preferences -%{_bindir}/tracker-preferences -%{_datadir}/appdata/tracker-preferences.appdata.xml -%{_datadir}/applications/tracker-preferences.desktop -%{_datadir}/icons/*/*/apps/tracker.* -%{_datadir}/tracker/tracker-preferences.ui -%{_mandir}/man1/tracker-preferences.1* +%{_datadir}/gir-1.0/Tracker-2.0.gir +%{_datadir}/gir-1.0/TrackerControl-2.0.gir +%{_datadir}/gir-1.0/TrackerMiner-2.0.gir %files docs %license docs/reference/COPYING @@ -286,6 +217,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Jul 25 2017 Debarshi Ray - 1.99.0-1 +- Update to 1.99.0 +- Backport build fix for -Werror=format-security +- Drop upstreamed patch +- Drop tracker-needle +- Drop tracker-preferences +- Rebase autostart/OnlyShowIn patch +- Use %%make_build + * Mon Jul 03 2017 Debarshi Ray - 1.13.0-2 - Backport fix for TrackerDirectConnection crashes from sqlite3DbMallocRawNN