From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XdAkp-0005WK-9P for ptxdist@pengutronix.de; Sun, 12 Oct 2014 06:27:35 +0200 Received: by mail-qg0-f50.google.com with SMTP id q108so5466713qgd.23 for ; Sat, 11 Oct 2014 21:27:28 -0700 (PDT) From: jon@ringle.org Date: Sun, 12 Oct 2014 00:27:19 -0400 Message-Id: <1413088039-27720-1-git-send-email-jon@ringle.org> Subject: [ptxdist] [PATCH] libcap: option to install setcap/getcap Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Jon Ringle From: Jon Ringle Signed-off-by: Jon Ringle --- 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