diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2016-03-20 22:10:19 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:15 +0000 |
commit | c5c9ed67add46e5fcb1a3ccb98b471c6228ced4d (patch) | |
tree | 1ee43708528baa3bd6fbb0f3357237de796db6a8 /meta/recipes-extended/at | |
parent | 9b2b1f05a8ad95467591f644d80efbae87146ebe (diff) | |
download | poky-c5c9ed67add46e5fcb1a3ccb98b471c6228ced4d.tar.gz |
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
(From OE-Core rev: f1f676cf720b869999553eecdb113a2a2daa61fe)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/at')
-rw-r--r-- | meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch | 53 | ||||
-rw-r--r-- | meta/recipes-extended/at/at_3.1.18.bb | 1 |
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 @@ | |||
1 | From c02354af7f3d9426da31503abfae70952c699a9d Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Fri, 18 Mar 2016 03:23:11 -0400 | ||
4 | Subject: [PATCH] configure: fix with/without selinux | ||
5 | |||
6 | Problem: | ||
7 | without-selinux doesn't work since WITH_SELINUX is always be defined no | ||
8 | matter which option is given: with-selinux, without-selinux. | ||
9 | |||
10 | Fix: | ||
11 | Disable selinux support if without-selinux is given; otherwise check | ||
12 | libselinux to determine if selinux support should be enabled. | ||
13 | |||
14 | Upstream-Status: Submitted [at@packages.debian.org] | ||
15 | |||
16 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
17 | --- | ||
18 | configure.ac | 19 +++++++++++++++---- | ||
19 | 1 file changed, 15 insertions(+), 4 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index 5a43419..8c9de62 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -240,10 +240,21 @@ AC_ARG_WITH(daemon_username, | ||
26 | AC_SUBST(DAEMON_USERNAME) | ||
27 | |||
28 | AC_ARG_WITH(selinux, | ||
29 | -[ --with-selinux Define to run with selinux], | ||
30 | -AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]), | ||
31 | -) | ||
32 | -AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux) | ||
33 | +[ --with-selinux Define to run with selinux (default=check)], | ||
34 | +[], | ||
35 | +[with_selinux=check]) | ||
36 | + | ||
37 | +if test "x$with_selinux" != xno; then | ||
38 | + AC_CHECK_LIB([selinux], [is_selinux_enabled], | ||
39 | + [SELINUXLIB=-lselinux | ||
40 | + AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]) | ||
41 | + ], | ||
42 | + [if test "x$with_selinux" != xcheck; then | ||
43 | + AC_MSG_FAILURE([--with-selinux is given, but test for selinux failed]) | ||
44 | + fi | ||
45 | + ] | ||
46 | + ) | ||
47 | +fi | ||
48 | AC_SUBST(SELINUXLIB) | ||
49 | AC_SUBST(WITH_SELINUX) | ||
50 | |||
51 | -- | ||
52 | 1.9.1 | ||
53 | |||
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} \ | |||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
26 | file://makefile-fix-parallel.patch \ | 26 | file://makefile-fix-parallel.patch \ |
27 | file://0001-remove-glibc-assumption.patch \ | 27 | file://0001-remove-glibc-assumption.patch \ |
28 | file://configure-fix-with-without-selinux.patch \ | ||
28 | " | 29 | " |
29 | 30 | ||
30 | PAM_SRC_URI = "file://pam.conf.patch \ | 31 | PAM_SRC_URI = "file://pam.conf.patch \ |