Skip to contentSkip to conversation

apache2: upgrade 2.4.41 -> 2.4.43

PATCH New Trevor Gamblin 1 participant 2 messages Apr 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 apache2: upgrade 2.4.41 -> 2.4.43

LICENSE file was updated due to a typo fix.

Note that this upgrade fixes two CVES affecting versions 2.4.41 and earlier:

CVE: CVE-2020-1927
CVE: CVE-2020-1934

See:
https://nvd.nist.gov/vuln/detail/CVE-2020-1927
https://nvd.nist.gov/vuln/detail/CVE-2020-1934

---
 .../apache2/{apache2_2.4.41.bb => apache2_2.4.43.bb}        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta-webserver/recipes-httpd/apache2/{apache2_2.4.41.bb => apache2_2.4.43.bb} (97%)
meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb renamed from meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb +3 -3
similarity index 97%
rename from meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb
rename to meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb
index a34734c20..2fff153fc 100644
@@ -24,9 +24,9 @@ SRC_URI_append_class-target = " \
            file://volatiles.04_apache2 \
            "
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d52d0fd0bc788f068e647116c01ddfcd"
-SRC_URI[md5sum] = "dfc674f8f454e3bc2d4ccd73ad3b5f1e"
-SRC_URI[sha256sum] = "133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
+SRC_URI[md5sum] = "791c986b1e70fe61eb44060aacc89a64"
+SRC_URI[sha256sum] = "a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43"
 
 S = "${WORKDIR}/httpd-${PV}"
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 2/2 apache2: add patch ensuring destdir is empty string

apache2 added cross-compilation support after 2.4.41, but this conflicts with our own cross-compilation setup and causes related recipes like apache-websocket to fail to find config files (due to incorrect file paths) during build:

| cannot open /ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot//usr/share/apache2/build/config_vars.mk:
No such file or directory at
/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/usr/bin/crossscripts/apxs
line 213.

Add this patch to ensure that the $destdir
variable used in apache2's cross-compilation scheme is always the empty string so that apache-websocket can find the right files.

---
 ....in-force-destdir-to-be-empty-string.patch | 49 +++++++++++++++++++
 .../recipes-httpd/apache2/apache2_2.4.43.bb   |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch
meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch new file +49 -0
new file mode 100644
index 000000000..bdedd146c
@@ -0,0 +1,49 @@
+From 705c0a7e9d9c1e64ee09fc0b54f6b5a4e27de1ca Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <[email protected]>
+Date: Fri, 17 Apr 2020 06:31:35 -0700
+Subject: [PATCH] support/apxs.in: force destdir to be empty string
+
+If destdir is assigned to anything other than the empty string, the 
+search path for apache2 config files is appended to itself, and 
+related packages like apache-websocket will be unable to locate them:
+
+| cannot open
+/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot//usr/share/apache2/build/config_vars.mk:
+No such file or directory at
+/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/usr/bin/crossscripts/apxs
+line 213.
+
+Ensure that it is always the empty string so that apache-websocket
+is able to find the required config files.
+
+Upstream-Status: Inappropriate (embedded-specific)
+
+Signed-off-by: Trevor Gamblin <[email protected]>
+---
+ support/apxs.in | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/support/apxs.in b/support/apxs.in
+index 65e1288527..9d96e33728 100644
+--- a/support/apxs.in
++++ b/support/apxs.in
+@@ -28,10 +28,12 @@ package apxs;
+ #   is the empty string.
+ 
+ my $destdir = "";
+-my $ddi = rindex($0, "@exp_bindir@");
+-if ($ddi >= 0) {
+-  $destdir = substr($0, 0, $ddi);
+-}
++# Comment out assignment of destdir so that it doesn't affect bitbake
++# cross-compilation setup
++#my $ddi = rindex($0, "@exp_bindir@");
++#if ($ddi >= 0) {
++#  $destdir = substr($0, 0, $ddi);
++#}
+ 
+ my %config_vars = ();
+ 
+-- 
+2.17.1
+
meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb +1 -0
index 2fff153fc..520011152 100644
@@ -14,6 +14,7 @@ SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
            file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \
            file://0007-apache2-allow-to-disable-selinux-support.patch \
            file://apache-configure_perlbin.patch \
+           file://0001-support-apxs.in-force-destdir-to-be-empty-string.patch \
           "
 
 SRC_URI_append_class-target = " \
Signature · 1 line
2.17.1