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