mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libcap: option to install setcap/getcap
@ 2014-10-12  4:27 jon
  2014-11-13 16:41 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: jon @ 2014-10-12  4:27 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] libcap: option to install setcap/getcap
  2014-10-12  4:27 [ptxdist] [PATCH] libcap: option to install setcap/getcap jon
@ 2014-11-13 16:41 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2014-11-13 16:41 UTC (permalink / raw)
  To: ptxdist

On Sun, Oct 12, 2014 at 12:27:19AM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>

Thanks, applied.

Michael

> ---
>  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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-13 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12  4:27 [ptxdist] [PATCH] libcap: option to install setcap/getcap jon
2014-11-13 16:41 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox