summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorJuergen Borleis <jbe@pengutronix.de>2017-08-28 12:17:50 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-08-29 10:45:50 +0200
commitaf3a035787a2816116c51d2c57fe257a3bda45cf (patch)
tree322d858a7a02904d33f1b3042f394f9817ef0cb5 /rules
parent9c626ceee7cb11830c60704031d5e0cce3694d07 (diff)
downloadptxdist-af3a035787a2816116c51d2c57fe257a3bda45cf.tar.gz
ptxdist-af3a035787a2816116c51d2c57fe257a3bda45cf.tar.xz
libseccomp: install some useful development tools on demand
These tools are intended for development and thus required on demand only. 'scmp_app_inspector' is a shell script which requires some additional tools from Busybox or Coreutils at run-time. Since both variants work, it up to the user to select one variant. Which tools are required and must be enabled in the menu is mentioned in the help text. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/libseccomp.in20
-rw-r--r--rules/libseccomp.make4
2 files changed, 22 insertions, 2 deletions
diff --git a/rules/libseccomp.in b/rules/libseccomp.in
index ece48a2eb..d3708c952 100644
--- a/rules/libseccomp.in
+++ b/rules/libseccomp.in
@@ -1,8 +1,11 @@
## SECTION=system_libraries
-config LIBSECCOMP
+menuconfig LIBSECCOMP
bool
- prompt "libseccomp"
+ prompt "libseccomp "
+ select SED if LIBSECCOMP_UTILS && RUNTIME
+ select STRACE if LIBSECCOMP_UTILS && RUNTIME
+ select WHICH if LIBSECCOMP_UTILS && RUNTIME
help
An Enhanced Seccomp (mode 2) Helper Library
@@ -11,3 +14,16 @@ config LIBSECCOMP
designed to abstract away the underlying BPF based syscall filter language and
present a more conventional function-call based filtering interface that should
be familiar to, and easily adopted by, application developers.
+
+if LIBSECCOMP
+
+config LIBSECCOMP_UTILS
+ bool
+ prompt "install utils"
+ help
+ Install some utils, useful for development.
+ Note: in order to run some of these utils the tools 'uniq', 'sort',
+ 'expr' and 'mktemp' from the 'Busybox' *or* 'Coreutils' package is
+ required.
+
+endif
diff --git a/rules/libseccomp.make b/rules/libseccomp.make
index 4b9e953dc..108969b81 100644
--- a/rules/libseccomp.make
+++ b/rules/libseccomp.make
@@ -53,6 +53,10 @@ $(STATEDIR)/libseccomp.targetinstall:
@$(call install_lib, libseccomp, 0, 0, 0644, libseccomp)
+ifdef PTXCONF_LIBSECCOMP_UTILS
+ @$(call install_copy, libseccomp, 0, 0, 0755, -, /usr/bin/scmp_sys_resolver)
+ @$(call install_copy, libseccomp, 0, 0, 0755, $(LIBSECCOMP_DIR)/tools/scmp_app_inspector, /usr/bin/scmp_app_inspector)
+endif
@$(call install_finish, libseccomp)
@$(call touch)