format patches

This commit is contained in:
zhouganqing 2023-01-16 15:55:45 +08:00
parent d65dbd0880
commit d79f8cdb96
16 changed files with 200 additions and 98 deletions

View File

@ -1,19 +1,29 @@
Description: SECURITY: CVE-2021-35940 (cve.mitre.org)
Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though
was addressed in 1.6.x in 1.6.3 and later via r1807976.
.
The fix was merged back to 1.7.x in r1891198.
.
Since this was a regression in 1.7.0, a new CVE name has been assigned
to track this, CVE-2021-35940.
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:45 +0800
Subject: SECURITY: CVE-2021-35940 (cve.mitre.org)
Origin: upstream, https://svn.apache.org/viewvc?view=revision&revision=1891198
Bug-Debian: https://bugs.debian.org/992789
Forwarded: not-needed
Last-Update: 2021-08-20
Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though
was addressed in 1.6.x in 1.6.3 and later via r1807976.
The fix was merged back to 1.7.x in r1891198.
Since this was a regression in 1.7.0, a new CVE name has been assigned
to track this, CVE-2021-35940.
---
time/unix/time.c | 3 +++
time/win32/time.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/time/unix/time.c b/time/unix/time.c
index dfa45e6..7f09581 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -142,6 +142,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_g
@@ -142,6 +142,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)
static const int dayoffset[12] =
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
@ -23,9 +33,11 @@ Last-Update: 2021-08-20
/* shift new year to 1st March in order to make leap year calc easy */
if (xt->tm_mon < 2)
diff --git a/time/win32/time.c b/time/win32/time.c
index 81dc2a4..eb1e6f1 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -54,6 +54,9 @@ static void SystemTimeToAprExpTime(apr_t
@@ -54,6 +54,9 @@ static void SystemTimeToAprExpTime(apr_time_exp_t *xt, SYSTEMTIME *tm)
static const int dayoffset[12] =
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
@ -35,7 +47,7 @@ Last-Update: 2021-08-20
/* Note; the caller is responsible for filling in detailed tm_usec,
* tm_gmtoff and tm_isdst data when applicable.
*/
@@ -228,6 +231,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_g
@@ -228,6 +231,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t,
static const int dayoffset[12] =
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};

View File

@ -1,6 +1,7 @@
From: Yann Ylavic <ylavic@apache.org>
Date: Sat, 6 Mar 2021 22:20:59 +0000
Subject: build/apr_common.m4: avoid explicit inclusion of "confdefs.h"
Origin: https://github.com/apache/apr/commit/0a763c5e500f4304b7c534fae0fad430d64982e8
The failure is observed on `autoconf-2.69d` (soon to be released
@ -42,10 +43,10 @@ git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887279 13f79535-47bb
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index 3dfe85542b76..67d004983d2b 100644
index f4e2dfd..6f5782e 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -467,13 +467,9 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
@@ -504,13 +504,9 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
CFLAGS="$CFLAGS -Werror"
fi
AC_COMPILE_IFELSE(
@ -61,6 +62,3 @@ index 3dfe85542b76..67d004983d2b 100644
)], [CFLAGS=$apr_save_CFLAGS
$3], [CFLAGS=$apr_save_CFLAGS
$4])
--
2.33.0

View File

@ -1,8 +1,15 @@
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: compile gen_test_char with the build architecture compiler
--- apr.orig/Makefile.in
+++ apr/Makefile.in
---
Makefile.in | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 9814afc..c767066 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,6 +8,7 @@ top_blddir=@apr_builddir@
# APR (Apache Portable Runtime) library Makefile.
#

View File

@ -1,10 +1,23 @@
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: debug_testpoll_failure
# reproducible.debian.net gave strange test error on build:
# testpoll : Line 876: apr_pollcb_poll() didn't sleep
# reproducible.debian.net gave strange test error on build:
# testpoll : Line 876: apr_pollcb_poll() didn't sleep
# FAILED 1 of 23
# add some debug output
--- apr.orig/test/testpoll.c
+++ apr/test/testpoll.c
@@ -908,6 +908,9 @@ static void justsleep(abts_case *tc, voi
---
test/testpoll.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/testpoll.c b/test/testpoll.c
index 9f90af2..f44c8a5 100644
--- a/test/testpoll.c
+++ b/test/testpoll.c
@@ -908,6 +908,9 @@ static void justsleep(abts_case *tc, void *data)
rv = apr_pollcb_poll(pollcb, apr_time_from_msec(200), NULL, NULL);
t2 = apr_time_now();
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));

View File

@ -1,7 +1,17 @@
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: dont_override_external_buildflags
# Don't force apr-using projects to use the compile flags used during
# apr's compilation.
--- apr.orig/build/apr_rules.mk.in
+++ apr/build/apr_rules.mk.in
---
build/apr_rules.mk.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build/apr_rules.mk.in b/build/apr_rules.mk.in
index ac376d6..97b50b8 100644
--- a/build/apr_rules.mk.in
+++ b/build/apr_rules.mk.in
@@ -41,10 +41,10 @@ LIBTOOL=@LIBTOOL@
# compilation and linking flags that are supposed to be set only by the user.
# configure adds to them for tests, but we restore them at the end.

View File

@ -1,15 +1,16 @@
From: <tfheen@debian.org>
From: "tfheen@debian.org" <tfheen@debian.org>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: No description.
---
apr.pc.in | 5 +++--
apr.pc.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: apr/apr.pc.in
===================================================================
--- apr.orig/apr.pc.in
+++ apr/apr.pc.in
@@ -7,5 +7,6 @@
diff --git a/apr.pc.in b/apr.pc.in
index 318a81e..5623793 100644
--- a/apr.pc.in
+++ b/apr.pc.in
@@ -7,5 +7,6 @@ includedir=@includedir@
Name: APR
Description: The Apache Portable Runtime library
Version: @APR_DOTTED_VERSION@

View File

@ -1,15 +1,16 @@
From: <tfheen@debian.org>
From: "tfheen@debian.org" <tfheen@debian.org>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: No description.
---
apr-config.in | 8 ++------
apr-config.in | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
Index: apr/apr-config.in
===================================================================
--- apr.orig/apr-config.in
+++ apr/apr-config.in
@@ -39,7 +39,7 @@
diff --git a/apr-config.in b/apr-config.in
index 84b4073..132d98b 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -39,7 +39,7 @@ LDFLAGS="@EXTRA_LDFLAGS@"
LIBS="@EXTRA_LIBS@"
EXTRA_INCLUDES="@EXTRA_INCLUDES@"
SHLIBPATH_VAR="@shlibpath_var@"
@ -18,7 +19,7 @@ Index: apr/apr-config.in
APR_BUILD_DIR="@apr_builddir@"
APR_SO_EXT="@so_ext@"
APR_LIB_TARGET="@export_lib_target@"
@@ -223,11 +223,7 @@
@@ -223,11 +223,7 @@ while test $# -gt 0; do
exit 0
;;
--apr-libtool)

View File

@ -1,13 +1,17 @@
From: Stefan Fritsch <sf@debian.org>
Subject: Fix generation of docs for out-of-tree builds and newer doxygen versions
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: Fix generation of docs for out-of-tree builds and newer doxygen
versions
---
docs/doxygen.conf | 2 +-
include/apr.h.in | 24 ++++++++++++------------
docs/doxygen.conf | 2 +-
include/apr.h.in | 24 ++++++++++++------------
2 files changed, 13 insertions(+), 13 deletions(-)
--- apr.orig/docs/doxygen.conf
+++ apr/docs/doxygen.conf
diff --git a/docs/doxygen.conf b/docs/doxygen.conf
index 29c2cbf..b6629ae 100644
--- a/docs/doxygen.conf
+++ b/docs/doxygen.conf
@@ -1,6 +1,6 @@
PROJECT_NAME="Apache Portable Runtime"
@ -16,9 +20,11 @@ Subject: Fix generation of docs for out-of-tree builds and newer doxygen version
QUIET=YES
RECURSIVE=YES
FILE_PATTERNS=*.h
--- apr.orig/include/apr.h.in
+++ apr/include/apr.h.in
@@ -464,11 +464,11 @@ typedef apr_uint32_t apr_uin
diff --git a/include/apr.h.in b/include/apr.h.in
index 0712443..10579a0 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -464,11 +464,11 @@ typedef apr_uint32_t apr_uintptr_t;
/**
* Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
* so that they follow the platform's calling convention.
@ -34,7 +40,7 @@ Subject: Fix generation of docs for out-of-tree builds and newer doxygen version
*/
#define APR_THREAD_FUNC @apr_thread_func@
@@ -502,11 +502,11 @@ typedef apr_uint32_t apr_uin
@@ -502,11 +502,11 @@ typedef apr_uint32_t apr_uintptr_t;
* APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
* @see APR_DECLARE @see APR_DECLARE_DATA
* @remark Both the declaration and implementations must use the same macro.
@ -50,7 +56,7 @@ Subject: Fix generation of docs for out-of-tree builds and newer doxygen version
*/
#define APR_DECLARE_NONSTD(type) type
@@ -517,12 +517,12 @@ typedef apr_uint32_t apr_uin
@@ -517,12 +517,12 @@ typedef apr_uint32_t apr_uintptr_t;
* @remark Note that the declaration and implementations use different forms,
* but both must include the macro.
*

View File

@ -1,37 +1,20 @@
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: generic-64bit-atomics
# quick and dirty fix for FTBFS on mipsel
# There should be a proper configure check, see
# https://bz.apache.org/bugzilla/show_bug.cgi?id=63566
Index: apr-1.7.0/include/arch/unix/apr_arch_atomic.h
===================================================================
--- apr-1.7.0.orig/include/arch/unix/apr_arch_atomic.h
+++ apr-1.7.0/include/arch/unix/apr_arch_atomic.h
@@ -26,6 +26,9 @@
/* noop */
#elif HAVE_ATOMIC_BUILTINS
# define USE_ATOMICS_BUILTINS
+# if (__INTPTR_WIDTH__ == 32) && ( defined(__MIPSEL__) || defined(__powerpc__) ) || defined(__m68k__) || defined(__sh__)
+# define NEED_ATOMICS_GENERIC64
+# endif
#elif defined(SOLARIS2) && SOLARIS2 >= 10
# define USE_ATOMICS_SOLARIS
# define NEED_ATOMICS_GENERIC64
Index: apr-1.7.0/atomic/unix/builtins64.c
===================================================================
--- apr-1.7.0.orig/atomic/unix/builtins64.c
+++ apr-1.7.0/atomic/unix/builtins64.c
@@ -16,7 +16,7 @@
#include "apr_arch_atomic.h"
-#ifdef USE_ATOMICS_BUILTINS
+#if defined(USE_ATOMICS_BUILTINS) && ! defined(NEED_ATOMICS_GENERIC64)
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
{
Index: apr-1.7.0/atomic/unix/builtins.c
===================================================================
--- apr-1.7.0.orig/atomic/unix/builtins.c
+++ apr-1.7.0/atomic/unix/builtins.c
---
atomic/unix/builtins.c | 4 ++++
atomic/unix/builtins64.c | 2 +-
include/arch/unix/apr_arch_atomic.h | 3 +++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/atomic/unix/builtins.c b/atomic/unix/builtins.c
index 745acf1..df7574e 100644
--- a/atomic/unix/builtins.c
+++ b/atomic/unix/builtins.c
@@ -20,7 +20,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
@ -44,3 +27,30 @@ Index: apr-1.7.0/atomic/unix/builtins.c
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
diff --git a/atomic/unix/builtins64.c b/atomic/unix/builtins64.c
index 4a4b685..3dc5e09 100644
--- a/atomic/unix/builtins64.c
+++ b/atomic/unix/builtins64.c
@@ -16,7 +16,7 @@
#include "apr_arch_atomic.h"
-#ifdef USE_ATOMICS_BUILTINS
+#if defined(USE_ATOMICS_BUILTINS) && ! defined(NEED_ATOMICS_GENERIC64)
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
{
diff --git a/include/arch/unix/apr_arch_atomic.h b/include/arch/unix/apr_arch_atomic.h
index 559257d..c07d525 100644
--- a/include/arch/unix/apr_arch_atomic.h
+++ b/include/arch/unix/apr_arch_atomic.h
@@ -26,6 +26,9 @@
/* noop */
#elif HAVE_ATOMIC_BUILTINS
# define USE_ATOMICS_BUILTINS
+# if (__INTPTR_WIDTH__ == 32) && ( defined(__MIPSEL__) || defined(__powerpc__) ) || defined(__m68k__) || defined(__sh__)
+# define NEED_ATOMICS_GENERIC64
+# endif
#elif defined(SOLARIS2) && SOLARIS2 >= 10
# define USE_ATOMICS_SOLARIS
# define NEED_ATOMICS_GENERIC64

View File

@ -1,12 +1,15 @@
From: Stefan Fritsch <sf@debian.org>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: #349418
---
include/apr.h.in | 3 ++-
include/apr.h.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- apr.orig/include/apr.h.in
+++ apr/include/apr.h.in
diff --git a/include/apr.h.in b/include/apr.h.in
index ee99def..0712443 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -629,7 +629,8 @@ typedef int apr_wait_t;
#elif defined(_POSIX_PATH_MAX)
#define APR_PATH_MAX _POSIX_PATH_MAX

View File

@ -1,4 +1,7 @@
From: Pino Toscano <pino@debian.org>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: hurd_shm_flock
Bug: #656880
# * hurd_shm_flock.diff
@ -7,9 +10,14 @@ Bug: #656880
# This patch should stay Debian-specific, as it is not that suitable for
# upstream inclusion. (As you can guess, ideally all of those
# non-working methods should be ideally fixed in Hurd...)
---
configure.in | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
--- apr.orig/configure.in
+++ apr/configure.in
diff --git a/configure.in b/configure.in
index 6833b32..806206e 100644
--- a/configure.in
+++ b/configure.in
@@ -1253,6 +1253,13 @@ case $host in
APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET_ANON)
;;

View File

@ -1,11 +1,18 @@
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: check for libtoolize rather than libtool
Last-Update: 2014-09-19
libtool is now in package libtool-bin, but apr only needs libtoolize.
---
build/buildcheck.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- apr.orig/build/buildcheck.sh
+++ apr/build/buildcheck.sh
diff --git a/build/buildcheck.sh b/build/buildcheck.sh
index 76ff8ce..08bc8a8 100755
--- a/build/buildcheck.sh
+++ b/build/buildcheck.sh
@@ -39,11 +39,11 @@ fi
# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
# output is multiline from 1.5 onwards

View File

@ -1,12 +1,15 @@
From: Stefan Fritsch <sf@debian.org>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: #463399
---
apr-config.in | 2 +-
apr-config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- apr.orig/apr-config.in
+++ apr/apr-config.in
diff --git a/apr-config.in b/apr-config.in
index 132d98b..5908a10 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -36,7 +36,7 @@ SHELL="@SHELL@"
CPPFLAGS="@EXTRA_CPPFLAGS@"
CFLAGS="@EXTRA_CFLAGS@"

View File

@ -1,5 +1,15 @@
--- apr.orig/build/gen-build.py
+++ apr/build/gen-build.py
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: python3-hashbang
---
build/gen-build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/gen-build.py b/build/gen-build.py
index 53ca595..9d6bb40 100755
--- a/build/gen-build.py
+++ b/build/gen-build.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3

View File

@ -1,12 +1,15 @@
From: Tollef Fog Heen <tfheen@err.no>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: Install a set of random build files too
---
Makefile.in | 9 +++++++++
Makefile.in | 9 +++++++++
1 file changed, 9 insertions(+)
--- apr.orig/Makefile.in
+++ apr/Makefile.in
diff --git a/Makefile.in b/Makefile.in
index 7aeefd0..9814afc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -94,6 +94,15 @@ install: $(TARGETS)
done
$(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk

View File

@ -1,8 +1,18 @@
From: OpenKylin Developers <packaging@lists.openkylin.top>
Date: Mon, 16 Jan 2023 15:55:44 +0800
Subject: use_fcntl_locking
# use flock for apr_file_lock/_unlock()
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752872
--- apr.orig/file_io/unix/flock.c
+++ apr/file_io/unix/flock.c
@@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_lock(
---
file_io/unix/flock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/file_io/unix/flock.c b/file_io/unix/flock.c
index 01e8a63..a41e440 100644
--- a/file_io/unix/flock.c
+++ b/file_io/unix/flock.c
@@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
{
int rc;
@ -11,7 +21,7 @@
{
struct flock l = { 0 };
int fc;
@@ -86,7 +86,7 @@ APR_DECLARE(apr_status_t) apr_file_unloc
@@ -86,7 +86,7 @@ APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
{
int rc;