summaryrefslogtreecommitdiff
path: root/dev-libs/apr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-20 14:38:48 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-20 14:38:48 +0100
commitdd45cee79a4c905271356e96af531293b62c429b (patch)
treebadf99f89a2e65ae16720e8c67fad03183873dd0 /dev-libs/apr
parent32fc5f4a2c2017f1f9c628fab9dcb5a54c3e6f03 (diff)
gentoo auto-resync : 20:08:2022 - 14:38:48
Diffstat (limited to 'dev-libs/apr')
-rw-r--r--dev-libs/apr/Manifest2
-rw-r--r--dev-libs/apr/apr-1.7.0-r5.ebuild162
-rw-r--r--dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch53
3 files changed, 217 insertions, 0 deletions
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest
index feafa073a96b..8c9f1fc6d6c2 100644
--- a/dev-libs/apr/Manifest
+++ b/dev-libs/apr/Manifest
@@ -3,8 +3,10 @@ AUX apr-1.5.0-libtool.patch 514 BLAKE2B b9d33d1317293c7614a3f0f753e466c7f8acf079
AUX apr-1.5.0-mint.patch 872 BLAKE2B dda2941cbed87117a8a6c488bd8045894686aef0ba219ff489f67dd03b58fb07a05f9e67c54cdff330c65e579c41c992446a465104661bbacbb2525a5b9518eb SHA512 ba71f17ef9f61a8379139f05ca17eb583ad34cbc3ebf5c4f59d011662db6b5c963da5c466c093c3eb98372299d8f202d927a05b52cc7515270ac52fe44ec6daf
AUX apr-1.5.0-sysroot.patch 1309 BLAKE2B de3dc13a44a9d5071c249875322b7d6be9ed765176f8232b96a5e5088c5764dff8b810377b214999b59380522fdc9d0577217fe1acff5a7ab4b17461d6daf909 SHA512 48609c522225b47df96039174dafa043f77ce5b91f464b14250dd2b30590d6685c9baa03d4ca34937532c26afea8d208fb78158dfc8026a606ff90543b5c8d5d
AUX apr-1.6.3-skip-known-failing-tests.patch 512 BLAKE2B 29607bce9a35853d824f8872557f361f3d5ffa0f2c7cd35e06cbf4d449e54f1b12978c0220b8ce4ae5d590ee9e04b5cd77af22876e3880deef115efbeb5a1dcc SHA512 ac097d28d5ae0b2437522da0578ff8bd049190d8df576e4e5298426f827b2bf69891e4f33bd1ffaf1a3c53143927e71f10d8362567121faa03cdf908d4fbc6c2
+AUX apr-1.7.0-CVE-2021-35940.patch 1749 BLAKE2B 256687934fd6b2af494198456d059f8a6edaaeb8b17f9186d0801bef489443faffefda3724d6c083f05811356c5168db31e5defbe19394699092090f7befdae6 SHA512 a2419817809dfd92a6d3b12e2067a802505d77d400fd47a4b9bb6fd5ae94c4be092e0d3b5894de429c6cc4a82d8133b801636bcab93d0f740c8f06a46516cd72
AUX apr-1.7.0-autoconf-2.70.patch 1970 BLAKE2B b552e2bb1be932a692e2d1fad5124b5db9163e45b1bef1fe97082db28efd6f6079d75253e961ca257bd31f53f814bdb11a2c6554fd5d1925d26fe7b42664db42 SHA512 63a56be83f555a78f422f9ce7074e5c3a497a4996d32ead78d9e1a05fba2e0dbdfb135c34143676b8ad16e8276642843d5ed8b17a540be58c6bf7e9662896c2f
AUX config.layout.patch 745 BLAKE2B 9877db3d76339b70f2bd354d118eff0df4d63bc81e4af9e65169c1c5862c3fa3532cc02df8e084b540e7a81091c3b16d50388c6234cba469b15fff896d0428fc SHA512 3a87e718859c8f95793f828b764d240907d65c21fe2c99143815ab835f8b657154092c4ad496e86d79490bd85ef03d394d3acb57a15186f2f06a518b32d77fdf
DIST apr-1.7.0.tar.bz2 872238 BLAKE2B a8750c45ca6495073a7120f3ae9b858905aecb24b6af5966c3900b06ac1f6d6b55346b17a39a9604cf1b595882335adedf8c8cf4db10e322501bfff4ad7adfe7 SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
EBUILD apr-1.7.0-r4.ebuild 4511 BLAKE2B 74ea0dd4227e2785e1a45eff3d1293d9fe937b57917107e736c0a1b056623eca5524e2bd3fe6c4f53c807e41394beca57513fed1318cf34c2b96abe8dede4c40 SHA512 dcf4320fe8c7ac38b3e89fe32a94fa9f4150d2269fc0e49822a9f488c9de485449f1ffa9e4d370b2f2c8ed1aecf46eea5313dfe779c1b08f55f4baa13bf0ac51
+EBUILD apr-1.7.0-r5.ebuild 4574 BLAKE2B 97d3f0d426379d85afe3960d3b832be88a143f4df994deaaff7cb689b035b67be9b885f73a744f7df7ce66fa0ac1d8c2b80a4d3c25592e09da6c1147936e05c3 SHA512 ecee94fdef9241e953f40668e303938bbfd19add367fc3432bf209f8c459f3e557e8e9fc7f40b1f735fdf1a5a77f684b6de033e79b7f9f69168408e14d5be931
MISC metadata.xml 511 BLAKE2B 5b4f31f74a9e3fe93b63bb337b5e0b7396c18439c269de0ec6c8308becf69ac8474d72dc921c80c06321bcaf708d49c9e26ec282036e84a9b03c08858c942980 SHA512 82063beddf8ce88d5f151ddeb8b3b69c10124af1c7b727b4c73885b4b14a427e93cd4164ddd4e3dfcdf7175727a8dffa357f1f14c3daee192a255f8995e6b0b5
diff --git a/dev-libs/apr/apr-1.7.0-r5.ebuild b/dev-libs/apr/apr-1.7.0-r5.ebuild
new file mode 100644
index 000000000000..b3db9ef05212
--- /dev/null
+++ b/dev-libs/apr/apr-1.7.0-r5.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools libtool toolchain-funcs
+
+DESCRIPTION="Apache Portable Runtime Library"
+HOMEPAGE="https://apr.apache.org/"
+SRC_URI="mirror://apache/apr/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="1/${PV%.*}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc older-kernels-compatibility selinux static-libs +urandom"
+
+# See bug #815265 for libcrypt dependency
+CDEPEND="virtual/libcrypt:=
+ elibc_glibc? ( >=sys-apps/util-linux-2.16 )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-base-policy )"
+DEPEND="${CDEPEND}
+ >=sys-devel/libtool-2.4.2
+ doc? ( app-doc/doxygen )"
+
+DOCS=( CHANGES NOTICE README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.0-mint.patch
+ "${FILESDIR}"/${PN}-1.5.0-libtool.patch
+ "${FILESDIR}"/${PN}-1.5.0-cross-types.patch
+ "${FILESDIR}"/${PN}-1.5.0-sysroot.patch #385775
+ "${FILESDIR}"/${PN}-1.6.3-skip-known-failing-tests.patch
+ "${FILESDIR}"/${PN}-1.7.0-autoconf-2.70.patch #750353
+ "${FILESDIR}"/${PN}-1.7.0-CVE-2021-35940.patch #828545
+)
+
+src_prepare() {
+ default
+
+ mv configure.in configure.ac || die
+ AT_M4DIR="build" eautoreconf
+ elibtoolize
+
+ eapply "${FILESDIR}/config.layout.patch"
+}
+
+src_configure() {
+ local myconf=(
+ --enable-layout=gentoo
+ --enable-nonportable-atomics
+ --enable-posix-shm
+ --enable-threads
+ $(use_enable static-libs static)
+ --with-installbuilddir="${EPREFIX}"/usr/share/${PN}/build
+ )
+
+ if use older-kernels-compatibility; then
+ local apr_cv_accept4 apr_cv_dup3 apr_cv_epoll_create1 apr_cv_sock_cloexec
+ export apr_cv_accept4="no"
+ export apr_cv_dup3="no"
+ export apr_cv_epoll_create1="no"
+ export apr_cv_sock_cloexec="no"
+ fi
+ if tc-is-cross-compiler; then
+ # The apache project relies heavily on AC_TRY_RUN and doesn't
+ # have any sane cross-compiling fallback logic.
+ export \
+ ac_cv_file__dev_zero="yes" \
+ ac_cv_func_sem_open="yes" \
+ ac_cv_negative_eai="yes" \
+ ac_cv_o_nonblock_inherited="no" \
+ ac_cv_struct_rlimit="yes" \
+ ap_cv_atomic_builtins="yes" \
+ apr_cv_accept4="yes" \
+ apr_cv_dup3="yes" \
+ apr_cv_epoll="yes" \
+ apr_cv_epoll_create1="yes" \
+ apr_cv_gai_addrconfig="yes" \
+ apr_cv_mutex_recursive="yes" \
+ apr_cv_mutex_robust_shared="yes" \
+ apr_cv_process_shared_works="yes" \
+ apr_cv_pthreads_lib="-pthread" \
+ apr_cv_sock_cloexec="yes" \
+ apr_cv_tcp_nodelay_with_cork="yes"
+ fi
+
+ if use urandom; then
+ myconf+=( --with-devrandom=/dev/urandom )
+ elif (( ${CHOST#*-hpux11.} <= 11 )); then
+ : # no /dev/*random on hpux11.11 and before, ${PN} detects this.
+ else
+ myconf+=( --with-devrandom=/dev/random )
+ fi
+
+ tc-is-static-only && myconf+=( --disable-dso )
+
+ # shl_load does not search runpath, but hpux11 supports dlopen
+ [[ ${CHOST} == *-hpux11* ]] && myconf+=( --enable-dso=dlfcn )
+
+ if [[ ${CHOST} == *-solaris2.10 ]]; then
+ case $(<$([[ ${CHOST} != ${CBUILD} ]] && echo "${EPREFIX}/usr/${CHOST}")/usr/include/atomic.h) in
+ *atomic_cas_ptr*) ;;
+ *)
+ elog "You do not have Solaris Patch ID "$(
+ [[ ${CHOST} == sparc* ]] && echo 118884 || echo 118885
+ )" (Problem 4954703) installed on your host ($(hostname)),"
+ elog "using generic atomic operations instead."
+ myconf+=( --disable-nonportable-atomics )
+ ;;
+ esac
+ else
+ if use ppc || use sparc || use mips; then
+ # Avoid libapr containing undefined references (underlinked)
+ # undefined reference to `__sync_val_compare_and_swap_8'
+ # (May be possible to fix via libatomic linkage in future?)
+ # bug #740464
+ myconf+=( --disable-nonportable-atomics )
+ fi
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ if tc-is-cross-compiler; then
+ # This header is the same across targets, so use the build compiler.
+ emake tools/gen_test_char
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
+ tools/gen_test_char.c -o tools/gen_test_char || die
+ fi
+
+ emake
+
+ if use doc; then
+ emake dox
+ fi
+}
+
+src_test() {
+ # Building tests in parallel is broken
+ emake -j1 check
+}
+
+src_install() {
+ default
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+
+ if use doc; then
+ docinto html
+ dodoc -r docs/dox/html/*
+ fi
+
+ # This file is only used on AIX systems, which Gentoo is not,
+ # and causes collisions between the SLOTs, so remove it.
+ # Even in Prefix, we don't need this on AIX.
+ rm "${ED}/usr/$(get_libdir)/apr.exp" || die
+}
diff --git a/dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch b/dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch
new file mode 100644
index 000000000000..f23d729f523e
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch
@@ -0,0 +1,53 @@
+
+SECURITY: CVE-2021-35940 (cve.mitre.org)
+
+Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though
+was addressed in 1.6.x in 1.6.3 and later via r1807976.
+
+The fix was merged back to 1.7.x in r1891198.
+
+Since this was a regression in 1.7.0, a new CVE name has been assigned
+to track this, CVE-2021-35940.
+
+Thanks to Iveta Cesalova <icesalov redhat.com> for reporting this issue.
+
+https://svn.apache.org/viewvc?view=revision&revision=1891198
+
+Index: time/unix/time.c
+===================================================================
+--- a/time/unix/time.c (revision 1891197)
++++ b/time/unix/time.c (revision 1891198)
+@@ -142,6 +142,9 @@
+ static const int dayoffset[12] =
+ {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
+
++ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
++ return APR_EBADDATE;
++
+ /* shift new year to 1st March in order to make leap year calc easy */
+
+ if (xt->tm_mon < 2)
+Index: time/win32/time.c
+===================================================================
+--- a/time/win32/time.c (revision 1891197)
++++ b/time/win32/time.c (revision 1891198)
+@@ -54,6 +54,9 @@
+ static const int dayoffset[12] =
+ {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
+
++ if (tm->wMonth < 1 || tm->wMonth > 12)
++ return APR_EBADDATE;
++
+ /* Note; the caller is responsible for filling in detailed tm_usec,
+ * tm_gmtoff and tm_isdst data when applicable.
+ */
+@@ -228,6 +231,9 @@
+ static const int dayoffset[12] =
+ {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
+
++ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
++ return APR_EBADDATE;
++
+ /* shift new year to 1st March in order to make leap year calc easy */
+
+ if (xt->tm_mon < 2)