[tracker] Backport upstream patch to avoid use of setrlimit (RH #1133924)

Debarshi Ray rishi at fedoraproject.org
Mon Nov 10 15:04:09 UTC 2014


commit cad5ab190c671e05e497886fdf54cec57f8f1150
Author: Debarshi Ray <debarshir at gnome.org>
Date:   Mon Nov 10 16:03:17 2014 +0100

    Backport upstream patch to avoid use of setrlimit (RH #1133924)

 ...mp-the-minimum-memory-requirement-to-768M.patch |   26 --------
 ...ract-Avoid-the-use-of-setrlimit-it-s-caus.patch |   63 ++++++++++++++++++++
 tracker.spec                                       |   11 ++-
 3 files changed, 70 insertions(+), 30 deletions(-)
---
diff --git a/0001-tracker-extract-Avoid-the-use-of-setrlimit-it-s-caus.patch b/0001-tracker-extract-Avoid-the-use-of-setrlimit-it-s-caus.patch
new file mode 100644
index 0000000..32b0dee
--- /dev/null
+++ b/0001-tracker-extract-Avoid-the-use-of-setrlimit-it-s-caus.patch
@@ -0,0 +1,63 @@
+From 35dbe5e46ad7c8e2c6343349b87d44e71fa32eb8 Mon Sep 17 00:00:00 2001
+From: Martyn Russell <martyn at lanedo.com>
+Date: Mon, 13 Oct 2014 11:41:57 +0100
+Subject: [PATCH] tracker-extract: Avoid the use of setrlimit() it's causing
+ problems
+
+Part of the solution is this commit, see:
+https://bugzilla.gnome.org/show_bug.cgi?id=737663
+
+The other part is to use cgroups
+---
+ src/tracker-extract/tracker-main.c | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
+index f7e3e55..22af4b2 100644
+--- a/src/tracker-extract/tracker-main.c
++++ b/src/tracker-extract/tracker-main.c
+@@ -29,9 +29,9 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
+-#include <glib.h>
+ #include <glib-object.h>
+ #include <glib/gi18n.h>
++#include <glib/gprintf.h>
+ #include <gio/gio.h>
+ 
+ #ifndef G_OS_WIN32
+@@ -42,12 +42,7 @@
+ #include <libmediaart/mediaart.h>
+ #endif
+ 
+-#include <libtracker-common/tracker-log.h>
+-#include <libtracker-common/tracker-dbus.h>
+-#include <libtracker-common/tracker-os-dependant.h>
+-#include <libtracker-common/tracker-ioprio.h>
+-#include <libtracker-common/tracker-locale.h>
+-#include <libtracker-common/tracker-sched.h>
++#include <libtracker-common/tracker-common.h>
+ 
+ #include <libtracker-data/tracker-db-manager.h>
+ 
+@@ -278,8 +273,6 @@ run_standalone (TrackerConfig *config)
+ 		return EXIT_FAILURE;
+ 	}
+ 
+-	tracker_memory_setrlimits ();
+-
+ 	tracker_extract_get_metadata_by_cmdline (object, uri, mime_type);
+ 
+ 	g_object_unref (object);
+@@ -364,7 +357,6 @@ main (int argc, char *argv[])
+ 	/* This makes sure we don't steal all the system's resources */
+ 	initialize_priority_and_scheduling (tracker_config_get_sched_idle (config),
+ 	                                    tracker_db_manager_get_first_index_done () == FALSE);
+-	tracker_memory_setrlimits ();
+ 
+ 	extract = tracker_extract_new (TRUE, force_module);
+ 
+-- 
+2.1.0
+
diff --git a/tracker.spec b/tracker.spec
index 1bbf654..df883e0 100644
--- a/tracker.spec
+++ b/tracker.spec
@@ -16,7 +16,7 @@
 
 Name:           tracker
 Version:        1.2.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Desktop-neutral search tool and indexer
 
 Group:          Applications/System
@@ -28,8 +28,8 @@ Source0:        https://download.gnome.org/sources/%{name}/1.2/%{name}-%{version
 # https://bugzilla.redhat.com/show_bug.cgi?id=771601
 Patch1:         tracker-0.15-onlyshowin.patch
 
-# https://bugzilla.gnome.org/show_bug.cgi?id=712142
-Patch3:         0001-Bump-the-minimum-memory-requirement-to-768M.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1133924
+Patch2:         0001-Bump-the-minimum-memory-requirement-to-768M.patch
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  firefox
@@ -170,7 +170,7 @@ This package contains the documentation for tracker
 %setup -q
 
 %patch1 -p1 -b .onlyshowin
-%patch3 -p1 -b .memory
+%patch2 -p1 -b .rlimits
 
 ## nuke unwanted rpaths, see also
 ## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
@@ -316,6 +316,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Mon Nov 10 2014 Debarshi Ray <rishi at fedoraproject.org> - 1.2.4-2
+- Backport upstream patch to avoid use of setrlimit (RH #1133924)
+
 * Thu Nov 06 2014 Kalev Lember <kalevlember at gmail.com> - 1.2.4-1
 - Update to 1.2.4
 


More information about the scm-commits mailing list