From 5b65c91b84857f20b0ff7fb7b28365d10d0af814 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 12 Sep 2024 07:00:21 +0200 Subject: Merging debian version 1.7.5-1. Signed-off-by: Daniel Baumann --- debian/patches/debug_testpoll_failure.patch | 6 +- debian/patches/fix-atomics-some-more.patch | 190 ---------------------------- debian/patches/fix-atomics.patch | 34 ++--- debian/patches/fix_doxygen.patch | 6 +- debian/patches/hurd_path_max.patch | 2 +- debian/patches/hurd_shm_flock.patch | 6 +- debian/patches/series | 1 - 7 files changed, 20 insertions(+), 225 deletions(-) delete mode 100644 debian/patches/fix-atomics-some-more.patch (limited to 'debian/patches') diff --git a/debian/patches/debug_testpoll_failure.patch b/debian/patches/debug_testpoll_failure.patch index 721e030..a555063 100644 --- a/debian/patches/debug_testpoll_failure.patch +++ b/debian/patches/debug_testpoll_failure.patch @@ -4,8 +4,8 @@ # add some debug output --- apr.orig/test/testpoll.c +++ apr/test/testpoll.c -@@ -908,6 +908,9 @@ static void justsleep(abts_case *tc, voi - rv = apr_pollcb_poll(pollcb, apr_time_from_msec(200), NULL, NULL); +@@ -924,6 +924,9 @@ static void justsleep(abts_case *tc, voi + rv = apr_pollcb_poll(pollcb, JUSTSLEEP_DELAY, NULL, NULL); t2 = apr_time_now(); ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv)); + if ((t2 - t1) <= apr_time_from_msec(100)) @@ -13,4 +13,4 @@ + i, (long)t1, (long)t2, rv); ABTS_ASSERT(tc, "apr_pollcb_poll() didn't sleep", - (t2 - t1) > apr_time_from_msec(100)); + JUSTSLEEP_ENOUGH(t1, t2)); diff --git a/debian/patches/fix-atomics-some-more.patch b/debian/patches/fix-atomics-some-more.patch deleted file mode 100644 index 786a9c3..0000000 --- a/debian/patches/fix-atomics-some-more.patch +++ /dev/null @@ -1,190 +0,0 @@ -# upstream trunk r1907541, r1907637, r1907642, r1907677, r1907678 ---- apr.orig/atomic/unix/mutex64.c -+++ apr/atomic/unix/mutex64.c -@@ -96,7 +96,14 @@ apr_status_t apr__atomic_generic64_init( - - APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) - { -- return *mem; -+ apr_uint64_t cur_value; -+ DECLARE_MUTEX_LOCKED(mutex, mem); -+ -+ cur_value = *mem; -+ -+ MUTEX_UNLOCK(mutex); -+ -+ return cur_value; - } - - APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val) ---- apr.orig/atomic/unix/builtins.c -+++ apr/atomic/unix/builtins.c -@@ -18,10 +18,11 @@ - - #ifdef USE_ATOMICS_BUILTINS - --#if defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) --#define WEAK_MEMORY_ORDERING 1 --#else -+#if defined(__i386__) || defined(__x86_64__) \ -+ || defined(__s390__) || defined(__s390x__) - #define WEAK_MEMORY_ORDERING 0 -+#else -+#define WEAK_MEMORY_ORDERING 1 - #endif - - APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) ---- apr.orig/atomic/unix/builtins64.c -+++ apr/atomic/unix/builtins64.c -@@ -18,17 +18,18 @@ - - #ifdef USE_ATOMICS_BUILTINS64 - --#if defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) --#define WEAK_MEMORY_ORDERING 1 --#else -+#if defined(__i386__) || defined(__x86_64__) \ -+ || defined(__s390__) || defined(__s390x__) - #define WEAK_MEMORY_ORDERING 0 -+#else -+#define WEAK_MEMORY_ORDERING 1 - #endif - - APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) - { - #if HAVE__ATOMIC_BUILTINS64 - return __atomic_load_n(mem, __ATOMIC_SEQ_CST); --#elif WEAK_MEMORY_ORDERING -+#elif WEAK_MEMORY_ORDERING || APR_SIZEOF_VOIDP < 8 - /* No __sync_load() available => apr_atomic_add64(mem, 0) */ - return __sync_fetch_and_add(mem, 0); - #else -@@ -40,7 +41,7 @@ APR_DECLARE(void) apr_atomic_set64(volat - { - #if HAVE__ATOMIC_BUILTINS64 - __atomic_store_n(mem, val, __ATOMIC_SEQ_CST); --#elif WEAK_MEMORY_ORDERING -+#elif WEAK_MEMORY_ORDERING || APR_SIZEOF_VOIDP < 8 - /* No __sync_store() available => apr_atomic_xchg64(mem, val) */ - __sync_synchronize(); - __sync_lock_test_and_set(mem, val); ---- apr.orig/configure.in -+++ apr/configure.in -@@ -552,31 +552,35 @@ AC_CACHE_CHECK([whether the compiler pro - [AC_TRY_RUN([ - #if HAVE_STDINT_H - #include -+typedef uint64_t u64_t; -+#else -+typedef unsigned long long u64_t; - #endif - int main(int argc, const char *const *argv) - { --#if HAVE_STDINT_H -- uint64_t val = 1010, tmp, *mem = &val; --#else -- unsigned long long val = 1010, tmp, *mem = &val; --#endif -+ struct { -+ char pad0; -+ u64_t val; -+ } s; -+ u64_t *mem = &s.val, tmp; - -- if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020) -+ s.val = 1010; -+ if (__sync_fetch_and_add(&s.val, 1010) != 1010 || s.val != 2020) - return 1; - -- tmp = val; -- if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010) -+ tmp = s.val; -+ if (__sync_fetch_and_sub(mem, 1010) != tmp || s.val != 1010) - return 1; - -- if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0) -+ if (__sync_sub_and_fetch(&s.val, 1010) != 0 || s.val != 0) - return 1; - - tmp = 3030; -- if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp) -+ if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || s.val != tmp) - return 1; - - __sync_synchronize(); -- if (__sync_lock_test_and_set(&val, 4040) != 3030) -+ if (__sync_lock_test_and_set(&s.val, 4040) != 3030) - return 1; - - return 0; -@@ -586,31 +590,45 @@ AC_CACHE_CHECK([whether the compiler pro - [AC_TRY_RUN([ - #if HAVE_STDINT_H - #include -+typedef uint64_t u64_t; -+#else -+typedef unsigned long long u64_t; - #endif -+static int test_always_lock_free(volatile u64_t *val) -+{ -+ return __atomic_always_lock_free(sizeof(*val), val); -+} - int main(int argc, const char *const *argv) - { --#if HAVE_STDINT_H -- uint64_t val = 1010, tmp, *mem = &val; --#else -- unsigned long long val = 1010, tmp, *mem = &val; --#endif -+ struct { -+ char pad0; -+ u64_t val; -+ char pad1; -+ u64_t tmp; -+ } s; -+ u64_t *mem = &s.val; -+ -+ /* check if alignment matters (no fallback to libatomic) */ -+ if (!test_always_lock_free(&s.val)) -+ return 1; - -- if (__atomic_fetch_add(&val, 1010, __ATOMIC_SEQ_CST) != 1010 || val != 2020) -+ s.val = 1010; -+ if (__atomic_fetch_add(&s.val, 1010, __ATOMIC_SEQ_CST) != 1010 || s.val != 2020) - return 1; - -- tmp = val; -- if (__atomic_fetch_sub(mem, 1010, __ATOMIC_SEQ_CST) != tmp || val != 1010) -+ s.tmp = s.val; -+ if (__atomic_fetch_sub(mem, 1010, __ATOMIC_SEQ_CST) != s.tmp || s.val != 1010) - return 1; - -- if (__atomic_sub_fetch(&val, 1010, __ATOMIC_SEQ_CST) != 0 || val != 0) -+ if (__atomic_sub_fetch(&s.val, 1010, __ATOMIC_SEQ_CST) != 0 || s.val != 0) - return 1; - -- tmp = val; -- if (!__atomic_compare_exchange_n(mem, &tmp, 3030, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) -- || tmp != 0) -+ s.tmp = s.val; -+ if (!__atomic_compare_exchange_n(mem, &s.tmp, 3030, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) -+ || s.tmp != 0) - return 1; - -- if (__atomic_exchange_n(&val, 4040, __ATOMIC_SEQ_CST) != 3030) -+ if (__atomic_exchange_n(&s.val, 4040, __ATOMIC_SEQ_CST) != 3030) - return 1; - - return 0; ---- apr.orig/test/testatomic.c -+++ apr/test/testatomic.c -@@ -662,6 +662,9 @@ static void test_atomics_threaded64(abts - pthread_setconcurrency(8); - #endif - -+ mutex_locks64 = 0; -+ apr_atomic_set64(&atomic_ops64, 0); -+ - rv = apr_thread_mutex_create(&thread_lock64, APR_THREAD_MUTEX_DEFAULT, p); - APR_ASSERT_SUCCESS(tc, "Could not create lock", rv); - diff --git a/debian/patches/fix-atomics.patch b/debian/patches/fix-atomics.patch index 2c519e7..81813ba 100644 --- a/debian/patches/fix-atomics.patch +++ b/debian/patches/fix-atomics.patch @@ -1,39 +1,25 @@ # upstream trunk commits r1907442, r1907441 ---- apr.orig/atomic/unix/builtins.c -+++ apr/atomic/unix/builtins.c -@@ -26,7 +26,11 @@ - - APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) - { -+#if defined (NEED_ATOMICS_GENERIC64) -+ return apr__atomic_generic64_init(p); -+#else - return APR_SUCCESS; -+#endif - } - - APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) --- apr.orig/atomic/unix/builtins64.c +++ apr/atomic/unix/builtins64.c -@@ -26,7 +26,7 @@ +@@ -27,7 +27,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) { -#if HAVE__ATOMIC_BUILTINS +#if HAVE__ATOMIC_BUILTINS64 return __atomic_load_n(mem, __ATOMIC_SEQ_CST); - #elif WEAK_MEMORY_ORDERING + #elif WEAK_MEMORY_ORDERING || APR_SIZEOF_VOIDP < 8 /* No __sync_load() available => apr_atomic_add64(mem, 0) */ -@@ -38,7 +38,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_rea +@@ -39,7 +39,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_rea APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val) { -#if HAVE__ATOMIC_BUILTINS +#if HAVE__ATOMIC_BUILTINS64 __atomic_store_n(mem, val, __ATOMIC_SEQ_CST); - #elif WEAK_MEMORY_ORDERING + #elif WEAK_MEMORY_ORDERING || APR_SIZEOF_VOIDP < 8 /* No __sync_store() available => apr_atomic_xchg64(mem, val) */ -@@ -51,7 +51,7 @@ APR_DECLARE(void) apr_atomic_set64(volat +@@ -52,7 +52,7 @@ APR_DECLARE(void) apr_atomic_set64(volat APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val) { @@ -42,7 +28,7 @@ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST); #else return __sync_fetch_and_add(mem, val); -@@ -60,7 +60,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_add +@@ -61,7 +61,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_add APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val) { @@ -51,7 +37,7 @@ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST); #else __sync_fetch_and_sub(mem, val); -@@ -69,7 +69,7 @@ APR_DECLARE(void) apr_atomic_sub64(volat +@@ -70,7 +70,7 @@ APR_DECLARE(void) apr_atomic_sub64(volat APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem) { @@ -60,7 +46,7 @@ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST); #else return __sync_fetch_and_add(mem, 1); -@@ -78,7 +78,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_inc +@@ -79,7 +79,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_inc APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem) { @@ -69,7 +55,7 @@ return __atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST); #else return __sync_sub_and_fetch(mem, 1); -@@ -88,7 +88,7 @@ APR_DECLARE(int) apr_atomic_dec64(volati +@@ -89,7 +89,7 @@ APR_DECLARE(int) apr_atomic_dec64(volati APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t val, apr_uint64_t cmp) { @@ -78,7 +64,7 @@ __atomic_compare_exchange_n(mem, &cmp, val, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return cmp; #else -@@ -98,7 +98,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_cas +@@ -99,7 +99,7 @@ APR_DECLARE(apr_uint64_t) apr_atomic_cas APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val) { diff --git a/debian/patches/fix_doxygen.patch b/debian/patches/fix_doxygen.patch index cba7489..35606a9 100644 --- a/debian/patches/fix_doxygen.patch +++ b/debian/patches/fix_doxygen.patch @@ -18,7 +18,7 @@ Subject: Fix generation of docs for out-of-tree builds and newer doxygen version FILE_PATTERNS=*.h --- apr.orig/include/apr.h.in +++ apr/include/apr.h.in -@@ -464,11 +464,11 @@ typedef apr_uint32_t apr_uin +@@ -473,11 +473,11 @@ typedef apr_uint32_t apr_uin /** * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, * so that they follow the platform's calling convention. @@ -34,7 +34,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 +@@ -511,11 +511,11 @@ typedef apr_uint32_t apr_uin * 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 +50,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 +@@ -526,12 +526,12 @@ typedef apr_uint32_t apr_uin * @remark Note that the declaration and implementations use different forms, * but both must include the macro. * diff --git a/debian/patches/hurd_path_max.patch b/debian/patches/hurd_path_max.patch index b333eb6..d5f8015 100644 --- a/debian/patches/hurd_path_max.patch +++ b/debian/patches/hurd_path_max.patch @@ -7,7 +7,7 @@ Subject: #349418 --- apr.orig/include/apr.h.in +++ apr/include/apr.h.in -@@ -629,7 +629,8 @@ typedef int apr_wait_t; +@@ -638,7 +638,8 @@ typedef int apr_wait_t; #elif defined(_POSIX_PATH_MAX) #define APR_PATH_MAX _POSIX_PATH_MAX #else diff --git a/debian/patches/hurd_shm_flock.patch b/debian/patches/hurd_shm_flock.patch index 5f1919f..bd5ea16 100644 --- a/debian/patches/hurd_shm_flock.patch +++ b/debian/patches/hurd_shm_flock.patch @@ -10,7 +10,7 @@ Bug: #656880 --- apr.orig/configure.in +++ apr/configure.in -@@ -1375,6 +1375,13 @@ case $host in +@@ -1464,6 +1464,13 @@ case $host in APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET_ANON) ;; esac @@ -24,7 +24,7 @@ Bug: #656880 APR_END_DECISION AC_DEFINE_UNQUOTED($ac_decision) -@@ -1452,6 +1459,13 @@ case $host in +@@ -1548,6 +1555,13 @@ case $host in APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET) ;; esac @@ -38,7 +38,7 @@ Bug: #656880 APR_END_DECISION AC_DEFINE_UNQUOTED($ac_decision) -@@ -2511,6 +2525,12 @@ esac +@@ -2608,6 +2622,12 @@ esac if test "x$apr_lock_method" != "x"; then APR_DECISION_FORCE($apr_lock_method) fi diff --git a/debian/patches/series b/debian/patches/series index a8badec..8abedf9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,4 +11,3 @@ debug_testpoll_failure.patch use_fcntl_locking.patch python3-hashbang.patch fix-atomics.patch -fix-atomics-some-more.patch -- cgit v1.2.3