From 25f0eeb141cf3815c489f858c0733ba15f1a480f Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 25 Aug 2015 10:32:51 +0100 Subject: [PATCH] Add patch to fix FS miner crash (#1246896) --- tracker-1.5.2-fix-fs-miner-crash.patch | 30 ++++++++++++++++++++++++++ tracker.spec | 9 +++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tracker-1.5.2-fix-fs-miner-crash.patch diff --git a/tracker-1.5.2-fix-fs-miner-crash.patch b/tracker-1.5.2-fix-fs-miner-crash.patch new file mode 100644 index 0000000..5f48628 --- /dev/null +++ b/tracker-1.5.2-fix-fs-miner-crash.patch @@ -0,0 +1,30 @@ +From 9e2682ecd7ed17033e63e49f847a7d74a43f3f88 Mon Sep 17 00:00:00 2001 +From: David King +Date: Tue, 25 Aug 2015 10:28:34 +0100 +Subject: [PATCH] tracker-miner-fs: avoid crash during init + +Correctly handle the result of tracker_sparql_cursor_get_string(), which +can be NULL. + +https://bugzilla.gnome.org/show_bug.cgi?id=754055 +--- + src/miners/fs/tracker-miner-files.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c +index fb7445f..527c6e5 100644 +--- a/src/miners/fs/tracker-miner-files.c ++++ b/src/miners/fs/tracker-miner-files.c +@@ -929,6 +929,9 @@ init_mount_points (TrackerMinerFiles *miner_files) + + urn = tracker_sparql_cursor_get_string (cursor, 0, NULL); + ++ if (!urn) ++ continue; ++ + if (strcmp (urn, TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA) == 0) { + /* Report non-removable media to be mounted by HAL as well */ + state |= VOLUME_MOUNTED; +-- +2.5.0 + diff --git a/tracker.spec b/tracker.spec index 927b0f3..5e91b3f 100644 --- a/tracker.spec +++ b/tracker.spec @@ -16,7 +16,7 @@ Name: tracker Version: 1.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Desktop-neutral search tool and indexer Group: Applications/System @@ -28,6 +28,9 @@ Source0: https://download.gnome.org/sources/%{name}/1.5/%{name}-%{version # 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=1246896 +Patch1: tracker-1.5.2-fix-fs-miner-crash.patch + BuildRequires: desktop-file-utils BuildRequires: firefox BuildRequires: giflib-devel @@ -174,6 +177,7 @@ This package contains the documentation for tracker %setup -q %patch0 -p1 -b .autostart-gnome +%patch1 -p1 -b .miner-crash ## nuke unwanted rpaths, see also ## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath @@ -328,6 +332,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Aug 25 2015 David King - 1.5.2-2 +- Add patch to fix FS miner crash (#1246896) + * Thu Aug 20 2015 Kalev Lember - 1.5.2-1 - Update to 1.5.2 - Use make_install macro