From c1e0976f071de8117ecf1b3d7321b1008c4942e070242c772936f8fc136c76b6 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 7 Jun 2017 13:35:01 +0000 Subject: [PATCH] Accepting request 500745 from home:Zaitor Seems I forgot to sub this one! Add upstream fixes. OBS-URL: https://build.opensuse.org/request/show/500745 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/tracker?expand=0&rev=121 --- tracker-extras.changes | 8 ++++ tracker-extras.spec | 6 +++ ...r-libtracker-common-whitelist-openat.patch | 47 +++++++++++++++++++ ...ibtracker-sparql-add-osinfo-ontology.patch | 42 +++++++++++++++++ tracker.changes | 8 ++++ tracker.spec | 6 +++ 6 files changed, 117 insertions(+) create mode 100644 tracker-libtracker-common-whitelist-openat.patch create mode 100644 tracker-libtracker-sparql-add-osinfo-ontology.patch diff --git a/tracker-extras.changes b/tracker-extras.changes index 98b838d..60741fb 100644 --- a/tracker-extras.changes +++ b/tracker-extras.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 23 15:13:21 UTC 2017 - zaitor@opensuse.org + +- Add tracker-libtracker-sparql-add-osinfo-ontology.patch: Add + osinfo ontology to the default TrackerNamespace (bgo#780968). +- Add tracker-libtracker-common-whitelist-openat.patch: + libtracker-common: Whitelist openat() (bgo#782514). + ------------------------------------------------------------------- Mon Mar 20 15:13:33 UTC 2017 - dimstar@opensuse.org diff --git a/tracker-extras.spec b/tracker-extras.spec index fcde9a2..22eeedb 100644 --- a/tracker-extras.spec +++ b/tracker-extras.spec @@ -54,6 +54,10 @@ Source0: http://download.gnome.org/sources/tracker/1.12/%{_name}-%{versio Source2: README.SUSE.rss # PATCH-FIX-UPSTREAM tracker-extract-private.patch bgo#725689 dimstar@opensuse.org -- Do not maintain LT versioning for private libs Patch0: tracker-extract-private.patch +# PATCH-FIX-UPSTREAM tracker-libtracker-sparql-add-osinfo-ontology.patch bgo#780968 zaitor@opensuse.org -- libtracker-sparql: Add osinfo ontology to the default TrackerNamespace +Patch1: tracker-libtracker-sparql-add-osinfo-ontology.patch +# PATCH-FIX-UPSTREAM tracker-libtracker-common-whitelist-openat.patch bgo#782514 zaitor@opensuse.org -- libtracker-common: Whitelist openat() +Patch2: tracker-libtracker-common-whitelist-openat.patch BuildRequires: enca-devel BuildRequires: fdupes BuildRequires: gcc-c++ @@ -425,6 +429,8 @@ This package contains an nautilus plugin to tag files with Tracker. %prep %setup -q -n %{_name}-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %if !0%{?is_opensuse} translation-update-upstream %endif diff --git a/tracker-libtracker-common-whitelist-openat.patch b/tracker-libtracker-common-whitelist-openat.patch new file mode 100644 index 0000000..e3b65e9 --- /dev/null +++ b/tracker-libtracker-common-whitelist-openat.patch @@ -0,0 +1,47 @@ +From 620a1be1636b53a39a5b740abd695b4e85e9ba3a Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Tue, 9 May 2017 14:55:26 +0200 +Subject: libtracker-common: Whitelist openat() + +With the same caveats than open(). + +https://bugzilla.gnome.org/show_bug.cgi?id=782514 +--- + src/libtracker-common/tracker-seccomp.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/libtracker-common/tracker-seccomp.c b/src/libtracker-common/tracker-seccomp.c +index 1af380c..ec873f5 100644 +--- a/src/libtracker-common/tracker-seccomp.c ++++ b/src/libtracker-common/tracker-seccomp.c +@@ -182,8 +182,8 @@ tracker_seccomp_init (void) + SCMP_CMP(0, SCMP_CMP_EQ, 2)) < 0) + goto out; + +- /* Special requirements for open, allow O_RDONLY calls, but fail +- * if write permissions are requested. ++ /* Special requirements for open/openat, allow O_RDONLY calls, ++ * but fail if write permissions are requested. + */ + if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 1, + SCMP_CMP(1, SCMP_CMP_MASKED_EQ, O_WRONLY | O_RDWR, 0)) < 0) +@@ -195,6 +195,16 @@ tracker_seccomp_init (void) + SCMP_CMP(1, SCMP_CMP_MASKED_EQ, O_RDWR, O_RDWR)) < 0) + goto out; + ++ if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 1, ++ SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_WRONLY | O_RDWR, 0)) < 0) ++ goto out; ++ if (seccomp_rule_add (ctx, SCMP_ACT_ERRNO (EACCES), SCMP_SYS(openat), 1, ++ SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_WRONLY, O_WRONLY)) < 0) ++ goto out; ++ if (seccomp_rule_add (ctx, SCMP_ACT_ERRNO (EACCES), SCMP_SYS(openat), 1, ++ SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_RDWR, O_RDWR)) < 0) ++ goto out; ++ + g_debug ("Loading seccomp rules."); + + if (seccomp_load (ctx) >= 0) +-- +cgit v0.12 + diff --git a/tracker-libtracker-sparql-add-osinfo-ontology.patch b/tracker-libtracker-sparql-add-osinfo-ontology.patch new file mode 100644 index 0000000..1d52db1 --- /dev/null +++ b/tracker-libtracker-sparql-add-osinfo-ontology.patch @@ -0,0 +1,42 @@ +From be575015414983ca5046319c500b35d6c668fbf5 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Mon, 3 Apr 2017 15:15:41 +0200 +Subject: libtracker-sparql: Add osinfo ontology to the default + TrackerNamespace + +Otherwise namespace lookups will come out NULL. + +https://bugzilla.gnome.org/show_bug.cgi?id=780968 +--- + src/libtracker-sparql/tracker-namespace-manager.c | 1 + + src/libtracker-sparql/tracker-ontologies.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/libtracker-sparql/tracker-namespace-manager.c b/src/libtracker-sparql/tracker-namespace-manager.c +index 21a5a48..d287c39 100644 +--- a/src/libtracker-sparql/tracker-namespace-manager.c ++++ b/src/libtracker-sparql/tracker-namespace-manager.c +@@ -152,6 +152,7 @@ tracker_namespace_manager_get_default () + tracker_namespace_manager_add_prefix (manager, "nmm", TRACKER_PREFIX_NMM); + tracker_namespace_manager_add_prefix (manager, "mlo", TRACKER_PREFIX_MLO); + tracker_namespace_manager_add_prefix (manager, "mfo", TRACKER_PREFIX_MFO); ++ tracker_namespace_manager_add_prefix (manager, "osinfo", TRACKER_PREFIX_OSINFO); + + g_once_init_leave (&default_namespace_manager__volatile, manager); + } +diff --git a/src/libtracker-sparql/tracker-ontologies.h b/src/libtracker-sparql/tracker-ontologies.h +index 124ffd8..24e1efe 100644 +--- a/src/libtracker-sparql/tracker-ontologies.h ++++ b/src/libtracker-sparql/tracker-ontologies.h +@@ -42,6 +42,7 @@ G_BEGIN_DECLS + #define TRACKER_PREFIX_NAO "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#" + #define TRACKER_PREFIX_NID3 "http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#" + #define TRACKER_PREFIX_NFO "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#" ++#define TRACKER_PREFIX_OSINFO "http://www.tracker-project.org/ontologies/osinfo#" + + /* Temporary */ + #define TRACKER_PREFIX_SLO "http://www.tracker-project.org/temp/slo#" +-- +cgit v0.12 + + diff --git a/tracker.changes b/tracker.changes index 98b838d..60741fb 100644 --- a/tracker.changes +++ b/tracker.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 23 15:13:21 UTC 2017 - zaitor@opensuse.org + +- Add tracker-libtracker-sparql-add-osinfo-ontology.patch: Add + osinfo ontology to the default TrackerNamespace (bgo#780968). +- Add tracker-libtracker-common-whitelist-openat.patch: + libtracker-common: Whitelist openat() (bgo#782514). + ------------------------------------------------------------------- Mon Mar 20 15:13:33 UTC 2017 - dimstar@opensuse.org diff --git a/tracker.spec b/tracker.spec index c242283..bbb2d6a 100644 --- a/tracker.spec +++ b/tracker.spec @@ -53,6 +53,10 @@ Source0: http://download.gnome.org/sources/tracker/1.12/%{_name}-%{versio Source2: README.SUSE.rss # PATCH-FIX-UPSTREAM tracker-extract-private.patch bgo#725689 dimstar@opensuse.org -- Do not maintain LT versioning for private libs Patch0: tracker-extract-private.patch +# PATCH-FIX-UPSTREAM tracker-libtracker-sparql-add-osinfo-ontology.patch bgo#780968 zaitor@opensuse.org -- libtracker-sparql: Add osinfo ontology to the default TrackerNamespace +Patch1: tracker-libtracker-sparql-add-osinfo-ontology.patch +# PATCH-FIX-UPSTREAM tracker-libtracker-common-whitelist-openat.patch bgo#782514 zaitor@opensuse.org -- libtracker-common: Whitelist openat() +Patch2: tracker-libtracker-common-whitelist-openat.patch BuildRequires: enca-devel BuildRequires: fdupes BuildRequires: gcc-c++ @@ -424,6 +428,8 @@ This package contains an nautilus plugin to tag files with Tracker. %prep %setup -q -n %{_name}-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %if !0%{?is_opensuse} translation-update-upstream %endif