[oe-commits] Wenzong Fan : ltrace: add PACKAGECONFIG for selinux

git at git.openembedded.org git at git.openembedded.org
Tue Dec 9 10:53:43 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: e2d07c8646d25a473dd66ab2f76954f1103470f7
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=e2d07c8646d25a473dd66ab2f76954f1103470f7

Author: Wenzong Fan <wenzong.fan at windriver.com>
Date:   Tue Dec  2 03:14:27 2014 -0500

ltrace: add PACKAGECONFIG for selinux

Add PACKAGECONFIG for 'selinux', otherwise there would be warnings like
below:

WARN: ltrace: ltrace rdepends on libselinux, but it isn't a build dependency?

Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 ...onfigure-allow-to-disable-selinux-support.patch | 36 ++++++++++++++++++++++
 meta-oe/recipes-devtools/ltrace/ltrace_git.bb      |  3 ++
 2 files changed, 39 insertions(+)

diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch b/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch
new file mode 100644
index 0000000..4f89d8f
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch
@@ -0,0 +1,36 @@
+From 887a403e38f590ebf1d04ce600d94cb7a351744c Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan at windriver.com>
+Date: Mon, 1 Dec 2014 00:57:42 -0500
+Subject: [PATCH] ltrace: allow to enable/disable selinux support
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
+---
+ configure.ac |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6fe5e3b..189885a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -125,8 +125,14 @@ AC_SUBST(libstdcxx_LIBS)
+ 
+ 
+ dnl Check security_get_boolean_active availability.
+-AC_CHECK_HEADERS(selinux/selinux.h)
+-AC_CHECK_LIB(selinux, security_get_boolean_active)
++AC_ARG_ENABLE([selinux],
++    AS_HELP_STRING([--enable-selinux],[enable SELinux support [default=auto]]),
++    [], [enable_selinux=auto])
++
++if test x$enable_selinux != xno; then
++    AC_CHECK_HEADERS(selinux/selinux.h)
++    AC_CHECK_LIB(selinux, security_get_boolean_active)
++fi
+ 
+ dnl Whether (and which) elfutils libdw.so to use for unwinding.
+ AC_ARG_WITH(elfutils,
+-- 
+1.7.9.5
+
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 507747a..6984848 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -17,12 +17,15 @@ DEPENDS = "elfutils"
 RDEPENDS_${PN} = "elfutils"
 SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git \
            file://ltrace-0.7.2-unused-typedef.patch \
+           file://configure-allow-to-disable-selinux-support.patch \
           "
 S = "${WORKDIR}/git"
 
 inherit autotools
 
+PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
 PACKAGECONFIG[unwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
 
 do_configure_prepend () {
 	( cd ${S}; ./autogen.sh )



More information about the Openembedded-commits mailing list