mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 3/3] libseccomp: install some useful development tools on demand
Date: Mon, 28 Aug 2017 12:17:50 +0200	[thread overview]
Message-ID: <20170828101750.19361-3-jbe@pengutronix.de> (raw)
In-Reply-To: <20170828101750.19361-1-jbe@pengutronix.de>

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>
---
 ...-run-time-use-a-supported-shell-interpreter.patch | 19 +++++++++++++++++++
 patches/libseccomp-2.3.2/series                      |  4 ++++
 rules/libseccomp.in                                  | 20 ++++++++++++++++++--
 rules/libseccomp.make                                |  4 ++++
 4 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 patches/libseccomp-2.3.2/0001-run-time-use-a-supported-shell-interpreter.patch
 create mode 100644 patches/libseccomp-2.3.2/series

diff --git a/patches/libseccomp-2.3.2/0001-run-time-use-a-supported-shell-interpreter.patch b/patches/libseccomp-2.3.2/0001-run-time-use-a-supported-shell-interpreter.patch
new file mode 100644
index 000000000..9e4b6d350
--- /dev/null
+++ b/patches/libseccomp-2.3.2/0001-run-time-use-a-supported-shell-interpreter.patch
@@ -0,0 +1,19 @@
+From: Juergen Borleis <jbe@pengutronix.de>
+Date: Fri, 25 Aug 2017 16:03:15 +0200
+Subject: [PATCH] run-time: use a broadly supported shell interpreter
+
+Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
+---
+ tools/scmp_app_inspector | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/scmp_app_inspector b/tools/scmp_app_inspector
+index 45b86b2ca0c5..14f3dfc07387 100755
+--- a/tools/scmp_app_inspector
++++ b/tools/scmp_app_inspector
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ #
+ # Runtime syscall inspector
diff --git a/patches/libseccomp-2.3.2/series b/patches/libseccomp-2.3.2/series
new file mode 100644
index 000000000..522fa2141
--- /dev/null
+++ b/patches/libseccomp-2.3.2/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-run-time-use-a-supported-shell-interpreter.patch
+# a24fa8dfff373b7689e92bc6cfdbb0cd  - git-ptx-patches magic
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)
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      parent reply	other threads:[~2017-08-28 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 10:17 [ptxdist] [PATCH 1/3] libgcrypt: version bump to 1.8 stable release Juergen Borleis
2017-08-28 10:17 ` [ptxdist] [PATCH 2/3] which: version bump and large file awareness Juergen Borleis
2017-08-28 10:17 ` Juergen Borleis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170828101750.19361-3-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox