summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/at
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2016-03-20 22:10:19 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-24 21:44:25 +0000
commitf1f676cf720b869999553eecdb113a2a2daa61fe (patch)
tree43e68388fd9dc5bee3791895565246d580134486 /meta/recipes-extended/at
parent79ec2ec397a35d6405f9c2b3c67e8b9981fbe7be (diff)
downloadopenembedded-core-f1f676cf720b869999553eecdb113a2a2daa61fe.tar.gz
openembedded-core-f1f676cf720b869999553eecdb113a2a2daa61fe.tar.bz2
openembedded-core-f1f676cf720b869999553eecdb113a2a2daa61fe.zip
at: fix configure option with/without-selinux
without-selinux doesn't work since WITH_SELINUX is always be defined no matter which option is given: with-selinux, without-selinux. This causes build errors if '--without-selinux' is used and libselinux is not buildable in project: atd.c:87:29: fatal error: selinux/selinux.h: No such file or directory Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/at')
-rw-r--r--meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch53
-rw-r--r--meta/recipes-extended/at/at_3.1.18.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch b/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
new file mode 100644
index 0000000000..389af1e072
--- /dev/null
+++ b/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
@@ -0,0 +1,53 @@
+From c02354af7f3d9426da31503abfae70952c699a9d Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 18 Mar 2016 03:23:11 -0400
+Subject: [PATCH] configure: fix with/without selinux
+
+Problem:
+without-selinux doesn't work since WITH_SELINUX is always be defined no
+matter which option is given: with-selinux, without-selinux.
+
+Fix:
+Disable selinux support if without-selinux is given; otherwise check
+libselinux to determine if selinux support should be enabled.
+
+Upstream-Status: Submitted [at@packages.debian.org]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a43419..8c9de62 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -240,10 +240,21 @@ AC_ARG_WITH(daemon_username,
+ AC_SUBST(DAEMON_USERNAME)
+
+ AC_ARG_WITH(selinux,
+-[ --with-selinux Define to run with selinux],
+-AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]),
+-)
+-AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux)
++[ --with-selinux Define to run with selinux (default=check)],
++[],
++[with_selinux=check])
++
++if test "x$with_selinux" != xno; then
++ AC_CHECK_LIB([selinux], [is_selinux_enabled],
++ [SELINUXLIB=-lselinux
++ AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux])
++ ],
++ [if test "x$with_selinux" != xcheck; then
++ AC_MSG_FAILURE([--with-selinux is given, but test for selinux failed])
++ fi
++ ]
++ )
++fi
+ AC_SUBST(SELINUXLIB)
+ AC_SUBST(WITH_SELINUX)
+
+--
+1.9.1
+
diff --git a/meta/recipes-extended/at/at_3.1.18.bb b/meta/recipes-extended/at/at_3.1.18.bb
index e83ea32825..93044f53e2 100644
--- a/meta/recipes-extended/at/at_3.1.18.bb
+++ b/meta/recipes-extended/at/at_3.1.18.bb
@@ -25,6 +25,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz;subdir=${BP} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://makefile-fix-parallel.patch \
file://0001-remove-glibc-assumption.patch \
+ file://configure-fix-with-without-selinux.patch \
"
PAM_SRC_URI = "file://pam.conf.patch \