[tracker-miners] meson: Enable seccomp support
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners] meson: Enable seccomp support
- Date: Thu, 19 Oct 2017 20:33:47 +0000 (UTC)
commit cdd252159a761d8f390ff361a516399caaae7f4c
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Thu Oct 19 21:27:33 2017 +0100
meson: Enable seccomp support
config.h.meson.in | 3 +++
meson.build | 10 ++++++++++
src/libtracker-common/meson.build | 8 +++++++-
3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/config.h.meson.in b/config.h.meson.in
index 1cf62f2..1760887 100644
--- a/config.h.meson.in
+++ b/config.h.meson.in
@@ -66,6 +66,9 @@
/* Define if we have libiptcdata */
#mesondefine HAVE_LIBIPTCDATA
+/* Define if we have libseccomp */
+#mesondefine HAVE_LIBSECCOMP
+
/* Define if we have libstemmer */
#mesondefine HAVE_LIBSTEMMER
diff --git a/meson.build b/meson.build
index d8700b9..b7b7a9d 100644
--- a/meson.build
+++ b/meson.build
@@ -38,6 +38,7 @@ libgxps = dependency('libgxps', required: false)
libiptcdata = dependency('libiptcdata', required: false)
libosinfo = dependency('libosinfo', version: '> 0.2.9', required: false)
libpng = dependency('libpng', version: '> 0.89', required: false)
+libseccomp = dependency('libseccomp', version: '>= 2.0', required: false)
libtiff = dependency('libtiff-4', required: false)
libxml2 = dependency('libxml-2.0', version: '> 2.6')
libvorbis = dependency('vorbisfile', version: '> 0.22')
@@ -213,6 +214,14 @@ if generic_media_handler_name == 'gstreamer'
endif
endif
+##################################################################
+# Check for libseccomp
+##################################################################
+
+if not libseccomp.found() and host_machine.system() == 'linux'
+ error('Libseccomp is mandatory for sandboxed metadata extraction')
+endif
+
####################################################################
# D-Bus service files
####################################################################
@@ -290,6 +299,7 @@ conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu')
conf.set('HAVE_LIBEXIF', libexif.found())
conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
conf.set('HAVE_LIBSTEMMER', have_libstemmer)
+conf.set('HAVE_LIBSECCOMP', libseccomp.found())
conf.set('HAVE_UPOWER', battery_detection_library_name == 'upower')
conf.set('HAVE_GETLINE', cc.has_function('getline', prefix : '#include <stdio.h>'))
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
index d0c6cb4..999c7ff 100644
--- a/src/libtracker-common/meson.build
+++ b/src/libtracker-common/meson.build
@@ -25,9 +25,15 @@ tracker_common_sources = [
# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
tracker_common_dependencies = [glib, gio, gio_unix, libmath]
+tracker_common_private_dependencies = [charset_library]
+if libseccomp.found()
+ tracker_common_private_dependencies += [libseccomp]
+endif
+
+
libtracker_common = library('tracker-common',
tracker_common_sources,
- dependencies: tracker_common_dependencies + [charset_library],
+ dependencies: tracker_common_dependencies + tracker_common_private_dependencies,
c_args: tracker_c_args,
include_directories: [configinc, srcinc],
install: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]