summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-02-08 08:20:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-14 14:59:10 +0000
commit75022804d84067878626d68f765ead5ccf1644aa (patch)
tree663b19ad46f1b6f55055462f7d8d382a4c480085
parent818ad186aeff33c270a8812194325abf2e8d212c (diff)
downloadpoky-75022804d84067878626d68f765ead5ccf1644aa.tar.gz
apr: update 1.7.0 -> 1.7.2
Changes for APR 1.7.2 *) Correct a packaging issue in 1.7.1. The contents of the release were correct, but the top level directory was misnamed. Changes for APR 1.7.1 *) SECURITY: CVE-2022-24963 (cve.mitre.org) Integer Overflow or Wraparound vulnerability in apr_encode functions of Apache Portable Runtime (APR) allows an attacker to write beyond bounds of a buffer. *) SECURITY: CVE-2022-28331 (cve.mitre.org) On Windows, Apache Portable Runtime 1.7.0 and earlier may write beyond the end of a stack based buffer in apr_socket_sendv(). This is a result of integer overflow. *) SECURITY: CVE-2021-35940 (cve.mitre.org) Restore fix for out-of-bounds array dereference in apr_time_exp*() functions. (This issue was addressed as CVE-2017-12613 in APR 1.6.3 and later 1.6.x releases, but was missing in 1.7.0.) [Stefan Sperling] *) configure: Fix various build issues for compilers enforcing strict C99 compliance. PR 66396, 66408, 66426. [Florian Weimer <fweimer redhat.com>, Sam James <sam gentoo.org>] *) apr_atomic_read64(): Fix non-atomic read on 32-bit Windows [Ivan Zhakov] *) configure: Prefer posix name-based shared memory over SysV IPC. [Jim Jagielski] *) configure: Add --disable-sctp argument to forcibly disable SCTP support, or --enable-sctp which fails if SCTP support is not detected. [Lubos Uhliarik <luhliari redhat.com>, Joe Orton] *) Fix handle leak in the Win32 apr_uid_current implementation. PR 61165. [Ivan Zhakov] *) Add error handling for lseek() failures in apr_file_write() and apr_file_writev(). [Joe Orton] *) Don't silently set APR_FOPEN_NOCLEANUP for apr_file_mktemp() created file to avoid a fd and inode leak when/if later passed to apr_file_setaside(). [Yann Ylavic] *) APR's configure script uses AC_TRY_RUN to detect whether the return type of strerror_r is int. When cross-compiling this defaults to no. This commit adds an AC_CACHE_CHECK so users who cross-compile APR may influence the outcome with a configure variable. [Sebastian Kemper <sebastian_ml gmx net>] *) Add a cache check with which users who cross-compile APR can influence the outcome of the /dev/zero test by setting the variable ac_cv_mmap__dev_zero=yes [Sebastian Kemper <sebastian_ml gmx net>] *) Trick autoconf into printing the correct default prefix in the help. [Stefan Fritsch] *) Don't try to use PROC_PTHREAD by default when cross compiling. [Yann Ylavic] *) Add the ability to cross compile APR. [Graham Leggett] *) While cross-compiling, the tools/gen_test_char could not be executed at build time, use AX_PROG_CC_FOR_BUILD to build native tools/gen_test_char Support explicit libtool by variable assigning before buildcheck.sh, it is helpful for cross-compiling (such as libtool=aarch64-linux-libtool) [Hongxu Jia <hongxu.jia windriver.com>] *) Avoid an overflow on 32 bit platforms. [René Hjortskov Nielsen <r... hjortskov.dk>] *) Use AC_CHECK_SIZEOF, so as to support cross compiling. PR 56053. [Mike Frysinger <vapier gentoo.org>] *) Add --tag=CC to libtool invocations. PR 62640. [Michael Osipov] *) apr_pools: Fix pool debugging output so that creation events are always emitted before allocation events and subpool destruction events are emitted on pool clear/destroy for proper accounting. [Brane Čibej] *) apr_socket_listen: Allow larger listen backlog values on Windows 8+. [Evgeny Kotkov <evgeny.kotkov visualsvn.com>] *) Fixed: apr_get_oslevel() was returning APR_WIN_XP on Windows 10 *) Fix attempt to free invalid memory on exit when apr_app is used on Windows. [Ivan Zhakov] *) Fix double free on exit when apr_app is used on Windows. [Ivan Zhakov] *) Fix a regression in apr_stat() for root path on Windows. [Ivan Zhakov] Dropped patches have all been merged, addressed separately or are backports. (From OE-Core rev: 013633b9f4b7dff2616c6d2e59e4d8118e3ce51f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3ffae93f24bb1e3954b232099153fd059cfd7daf) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit a308e10ef4ad9e097b025f009866eae178259781) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch20
-rw-r--r--meta/recipes-support/apr/apr/0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch52
-rw-r--r--meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch26
-rw-r--r--meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch25
-rw-r--r--meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch63
-rw-r--r--meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch76
-rw-r--r--meta/recipes-support/apr/apr/CVE-2021-35940.patch58
-rw-r--r--meta/recipes-support/apr/apr/autoconf270.patch22
-rw-r--r--meta/recipes-support/apr/apr/libtoolize_check.patch21
-rw-r--r--meta/recipes-support/apr/apr_1.7.2.bb (renamed from meta/recipes-support/apr/apr_1.7.0.bb)8
10 files changed, 51 insertions, 320 deletions
diff --git a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
index abff4e9331..a274f3a16e 100644
--- a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
+++ b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
@@ -1,14 +1,15 @@
1From 2bbe20b4f69e84e7a18bc79d382486953f479328 Mon Sep 17 00:00:00 2001 1From 225abf37cd0b49960664b59f08e515a4c4ea5ad0 Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com> 2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Thu, 26 Mar 2020 18:30:36 +0000 3Date: Thu, 26 Mar 2020 18:30:36 +0000
4Subject: [PATCH] Add option to disable timed dependant tests 4Subject: [PATCH] Add option to disable timed dependant tests
5 5
6The disabled tests rely on timing to pass correctly. On a virtualized 6The disabled tests rely on timing to pass correctly. On a virtualized
7system under heavy load, these tests randomly fail because they miss 7system under heavy load, these tests randomly fail because they miss
8a timer or other timing related issues. 8a timer or other timing related issues.
9 9
10Upstream-Status: Pending 10Upstream-Status: Pending
11Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> 11Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
12
12--- 13---
13 configure.in | 6 ++++++ 14 configure.in | 6 ++++++
14 include/apr.h.in | 1 + 15 include/apr.h.in | 1 +
@@ -16,10 +17,10 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
16 3 files changed, 9 insertions(+), 2 deletions(-) 17 3 files changed, 9 insertions(+), 2 deletions(-)
17 18
18diff --git a/configure.in b/configure.in 19diff --git a/configure.in b/configure.in
19index d9f32d6..f0c5661 100644 20index bfd488b..3663220 100644
20--- a/configure.in 21--- a/configure.in
21+++ b/configure.in 22+++ b/configure.in
22@@ -2886,6 +2886,12 @@ AC_ARG_ENABLE(timedlocks, 23@@ -3023,6 +3023,12 @@ AC_ARG_ENABLE(timedlocks,
23 ) 24 )
24 AC_SUBST(apr_has_timedlocks) 25 AC_SUBST(apr_has_timedlocks)
25 26
@@ -45,10 +46,10 @@ index ee99def..c46a5f4 100644
45 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ 46 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
46 47
47diff --git a/test/testlock.c b/test/testlock.c 48diff --git a/test/testlock.c b/test/testlock.c
48index a43f477..6233d0b 100644 49index e3437c1..04e01b9 100644
49--- a/test/testlock.c 50--- a/test/testlock.c
50+++ b/test/testlock.c 51+++ b/test/testlock.c
51@@ -396,13 +396,13 @@ abts_suite *testlock(abts_suite *suite) 52@@ -535,7 +535,7 @@ abts_suite *testlock(abts_suite *suite)
52 abts_run_test(suite, threads_not_impl, NULL); 53 abts_run_test(suite, threads_not_impl, NULL);
53 #else 54 #else
54 abts_run_test(suite, test_thread_mutex, NULL); 55 abts_run_test(suite, test_thread_mutex, NULL);
@@ -56,6 +57,8 @@ index a43f477..6233d0b 100644
56+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS 57+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
57 abts_run_test(suite, test_thread_timedmutex, NULL); 58 abts_run_test(suite, test_thread_timedmutex, NULL);
58 #endif 59 #endif
60 abts_run_test(suite, test_thread_nestedmutex, NULL);
61@@ -543,7 +543,7 @@ abts_suite *testlock(abts_suite *suite)
59 abts_run_test(suite, test_thread_rwlock, NULL); 62 abts_run_test(suite, test_thread_rwlock, NULL);
60 abts_run_test(suite, test_cond, NULL); 63 abts_run_test(suite, test_cond, NULL);
61 abts_run_test(suite, test_timeoutcond, NULL); 64 abts_run_test(suite, test_timeoutcond, NULL);
@@ -63,7 +66,4 @@ index a43f477..6233d0b 100644
63+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS 66+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
64 abts_run_test(suite, test_timeoutmutex, NULL); 67 abts_run_test(suite, test_timeoutmutex, NULL);
65 #endif 68 #endif
66 #endif 69 #ifdef WIN32
67--
682.23.0
69
diff --git a/meta/recipes-support/apr/apr/0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch b/meta/recipes-support/apr/apr/0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch
deleted file mode 100644
index d0a9bd9129..0000000000
--- a/meta/recipes-support/apr/apr/0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 8ca3c3306f1a149e51a3be6a4b1e47e9aee88262 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 23 Aug 2022 22:42:03 -0700
4Subject: [PATCH] add AC_CACHE_CHECK for strerror_r return type
5
6APR's configure script uses AC_TRY_RUN to detect whether the return type
7of strerror_r is int. When cross-compiling this defaults to no.
8
9This commit adds an AC_CACHE_CHECK so users who cross-compile APR may
10influence the outcome with a configure variable.
11
12Upstream-Status: Backport [https://svn.apache.org/viewvc?view=revision&revision=1875065]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 build/apr_common.m4 | 11 ++++-------
16 1 file changed, 4 insertions(+), 7 deletions(-)
17
18diff --git a/build/apr_common.m4 b/build/apr_common.m4
19index cbf2a4c..42e75cf 100644
20--- a/build/apr_common.m4
21+++ b/build/apr_common.m4
22@@ -525,8 +525,9 @@ dnl string.
23 dnl
24 dnl
25 AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
26-AC_MSG_CHECKING(for type of return code from strerror_r)
27-AC_TRY_RUN([
28+AC_CACHE_CHECK([whether return code from strerror_r has type int],
29+[ac_cv_strerror_r_rc_int],
30+[AC_TRY_RUN([
31 #include <errno.h>
32 #include <string.h>
33 #include <stdio.h>
34@@ -542,14 +543,10 @@ main()
35 }], [
36 ac_cv_strerror_r_rc_int=yes ], [
37 ac_cv_strerror_r_rc_int=no ], [
38- ac_cv_strerror_r_rc_int=no ] )
39+ ac_cv_strerror_r_rc_int=no ] ) ] )
40 if test "x$ac_cv_strerror_r_rc_int" = xyes; then
41 AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
42- msg="int"
43-else
44- msg="pointer"
45 fi
46-AC_MSG_RESULT([$msg])
47 ] )
48
49 dnl
50--
512.37.2
52
diff --git a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
index fa6202da79..a78b16284f 100644
--- a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
+++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
@@ -1,4 +1,4 @@
1From ee728971fd9d2da39356f1574d58d5daa3b24520 Mon Sep 17 00:00:00 2001 1From 316b81c462f065927d7fec56aadd5c8cb94d1cf0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 26 Aug 2022 00:28:08 -0700 3Date: Fri, 26 Aug 2022 00:28:08 -0700
4Subject: [PATCH] configure: Remove runtime test for mmap that can map 4Subject: [PATCH] configure: Remove runtime test for mmap that can map
@@ -10,24 +10,25 @@ mutexes
10 10
11Upstream-Status: Inappropriate [Cross-compile specific] 11Upstream-Status: Inappropriate [Cross-compile specific]
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
13--- 14---
14 configure.in | 32 -------------------------------- 15 configure.in | 30 ------------------------------
15 1 file changed, 32 deletions(-) 16 1 file changed, 30 deletions(-)
16 17
17diff --git a/configure.in b/configure.in 18diff --git a/configure.in b/configure.in
18index a99049d..f1f55c7 100644 19index 3663220..dce9789 100644
19--- a/configure.in 20--- a/configure.in
20+++ b/configure.in 21+++ b/configure.in
21@@ -1182,38 +1182,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \ 22@@ -1303,36 +1303,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
22 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) 23 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
23 AC_CHECK_FILE(/dev/zero) 24 AC_CHECK_FILE(/dev/zero)
24 25
25-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that. 26-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
26-if test "$ac_cv_func_mmap" = "yes" && 27-if test "$ac_cv_func_mmap" = "yes" &&
27- test "$ac_cv_file__dev_zero" = "yes"; then 28- test "$ac_cv_file__dev_zero" = "yes"; then
28- AC_MSG_CHECKING(for mmap that can map /dev/zero) 29- AC_CACHE_CHECK([for mmap that can map /dev/zero],
29- AC_TRY_RUN([ 30- [ac_cv_mmap__dev_zero],
30-#include <sys/types.h> 31- [AC_TRY_RUN([#include <sys/types.h>
31-#include <sys/stat.h> 32-#include <sys/stat.h>
32-#include <fcntl.h> 33-#include <fcntl.h>
33-#ifdef HAVE_SYS_MMAN_H 34-#ifdef HAVE_SYS_MMAN_H
@@ -49,14 +50,9 @@ index a99049d..f1f55c7 100644
49- return 3; 50- return 3;
50- } 51- }
51- return 0; 52- return 0;
52- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no]) 53- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
53-
54- AC_MSG_RESULT($ac_cv_file__dev_zero)
55-fi 54-fi
56- 55-
57 # Now we determine which one is our anonymous shmem preference. 56 # Now we determine which one is our anonymous shmem preference.
58 haveshmgetanon="0" 57 haveshmgetanon="0"
59 havemmapzero="0" 58 havemmapzero="0"
60--
612.37.2
62
diff --git a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
index 72e706f966..d63423f3a1 100644
--- a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
+++ b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -1,8 +1,7 @@
1From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001 1From 689a8db96a6d1e1cae9cbfb35d05ac82140a6555 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 30 Jan 2018 09:39:06 +0800 3Date: Tue, 30 Jan 2018 09:39:06 +0800
4Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr 4Subject: [PATCH] apr: Remove workdir path references from installed apr files
5 files
6 5
7Upstream-Status: Inappropriate [configuration] 6Upstream-Status: Inappropriate [configuration]
8 7
@@ -14,20 +13,23 @@ packages at target run time, the workdir path caused confusion.
14Rebase to 1.6.3 13Rebase to 1.6.3
15 14
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16
17--- 17---
18 apr-config.in | 26 ++------------------------ 18 apr-config.in | 32 ++------------------------------
19 1 file changed, 2 insertions(+), 24 deletions(-) 19 1 file changed, 2 insertions(+), 30 deletions(-)
20 20
21diff --git a/apr-config.in b/apr-config.in 21diff --git a/apr-config.in b/apr-config.in
22index 84b4073..bbbf651 100644 22index bed47ca..47874e5 100644
23--- a/apr-config.in 23--- a/apr-config.in
24+++ b/apr-config.in 24+++ b/apr-config.in
25@@ -152,14 +152,7 @@ while test $# -gt 0; do 25@@ -164,16 +164,7 @@ while test $# -gt 0; do
26 flags="$flags $LDFLAGS" 26 flags="$flags $LDFLAGS"
27 ;; 27 ;;
28 --includes) 28 --includes)
29- if test "$location" = "installed"; then 29- if test "$location" = "installed"; then
30 flags="$flags -I$includedir $EXTRA_INCLUDES" 30 flags="$flags -I$includedir $EXTRA_INCLUDES"
31- elif test "$location" = "crosscompile"; then
32- flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES"
31- elif test "$location" = "source"; then 33- elif test "$location" = "source"; then
32- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" 34- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
33- else 35- else
@@ -37,13 +39,15 @@ index 84b4073..bbbf651 100644
37 ;; 39 ;;
38 --srcdir) 40 --srcdir)
39 echo $APR_SOURCE_DIR 41 echo $APR_SOURCE_DIR
40@@ -181,29 +174,14 @@ while test $# -gt 0; do 42@@ -197,33 +188,14 @@ while test $# -gt 0; do
41 exit 0 43 exit 0
42 ;; 44 ;;
43 --link-ld) 45 --link-ld)
44- if test "$location" = "installed"; then 46- if test "$location" = "installed"; then
45- ### avoid using -L if libdir is a "standard" location like /usr/lib 47- ### avoid using -L if libdir is a "standard" location like /usr/lib
46- flags="$flags -L$libdir -l${APR_LIBNAME}" 48- flags="$flags -L$libdir -l${APR_LIBNAME}"
49- elif test "$location" = "crosscompile"; then
50- flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}"
47- else 51- else
48- ### this surely can't work since the library is in .libs? 52- ### this surely can't work since the library is in .libs?
49- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" 53- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
@@ -62,6 +66,8 @@ index 84b4073..bbbf651 100644
62- # Since the user is specifying they are linking with libtool, we 66- # Since the user is specifying they are linking with libtool, we
63- # *know* that -R will be recognized by libtool. 67- # *know* that -R will be recognized by libtool.
64- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" 68- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
69- elif test "$location" = "crosscompile"; then
70- flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}"
65- else 71- else
66- flags="$flags $LA_FILE" 72- flags="$flags $LA_FILE"
67- fi 73- fi
@@ -69,6 +75,3 @@ index 84b4073..bbbf651 100644
69 ;; 75 ;;
70 --shlib-path-var) 76 --shlib-path-var)
71 echo "$SHLIBPATH_VAR" 77 echo "$SHLIBPATH_VAR"
72--
731.8.3.1
74
diff --git a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
deleted file mode 100644
index 4dd53bd8eb..0000000000
--- a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 2 Feb 2018 15:51:42 +0800
4Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
5
6While cross compiling, the tools/gen_test_char could not
7be executed at build time, use AX_PROG_CC_FOR_BUILD to
8build native tools/gen_test_char
9
10Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 Makefile.in | 10 +++-------
15 configure.in | 3 +++
16 2 files changed, 6 insertions(+), 7 deletions(-)
17
18diff --git a/Makefile.in b/Makefile.in
19index 5fb760e..8675f90 100644
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
23
24 CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
25 build/apr_rules.out tools/gen_test_char@EXEEXT@ \
26- tools/gen_test_char.o tools/gen_test_char.lo \
27+ tools/gen_test_char.o \
28 include/private/apr_escape_test_char.h
29 DISTCLEAN_TARGETS = config.cache config.log config.status \
30 include/apr.h include/arch/unix/apr_private.h \
31@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
32 etags:
33 etags `find . -name '*.[ch]'`
34
35-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
36-tools/gen_test_char.lo: tools/gen_test_char.c
37+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
38 $(APR_MKDIR) tools
39- $(LT_COMPILE)
40-
41-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
42- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
43+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
44
45 include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
46 $(APR_MKDIR) include/private
47diff --git a/configure.in b/configure.in
48index 719f331..361120f 100644
49--- a/configure.in
50+++ b/configure.in
51@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
52 dnl preload section from invoking the macro to get compiler info.
53 AC_PROG_CC
54
55+dnl Check build CC for gen_test_char compiling which is executed at build time.
56+AX_PROG_CC_FOR_BUILD
57+
58 dnl AC_PROG_SED is only avaliable in recent autoconf versions.
59 dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
60 ifdef([AC_PROG_SED],
61--
621.8.3.1
63
diff --git a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
deleted file mode 100644
index d1a2ebe881..0000000000
--- a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 14 Dec 2016 18:13:08 +0800
4Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
5 compiling
6
7In configure.in, it contains the following:
8
9 APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
10
11the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
12it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
13compiling enable.
14
15So it was hardcoded for cross compiling, we should detect it dynamic based on
16the sysroot's glibc. We change it to the following:
17
18 AC_CHECK_SIZEOF(off_t)
19
20The same for the following hardcoded types for cross compiling:
21
22 pid_t 8
23 ssize_t 8
24 size_t 8
25 off_t 8
26
27Change the above correspondingly.
28
29Signed-off-by: Dengke Du <dengke.du@windriver.com>
30
31Upstream-Status: Pending
32
33---
34 configure.in | 8 ++++----
35 1 file changed, 4 insertions(+), 4 deletions(-)
36
37diff --git a/configure.in b/configure.in
38index 27b8539..fb408d1 100644
39--- a/configure.in
40+++ b/configure.in
41@@ -1801,7 +1801,7 @@ else
42 socklen_t_value="int"
43 fi
44
45-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
46+AC_CHECK_SIZEOF(pid_t)
47
48 if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
49 pid_t_fmt='#define APR_PID_T_FMT "hd"'
50@@ -1873,7 +1873,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [
51 APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
52 ])
53
54-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
55+AC_CHECK_SIZEOF(ssize_t)
56
57 dnl the else cases below should no longer occur;
58 AC_MSG_CHECKING([which format to use for apr_ssize_t])
59@@ -1891,7 +1891,7 @@ fi
60
61 ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
62
63-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
64+AC_CHECK_SIZEOF(size_t)
65
66 # else cases below should no longer occur;
67 AC_MSG_CHECKING([which format to use for apr_size_t])
68@@ -1909,7 +1909,7 @@ fi
69
70 size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
71
72-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
73+AC_CHECK_SIZEOF(off_t)
74
75 if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
76 # Enable LFS
diff --git a/meta/recipes-support/apr/apr/CVE-2021-35940.patch b/meta/recipes-support/apr/apr/CVE-2021-35940.patch
deleted file mode 100644
index 00befdacee..0000000000
--- a/meta/recipes-support/apr/apr/CVE-2021-35940.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1
2SECURITY: CVE-2021-35940 (cve.mitre.org)
3
4Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though
5was addressed in 1.6.x in 1.6.3 and later via r1807976.
6
7The fix was merged back to 1.7.x in r1891198.
8
9Since this was a regression in 1.7.0, a new CVE name has been assigned
10to track this, CVE-2021-35940.
11
12Thanks to Iveta Cesalova <icesalov redhat.com> for reporting this issue.
13
14https://svn.apache.org/viewvc?view=revision&revision=1891198
15
16Upstream-Status: Backport
17CVE: CVE-2021-35940
18Signed-off-by: Armin Kuster <akuster@mvista.com>
19
20
21Index: time/unix/time.c
22===================================================================
23--- a/time/unix/time.c (revision 1891197)
24+++ b/time/unix/time.c (revision 1891198)
25@@ -142,6 +142,9 @@
26 static const int dayoffset[12] =
27 {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
28
29+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
30+ return APR_EBADDATE;
31+
32 /* shift new year to 1st March in order to make leap year calc easy */
33
34 if (xt->tm_mon < 2)
35Index: time/win32/time.c
36===================================================================
37--- a/time/win32/time.c (revision 1891197)
38+++ b/time/win32/time.c (revision 1891198)
39@@ -54,6 +54,9 @@
40 static const int dayoffset[12] =
41 {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
42
43+ if (tm->wMonth < 1 || tm->wMonth > 12)
44+ return APR_EBADDATE;
45+
46 /* Note; the caller is responsible for filling in detailed tm_usec,
47 * tm_gmtoff and tm_isdst data when applicable.
48 */
49@@ -228,6 +231,9 @@
50 static const int dayoffset[12] =
51 {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
52
53+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
54+ return APR_EBADDATE;
55+
56 /* shift new year to 1st March in order to make leap year calc easy */
57
58 if (xt->tm_mon < 2)
diff --git a/meta/recipes-support/apr/apr/autoconf270.patch b/meta/recipes-support/apr/apr/autoconf270.patch
deleted file mode 100644
index 9f7b5c624c..0000000000
--- a/meta/recipes-support/apr/apr/autoconf270.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1With autoconf 2.70 confdefs.h is already included. Including it twice generates
2compiler warnings and since this macros is to error on warnings, it breaks.
3
4Fix by not including the file.
5
6Upstream-Status: Pending
7RP - 2021/1/28
8
9Index: apr-1.7.0/build/apr_common.m4
10===================================================================
11--- apr-1.7.0.orig/build/apr_common.m4
12+++ apr-1.7.0/build/apr_common.m4
13@@ -505,8 +505,7 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
14 fi
15 AC_COMPILE_IFELSE(
16 [AC_LANG_SOURCE(
17- [#include "confdefs.h"
18- ]
19+ []
20 [[$1]]
21 [int main(int argc, const char *const *argv) {]
22 [[$2]]
diff --git a/meta/recipes-support/apr/apr/libtoolize_check.patch b/meta/recipes-support/apr/apr/libtoolize_check.patch
index 740792e6b0..80ce43caa4 100644
--- a/meta/recipes-support/apr/apr/libtoolize_check.patch
+++ b/meta/recipes-support/apr/apr/libtoolize_check.patch
@@ -1,6 +1,7 @@
1From 17835709bc55657b7af1f7c99b3f572b819cf97e Mon Sep 17 00:00:00 2001
1From: Helmut Grohne <helmut@subdivi.de> 2From: Helmut Grohne <helmut@subdivi.de>
2Subject: check for libtoolize rather than libtool 3Date: Tue, 7 Feb 2023 07:04:00 +0000
3Last-Update: 2014-09-19 4Subject: [PATCH] check for libtoolize rather than libtool
4 5
5libtool is now in package libtool-bin, but apr only needs libtoolize. 6libtool is now in package libtool-bin, but apr only needs libtoolize.
6 7
@@ -8,14 +9,22 @@ Upstream-Status: Pending [ from debian: https://sources.debian.org/data/main/a/a
8 9
9Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
10 11
11--- apr.orig/build/buildcheck.sh 12---
12+++ apr/build/buildcheck.sh 13 build/buildcheck.sh | 10 ++++------
13@@ -39,11 +39,11 @@ fi 14 1 file changed, 4 insertions(+), 6 deletions(-)
15
16diff --git a/build/buildcheck.sh b/build/buildcheck.sh
17index 44921b5..08bc8a8 100755
18--- a/build/buildcheck.sh
19+++ b/build/buildcheck.sh
20@@ -39,13 +39,11 @@ fi
14 # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a 21 # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
15 # output is multiline from 1.5 onwards 22 # output is multiline from 1.5 onwards
16 23
17-# Require libtool 1.4 or newer 24-# Require libtool 1.4 or newer
18-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` 25-if test -z "$libtool"; then
26- libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
27-fi
19-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` 28-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
20+# Require libtoolize 1.4 or newer 29+# Require libtoolize 1.4 or newer
21+libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14` 30+libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14`
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.2.bb
index 5e62e5683f..807dce21da 100644
--- a/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/meta/recipes-support/apr/apr_1.7.2.bb
@@ -16,21 +16,15 @@ BBCLASSEXTEND = "native nativesdk"
16SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ 16SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
17 file://run-ptest \ 17 file://run-ptest \
18 file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \ 18 file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
19 file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
20 file://0004-Fix-packet-discards-HTTP-redirect.patch \ 19 file://0004-Fix-packet-discards-HTTP-redirect.patch \
21 file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \ 20 file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
22 file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
23 file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \ 21 file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
24 file://libtoolize_check.patch \ 22 file://libtoolize_check.patch \
25 file://0001-Add-option-to-disable-timed-dependant-tests.patch \ 23 file://0001-Add-option-to-disable-timed-dependant-tests.patch \
26 file://autoconf270.patch \
27 file://0001-add-AC_CACHE_CHECK-for-strerror_r-return-type.patch \
28 file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \ 24 file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \
29 file://CVE-2021-35940.patch \
30 " 25 "
31 26
32SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" 27SRC_URI[sha256sum] = "75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e"
33SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea"
34 28
35inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script 29inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script
36 30