diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2014-12-02 03:49:17 -0500 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-09 11:34:42 +0100 |
commit | 8cd982aeeaf0d7c00f3495e6a5a44c35cb7854da (patch) | |
tree | 1cf2b5e14a1656a987fb4e45d51b957550ab1a18 /meta-webserver/recipes-httpd | |
parent | e2d07c8646d25a473dd66ab2f76954f1103470f7 (diff) | |
download | meta-openembedded-8cd982aeeaf0d7c00f3495e6a5a44c35cb7854da.tar.gz |
apache2: add PACKAGECONFIG for selinux
Add PACKAGECONFIG for 'selinux', otherwise there would be warnings like
below:
WARN: apache2: apache2 rdepends on libselinux, but it isn't a build dependency?
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd')
-rw-r--r-- | meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb | 4 | ||||
-rw-r--r-- | meta-webserver/recipes-httpd/apache2/files/configure-allow-to-disable-selinux-support.patch | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb index d79d40bd2..55d507f75 100644 --- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb +++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \ | |||
17 | file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \ | 17 | file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \ |
18 | file://npn-patch-2.4.7.patch \ | 18 | file://npn-patch-2.4.7.patch \ |
19 | file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ | 19 | file://0001-configure-use-pkg-config-for-PCRE-detection.patch \ |
20 | file://configure-allow-to-disable-selinux-support.patch \ | ||
20 | file://init \ | 21 | file://init \ |
21 | file://apache2-volatile.conf \ | 22 | file://apache2-volatile.conf \ |
22 | file://apache2.service \ | 23 | file://apache2.service \ |
@@ -58,6 +59,9 @@ EXTRA_OECONF = "--enable-ssl \ | |||
58 | --enable-mpms-shared \ | 59 | --enable-mpms-shared \ |
59 | ac_cv_have_threadsafe_pollset=no" | 60 | ac_cv_have_threadsafe_pollset=no" |
60 | 61 | ||
62 | PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" | ||
63 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" | ||
64 | |||
61 | do_install_append() { | 65 | do_install_append() { |
62 | install -d ${D}/${sysconfdir}/init.d | 66 | install -d ${D}/${sysconfdir}/init.d |
63 | cat ${WORKDIR}/init | \ | 67 | cat ${WORKDIR}/init | \ |
diff --git a/meta-webserver/recipes-httpd/apache2/files/configure-allow-to-disable-selinux-support.patch b/meta-webserver/recipes-httpd/apache2/files/configure-allow-to-disable-selinux-support.patch new file mode 100644 index 000000000..5b5c29707 --- /dev/null +++ b/meta-webserver/recipes-httpd/apache2/files/configure-allow-to-disable-selinux-support.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From d23dd33e373340f6fddf11904839d1a118824401 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Mon, 1 Dec 2014 02:08:27 -0500 | ||
4 | Subject: [PATCH] apache2: allow to disable selinux support | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
9 | --- | ||
10 | configure.in | 14 ++++++++++---- | ||
11 | 1 file changed, 10 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/configure.in b/configure.in | ||
14 | index df94ee5..8c3ab21 100644 | ||
15 | --- a/configure.in | ||
16 | +++ b/configure.in | ||
17 | @@ -466,10 +466,16 @@ getloadavg | ||
18 | dnl confirm that a void pointer is large enough to store a long integer | ||
19 | APACHE_CHECK_VOID_PTR_LEN | ||
20 | |||
21 | -AC_CHECK_LIB(selinux, is_selinux_enabled, [ | ||
22 | - AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) | ||
23 | - APR_ADDTO(AP_LIBS, [-lselinux]) | ||
24 | -]) | ||
25 | +# SELinux support | ||
26 | +AC_ARG_ENABLE(selinux,APACHE_HELP_STRING(--enable-selinux,Enable SELinux support [default=auto]), | ||
27 | + [],[enable_selinux=auto]) | ||
28 | + | ||
29 | +if test x$enable_selinux != xno; then | ||
30 | + AC_CHECK_LIB(selinux, is_selinux_enabled, [ | ||
31 | + AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) | ||
32 | + APR_ADDTO(AP_LIBS, [-lselinux]) | ||
33 | + ]) | ||
34 | +fi | ||
35 | |||
36 | AC_CACHE_CHECK([for gettid()], ac_cv_gettid, | ||
37 | [AC_TRY_RUN(#define _GNU_SOURCE | ||
38 | -- | ||
39 | 1.7.9.5 | ||
40 | |||