summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb259
1 files changed, 259 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
new file mode 100644
index 000000000..364b4c674
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
@@ -0,0 +1,259 @@
1DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
2extensible web server."
3SUMMARY = "Apache HTTP Server"
4HOMEPAGE = "http://httpd.apache.org/"
5SECTION = "net"
6LICENSE = "Apache-2.0"
7
8SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
9 file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
10 file://0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch \
11 file://0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch \
12 file://0004-apache2-log-the-SELinux-context-at-startup.patch \
13 file://0005-replace-lynx-to-curl-in-apachectl-script.patch \
14 file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \
15 file://0007-apache2-allow-to-disable-selinux-support.patch \
16 file://0008-Fix-perl-install-directory-to-usr-bin.patch \
17 file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
18 file://0001-make_exports.awk-not-expose-the-path.patch \
19 "
20
21SRC_URI:append:class-target = " \
22 file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \
23 file://init \
24 file://apache2-volatile.conf \
25 file://apache2.service \
26 file://volatiles.04_apache2 \
27 "
28
29LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
30SRC_URI[sha256sum] = "674188e7bf44ced82da8db522da946849e22080d73d16c93f7f4df89e25729ec"
31
32S = "${WORKDIR}/httpd-${PV}"
33
34inherit autotools update-rc.d pkgconfig systemd multilib_script multilib_header
35
36DEPENDS = "openssl expat pcre apr apr-util apache2-native "
37
38CVE_PRODUCT = "apache:http_server"
39
40CVE_STATUS[CVE-1999-0289] = "not-applicable-platform: The current version (2.4.6) is not affected. It only applies for Windows"
41CVE_STATUS[CVE-2007-0450] = "not-applicable-platform: The current version (2.4.6) is not affected. It only applies for Windows."
42CVE_STATUS[CVE-2007-6421] = "cpe-incorrect: The current version (2.4.59) is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)"
43CVE_STATUS[CVE-2007-6422] = "cpe-incorrect: The current version (2.4.59) is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)"
44CVE_STATUS[CVE-2007-6423] = "cpe-incorrect: The current version (2.4.59) is not affected by the CVE which affects versions from 2.2.x to 2.2.7-dev"
45CVE_STATUS[CVE-2008-2168] = "cpe-incorrect: The current version (2.4.59) is not affected by the CVE which affects versions up to 2.2.6 (excl.)"
46CVE_STATUS[CVE-2010-0425] = "not-applicable-platform: The current version (2.4.6) is not affected. It only applies for Windows."
47
48SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
49
50PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
51PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
52PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
53PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib"
54
55CFLAGS:append = " -DPATH_MAX=4096"
56
57EXTRA_OECONF:class-target = "\
58 --enable-layout=Debian \
59 --prefix=${base_prefix} \
60 --exec_prefix=${exec_prefix} \
61 --includedir=${includedir}/${BPN} \
62 --sysconfdir=${sysconfdir}/${BPN} \
63 --datadir=${datadir}/${BPN} \
64 --libdir=${libdir} \
65 --libexecdir=${libexecdir}/${BPN}/modules \
66 --localstatedir=${localstatedir} \
67 --enable-ssl \
68 --with-dbm=sdbm \
69 --with-gdbm=no \
70 --with-ndbm=no \
71 --with-berkeley-db=no \
72 --enable-info \
73 --enable-rewrite \
74 --with-mpm=prefork \
75 --enable-mpms-shared \
76 ap_cv_void_ptr_lt_long=no \
77 ac_cv_have_threadsafe_pollset=no \
78 "
79
80EXTRA_OECONF:class-native = "\
81 --prefix=${prefix} \
82 --includedir=${includedir}/${BPN} \
83 --sysconfdir=${sysconfdir}/${BPN} \
84 --datadir=${datadir}/${BPN} \
85 --libdir=${libdir} \
86 --libexecdir=${libdir}/${BPN}/modules \
87 --localstatedir=${localstatedir} \
88 "
89
90do_configure:prepend() {
91 sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' \
92 -e 's#\(installbuilddir:\s*\).*#\1${libexecdir}/${PN}/build#' \
93 ${S}/config.layout
94}
95
96do_install:append:class-target() {
97 install -d ${D}/${sysconfdir}/init.d
98
99 cat ${UNPACKDIR}/init | \
100 sed -e 's,/usr/sbin/,${sbindir}/,g' \
101 -e 's,/usr/bin/,${bindir}/,g' \
102 -e 's,/usr/lib/,${libdir}/,g' \
103 -e 's,/etc/,${sysconfdir}/,g' \
104 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
105
106 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
107
108 # Remove the goofy original files...
109 rm -rf ${D}/${sysconfdir}/${BPN}/original
110
111 install -d ${D}${sysconfdir}/${BPN}/conf.d
112 install -d ${D}${sysconfdir}/${BPN}/modules.d
113
114 # Ensure configuration file pulls in conf.d and modules.d
115 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
116 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
117 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
118
119 # Match with that is in init script
120 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
121
122 # Set 'ServerName' to fix error messages when restart apache service
123 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
124
125 sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf
126
127 sed -i -e 's,${STAGING_DIR_TARGET},,g' \
128 -e 's,${DEBUG_PREFIX_MAP},,g' \
129 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
130 -e 's,${HOSTTOOLS_DIR}/,,g' \
131 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
132 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${libexecdir}/${PN}/build/config_vars.mk
133
134 sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
135 -e 's,${DEBUG_PREFIX_MAP},,g' \
136 -e 's,${RECIPE_SYSROOT},,g' \
137 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
138 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
139 -e 's,${WORKDIR}/recipe-sysroot/,,g' \
140 -e 's,".*/configure","configure",g' ${D}${libexecdir}/${PN}/build/config.nice
141
142 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
143 install -d ${D}${sysconfdir}/tmpfiles.d/
144 install -m 0644 ${UNPACKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
145
146 install -d ${D}${systemd_unitdir}/system
147 install -m 0644 ${UNPACKDIR}/apache2.service ${D}${systemd_unitdir}/system
148 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
149 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
150 elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
151 install -d ${D}${sysconfdir}/default/volatiles
152 install -m 0644 ${UNPACKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
153 fi
154
155 rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars*
156 chown -R root:root ${D}
157
158 oe_multilib_header apache2/ap_config_layout.h
159}
160
161do_install:append:class-native() {
162 install -d ${D}${bindir} ${D}${libdir}
163 install -m 755 server/gen_test_char ${D}${bindir}
164}
165
166SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess"
167
168SYSROOT_DIRS += "${libexecdir}/${PN}/build"
169
170apache_sysroot_preprocess() {
171 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
172 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}
173 install -d ${SYSROOT_DESTDIR}${sbindir}
174 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}
175 sed -i 's!\(my $installbuilddir = \)"\(.*\)"!\1"${STAGING_DIR_HOST}\2"!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
176
177 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
178 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
179 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
180 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
181 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
182 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
183 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
184}
185
186# Implications - used by update-rc.d scripts
187INITSCRIPT_NAME = "apache2"
188INITSCRIPT_PARAMS = "defaults 91 20"
189
190SYSTEMD_SERVICE:${PN} = "apache2.service"
191SYSTEMD_AUTO_ENABLE:${PN} = "enable"
192
193ALTERNATIVE:${PN} = "httpd"
194ALTERNATIVE_LINK_NAME[httpd] = "${sbindir}/httpd"
195ALTERNATIVE_PRIORITY[httpd] = "60"
196
197ALTERNATIVE:${PN}-doc = "htpasswd.1"
198ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
199
200MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apxs"
201
202PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
203
204CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \
205 ${sysconfdir}/${BPN}/magic \
206 ${sysconfdir}/${BPN}/mime.types \
207 ${sysconfdir}/${BPN}/extra/*"
208
209FILES:${PN}-utils = "${bindir}/ab \
210 ${bindir}/htdbm \
211 ${bindir}/htdigest \
212 ${bindir}/htpasswd \
213 ${bindir}/logresolve \
214 ${bindir}/httxt2dbm \
215 ${sbindir}/htcacheclean \
216 ${sbindir}/fcgistarter \
217 ${sbindir}/checkgid \
218 ${sbindir}/rotatelogs \
219 "
220
221# We override here rather than append so that .so links are
222# included in the runtime package rather than here (-dev)
223# and to get build, icons, error into the -dev package
224FILES:${PN}-dev = "${libexecdir}/${PN}/build \
225 ${datadir}/${BPN}/icons \
226 ${datadir}/${BPN}/error \
227 ${includedir}/${BPN} \
228 ${bindir}/apxs \
229 "
230
231# Add the manual to -doc
232FILES:${PN}-doc += " ${datadir}/${BPN}/manual"
233
234FILES:${PN}-scripts += "${bindir}/dbmmanage"
235
236# Override this too - here is the default, less datadir
237FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \
238 ${sysconfdir} ${libdir}/${BPN}"
239
240# We want htdocs and cgi-bin to go with the binary
241FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin"
242
243FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
244
245RDEPENDS:${PN} += "openssl libgcc ${PN}-utils"
246RDEPENDS:${PN}-scripts += "perl ${PN}"
247RDEPENDS:${PN}-dev = "perl"
248
249BBCLASSEXTEND = "native"
250
251pkg_postinst:${PN}() {
252 if [ -z "$D" ]; then
253 if type systemd-tmpfiles >/dev/null; then
254 systemd-tmpfiles --create
255 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
256 ${sysconfdir}/init.d/populate-volatile.sh update
257 fi
258 fi
259}