From: jon@ringle.org
To: ptxdist@pengutronix.de
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [ptxdist] [PATCH] libcap: option to install setcap/getcap
Date: Sun, 12 Oct 2014 00:27:19 -0400 [thread overview]
Message-ID: <1413088039-27720-1-git-send-email-jon@ringle.org> (raw)
From: Jon Ringle <jringle@gridpoint.com>
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
rules/libcap.in | 10 ++++++++++
rules/libcap.make | 13 ++++++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/rules/libcap.in b/rules/libcap.in
index c820658..6fe0230 100644
--- a/rules/libcap.in
+++ b/rules/libcap.in
@@ -3,5 +3,15 @@
config LIBCAP
tristate
prompt "libcap"
+ select ATTR if LIBCAP_SETCAP
+ select ATTR_SHARED if LIBCAP_SETCAP
help
A library for getting and setting POSIX.1e capabilities.
+
+if LIBCAP
+
+config LIBCAP_SETCAP
+ bool
+ prompt "Install setcap/getcap"
+
+endif
diff --git a/rules/libcap.make b/rules/libcap.make
index 666d8c2..47f28d2 100644
--- a/rules/libcap.make
+++ b/rules/libcap.make
@@ -32,11 +32,15 @@ LIBCAP_LICENSE := BSD, GPL
# ----------------------------------------------------------------------------
LIBCAP_MAKE_OPT := \
- prefix= PAM_CAP=no DYNAMIC=yes LIBATTR=no lib=lib \
+ prefix= PAM_CAP=no DYNAMIC=yes \
+ LIBATTR=$(call ptx/ifdef, PTXCONF_LIBCAP_SETCAP,yes,no) \
+ lib=lib \
CC=$(CROSS_CC) \
BUILD_CC=$(HOSTCC)
-LIBCAP_INSTALL_OPT := $(LIBCAP_MAKE_OPT) install
+LIBCAP_INSTALL_OPT := $(LIBCAP_MAKE_OPT) \
+ RAISE_SETFCAP=no \
+ install
# ----------------------------------------------------------------------------
# Target-Install
@@ -54,7 +58,10 @@ $(STATEDIR)/libcap.targetinstall:
@$(call install_copy, libcap, 0, 0, 0755, -, /sbin/getpcaps)
@$(call install_copy, libcap, 0, 0, 0755, -, /sbin/capsh)
@$(call install_lib, libcap, 0, 0, 0644, libcap)
-
+ifdef PTXCONF_LIBCAP_SETCAP
+ @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/setcap)
+ @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/getcap)
+endif
@$(call install_finish, libcap)
@$(call touch)
--
1.8.5.4
--
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2014-10-12 4:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-12 4:27 jon [this message]
2014-11-13 16:41 ` Michael Olbrich
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=1413088039-27720-1-git-send-email-jon@ringle.org \
--to=jon@ringle.org \
--cc=jringle@gridpoint.com \
--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