Sync from SUSE:SLFO:Main apr revision 48aa8b13580d835ea08d8a80e6c40ad1

This commit is contained in:
Adrian Schröter 2024-05-03 11:06:51 +02:00
commit 9ddc6e94a0
9 changed files with 7886 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
apr-1.7.4.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

17
apr-1.7.4.tar.bz2.asc Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJHBAABCgAxFiEEZbLUT+dL1ePeOsPwgngd5G1ZVPoFAmQ3ZCsTHGNvdmVuZXJA
YXBhY2hlLm9yZwAKCRCCeB3kbVlU+mb9D/9Wl1CGZ/biEYEyLPAq3Ik0DrGvSQ49
5wfaBCABRDBD2otD9YSuNrV+RZYkYys6xdPdGrQxUDkv5mh0hLZRvSK/Uf7eD9sD
sDZ5ZSj6+KWvpww8+QWiYOFZLKFqcdt7/g8CWZYy+h2wkAB3jSeOW6kmum2MNowI
8fE9ESMHwaR1nSNo+q7fTg4CyGtObEbDOcWdKwDW1Ib68Z2nj3zSz4i+rpZQZmCF
FvPvQIYcM/TDFhitsJwc8f11NJhtZybmAnmH1kl8Ncy8WScuj08nltEpvBdPgw8V
DG7tPrHNfbQnB3FUeBMlT8L1D6gGD7FZgynWmG49yc7V1Ll0JyW701mXsRcRCg6E
6xMBTeAek/QQthguAmpCsRMiLrPPMiCLs8B9vlnMWQEqYG0ng9ehzXVAWz4ix5K+
hWmVa95MHpxcoZ5joJL7G1AiVFjRuBJxyBA36qnYzleQWhtvmIW2Onf7QaknlXoC
3ABOa6OCs8DTMynoPlLJKsPACNrOQX79rIg4xfr0jSueDJnBnfF1CVSJES7+75n8
dt0kMm5Y718a44Vji9MtJrOXGDk9FhR8J3j++AE0vlYVpOGh5CXr2Ow0eldmaKWu
bgtlUdB7ai3kLjtBNUBjWiz7mniDiSPSp6eskVlbmTnOkkqqXXJMyQjJ+XIGdXQJ
8aDQ7ocCun+qhA==
=eV/3
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,31 @@
Index: apr-1.6.2/locks/unix/proc_mutex.c
===================================================================
--- apr-1.6.2.orig/locks/unix/proc_mutex.c
+++ apr-1.6.2/locks/unix/proc_mutex.c
@@ -435,24 +435,16 @@ static apr_status_t proc_mutex_pthread_c
const char *fname)
{
apr_status_t rv;
- int fd;
pthread_mutexattr_t mattr;
- fd = open("/dev/zero", O_RDWR);
- if (fd < 0) {
- return errno;
- }
-
new_mutex->os.pthread_interproc = mmap(NULL, sizeof(proc_pthread_mutex_t),
- PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, 0);
+ PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS,
+ -1, 0);
if (new_mutex->os.pthread_interproc == MAP_FAILED) {
new_mutex->os.pthread_interproc = NULL;
rv = errno;
- close(fd);
return rv;
}
- close(fd);
new_mutex->pthread_refcounting = 1;
new_mutex->curr_locked = -1; /* until the mutex has been created */

View File

@ -0,0 +1,13 @@
Index: apr-1.6.5/test/sendfile.c
===================================================================
--- apr-1.6.5.orig/test/sendfile.c 2013-10-14 15:45:05.000000000 +0200
+++ apr-1.6.5/test/sendfile.c 2019-02-08 10:58:50.731588817 +0100
@@ -463,7 +463,7 @@ static int client(apr_pool_t *p, client_
/* in case this is the non-blocking test, set socket timeout;
* we're just waiting for EOF */
- rv = apr_socket_timeout_set(sock, apr_time_from_sec(3));
+ rv = apr_socket_timeout_set(sock, apr_time_from_sec(10));
if (rv != APR_SUCCESS) {
aprerr("apr_socket_timeout_set()", rv);
}

44
apr-visibility.patch Normal file
View File

@ -0,0 +1,44 @@
Index: apr-1.7.0/include/apr.h.in
===================================================================
--- apr-1.7.0.orig/include/apr.h.in
+++ apr-1.7.0/include/apr.h.in
@@ -495,7 +495,7 @@ typedef apr_uint32_t apr_uin
* headers, without defining APR_DECLARE_STATIC, will prepare the code to be
* linked to the dynamic library.
*/
-#define APR_DECLARE(type) type
+#define APR_DECLARE(type) __attribute__ ((visibility ("default"))) type
/**
* The public APR functions using variable arguments are declared with
@@ -508,7 +508,7 @@ typedef apr_uint32_t apr_uin
*
* </PRE>
*/
-#define APR_DECLARE_NONSTD(type) type
+#define APR_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
/**
* The public APR variables are declared with AP_MODULE_DECLARE_DATA.
@@ -524,7 +524,7 @@ typedef apr_uint32_t apr_uin
*
* </PRE>
*/
-#define APR_DECLARE_DATA
+#define APR_DECLARE_DATA __attribute__ ((visibility ("default")))
#elif defined(APR_DECLARE_STATIC)
#define APR_DECLARE(type) type __stdcall
Index: apr-1.6.3/include/apr_support.h
===================================================================
--- apr-1.7.0.orig/include/apr_support.h
+++ apr-1.7.0/include/apr_support.h
@@ -45,7 +45,7 @@ extern "C" {
* otherwise wait for data to be able to be written.
* @return APR_TIMEUP if we run out of time.
*/
-apr_status_t apr_wait_for_io_or_timeout(apr_file_t *f, apr_socket_t *s,
+APR_DECLARE(apr_status_t) apr_wait_for_io_or_timeout(apr_file_t *f, apr_socket_t *s,
int for_read);
/** @} */

1024
apr.changes Normal file

File diff suppressed because it is too large Load Diff

6577
apr.keyring Normal file

File diff suppressed because it is too large Load Diff

154
apr.spec Normal file
View File

@ -0,0 +1,154 @@
#
# spec file for package apr
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define aprver 1
%define libname lib%{name}%{aprver}-0
%define installbuilddir %{_libdir}/apr-%{aprver}/build
%define includedir %{_includedir}/apr-%{aprver}
Name: apr
Version: 1.7.4
Release: 0
Summary: Apache Portable Runtime (APR) Library
License: Apache-2.0
Group: Development/Libraries/C and C++
URL: https://apr.apache.org/
Source0: https://www.apache.org/dist/apr/apr-%{version}.tar.bz2
Source1: https://www.apache.org/dist/apr/apr-%{version}.tar.bz2.asc
Source2: https://downloads.apache.org/apr/KEYS#/%{name}.keyring
Patch5: apr-visibility.patch
Patch9: apr-proc-mutex-map-anon.patch
# prevent random failures of the testsuite (sendfile test)
Patch10: apr-test-sendfile-timeout.patch
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: libuuid-devel
BuildRequires: lksctp-tools-devel
# for the testsuite
BuildRequires: netcfg
BuildRequires: pkgconfig
%description
APR is Apache's Portable Runtime Library, designed to be a support
library that provides a predictable and consistent interface to
underlying platform-specific implementations.
%package -n %{libname}
Summary: Apache Portable Runtime (APR) Library
Group: System/Libraries
%description -n %{libname}
APR is Apache's Portable Runtime Library, designed to be a support
library that provides a predictable and consistent interface to
underlying platform-specific implementations.
The range of platform-spanning functionality provided by APR
includes: Memory allocation and memory pool functionality, atomic
operations, dynamic library handling, file I/O, command-argument
parsing, locking, hash tables and arrays, mmap functionality, network
sockets and protocols, threads, process and mutex functionality,
shared memory functionality, time routines, as well as user and group
ID services.
%package devel
Summary: Development files for the Apache Portable Runtime (APR) library
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Provides: libapr1-devel = %{version}
Obsoletes: libapr1-devel < %{version}-%{release}
%description devel
APR is Apache's Portable Runtime Library, designed to be a support
library that provides a predictable and consistent interface to
underlying platform-specific implementations.
This subpackage contains header files for developing applications
that want to make use of APR.
%prep
%autosetup -p1
# Do not put date to doxy content
sed -i \
-e '4 iHTML_TIMESTAMP=NO' \
docs/doxygen.conf
%build
%configure \
--enable-other-child \
--with-installbuilddir=%{installbuilddir} \
--includedir=%{includedir} \
--with-devrandom=/dev/urandom \
--disable-static \
--enable-posix-shm \
--with-sendfile
%make_build CFLAGS="%{optflags} -DREADDIR_IS_THREAD_SAFE -fvisibility=hidden -fPIC"
%make_build dox
%install
%make_install
# Move docs to more convenient location
mv docs/dox/html html
# Unpackaged files:
rm -f %{buildroot}/%{_libdir}/apr.exp
rm -f %{buildroot}%{_libdir}/libapr-%{aprver}.la
# Trim exported dependecies
sed -ri '/^LIBS=/{s,-l(uuid|crypt) ,,g;s/ */ /g}' \
%{buildroot}%{_bindir}/apr-%{aprver}-config
sed -ri '/^Libs/{s,-l(uuid|crypt) ,,g}' \
%{buildroot}%{_libdir}/pkgconfig/apr-%{aprver}.pc
%fdupes %{buildroot}
%check
%if ! 0%{?qemu_user_space_build}
%ifarch ppc ppc64 ppc64le
%make_build check -j1 || { echo "ignore PowerPC transient test failures"; exit 0; }
%else
%make_build check -j1
%endif
%endif
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%doc CHANGES
%if 0%{?suse_version} > 1315
%license LICENSE
%else
%license LICENSE
%endif
%doc NOTICE
%{_libdir}/libapr-%{aprver}.so.*
# Do NOT move to devel as this is utilized by Tomcat
%{_libdir}/libapr-%{aprver}.so
%files devel
%doc docs/APRDesign.html
%doc docs/canonical_filenames.html
%doc docs/incomplete_types
%doc docs/non_apr_programs
%doc html
%doc emacs-mode
%{includedir}
%{_bindir}/apr-%{aprver}-config
%{_libdir}/pkgconfig/apr-%{aprver}.pc
%{_libdir}/apr-%{aprver}
%changelog