Skip to contentSkip to conversation

package/apr: security bump version to 1.7.2

PATCH In review Peter Seiderer 2 participants 3 messages Feb 28, 2023 – Mar 15, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/apr: security bump version to 1.7.2

- remove 0001-cross-compile.patch
(superseeded by upstream commit [1])

- rename 0002-sys-param-h.patch to 0001-sys-param-h.patch

- remove 0003-Merge-r1887279-from-trunk.patch
(from upstream [2])

- remove 0004-apr-1.7.0-CVE-2021-35940.patch
(superseeded by upstream commit [3], remove APR_IGNORE_CVES accordingly)

- set new configure option '--disable-sctp' (no libsctp provided by buildroot)

- set new 'ac_cv_strerror_r_rc_int' explicitly to no (default for cross compile)

- set new 'ac_cv_mmap__dev_zero' explicitly to yes

- revert two upstream commits ([4], [5]) to fix apr-util build, fails otherwise because of some path mismatch where to find apr_rules.mk copied to apr-util-1.6.3/build/rules.mk, fixes:

    Makefile:50: .../build/apr-util-1.6.3/build/rules.mk: No such file or directory

For details see [6].

[1] https://github.com/apache/apr/commit/866e1df66be6704a584feaf5c3d241e3d631d03a
[2] https://github.com/apache/apr/commit/0a763c5e500f4304b7c534fae0fad430d64982e8
[3] https://github.com/apache/apr/commit/e0be630b681fac7b8b5e2f2e402a8e18a147f966
[4] https://github.com/apache/apr/commit/f82374627b3a6500a7a6cb11e48bcac59bcbb6a1
[5] https://github.com/apache/apr/commit/b6dbbc77da35a7b46754c99f465827f2a583e23c
[6] https://downloads.apache.org/apr/CHANGES-APR-1.7

---
 package/apr/0001-cross-compile.patch          |  58 ---------
 ...s-param-h.patch => 0001-sys-param-h.patch} |   0
 ...r1872164.-Fix-the-name-of-libtool-wh.patch |  30 +++++
 .../apr/0003-Merge-r1887279-from-trunk.patch  |  69 -----------
 ...Add-the-ability-to-cross-compile-APR.patch | 112 ++++++++++++++++++
 .../apr/0004-apr-1.7.0-CVE-2021-35940.patch   |  57 ---------
 package/apr/apr.hash                          |   4 +-
 package/apr/apr.mk                            |   7 +-
 8 files changed, 148 insertions(+), 189 deletions(-)
 delete mode 100644 package/apr/0001-cross-compile.patch
 rename package/apr/{0002-sys-param-h.patch => 0001-sys-param-h.patch} (100%)
 create mode 100644 package/apr/0002-Revert-Backport-r1872164.-Fix-the-name-of-libtool-wh.patch
 delete mode 100644 package/apr/0003-Merge-r1887279-from-trunk.patch
 create mode 100644 package/apr/0003-Revert-Add-the-ability-to-cross-compile-APR.patch
 delete mode 100644 package/apr/0004-apr-1.7.0-CVE-2021-35940.patch
package/apr/0001-cross-compile.patch deleted +0 -58
deleted file mode 100644
index 559ebb74ba..0000000000
@@ -1,58 +0,0 @@
-Fix cross-compilation
-
-Patch was backported from Apache httpd:
-http://svn.apache.org/viewvc?view=revision&revision=1327907
-http://svn.apache.org/viewvc?view=revision&revision=1328390
-http://svn.apache.org/viewvc?view=revision&revision=1328714
-
-Patch submitted upstream:
-https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
-
-Signed-off-by: Bernd Kuhls <[email protected]>
-
-diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in
---- apr-1.5.1.org/configure.in	2014-01-25 16:17:29.000000000 +0100
-+++ apr-1.5.1/configure.in	2014-10-05 11:20:40.080746760 +0200
-@@ -118,6 +118,16 @@
- echo "Configuring APR library"
- echo "Platform: $host"
- 
-+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
-+dnl we got already CC_FOR_BUILD from environment.
-+if test "x${build_alias}" != "x${host_alias}"; then
-+  if test "x${CC_FOR_BUILD}" = "x"; then
-+    CC_FOR_BUILD=cc
-+  fi
-+fi
-+AC_SUBST(CC_FOR_BUILD)
-+AC_SUBST(CFLAGS_FOR_BUILD)
-+
- dnl Some initial steps for configuration.  We setup the default directory
- dnl and which files are to be configured.
- 
-diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in
---- apr-1.5.1.org/Makefile.in	2014-03-17 16:10:26.000000000 +0100
-+++ apr-1.5.1/Makefile.in	2014-10-05 11:22:53.031070519 +0200
-@@ -8,6 +8,8 @@
- # APR (Apache Portable Runtime) library Makefile.
- #
- CPP = @CPP@
-+CC_FOR_BUILD = @CC_FOR_BUILD@
-+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
- 
- # get substituted into some targets
- APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
-@@ -134,8 +134,13 @@
- 	$(APR_MKDIR) tools
- 	$(LT_COMPILE)
- 
-+ifdef CC_FOR_BUILD
-+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
-+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
-+else
- tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
- 	$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
-+endif
- 
- include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
- 	$(APR_MKDIR) include/private
package/apr/0001-sys-param-h.patch renamed from package/apr/0002-sys-param-h.patch +0 -0
similarity index 100%
rename from package/apr/0002-sys-param-h.patch
rename to package/apr/0001-sys-param-h.patch
package/apr/0002-Revert-Backport-r1872164.-Fix-the-name-of-libtool-wh.patch new file +30 -0
new file mode 100644
index 0000000000..f80db1cb6b
@@ -0,0 +1,30 @@
+From 0aa7e33372b479a26e5f04dfc4801e24573a8737 Mon Sep 17 00:00:00 2001
+From: Graham Leggett <[email protected]>
+Date: Wed, 1 Jan 2020 10:43:39 +0000
+Subject: [PATCH] Revert: Backport r1872164. Fix the name of libtool when
+ cross compiling.
+
+git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872165 13f79535-47bb-0310-9956-ffa450edef68
+
+[Revert upstream commit https://github.com/apache/apr/commit/f82374627b3a6500a7a6cb11e48bcac59bcbb6a1]
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ apr-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/apr-config.in b/apr-config.in
+index bed47ca..4873fc0 100644
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -246,7 +246,7 @@ while test $# -gt 0; do
+     if test "$location" = "installed"; then
+         echo "${installbuilddir}/libtool"
+     elif test "$location" = "crosscompile"; then
+-        echo "$APR_TARGET_DIR/${installbuilddir}/libtool"
++        echo "$APR_TARGET_DIR/${installbuilddir}/build"
+     else
+         echo "$APR_BUILD_DIR/libtool"
+     fi
+-- 
+2.39.2
+
package/apr/0003-Merge-r1887279-from-trunk.patch deleted +0 -69

69 lines not on this page · raw message

package/apr/0003-Revert-Add-the-ability-to-cross-compile-APR.patch new file +112 -0

112 lines not on this page · raw message

package/apr/0004-apr-1.7.0-CVE-2021-35940.patch deleted +0 -57

57 lines not on this page · raw message

package/apr/apr.hash +2 -2
index d7739d7ed3..96f43d3710 100644
@@ -1,4 +1,4 @@
-# From http://archive.apache.org/dist/apr/apr-1.7.0.tar.bz2.sha256
-sha256  e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea  apr-1.7.0.tar.bz2
+# From https://archive.apache.org/dist/apr/apr-1.7.2.tar.bz2.sha256
+sha256  75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e  apr-1.7.2.tar.bz2
 # Locally calculated
 sha256  f854aeef66ecd55a126226e82b3f26793fc3b1c584647f6a0edc5639974c38ad  LICENSE
package/apr/apr.mk +4 -3
index 77217ccbb3..bdc5e915c6 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-APR_VERSION = 1.7.0
+APR_VERSION = 1.7.2
 APR_SOURCE = apr-$(APR_VERSION).tar.bz2
 APR_SITE = https://archive.apache.org/dist/apr
 APR_LICENSE = Apache-2.0
@@ -16,8 +16,7 @@ APR_INSTALL_STAGING = YES
 # so we need to autoreconf:
 APR_AUTORECONF = YES
 
-# 0004-apr-1.7.0-CVE-2021-35940.patch
-APR_IGNORE_CVES += CVE-2021-35940
+APR_CONF_OPTS = --disable-sctp
 
 # avoid apr_hints.m4 by setting apr_preload_done=yes and set
 # the needed CFLAGS on our own (avoids '-D_REENTRANT' in case
@@ -32,6 +31,7 @@ APR_CONF_ENV = \
 	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
 	CFLAGS="$(APR_CFLAGS)" \
 	ac_cv_file__dev_zero=yes \
+	ac_cv_mmap__dev_zero=yes \
 	ac_cv_func_setpgrp_void=yes \
 	apr_cv_process_shared_works=yes \
 	apr_cv_mutex_robust_shared=no \
@@ -39,6 +39,7 @@ APR_CONF_ENV = \
 	ac_cv_sizeof_struct_iovec=8 \
 	ac_cv_sizeof_pid_t=4 \
 	ac_cv_struct_rlimit=yes \
+	ac_cv_strerror_r_rc_int=no \
 	ac_cv_o_nonblock_inherited=no \
 	apr_cv_mutex_recursive=yes \
 	apr_cv_epoll=yes \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

- remove 0001-cross-compile.patch
(superseeded by upstream commit [1])

- rename 0002-sys-param-h.patch to 0001-sys-param-h.patch

- remove 0003-Merge-r1887279-from-trunk.patch
(from upstream [2])

- remove 0004-apr-1.7.0-CVE-2021-35940.patch
(superseeded by upstream commit [3], remove APR_IGNORE_CVES accordingly)

- set new configure option '--disable-sctp' (no libsctp provided by buildroot)

- set new 'ac_cv_strerror_r_rc_int' explicitly to no (default for cross compile)

- set new 'ac_cv_mmap__dev_zero' explicitly to yes

- revert two upstream commits ([4], [5]) to fix apr-util build, fails otherwise because of some path mismatch where to find apr_rules.mk copied to apr-util-1.6.3/build/rules.mk, fixes:

    Makefile:50: .../build/apr-util-1.6.3/build/rules.mk: No such file or directory

For details see [6].

Quoted 8 lines

[1] https://github.com/apache/apr/commit/866e1df66be6704a584feaf5c3d241e3d631d03a
[2] https://github.com/apache/apr/commit/0a763c5e500f4304b7c534fae0fad430d64982e8
[3] https://github.com/apache/apr/commit/e0be630b681fac7b8b5e2f2e402a8e18a147f966
[4] https://github.com/apache/apr/commit/f82374627b3a6500a7a6cb11e48bcac59bcbb6a1
[5] https://github.com/apache/apr/commit/b6dbbc77da35a7b46754c99f465827f2a583e23c
[6] https://downloads.apache.org/apr/CHANGES-APR-1.7

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Peter Seiderer
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

- remove 0001-cross-compile.patch
(superseeded by upstream commit [1])

- rename 0002-sys-param-h.patch to 0001-sys-param-h.patch

- remove 0003-Merge-r1887279-from-trunk.patch
(from upstream [2])

- remove 0004-apr-1.7.0-CVE-2021-35940.patch
(superseeded by upstream commit [3], remove APR_IGNORE_CVES accordingly)

- set new configure option '--disable-sctp' (no libsctp provided by buildroot)

- set new 'ac_cv_strerror_r_rc_int' explicitly to no (default for cross compile)

- set new 'ac_cv_mmap__dev_zero' explicitly to yes

- revert two upstream commits ([4], [5]) to fix apr-util build, fails otherwise because of some path mismatch where to find apr_rules.mk copied to apr-util-1.6.3/build/rules.mk, fixes:

    Makefile:50: .../build/apr-util-1.6.3/build/rules.mk: No such file or directory

For details see [6].

Quoted 8 lines

[1] https://github.com/apache/apr/commit/866e1df66be6704a584feaf5c3d241e3d631d03a
[2] https://github.com/apache/apr/commit/0a763c5e500f4304b7c534fae0fad430d64982e8
[3] https://github.com/apache/apr/commit/e0be630b681fac7b8b5e2f2e402a8e18a147f966
[4] https://github.com/apache/apr/commit/f82374627b3a6500a7a6cb11e48bcac59bcbb6a1
[5] https://github.com/apache/apr/commit/b6dbbc77da35a7b46754c99f465827f2a583e23c
[6] https://downloads.apache.org/apr/CHANGES-APR-1.7

Committed to 2022.11.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot