From 8874bcdd4550830516a3c2412fd8945cb08a93aa Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 10 Mar 2020 06:59:59 +0100 Subject: [PATCH] Update to 2.3.3 --- .gitignore | 1 + 148.patch | 195 -------------------------------------------- sources | 2 +- tracker-miners.spec | 10 +-- 4 files changed, 7 insertions(+), 201 deletions(-) delete mode 100644 148.patch diff --git a/.gitignore b/.gitignore index 68169d0..1e51b03 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /tracker-miners-2.3.0.tar.xz /tracker-miners-2.3.1.tar.xz /tracker-miners-2.3.2.tar.xz +/tracker-miners-2.3.3.tar.xz diff --git a/148.patch b/148.patch deleted file mode 100644 index cdcc8c2..0000000 --- a/148.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 3757daba251bd5bd1bb20b89c6269d63ff95038d Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 19 Feb 2020 18:27:11 +0100 -Subject: [PATCH 1/3] tracker-extract: Set cpu/io/nice settings before glib/gio - usage - -This was happening late enough during main() that there were already -non-exclusive threadpools/threads created with regular scheduler -settings. Those settings would be cached in recent glib, creating -disparities that it will g_error() out on later. Those created threads -might however be reused later on by different code (eg. metadata -extraction, directly or indirectly), with the regular scheduling -priorities set. - -Given that even accessing GSettings will result in threads being -spawned underneath, there's no better choice than doing this always. -This means the 'sched-idle' setting is ineffective. But this default -should avoid fingers from pointing at us. - -Closes: https://gitlab.gnome.org/GNOME/tracker/issues/180 ---- - src/tracker-extract/tracker-main.c | 20 ++++++++------------ - 1 file changed, 8 insertions(+), 12 deletions(-) - -diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c -index f6db1e0f2..0a9a42ebd 100644 ---- a/src/tracker-extract/tracker-main.c -+++ b/src/tracker-extract/tracker-main.c -@@ -109,14 +109,10 @@ static GOptionEntry entries[] = { - }; - - static void --initialize_priority_and_scheduling (TrackerSchedIdle sched_idle, -- gboolean first_time_index) -+initialize_priority_and_scheduling (void) - { - /* Set CPU priority */ -- if (sched_idle == TRACKER_SCHED_IDLE_ALWAYS || -- (sched_idle == TRACKER_SCHED_IDLE_FIRST_INDEX && first_time_index)) { -- tracker_sched_idle (); -- } -+ tracker_sched_idle (); - - /* Set disk IO priority and scheduling */ - tracker_ioprio_init (); -@@ -230,6 +226,9 @@ run_standalone (TrackerConfig *config) - output_format_name = "turtle"; - } - -+ /* This makes sure we don't steal all the system's resources */ -+ initialize_priority_and_scheduling (); -+ - /* Look up the output format by name */ - enum_class = g_type_class_ref (TRACKER_TYPE_SERIALIZATION_FORMAT); - enum_value = g_enum_get_value_by_nick (enum_class, output_format_name); -@@ -242,9 +241,6 @@ run_standalone (TrackerConfig *config) - - tracker_locale_sanity_check (); - -- /* This makes sure we don't steal all the system's resources */ -- initialize_priority_and_scheduling (tracker_config_get_sched_idle (config), TRUE); -- - file = g_file_new_for_commandline_arg (filename); - uri = g_file_get_uri (file); - -@@ -371,6 +367,9 @@ main (int argc, char *argv[]) - return EXIT_FAILURE; - } - -+ /* This makes sure we don't steal all the system's resources */ -+ initialize_priority_and_scheduling (); -+ - connection = g_bus_get_sync (TRACKER_IPC_BUS, NULL, &error); - if (error) { - g_critical ("Could not create DBus connection: %s\n", -@@ -402,9 +401,6 @@ main (int argc, char *argv[]) - /* Initialize subsystems */ - initialize_directories (); - -- /* This makes sure we don't steal all the system's resources */ -- initialize_priority_and_scheduling (tracker_config_get_sched_idle (config), TRUE); -- - extract = tracker_extract_new (TRUE, force_module); - - if (!extract) { --- -2.24.1 - - -From 75493f12a06a2150d9c8d66d2ec6fe25e14428cd Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 19 Feb 2020 18:27:21 +0100 -Subject: [PATCH 2/3] tracker-miner-fs: Set cpu/io/nice settings before - glib/gio usage - -This was happening late enough during main() that there were already -non-exclusive threadpools/threads created with regular scheduler -settings. Those settings would be cached in recent glib, creating -disparities that it will g_error() out on later. Those created threads -might however be reused later on by different code (eg. metadata -extraction, directly or indirectly), with the regular scheduling -priorities set. - -Given that even accessing GSettings will result in threads being -spawned underneath, there's no better choice than doing this always. -This means the 'sched-idle' setting is ineffective. But this default -should avoid fingers from pointing at us. - -Closes: https://gitlab.gnome.org/GNOME/tracker/issues/180 ---- - src/miners/fs/tracker-main.c | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c -index 03e8e6496..7ae85e254 100644 ---- a/src/miners/fs/tracker-main.c -+++ b/src/miners/fs/tracker-main.c -@@ -271,14 +271,10 @@ initialize_signal_handler (void) - } - - static void --initialize_priority_and_scheduling (TrackerSchedIdle sched_idle, -- gboolean first_time_index) -+initialize_priority_and_scheduling (void) - { - /* Set CPU priority */ -- if (sched_idle == TRACKER_SCHED_IDLE_ALWAYS || -- (sched_idle == TRACKER_SCHED_IDLE_FIRST_INDEX && first_time_index)) { -- tracker_sched_idle (); -- } -+ tracker_sched_idle (); - - /* Set disk IO priority and scheduling */ - tracker_ioprio_init (); -@@ -823,6 +819,9 @@ main (gint argc, gchar *argv[]) - return EXIT_FAILURE; - } - -+ /* This makes sure we don't steal all the system's resources */ -+ initialize_priority_and_scheduling (); -+ - connection = g_bus_get_sync (TRACKER_IPC_BUS, NULL, &error); - if (error) { - g_critical ("Could not create DBus connection: %s\n", -@@ -851,10 +850,6 @@ main (gint argc, gchar *argv[]) - - sanity_check_option_values (config); - -- /* This makes sure we don't steal all the system's resources */ -- initialize_priority_and_scheduling (tracker_config_get_sched_idle (config), -- tracker_miner_files_get_first_index_done () == FALSE); -- - main_loop = g_main_loop_new (NULL, FALSE); - - if (domain_ontology_name) { --- -2.24.1 - - -From 78c709c3946857e43796240d54a7558cbb6c2da1 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 19 Feb 2020 18:27:35 +0100 -Subject: [PATCH 3/3] libtracker-miners-common: Allow sched_setattr syscall - -https://gitlab.gnome.org/GNOME/glib/issues/2039 has taught us two -things: -- Even if sched_setattr failures aren't handled as g_error() in - glib, there will be some kind of warning. It's not desirable to - extractor modules to indirectly trigger it. -- Since priorities cannot be risen back without special capabilities - (results in EPERM), it's not that bad to simply allow this syscall. - -So simply allow the sched_setattr syscall in our seccomp filter. - -Closes: https://gitlab.gnome.org/GNOME/tracker/issues/180 ---- - src/libtracker-miners-common/tracker-seccomp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libtracker-miners-common/tracker-seccomp.c b/src/libtracker-miners-common/tracker-seccomp.c -index 6e6218126..9d031c09e 100644 ---- a/src/libtracker-miners-common/tracker-seccomp.c -+++ b/src/libtracker-miners-common/tracker-seccomp.c -@@ -114,7 +114,7 @@ tracker_seccomp_init (void) - ALLOW_RULE (rt_sigprocmask); - ALLOW_RULE (sched_yield); - ALLOW_RULE (sched_getaffinity); -- ERROR_RULE (sched_setattr, EPERM); -+ ALLOW_RULE (sched_setattr); - ALLOW_RULE (nanosleep); - ALLOW_RULE (waitid); - ALLOW_RULE (waitpid); --- -2.24.1 - diff --git a/sources b/sources index ec20c8a..4de3efd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tracker-miners-2.3.2.tar.xz) = 461e6a6213b35f15fec679580b0776b431dc40053f4b7e08061f9e25c2c806dea0cfd16fda93ffbd34577e3d7ac30459a6e2c3412db125720d232427928d1084 +SHA512 (tracker-miners-2.3.3.tar.xz) = 1e845aaa5412125df84298a05f29888b3872c0f4d9251f026dd51846831fcd4aa0c6965c85752d7b6ed6548268d21f0fd2a8427c922a5dc0afcd294286c607e2 diff --git a/tracker-miners.spec b/tracker-miners.spec index 541f407..0067dcd 100644 --- a/tracker-miners.spec +++ b/tracker-miners.spec @@ -17,17 +17,14 @@ %global __requires_exclude ^(libtracker-extract\.so|libtracker-miners-common\.so|libextract-.*\.so|libwriteback-.*\.so) Name: tracker-miners -Version: 2.3.2 -Release: 2%{?dist} +Version: 2.3.3 +Release: 1%{?dist} Summary: Tracker miners and metadata extractors # libtracker-extract is LGPLv2+; the miners are a mix of GPLv2+ and LGPLv2+ code License: GPLv2+ and LGPLv2+ URL: https://wiki.gnome.org/Projects/Tracker Source0: https://download.gnome.org/sources/%{name}/2.3/%{name}-%{version}.tar.xz -# Fix tracker erroring out with "Failed to set scheduler settings" -# https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/148 -Patch0: 148.patch BuildRequires: gcc BuildRequires: giflib-devel @@ -129,6 +126,9 @@ rm -rf %{buildroot}%{_datadir}/tracker-tests %changelog +* Tue Mar 10 2020 Kalev Lember - 2.3.3-1 +- Update to 2.3.3 + * Wed Feb 19 2020 Kalev Lember - 2.3.2-2 - Backport a fix for tracker erroring out with "Failed to set scheduler settings"