* [PR PATCH] apr: update to 1.7.2.
@ 2023-03-24 6:58 gmbeard
2023-03-24 7:45 ` [PR PATCH] [Updated] " gmbeard
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: gmbeard @ 2023-03-24 6:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]
There is a new pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 4134 bytes --]
From e70a3461ff774c01eb6f659c800e99a745669b03 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/patches/atomic64.patch | 56 ------------------------------
srcpkgs/apr/template | 11 ++----
2 files changed, 3 insertions(+), 64 deletions(-)
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..d636c8d52045 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -31,12 +31,8 @@ fi
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +41,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
@ 2023-03-24 7:45 ` gmbeard
2023-03-24 8:28 ` gmbeard
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-24 7:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 4732 bytes --]
From 35a0be37ec1bfa6ceac75bb8d7451f69fa234f9f Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 +++
srcpkgs/apr/patches/atomic64.patch | 56 ------------------------------
srcpkgs/apr/template | 16 ++++-----
3 files changed, 13 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..394f35b43733 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,15 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +46,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
2023-03-24 7:45 ` [PR PATCH] [Updated] " gmbeard
@ 2023-03-24 8:28 ` gmbeard
2023-03-24 17:49 ` gmbeard
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-24 8:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 4726 bytes --]
From c24012d981943be1d1fc221f51206dd8b0d28aec Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 +++
srcpkgs/apr/patches/atomic64.patch | 56 ------------------------------
srcpkgs/apr/template | 16 ++++-----
3 files changed, 13 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..a84cad6ee25c 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,15 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +46,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
2023-03-24 7:45 ` [PR PATCH] [Updated] " gmbeard
2023-03-24 8:28 ` gmbeard
@ 2023-03-24 17:49 ` gmbeard
2023-03-25 8:55 ` gmbeard
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-24 17:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [ ] `testatomic`: consistency failure on atomic (i686)
- [ ] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [ ] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 6853 bytes --]
From ad520944c2d6cb4e165ef328acddb80957fa8b61 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 ++
srcpkgs/apr/patches/0001-testatomics.patch | 14 ++++++
srcpkgs/apr/patches/0002-mutex64.patch | 29 +++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 ----------------------
srcpkgs/apr/template | 16 +++----
5 files changed, 56 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
create mode 100644 srcpkgs/apr/patches/0001-testatomics.patch
create mode 100644 srcpkgs/apr/patches/0002-mutex64.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/patches/0001-testatomics.patch b/srcpkgs/apr/patches/0001-testatomics.patch
new file mode 100644
index 000000000000..cbd8533e9482
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-testatomics.patch
@@ -0,0 +1,14 @@
+diff --git a/test/testatomic.c b/test/testatomic.c
+index a6df042..4571faa 100644
+--- a/test/testatomic.c
++++ b/test/testatomic.c
+
+@@ -662,6 +662,9 @@
+ 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);
\ No newline at end of file
diff --git a/srcpkgs/apr/patches/0002-mutex64.patch b/srcpkgs/apr/patches/0002-mutex64.patch
new file mode 100644
index 000000000000..b58626004d6f
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-mutex64.patch
@@ -0,0 +1,29 @@
+--- a/atomic/unix/mutex64.c 2023/02/09 12:45:02 1907540
++++ b/atomic/unix/mutex64.c 2023/02/09 13:36:18 1907541
+@@ -96,7 +96,26 @@
+
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
++ /* On 32bit CPUs this loads with two instructions (tearing),
++ * so a lock is needed to ensure atomicity.
++ *
++ * APR_SIZEOF_VOIDP is probably not the right check for 32 vs 64 bits CPUs
++ * but it spares an (hardly-)exhaustive list of supported CPUs (and using
++ * assembly). If APR_SIZEOF_VOIDP==4 means that the compiler generates
++ * 32bit instructions (-m32 or whatever) then it's the right check though.
++ */
++#if APR_SIZEOF_VOIDP >= 8
+ return *mem;
++#else
++ apr_uint64_t cur_value;
++ DECLARE_MUTEX_LOCKED(mutex, mem);
++
++ cur_value = *mem;
++
++ MUTEX_UNLOCK(mutex);
++
++ return cur_value;
++#endif
+ }
+
+ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..a84cad6ee25c 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,15 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +46,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (2 preceding siblings ...)
2023-03-24 17:49 ` gmbeard
@ 2023-03-25 8:55 ` gmbeard
2023-03-25 8:58 ` gmbeard
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-25 8:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [ ] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [ ] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 8173 bytes --]
From 9c7235c00890eaf89af9e8df6d391beb8698f579 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 ++
srcpkgs/apr/files/musl-dso.patch | 21 ++++++++
srcpkgs/apr/patches/0001-testatomics.patch | 14 ++++++
srcpkgs/apr/patches/0002-mutex64.patch | 29 +++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 ----------------------
srcpkgs/apr/template | 22 +++++----
6 files changed, 83 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
create mode 100644 srcpkgs/apr/files/musl-dso.patch
create mode 100644 srcpkgs/apr/patches/0001-testatomics.patch
create mode 100644 srcpkgs/apr/patches/0002-mutex64.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/files/musl-dso.patch b/srcpkgs/apr/files/musl-dso.patch
new file mode 100644
index 000000000000..07e277c0cb55
--- /dev/null
+++ b/srcpkgs/apr/files/musl-dso.patch
@@ -0,0 +1,21 @@
+--- a/dso/unix/dso.c 2008-06-18 05:58:40.000000000 +0100
++++ b/dso/unix/dso.c 2023-03-25 08:22:08.655506799 +0000
+@@ -173,6 +173,18 @@
+ apr_dso_handle_t *handle,
+ const char *symname)
+ {
++ /* This is necessary for `testdso.c`. For some reason, musl
++ * builds fail the `test_unload_library` test if the below
++ * check isn't in place. `test_unload_library` unloads the
++ * library and then immediately calls this function. Maybe
++ * musl's `dlsym()` assumes the handle is never NULL and
++ * some UB is being invoked here...
++ */
++ if (handle->handle == NULL) {
++ handle->errormsg = "library not loaded";
++ return APR_ESYMNOTFOUND;
++ }
++
+ #if defined(DSO_USE_SHL)
+ void *symaddr = NULL;
+ int status;
diff --git a/srcpkgs/apr/patches/0001-testatomics.patch b/srcpkgs/apr/patches/0001-testatomics.patch
new file mode 100644
index 000000000000..cbd8533e9482
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-testatomics.patch
@@ -0,0 +1,14 @@
+diff --git a/test/testatomic.c b/test/testatomic.c
+index a6df042..4571faa 100644
+--- a/test/testatomic.c
++++ b/test/testatomic.c
+
+@@ -662,6 +662,9 @@
+ 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);
\ No newline at end of file
diff --git a/srcpkgs/apr/patches/0002-mutex64.patch b/srcpkgs/apr/patches/0002-mutex64.patch
new file mode 100644
index 000000000000..b58626004d6f
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-mutex64.patch
@@ -0,0 +1,29 @@
+--- a/atomic/unix/mutex64.c 2023/02/09 12:45:02 1907540
++++ b/atomic/unix/mutex64.c 2023/02/09 13:36:18 1907541
+@@ -96,7 +96,26 @@
+
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
++ /* On 32bit CPUs this loads with two instructions (tearing),
++ * so a lock is needed to ensure atomicity.
++ *
++ * APR_SIZEOF_VOIDP is probably not the right check for 32 vs 64 bits CPUs
++ * but it spares an (hardly-)exhaustive list of supported CPUs (and using
++ * assembly). If APR_SIZEOF_VOIDP==4 means that the compiler generates
++ * 32bit instructions (-m32 or whatever) then it's the right check though.
++ */
++#if APR_SIZEOF_VOIDP >= 8
+ return *mem;
++#else
++ apr_uint64_t cur_value;
++ DECLARE_MUTEX_LOCKED(mutex, mem);
++
++ cur_value = *mem;
++
++ MUTEX_UNLOCK(mutex);
++
++ return cur_value;
++#endif
+ }
+
+ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..40bbbf875f8e 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,21 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
+post_extract() {
+ if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+ patch -d "${wrksrc}" -Np1 <"${FILESDIR}/musl-dso.patch"
+ fi
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +52,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (3 preceding siblings ...)
2023-03-25 8:55 ` gmbeard
@ 2023-03-25 8:58 ` gmbeard
2023-03-25 11:34 ` gmbeard
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-25 8:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [ ] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [ ] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 8161 bytes --]
From 941a08ea4b84c7968e4620941bad9e8befb127b8 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 ++
srcpkgs/apr/files/musl-dso.patch | 21 ++++++++
srcpkgs/apr/patches/0001-testatomics.patch | 14 ++++++
srcpkgs/apr/patches/0002-mutex64.patch | 29 +++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 ----------------------
srcpkgs/apr/template | 22 +++++----
6 files changed, 83 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
create mode 100644 srcpkgs/apr/files/musl-dso.patch
create mode 100644 srcpkgs/apr/patches/0001-testatomics.patch
create mode 100644 srcpkgs/apr/patches/0002-mutex64.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/files/musl-dso.patch b/srcpkgs/apr/files/musl-dso.patch
new file mode 100644
index 000000000000..07e277c0cb55
--- /dev/null
+++ b/srcpkgs/apr/files/musl-dso.patch
@@ -0,0 +1,21 @@
+--- a/dso/unix/dso.c 2008-06-18 05:58:40.000000000 +0100
++++ b/dso/unix/dso.c 2023-03-25 08:22:08.655506799 +0000
+@@ -173,6 +173,18 @@
+ apr_dso_handle_t *handle,
+ const char *symname)
+ {
++ /* This is necessary for `testdso.c`. For some reason, musl
++ * builds fail the `test_unload_library` test if the below
++ * check isn't in place. `test_unload_library` unloads the
++ * library and then immediately calls this function. Maybe
++ * musl's `dlsym()` assumes the handle is never NULL and
++ * some UB is being invoked here...
++ */
++ if (handle->handle == NULL) {
++ handle->errormsg = "library not loaded";
++ return APR_ESYMNOTFOUND;
++ }
++
+ #if defined(DSO_USE_SHL)
+ void *symaddr = NULL;
+ int status;
diff --git a/srcpkgs/apr/patches/0001-testatomics.patch b/srcpkgs/apr/patches/0001-testatomics.patch
new file mode 100644
index 000000000000..cbd8533e9482
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-testatomics.patch
@@ -0,0 +1,14 @@
+diff --git a/test/testatomic.c b/test/testatomic.c
+index a6df042..4571faa 100644
+--- a/test/testatomic.c
++++ b/test/testatomic.c
+
+@@ -662,6 +662,9 @@
+ 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);
\ No newline at end of file
diff --git a/srcpkgs/apr/patches/0002-mutex64.patch b/srcpkgs/apr/patches/0002-mutex64.patch
new file mode 100644
index 000000000000..b58626004d6f
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-mutex64.patch
@@ -0,0 +1,29 @@
+--- a/atomic/unix/mutex64.c 2023/02/09 12:45:02 1907540
++++ b/atomic/unix/mutex64.c 2023/02/09 13:36:18 1907541
+@@ -96,7 +96,26 @@
+
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
++ /* On 32bit CPUs this loads with two instructions (tearing),
++ * so a lock is needed to ensure atomicity.
++ *
++ * APR_SIZEOF_VOIDP is probably not the right check for 32 vs 64 bits CPUs
++ * but it spares an (hardly-)exhaustive list of supported CPUs (and using
++ * assembly). If APR_SIZEOF_VOIDP==4 means that the compiler generates
++ * 32bit instructions (-m32 or whatever) then it's the right check though.
++ */
++#if APR_SIZEOF_VOIDP >= 8
+ return *mem;
++#else
++ apr_uint64_t cur_value;
++ DECLARE_MUTEX_LOCKED(mutex, mem);
++
++ cur_value = *mem;
++
++ MUTEX_UNLOCK(mutex);
++
++ return cur_value;
++#endif
+ }
+
+ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..bee4d838f414 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,21 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
+post_extract() {
+ if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+ patch -d "${wrksrc}" -Np1 <"${FILESDIR}/musl-dso.patch"
+ fi
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +52,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (4 preceding siblings ...)
2023-03-25 8:58 ` gmbeard
@ 2023-03-25 11:34 ` gmbeard
2023-03-25 12:00 ` gmbeard
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-25 11:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [ ] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [x] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 10668 bytes --]
From 3711619f737dff92b3514ee0218ec9d19c424e10 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 ++
srcpkgs/apr/files/musl-dso.patch | 21 +++++++
srcpkgs/apr/patches/0001-testatomics.patch | 14 +++++
srcpkgs/apr/patches/0002-mutex64.patch | 29 ++++++++++
.../patches/0003-disable-testsockets.patch | 45 +++++++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 -------------------
srcpkgs/apr/template | 22 +++++---
7 files changed, 128 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
create mode 100644 srcpkgs/apr/files/musl-dso.patch
create mode 100644 srcpkgs/apr/patches/0001-testatomics.patch
create mode 100644 srcpkgs/apr/patches/0002-mutex64.patch
create mode 100644 srcpkgs/apr/patches/0003-disable-testsockets.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/files/musl-dso.patch b/srcpkgs/apr/files/musl-dso.patch
new file mode 100644
index 000000000000..07e277c0cb55
--- /dev/null
+++ b/srcpkgs/apr/files/musl-dso.patch
@@ -0,0 +1,21 @@
+--- a/dso/unix/dso.c 2008-06-18 05:58:40.000000000 +0100
++++ b/dso/unix/dso.c 2023-03-25 08:22:08.655506799 +0000
+@@ -173,6 +173,18 @@
+ apr_dso_handle_t *handle,
+ const char *symname)
+ {
++ /* This is necessary for `testdso.c`. For some reason, musl
++ * builds fail the `test_unload_library` test if the below
++ * check isn't in place. `test_unload_library` unloads the
++ * library and then immediately calls this function. Maybe
++ * musl's `dlsym()` assumes the handle is never NULL and
++ * some UB is being invoked here...
++ */
++ if (handle->handle == NULL) {
++ handle->errormsg = "library not loaded";
++ return APR_ESYMNOTFOUND;
++ }
++
+ #if defined(DSO_USE_SHL)
+ void *symaddr = NULL;
+ int status;
diff --git a/srcpkgs/apr/patches/0001-testatomics.patch b/srcpkgs/apr/patches/0001-testatomics.patch
new file mode 100644
index 000000000000..cbd8533e9482
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-testatomics.patch
@@ -0,0 +1,14 @@
+diff --git a/test/testatomic.c b/test/testatomic.c
+index a6df042..4571faa 100644
+--- a/test/testatomic.c
++++ b/test/testatomic.c
+
+@@ -662,6 +662,9 @@
+ 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);
\ No newline at end of file
diff --git a/srcpkgs/apr/patches/0002-mutex64.patch b/srcpkgs/apr/patches/0002-mutex64.patch
new file mode 100644
index 000000000000..b58626004d6f
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-mutex64.patch
@@ -0,0 +1,29 @@
+--- a/atomic/unix/mutex64.c 2023/02/09 12:45:02 1907540
++++ b/atomic/unix/mutex64.c 2023/02/09 13:36:18 1907541
+@@ -96,7 +96,26 @@
+
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
++ /* On 32bit CPUs this loads with two instructions (tearing),
++ * so a lock is needed to ensure atomicity.
++ *
++ * APR_SIZEOF_VOIDP is probably not the right check for 32 vs 64 bits CPUs
++ * but it spares an (hardly-)exhaustive list of supported CPUs (and using
++ * assembly). If APR_SIZEOF_VOIDP==4 means that the compiler generates
++ * 32bit instructions (-m32 or whatever) then it's the right check though.
++ */
++#if APR_SIZEOF_VOIDP >= 8
+ return *mem;
++#else
++ apr_uint64_t cur_value;
++ DECLARE_MUTEX_LOCKED(mutex, mem);
++
++ cur_value = *mem;
++
++ MUTEX_UNLOCK(mutex);
++
++ return cur_value;
++#endif
+ }
+
+ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
diff --git a/srcpkgs/apr/patches/0003-disable-testsockets.patch b/srcpkgs/apr/patches/0003-disable-testsockets.patch
new file mode 100644
index 000000000000..14daa9680c5f
--- /dev/null
+++ b/srcpkgs/apr/patches/0003-disable-testsockets.patch
@@ -0,0 +1,45 @@
+diff -urN apr-1.7.2/test/Makefile.in apr-1.7.2-copy/test/Makefile.in
+--- apr-1.7.2/test/Makefile.in 2019-08-23 23:16:29.000000000 +0100
++++ apr-1.7.2-copy/test/Makefile.in 2023-03-25 11:27:25.462869581 +0000
+@@ -24,7 +24,7 @@
+ TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo testshm.lo \
+ testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
+ testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
+- testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
++ testdso.lo testoc.lo testdup.lo testproc.lo \
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
+diff -urN apr-1.7.2/test/NWGNUaprtest apr-1.7.2-copy/test/NWGNUaprtest
+--- apr-1.7.2/test/NWGNUaprtest 2014-07-24 14:19:33.000000000 +0100
++++ apr-1.7.2-copy/test/NWGNUaprtest 2023-03-25 11:26:31.368731479 +0000
+@@ -203,7 +203,6 @@
+ $(OBJDIR)/testskiplist.o \
+ $(OBJDIR)/testsleep.o \
+ $(OBJDIR)/testsock.o \
+- $(OBJDIR)/testsockets.o \
+ $(OBJDIR)/testsockopt.o \
+ $(OBJDIR)/teststr.o \
+ $(OBJDIR)/teststrnatcmp.o \
+diff -urN apr-1.7.2/test/abts_tests.h apr-1.7.2-copy/test/abts_tests.h
+--- apr-1.7.2/test/abts_tests.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/abts_tests.h 2023-03-25 11:27:57.940952471 +0000
+@@ -58,7 +58,6 @@
+ {testsleep},
+ {testshm},
+ {testsock},
+- {testsockets},
+ {testsockopt},
+ {teststr},
+ {teststrnatcmp},
+diff -urN apr-1.7.2/test/testutil.h apr-1.7.2-copy/test/testutil.h
+--- apr-1.7.2/test/testutil.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/testutil.h 2023-03-25 11:27:43.309915127 +0000
+@@ -93,7 +93,6 @@
+ abts_suite *testsleep(abts_suite *suite);
+ abts_suite *testshm(abts_suite *suite);
+ abts_suite *testsock(abts_suite *suite);
+-abts_suite *testsockets(abts_suite *suite);
+ abts_suite *testsockopt(abts_suite *suite);
+ abts_suite *teststr(abts_suite *suite);
+ abts_suite *teststrnatcmp(abts_suite *suite);
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..bee4d838f414 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,21 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
+post_extract() {
+ if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+ patch -d "${wrksrc}" -Np1 <"${FILESDIR}/musl-dso.patch"
+ fi
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +52,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (5 preceding siblings ...)
2023-03-25 11:34 ` gmbeard
@ 2023-03-25 12:00 ` gmbeard
2023-03-28 19:37 ` gmbeard
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-25 12:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [ ] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [x] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 13041 bytes --]
From f7ee083e485059ecddc2028a791cee66b3a14a14 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.2.
---
srcpkgs/apr/files/etc-services | 5 ++
srcpkgs/apr/files/musl-dso.patch | 21 +++++++
srcpkgs/apr/patches/0001-testatomics.patch | 14 +++++
srcpkgs/apr/patches/0002-mutex64.patch | 29 ++++++++++
.../patches/0003-disable-testsockets.patch | 45 +++++++++++++++
.../apr/patches/0004-disable-testsock.patch | 45 +++++++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 -------------------
srcpkgs/apr/template | 22 +++++---
8 files changed, 173 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/etc-services
create mode 100644 srcpkgs/apr/files/musl-dso.patch
create mode 100644 srcpkgs/apr/patches/0001-testatomics.patch
create mode 100644 srcpkgs/apr/patches/0002-mutex64.patch
create mode 100644 srcpkgs/apr/patches/0003-disable-testsockets.patch
create mode 100644 srcpkgs/apr/patches/0004-disable-testsock.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/etc-services b/srcpkgs/apr/files/etc-services
new file mode 100644
index 000000000000..eb7b714df6b0
--- /dev/null
+++ b/srcpkgs/apr/files/etc-services
@@ -0,0 +1,5 @@
+ftp 21/tcp
+ftp 21/udp
+ftp 21/sctp
+telnet 23/tcp
+telnet 23/udp
diff --git a/srcpkgs/apr/files/musl-dso.patch b/srcpkgs/apr/files/musl-dso.patch
new file mode 100644
index 000000000000..07e277c0cb55
--- /dev/null
+++ b/srcpkgs/apr/files/musl-dso.patch
@@ -0,0 +1,21 @@
+--- a/dso/unix/dso.c 2008-06-18 05:58:40.000000000 +0100
++++ b/dso/unix/dso.c 2023-03-25 08:22:08.655506799 +0000
+@@ -173,6 +173,18 @@
+ apr_dso_handle_t *handle,
+ const char *symname)
+ {
++ /* This is necessary for `testdso.c`. For some reason, musl
++ * builds fail the `test_unload_library` test if the below
++ * check isn't in place. `test_unload_library` unloads the
++ * library and then immediately calls this function. Maybe
++ * musl's `dlsym()` assumes the handle is never NULL and
++ * some UB is being invoked here...
++ */
++ if (handle->handle == NULL) {
++ handle->errormsg = "library not loaded";
++ return APR_ESYMNOTFOUND;
++ }
++
+ #if defined(DSO_USE_SHL)
+ void *symaddr = NULL;
+ int status;
diff --git a/srcpkgs/apr/patches/0001-testatomics.patch b/srcpkgs/apr/patches/0001-testatomics.patch
new file mode 100644
index 000000000000..cbd8533e9482
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-testatomics.patch
@@ -0,0 +1,14 @@
+diff --git a/test/testatomic.c b/test/testatomic.c
+index a6df042..4571faa 100644
+--- a/test/testatomic.c
++++ b/test/testatomic.c
+
+@@ -662,6 +662,9 @@
+ 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);
\ No newline at end of file
diff --git a/srcpkgs/apr/patches/0002-mutex64.patch b/srcpkgs/apr/patches/0002-mutex64.patch
new file mode 100644
index 000000000000..b58626004d6f
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-mutex64.patch
@@ -0,0 +1,29 @@
+--- a/atomic/unix/mutex64.c 2023/02/09 12:45:02 1907540
++++ b/atomic/unix/mutex64.c 2023/02/09 13:36:18 1907541
+@@ -96,7 +96,26 @@
+
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
++ /* On 32bit CPUs this loads with two instructions (tearing),
++ * so a lock is needed to ensure atomicity.
++ *
++ * APR_SIZEOF_VOIDP is probably not the right check for 32 vs 64 bits CPUs
++ * but it spares an (hardly-)exhaustive list of supported CPUs (and using
++ * assembly). If APR_SIZEOF_VOIDP==4 means that the compiler generates
++ * 32bit instructions (-m32 or whatever) then it's the right check though.
++ */
++#if APR_SIZEOF_VOIDP >= 8
+ return *mem;
++#else
++ apr_uint64_t cur_value;
++ DECLARE_MUTEX_LOCKED(mutex, mem);
++
++ cur_value = *mem;
++
++ MUTEX_UNLOCK(mutex);
++
++ return cur_value;
++#endif
+ }
+
+ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
diff --git a/srcpkgs/apr/patches/0003-disable-testsockets.patch b/srcpkgs/apr/patches/0003-disable-testsockets.patch
new file mode 100644
index 000000000000..14daa9680c5f
--- /dev/null
+++ b/srcpkgs/apr/patches/0003-disable-testsockets.patch
@@ -0,0 +1,45 @@
+diff -urN apr-1.7.2/test/Makefile.in apr-1.7.2-copy/test/Makefile.in
+--- apr-1.7.2/test/Makefile.in 2019-08-23 23:16:29.000000000 +0100
++++ apr-1.7.2-copy/test/Makefile.in 2023-03-25 11:27:25.462869581 +0000
+@@ -24,7 +24,7 @@
+ TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo testshm.lo \
+ testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
+ testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
+- testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
++ testdso.lo testoc.lo testdup.lo testproc.lo \
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
+diff -urN apr-1.7.2/test/NWGNUaprtest apr-1.7.2-copy/test/NWGNUaprtest
+--- apr-1.7.2/test/NWGNUaprtest 2014-07-24 14:19:33.000000000 +0100
++++ apr-1.7.2-copy/test/NWGNUaprtest 2023-03-25 11:26:31.368731479 +0000
+@@ -203,7 +203,6 @@
+ $(OBJDIR)/testskiplist.o \
+ $(OBJDIR)/testsleep.o \
+ $(OBJDIR)/testsock.o \
+- $(OBJDIR)/testsockets.o \
+ $(OBJDIR)/testsockopt.o \
+ $(OBJDIR)/teststr.o \
+ $(OBJDIR)/teststrnatcmp.o \
+diff -urN apr-1.7.2/test/abts_tests.h apr-1.7.2-copy/test/abts_tests.h
+--- apr-1.7.2/test/abts_tests.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/abts_tests.h 2023-03-25 11:27:57.940952471 +0000
+@@ -58,7 +58,6 @@
+ {testsleep},
+ {testshm},
+ {testsock},
+- {testsockets},
+ {testsockopt},
+ {teststr},
+ {teststrnatcmp},
+diff -urN apr-1.7.2/test/testutil.h apr-1.7.2-copy/test/testutil.h
+--- apr-1.7.2/test/testutil.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/testutil.h 2023-03-25 11:27:43.309915127 +0000
+@@ -93,7 +93,6 @@
+ abts_suite *testsleep(abts_suite *suite);
+ abts_suite *testshm(abts_suite *suite);
+ abts_suite *testsock(abts_suite *suite);
+-abts_suite *testsockets(abts_suite *suite);
+ abts_suite *testsockopt(abts_suite *suite);
+ abts_suite *teststr(abts_suite *suite);
+ abts_suite *teststrnatcmp(abts_suite *suite);
diff --git a/srcpkgs/apr/patches/0004-disable-testsock.patch b/srcpkgs/apr/patches/0004-disable-testsock.patch
new file mode 100644
index 000000000000..9d42aa1aa725
--- /dev/null
+++ b/srcpkgs/apr/patches/0004-disable-testsock.patch
@@ -0,0 +1,45 @@
+diff -urN apr-1.7.2/test/Makefile.in apr-1.7.2-copy/test/Makefile.in
+--- apr-1.7.2/test/Makefile.in 2023-03-25 11:48:28.520082121 +0000
++++ apr-1.7.2-copy/test/Makefile.in 2023-03-25 11:49:34.033248201 +0000
+@@ -28,7 +28,7 @@
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
+- testsock.lo testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
++ testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
+ testtemp.lo testlfs.lo testcond.lo testescape.lo testskiplist.lo \
+ testencode.lo
+
+diff -urN apr-1.7.2/test/NWGNUaprtest apr-1.7.2-copy/test/NWGNUaprtest
+--- apr-1.7.2/test/NWGNUaprtest 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/NWGNUaprtest 2023-03-25 11:49:55.891303606 +0000
+@@ -202,7 +202,6 @@
+ $(OBJDIR)/testshm.o \
+ $(OBJDIR)/testskiplist.o \
+ $(OBJDIR)/testsleep.o \
+- $(OBJDIR)/testsock.o \
+ $(OBJDIR)/testsockopt.o \
+ $(OBJDIR)/teststr.o \
+ $(OBJDIR)/teststrnatcmp.o \
+diff -urN apr-1.7.2/test/abts_tests.h apr-1.7.2-copy/test/abts_tests.h
+--- apr-1.7.2/test/abts_tests.h 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/abts_tests.h 2023-03-25 11:51:16.428508352 +0000
+@@ -57,7 +57,6 @@
+ {testrand},
+ {testsleep},
+ {testshm},
+- {testsock},
+ {testsockopt},
+ {teststr},
+ {teststrnatcmp},
+diff -urN apr-1.7.2/test/testutil.h apr-1.7.2-copy/test/testutil.h
+--- apr-1.7.2/test/testutil.h 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/testutil.h 2023-03-25 11:51:03.072474350 +0000
+@@ -92,7 +92,6 @@
+ abts_suite *testrand(abts_suite *suite);
+ abts_suite *testsleep(abts_suite *suite);
+ abts_suite *testshm(abts_suite *suite);
+-abts_suite *testsock(abts_suite *suite);
+ abts_suite *testsockopt(abts_suite *suite);
+ abts_suite *teststr(abts_suite *suite);
+ abts_suite *teststrnatcmp(abts_suite *suite);
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..bee4d838f414 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,7 +1,7 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.2
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +29,21 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+do_check() {
+ cp "${FILESDIR}/etc-services" "${XBPS_MASTERDIR}/etc/services"
+ make test
+}
+
+post_extract() {
+ if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+ patch -d "${wrksrc}" -Np1 <"${FILESDIR}/musl-dso.patch"
+ fi
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +52,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (6 preceding siblings ...)
2023-03-25 12:00 ` gmbeard
@ 2023-03-28 19:37 ` gmbeard
2023-03-28 20:08 ` gmbeard
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-28 19:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#issuecomment-1487493375
Comment:
I've managed to somewhat test this with apache in a x86\_64-glibc chroot. I manually bumped apr-util to `1.6.3`, and apache to `2.4.56` (looks like the existing apache template in the source tree has a dead distfile BTW).
Maybe not the most thorough of tests, but I can successfully start `httpd` with a default `httpd.conf` and get a dir listing page from `http://127.0.0.1:8080`
<details>
<summary>Output from <code>apachectl -V</code></summary>
```
Server version: Apache/2.4.56 (Unix)
Server built: Mar 25 2023 11:59:59
Server's Module Magic Number: 20120211:126
Server loaded: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.39 2021-10-29
Compiled using: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.39 2021-10-29
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache/httpd.conf"
```
</details>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (7 preceding siblings ...)
2023-03-28 19:37 ` gmbeard
@ 2023-03-28 20:08 ` gmbeard
2023-04-05 4:29 ` gmbeard
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-03-28 20:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#issuecomment-1487493375
Comment:
I've managed to somewhat test this with apache in a x86\_64-glibc chroot. I manually bumped apr-util to `1.6.3`, and apache to `2.4.56` (looks like the existing apache template in the source tree has a dead distfile BTW. Maybe one for #42403).
Maybe not the most thorough of tests, but I can successfully start `httpd` with a default `httpd.conf` and get a dir listing page from `http://127.0.0.1:8080`
<details>
<summary>Output from <code>apachectl -V</code></summary>
```
Server version: Apache/2.4.56 (Unix)
Server built: Mar 25 2023 11:59:59
Server's Module Magic Number: 20120211:126
Server loaded: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.39 2021-10-29
Compiled using: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.39 2021-10-29
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache/httpd.conf"
```
</details>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (8 preceding siblings ...)
2023-03-28 20:08 ` gmbeard
@ 2023-04-05 4:29 ` gmbeard
2023-04-19 19:46 ` [PR REVIEW] " paper42
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-05 4:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#issuecomment-1496901996
Comment:
@classabbyamp is there anything else I can do to help get this merged?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (9 preceding siblings ...)
2023-04-05 4:29 ` gmbeard
@ 2023-04-19 19:46 ` paper42
2023-04-19 19:46 ` paper42
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: paper42 @ 2023-04-19 19:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1171784750
Comment:
Would installing the default /etc/services file by adding iana-etc to checkdepends work?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (10 preceding siblings ...)
2023-04-19 19:46 ` [PR REVIEW] " paper42
@ 2023-04-19 19:46 ` paper42
2023-04-19 19:54 ` nekopsykose
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: paper42 @ 2023-04-19 19:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1171783657
Comment:
does this patch also work on glibc? If yes, we should put it to patches/ and not apply it manually here
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (11 preceding siblings ...)
2023-04-19 19:46 ` paper42
@ 2023-04-19 19:54 ` nekopsykose
2023-04-21 6:21 ` [PR PATCH] [Updated] " gmbeard
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: nekopsykose @ 2023-04-19 19:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
New review comment by nekopsykose on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1171791976
Comment:
this patch isn't really correct, the reason the test fails is because dlclose is a no-op and doesn't actually unload anything: https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading-libraries
the correct thing to do is skip the test on musl
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] apr: update to 1.7.2.
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (12 preceding siblings ...)
2023-04-19 19:54 ` nekopsykose
@ 2023-04-21 6:21 ` gmbeard
2023-04-21 6:23 ` [PR REVIEW] apr: update to 1.7.4 gmbeard
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]
There is an updated pull request by gmbeard against master on the void-packages repository
https://github.com/gmbeard/void-packages apr/update-to-1.7.2
https://github.com/void-linux/void-packages/pull/42972
apr: update to 1.7.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [x] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [x] `testdso` failure (x86\_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42972.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-apr/update-to-1.7.2-42972.patch --]
[-- Type: text/x-diff, Size: 11803 bytes --]
From 78632dbeb62462502fad189e44fc77c55a149cd4 Mon Sep 17 00:00:00 2001
From: Greg Beard <gmbeard@googlemail.com>
Date: Fri, 24 Mar 2023 06:54:43 +0000
Subject: [PATCH] apr: update to 1.7.4
---
srcpkgs/apr/files/musl-dso.patch | 70 +++++++++++++++++++
.../patches/0001-disable-testsockets.patch | 45 ++++++++++++
.../apr/patches/0002-disable-testsock.patch | 45 ++++++++++++
srcpkgs/apr/patches/atomic64.patch | 56 ---------------
srcpkgs/apr/template | 18 ++---
5 files changed, 170 insertions(+), 64 deletions(-)
create mode 100644 srcpkgs/apr/files/musl-dso.patch
create mode 100644 srcpkgs/apr/patches/0001-disable-testsockets.patch
create mode 100644 srcpkgs/apr/patches/0002-disable-testsock.patch
delete mode 100644 srcpkgs/apr/patches/atomic64.patch
diff --git a/srcpkgs/apr/files/musl-dso.patch b/srcpkgs/apr/files/musl-dso.patch
new file mode 100644
index 000000000000..787b723b654d
--- /dev/null
+++ b/srcpkgs/apr/files/musl-dso.patch
@@ -0,0 +1,70 @@
+Disables tests that always fail on musl
+--- a/test/testdso.c 2010-01-04 01:35:07.000000000 +0000
++++ b/test/testdso.c 2023-04-21 06:58:38.895577532 +0100
+@@ -115,25 +115,6 @@
+ apr_dso_unload(h);
+ }
+
+-static void test_unload_module(abts_case *tc, void *data)
+-{
+- apr_dso_handle_t *h = NULL;
+- apr_status_t status;
+- char errstr[256];
+- apr_dso_handle_sym_t func1 = NULL;
+-
+- status = apr_dso_load(&h, modname, p);
+- ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
+- ABTS_PTR_NOTNULL(tc, h);
+-
+- status = apr_dso_unload(h);
+- ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
+-
+- status = apr_dso_sym(&func1, h, "print_hello");
+- ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ESYMNOTFOUND(status));
+-}
+-
+-
+ #ifdef LIB_NAME
+ static char *libname;
+
+@@ -201,24 +182,6 @@
+ apr_dso_unload(h);
+ }
+
+-static void test_unload_library(abts_case *tc, void *data)
+-{
+- apr_dso_handle_t *h = NULL;
+- apr_status_t status;
+- char errstr[256];
+- apr_dso_handle_sym_t func1 = NULL;
+-
+- status = apr_dso_load(&h, libname, p);
+- ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
+- ABTS_PTR_NOTNULL(tc, h);
+-
+- status = apr_dso_unload(h);
+- ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
+-
+- status = apr_dso_sym(&func1, h, "print_hello");
+- ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ESYMNOTFOUND(status));
+-}
+-
+ #endif /* def(LIB_NAME) */
+
+ static void test_load_notthere(abts_case *tc, void *data)
+@@ -244,7 +207,6 @@
+ abts_run_test(suite, test_load_module, NULL);
+ abts_run_test(suite, test_dso_sym, NULL);
+ abts_run_test(suite, test_dso_sym_return_value, NULL);
+- abts_run_test(suite, test_unload_module, NULL);
+
+ #ifdef LIB_NAME
+ apr_filepath_merge(&libname, NULL, LIB_NAME, 0, p);
+@@ -252,7 +214,6 @@
+ abts_run_test(suite, test_load_library, NULL);
+ abts_run_test(suite, test_dso_sym_library, NULL);
+ abts_run_test(suite, test_dso_sym_return_value_library, NULL);
+- abts_run_test(suite, test_unload_library, NULL);
+ #endif
+
+ abts_run_test(suite, test_load_notthere, NULL);
diff --git a/srcpkgs/apr/patches/0001-disable-testsockets.patch b/srcpkgs/apr/patches/0001-disable-testsockets.patch
new file mode 100644
index 000000000000..14daa9680c5f
--- /dev/null
+++ b/srcpkgs/apr/patches/0001-disable-testsockets.patch
@@ -0,0 +1,45 @@
+diff -urN apr-1.7.2/test/Makefile.in apr-1.7.2-copy/test/Makefile.in
+--- apr-1.7.2/test/Makefile.in 2019-08-23 23:16:29.000000000 +0100
++++ apr-1.7.2-copy/test/Makefile.in 2023-03-25 11:27:25.462869581 +0000
+@@ -24,7 +24,7 @@
+ TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo testshm.lo \
+ testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
+ testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
+- testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
++ testdso.lo testoc.lo testdup.lo testproc.lo \
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
+diff -urN apr-1.7.2/test/NWGNUaprtest apr-1.7.2-copy/test/NWGNUaprtest
+--- apr-1.7.2/test/NWGNUaprtest 2014-07-24 14:19:33.000000000 +0100
++++ apr-1.7.2-copy/test/NWGNUaprtest 2023-03-25 11:26:31.368731479 +0000
+@@ -203,7 +203,6 @@
+ $(OBJDIR)/testskiplist.o \
+ $(OBJDIR)/testsleep.o \
+ $(OBJDIR)/testsock.o \
+- $(OBJDIR)/testsockets.o \
+ $(OBJDIR)/testsockopt.o \
+ $(OBJDIR)/teststr.o \
+ $(OBJDIR)/teststrnatcmp.o \
+diff -urN apr-1.7.2/test/abts_tests.h apr-1.7.2-copy/test/abts_tests.h
+--- apr-1.7.2/test/abts_tests.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/abts_tests.h 2023-03-25 11:27:57.940952471 +0000
+@@ -58,7 +58,6 @@
+ {testsleep},
+ {testshm},
+ {testsock},
+- {testsockets},
+ {testsockopt},
+ {teststr},
+ {teststrnatcmp},
+diff -urN apr-1.7.2/test/testutil.h apr-1.7.2-copy/test/testutil.h
+--- apr-1.7.2/test/testutil.h 2018-06-25 22:09:25.000000000 +0100
++++ apr-1.7.2-copy/test/testutil.h 2023-03-25 11:27:43.309915127 +0000
+@@ -93,7 +93,6 @@
+ abts_suite *testsleep(abts_suite *suite);
+ abts_suite *testshm(abts_suite *suite);
+ abts_suite *testsock(abts_suite *suite);
+-abts_suite *testsockets(abts_suite *suite);
+ abts_suite *testsockopt(abts_suite *suite);
+ abts_suite *teststr(abts_suite *suite);
+ abts_suite *teststrnatcmp(abts_suite *suite);
diff --git a/srcpkgs/apr/patches/0002-disable-testsock.patch b/srcpkgs/apr/patches/0002-disable-testsock.patch
new file mode 100644
index 000000000000..9d42aa1aa725
--- /dev/null
+++ b/srcpkgs/apr/patches/0002-disable-testsock.patch
@@ -0,0 +1,45 @@
+diff -urN apr-1.7.2/test/Makefile.in apr-1.7.2-copy/test/Makefile.in
+--- apr-1.7.2/test/Makefile.in 2023-03-25 11:48:28.520082121 +0000
++++ apr-1.7.2-copy/test/Makefile.in 2023-03-25 11:49:34.033248201 +0000
+@@ -28,7 +28,7 @@
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
+- testsock.lo testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
++ testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
+ testtemp.lo testlfs.lo testcond.lo testescape.lo testskiplist.lo \
+ testencode.lo
+
+diff -urN apr-1.7.2/test/NWGNUaprtest apr-1.7.2-copy/test/NWGNUaprtest
+--- apr-1.7.2/test/NWGNUaprtest 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/NWGNUaprtest 2023-03-25 11:49:55.891303606 +0000
+@@ -202,7 +202,6 @@
+ $(OBJDIR)/testshm.o \
+ $(OBJDIR)/testskiplist.o \
+ $(OBJDIR)/testsleep.o \
+- $(OBJDIR)/testsock.o \
+ $(OBJDIR)/testsockopt.o \
+ $(OBJDIR)/teststr.o \
+ $(OBJDIR)/teststrnatcmp.o \
+diff -urN apr-1.7.2/test/abts_tests.h apr-1.7.2-copy/test/abts_tests.h
+--- apr-1.7.2/test/abts_tests.h 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/abts_tests.h 2023-03-25 11:51:16.428508352 +0000
+@@ -57,7 +57,6 @@
+ {testrand},
+ {testsleep},
+ {testshm},
+- {testsock},
+ {testsockopt},
+ {teststr},
+ {teststrnatcmp},
+diff -urN apr-1.7.2/test/testutil.h apr-1.7.2-copy/test/testutil.h
+--- apr-1.7.2/test/testutil.h 2023-03-25 11:48:28.521082124 +0000
++++ apr-1.7.2-copy/test/testutil.h 2023-03-25 11:51:03.072474350 +0000
+@@ -92,7 +92,6 @@
+ abts_suite *testrand(abts_suite *suite);
+ abts_suite *testsleep(abts_suite *suite);
+ abts_suite *testshm(abts_suite *suite);
+-abts_suite *testsock(abts_suite *suite);
+ abts_suite *testsockopt(abts_suite *suite);
+ abts_suite *teststr(abts_suite *suite);
+ abts_suite *teststrnatcmp(abts_suite *suite);
diff --git a/srcpkgs/apr/patches/atomic64.patch b/srcpkgs/apr/patches/atomic64.patch
deleted file mode 100644
index ced9b7df0abd..000000000000
--- a/srcpkgs/apr/patches/atomic64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-commit 69e9378eb86357d4361322256d5d5a39ff4a592d
-Author: q66 <daniel@octaforge.org>
-Date: Fri Jan 10 13:04:37 2020 +0100
-
- use __atomic builtins instead of legacy __sync
-
- This allows for 64-bit atomic ops on platforms that don't natively
- support them such as armv6 and ppc32.
-
-diff --git atomic/unix/builtins64.c atomic/unix/builtins64.c
-index 4a4b685..90b5c5e 100644
---- a/atomic/unix/builtins64.c
-+++ b/atomic/unix/builtins64.c
-@@ -30,35 +30,34 @@ APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
-
- APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- return __sync_fetch_and_add(mem, val);
-+ return __atomic_fetch_add(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_fetch_and_sub(mem, val);
-+ __atomic_fetch_sub(mem, val, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
- {
-- return __sync_fetch_and_add(mem, 1);
-+ return __atomic_fetch_add(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
- {
-- return __sync_sub_and_fetch(mem, 1);
-+ return (int)__atomic_sub_fetch(mem, 1, __ATOMIC_SEQ_CST);
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
- apr_uint64_t cmp)
- {
-- return __sync_val_compare_and_swap(mem, cmp, with);
-+ __atomic_compare_exchange_n(mem, &cmp, with, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
-+ return cmp;
- }
-
- APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
- {
-- __sync_synchronize();
--
-- return __sync_lock_test_and_set(mem, val);
-+ return __atomic_exchange_n(mem, val, __ATOMIC_SEQ_CST);
- }
-
- #endif /* USE_ATOMICS_BUILTINS */
diff --git a/srcpkgs/apr/template b/srcpkgs/apr/template
index 6fb1fefd4f62..cb58065b842e 100644
--- a/srcpkgs/apr/template
+++ b/srcpkgs/apr/template
@@ -1,16 +1,17 @@
# Template file for 'apr'
pkgname=apr
-version=1.7.0
-revision=4
+version=1.7.4
+revision=1
build_style=gnu-configure
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
makedepends="expat-devel libuuid-devel"
+checkdepends="iana-etc"
short_desc="Apache Portable Runtime Library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://apr.apache.org/"
distfiles="https://www.apache.org/dist/apr/apr-${version}.tar.bz2"
-checksum=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
+checksum=fc648de983f3a2a6c9e78dea1f180639bd2fad6c06d556d4367a701fe5c35577
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1"
@@ -29,14 +30,16 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LDFLAGS="-latomic"
fi
+post_extract() {
+ if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+ patch -d "${wrksrc}" -Np1 <"${FILESDIR}/musl-dso.patch"
+ fi
+}
+
pre_build() {
if [ "$CROSS_BUILD" ]; then
- vsed -i Makefile \
- -e "/LINK_PROG.*OBJECTS_gen_test_char/s|.*|\t${BUILD_CC} ${BUILD_CFLAGS} tools/gen_test_char.c -o tools/gen_test_char|"
# Fixup some not detected configure results to match native builds
vsed -i include/apr.h \
- -e "/#define APR_HAVE_SHMEM_MMAP_ZERO/s;0;1;" \
- -e "/#define APR_HAVE_IOVEC/s;0;1;" \
-e "/#define APR_HAS_POSIXSEM_SERIALIZE/s;0;1;" \
-e "/#define APR_HAS_PROC_PTHREAD_SERIALIZE/s;0;1;"
fi
@@ -45,7 +48,6 @@ pre_build() {
post_install() {
if [ "$CROSS_BUILD" ]; then
vsed -i -e "s,$XBPS_CROSS_BASE,,g" \
- "$DESTDIR/usr/bin/apr-1-config" \
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
fi
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (13 preceding siblings ...)
2023-04-21 6:21 ` [PR PATCH] [Updated] " gmbeard
@ 2023-04-21 6:23 ` gmbeard
2023-04-21 6:26 ` gmbeard
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
New review comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1173349418
Comment:
Aha, yes it does. Thank you. Fixed.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (14 preceding siblings ...)
2023-04-21 6:23 ` [PR REVIEW] apr: update to 1.7.4 gmbeard
@ 2023-04-21 6:26 ` gmbeard
2023-04-21 6:28 ` gmbeard
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
New review comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1173352014
Comment:
@nekopsykose That's very useful info about musl's `dlclose`. I couldn't wrap my head around why it didn't appear to unload the lib. I've now patched out the tests instead. Thank you.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (15 preceding siblings ...)
2023-04-21 6:26 ` gmbeard
@ 2023-04-21 6:28 ` gmbeard
2023-04-21 6:44 ` [PR REVIEW] " gmbeard
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
New comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#issuecomment-1517330876
Comment:
Updated the version to `1.7.4`. There was a further update since opening the PR, which made some of the patches unnecessary.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (16 preceding siblings ...)
2023-04-21 6:28 ` gmbeard
@ 2023-04-21 6:44 ` gmbeard
2023-04-21 6:45 ` gmbeard
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
New review comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1173365952
Comment:
@paper42 The patch is only _applicable_ to musl, but I guess it would work on glibc too. Would it be preferable to apply the patch unconditionally?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (17 preceding siblings ...)
2023-04-21 6:44 ` [PR REVIEW] " gmbeard
@ 2023-04-21 6:45 ` gmbeard
2023-07-21 1:55 ` github-actions
2023-08-05 1:48 ` [PR PATCH] [Closed]: " github-actions
20 siblings, 0 replies; 22+ messages in thread
From: gmbeard @ 2023-04-21 6:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
New review comment by gmbeard on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#discussion_r1173365952
Comment:
@paper42 The (now updated) patch is only _applicable_ to musl, but I guess it would work on glibc too. Would it be preferable to apply the patch unconditionally?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (18 preceding siblings ...)
2023-04-21 6:45 ` gmbeard
@ 2023-07-21 1:55 ` github-actions
2023-08-05 1:48 ` [PR PATCH] [Closed]: " github-actions
20 siblings, 0 replies; 22+ messages in thread
From: github-actions @ 2023-07-21 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/42972#issuecomment-1644880120
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Closed]: apr: update to 1.7.4
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
` (19 preceding siblings ...)
2023-07-21 1:55 ` github-actions
@ 2023-08-05 1:48 ` github-actions
20 siblings, 0 replies; 22+ messages in thread
From: github-actions @ 2023-08-05 1:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
There's a closed pull request on the void-packages repository
apr: update to 1.7.4
https://github.com/void-linux/void-packages/pull/42972
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86\_64-glibc
- I built this PR locally for these architectures:
- aarch64
This also addresses #42441
- [x] apr
### Tests to fix
- [x] `testatomic`: consistency failure on atomic (i686)
- [x] `testsockets`: Socket bind failure (x86\_64, i686, x86\_64-musl)
- [x] `testdso` failure (x86\_64-musl)
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2023-08-05 1:48 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 6:58 [PR PATCH] apr: update to 1.7.2 gmbeard
2023-03-24 7:45 ` [PR PATCH] [Updated] " gmbeard
2023-03-24 8:28 ` gmbeard
2023-03-24 17:49 ` gmbeard
2023-03-25 8:55 ` gmbeard
2023-03-25 8:58 ` gmbeard
2023-03-25 11:34 ` gmbeard
2023-03-25 12:00 ` gmbeard
2023-03-28 19:37 ` gmbeard
2023-03-28 20:08 ` gmbeard
2023-04-05 4:29 ` gmbeard
2023-04-19 19:46 ` [PR REVIEW] " paper42
2023-04-19 19:46 ` paper42
2023-04-19 19:54 ` nekopsykose
2023-04-21 6:21 ` [PR PATCH] [Updated] " gmbeard
2023-04-21 6:23 ` [PR REVIEW] apr: update to 1.7.4 gmbeard
2023-04-21 6:26 ` gmbeard
2023-04-21 6:28 ` gmbeard
2023-04-21 6:44 ` [PR REVIEW] " gmbeard
2023-04-21 6:45 ` gmbeard
2023-07-21 1:55 ` github-actions
2023-08-05 1:48 ` [PR PATCH] [Closed]: " github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).