summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb263
1 files changed, 263 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb
new file mode 100644
index 0000000000..2b4ae41d95
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb
@@ -0,0 +1,263 @@
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] = "88fc236ab99b2864b248de7d49a008ec2afd7551e64dce8b95f58f32f94c46ab"
31
32S = "${UNPACKDIR}/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 is not affected. It only applies for Windows"
41CVE_STATUS[CVE-1999-0678] = "not-applicable-platform: this CVE is for Debian packaging configuration"
42CVE_STATUS[CVE-1999-1237] = "cpe-incorrect: This is vulnerability of Apache AuthenSmb module, fixed in 0.9"
43CVE_STATUS[CVE-1999-1412] = "not-applicable-platform: this CVE is for MAC OS X specific problem"
44CVE_STATUS[CVE-2007-0086] = "disputed: this CVE is officially disputed by Redhat"
45CVE_STATUS[CVE-2007-0450] = "not-applicable-platform: The current version is not affected. It only applies for Windows."
46CVE_STATUS[CVE-2007-6421] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)"
47CVE_STATUS[CVE-2007-6422] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)"
48CVE_STATUS[CVE-2007-6423] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2.x to 2.2.7-dev"
49CVE_STATUS[CVE-2008-2168] = "cpe-incorrect: The current version is not affected by the CVE which affects versions up to 2.2.6 (excl.)"
50CVE_STATUS[CVE-2010-0425] = "not-applicable-platform: The current version is not affected. It only applies for Windows."
51
52SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
53
54PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
55PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
56PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
57PACKAGECONFIG[zlib] = "--enable-deflate --with-zlib=${STAGING_LIBDIR}/../,,zlib,zlib"
58
59CFLAGS:append = " -DPATH_MAX=4096"
60
61EXTRA_OECONF:class-target = "\
62 --enable-layout=Debian \
63 --prefix=${base_prefix} \
64 --exec_prefix=${exec_prefix} \
65 --includedir=${includedir}/${BPN} \
66 --sysconfdir=${sysconfdir}/${BPN} \
67 --datadir=${datadir}/${BPN} \
68 --libdir=${libdir} \
69 --libexecdir=${libexecdir}/${BPN}/modules \
70 --localstatedir=${localstatedir} \
71 --enable-ssl \
72 --with-dbm=sdbm \
73 --with-gdbm=no \
74 --with-ndbm=no \
75 --with-berkeley-db=no \
76 --enable-info \
77 --enable-rewrite \
78 --with-mpm=prefork \
79 --enable-mpms-shared \
80 ap_cv_void_ptr_lt_long=no \
81 ac_cv_have_threadsafe_pollset=no \
82 "
83
84EXTRA_OECONF:class-native = "\
85 --prefix=${prefix} \
86 --includedir=${includedir}/${BPN} \
87 --sysconfdir=${sysconfdir}/${BPN} \
88 --datadir=${datadir}/${BPN} \
89 --libdir=${libdir} \
90 --libexecdir=${libdir}/${BPN}/modules \
91 --localstatedir=${localstatedir} \
92 "
93
94do_configure:prepend() {
95 sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' \
96 -e 's#\(installbuilddir:\s*\).*#\1${libexecdir}/${PN}/build#' \
97 ${S}/config.layout
98}
99
100do_install:append:class-target() {
101 install -d ${D}/${sysconfdir}/init.d
102
103 cat ${UNPACKDIR}/init | \
104 sed -e 's,/usr/sbin/,${sbindir}/,g' \
105 -e 's,/usr/bin/,${bindir}/,g' \
106 -e 's,/usr/lib/,${libdir}/,g' \
107 -e 's,/etc/,${sysconfdir}/,g' \
108 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
109
110 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
111
112 # Remove the goofy original files...
113 rm -rf ${D}/${sysconfdir}/${BPN}/original
114
115 install -d ${D}${sysconfdir}/${BPN}/conf.d
116 install -d ${D}${sysconfdir}/${BPN}/modules.d
117
118 # Ensure configuration file pulls in conf.d and modules.d
119 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
120 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
121 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
122
123 # Match with that is in init script
124 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
125
126 # Set 'ServerName' to fix error messages when restart apache service
127 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
128
129 sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf
130
131 sed -i -e 's,${STAGING_DIR_TARGET},,g' \
132 -e 's,${DEBUG_PREFIX_MAP},,g' \
133 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
134 -e 's,${HOSTTOOLS_DIR}/,,g' \
135 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
136 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${libexecdir}/${PN}/build/config_vars.mk
137
138 sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
139 -e 's,${DEBUG_PREFIX_MAP},,g' \
140 -e 's,${RECIPE_SYSROOT},,g' \
141 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
142 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
143 -e 's,${WORKDIR}/recipe-sysroot/,,g' \
144 -e 's,".*/configure","configure",g' ${D}${libexecdir}/${PN}/build/config.nice
145
146 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
147 install -d ${D}${sysconfdir}/tmpfiles.d/
148 install -m 0644 ${UNPACKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
149
150 install -d ${D}${systemd_unitdir}/system
151 install -m 0644 ${UNPACKDIR}/apache2.service ${D}${systemd_unitdir}/system
152 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
153 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
154 elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
155 install -d ${D}${sysconfdir}/default/volatiles
156 install -m 0644 ${UNPACKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
157 fi
158
159 rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars*
160 chown -R root:root ${D}
161
162 oe_multilib_header apache2/ap_config_layout.h
163}
164
165do_install:append:class-native() {
166 install -d ${D}${bindir} ${D}${libdir}
167 install -m 755 server/gen_test_char ${D}${bindir}
168}
169
170SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess"
171
172SYSROOT_DIRS += "${libexecdir}/${PN}/build"
173
174apache_sysroot_preprocess() {
175 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
176 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}
177 install -d ${SYSROOT_DESTDIR}${sbindir}
178 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}
179 sed -i 's!\(my $installbuilddir = \)"\(.*\)"!\1"${STAGING_DIR_HOST}\2"!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
180
181 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
182 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
183 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
184 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
185 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
186 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
187 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
188}
189
190# Implications - used by update-rc.d scripts
191INITSCRIPT_NAME = "apache2"
192INITSCRIPT_PARAMS = "defaults 91 20"
193
194SYSTEMD_SERVICE:${PN} = "apache2.service"
195SYSTEMD_AUTO_ENABLE:${PN} = "enable"
196
197ALTERNATIVE:${PN} = "httpd"
198ALTERNATIVE_LINK_NAME[httpd] = "${sbindir}/httpd"
199ALTERNATIVE_PRIORITY[httpd] = "60"
200
201ALTERNATIVE:${PN}-doc = "htpasswd.1"
202ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
203
204MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apxs"
205
206PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
207
208CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \
209 ${sysconfdir}/${BPN}/magic \
210 ${sysconfdir}/${BPN}/mime.types \
211 ${sysconfdir}/${BPN}/extra/*"
212
213FILES:${PN}-utils = "${bindir}/ab \
214 ${bindir}/htdbm \
215 ${bindir}/htdigest \
216 ${bindir}/htpasswd \
217 ${bindir}/logresolve \
218 ${bindir}/httxt2dbm \
219 ${sbindir}/htcacheclean \
220 ${sbindir}/fcgistarter \
221 ${sbindir}/checkgid \
222 ${sbindir}/rotatelogs \
223 "
224
225# We override here rather than append so that .so links are
226# included in the runtime package rather than here (-dev)
227# and to get build, icons, error into the -dev package
228FILES:${PN}-dev = "${libexecdir}/${PN}/build \
229 ${datadir}/${BPN}/icons \
230 ${datadir}/${BPN}/error \
231 ${includedir}/${BPN} \
232 ${bindir}/apxs \
233 "
234
235# Add the manual to -doc
236FILES:${PN}-doc += " ${datadir}/${BPN}/manual"
237
238FILES:${PN}-scripts += "${bindir}/dbmmanage"
239
240# Override this too - here is the default, less datadir
241FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \
242 ${sysconfdir} ${libdir}/${BPN}"
243
244# We want htdocs and cgi-bin to go with the binary
245FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin"
246
247FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
248
249RDEPENDS:${PN} += "openssl libgcc ${PN}-utils"
250RDEPENDS:${PN}-scripts += "perl ${PN}"
251RDEPENDS:${PN}-dev = "perl"
252
253BBCLASSEXTEND = "native"
254
255pkg_postinst:${PN}() {
256 if [ -z "$D" ]; then
257 if type systemd-tmpfiles >/dev/null; then
258 systemd-tmpfiles --create
259 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
260 ${sysconfdir}/init.d/populate-volatile.sh update
261 fi
262 fi
263}