thrift: update to 0.18.1, patch out old tls and broken tests
This commit is contained in:
parent
bfbfa1bed7
commit
e0aefd77af
3 changed files with 98 additions and 9 deletions
39
srcpkgs/thrift/patches/network-tests.patch
Normal file
39
srcpkgs/thrift/patches/network-tests.patch
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
From https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/thrift/files/thrift-0.16.0-network-tests.patch
|
||||||
|
|
||||||
|
diff --git a/lib/cpp/test/ToStringTest.cpp b/lib/cpp/test/ToStringTest.cpp
|
||||||
|
index 736b33c0a..f66909873 100644
|
||||||
|
--- a/lib/cpp/test/ToStringTest.cpp
|
||||||
|
+++ b/lib/cpp/test/ToStringTest.cpp
|
||||||
|
@@ -41,31 +41,6 @@ BOOST_AUTO_TEST_CASE(base_types_to_string) {
|
||||||
|
BOOST_CHECK_EQUAL(to_string("abc"), "abc");
|
||||||
|
}
|
||||||
|
|
||||||
|
-// NOTE: Currently (as of 2021.08.12) the locale-based tests do not work on
|
||||||
|
-// Windows in the AppVeyor Thrift CI build correctly. Therefore disabled on
|
||||||
|
-// Windows:
|
||||||
|
-#ifndef _WIN32
|
||||||
|
-BOOST_AUTO_TEST_CASE(locale_en_US_int_to_string) {
|
||||||
|
-#ifdef _WIN32
|
||||||
|
- std::locale::global(std::locale("en-US.UTF-8"));
|
||||||
|
-#else
|
||||||
|
- std::locale::global(std::locale("en_US.UTF-8"));
|
||||||
|
-#endif
|
||||||
|
- BOOST_CHECK_EQUAL(to_string(1000000), "1000000");
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-BOOST_AUTO_TEST_CASE(locale_de_DE_floating_point_to_string) {
|
||||||
|
-#ifdef _WIN32
|
||||||
|
- std::locale::global(std::locale("de-DE.UTF-8"));
|
||||||
|
-#else
|
||||||
|
- std::locale::global(std::locale("de_DE.UTF-8"));
|
||||||
|
-#endif
|
||||||
|
- BOOST_CHECK_EQUAL(to_string(1.5), "1.5");
|
||||||
|
- BOOST_CHECK_EQUAL(to_string(1.5f), "1.5");
|
||||||
|
- BOOST_CHECK_EQUAL(to_string(1.5L), "1.5");
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
BOOST_AUTO_TEST_CASE(empty_vector_to_string) {
|
||||||
|
std::vector<int> l;
|
||||||
|
BOOST_CHECK_EQUAL(to_string(l), "[]");
|
||||||
|
|
44
srcpkgs/thrift/patches/skip-old-tls-tests.patch
Normal file
44
srcpkgs/thrift/patches/skip-old-tls-tests.patch
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
From: https://git.alpinelinux.org/aports/plain/community/thrift/skip-old-tls-tests.patch
|
||||||
|
|
||||||
|
Skip TLSv1_0 and TLSv1_1 test cases
|
||||||
|
--- a/lib/cpp/test/SecurityFromBufferTest.cpp
|
||||||
|
+++ b/lib/cpp/test/SecurityFromBufferTest.cpp
|
||||||
|
@@ -224,6 +224,16 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix) {
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ if (si == 3 || ci == 3) {
|
||||||
|
+ // Skip all TLSv1_0 cases - protocol not supported
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (si == 4 || ci == 4) {
|
||||||
|
+ // Skip all TLSv1_1 cases - protocol not supported
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
boost::mutex::scoped_lock lock(mMutex);
|
||||||
|
|
||||||
|
BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%") % protocol2str(si)
|
||||||
|
--- a/lib/cpp/test/SecurityTest.cpp
|
||||||
|
+++ b/lib/cpp/test/SecurityTest.cpp
|
||||||
|
@@ -250,6 +250,18 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ if (si == 3 || ci == 3)
|
||||||
|
+ {
|
||||||
|
+ // Skip all TLSv1_0 cases - protocol not supported
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (si == 4 || ci == 4)
|
||||||
|
+ {
|
||||||
|
+ // Skip all TLSv1_1 cases - protocol not supported
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
boost::mutex::scoped_lock lock(mMutex);
|
||||||
|
|
||||||
|
BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%")
|
||||||
|
|
|
@ -1,31 +1,37 @@
|
||||||
# Template file for 'thrift'
|
# Template file for 'thrift'
|
||||||
pkgname=thrift
|
pkgname=thrift
|
||||||
version=0.13.0
|
version=0.18.1
|
||||||
revision=6
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=cmake
|
||||||
configure_args="--without-python"
|
configure_args="-DBUILD_SHARED_LIBS=ON
|
||||||
|
-DWITH_AS3=OFF
|
||||||
|
-DWITH_JAVA=OFF
|
||||||
|
-DWITH_JAVASCRIPT=OFF
|
||||||
|
-DWITH_NODEJS=OFF
|
||||||
|
-DWITH_PYTHON=OFF"
|
||||||
|
hostmakedepends="flex"
|
||||||
makedepends="boost-devel openssl-devel"
|
makedepends="boost-devel openssl-devel"
|
||||||
checkdepends="zlib-devel libevent-devel"
|
checkdepends="zlib-devel libevent-devel"
|
||||||
short_desc="Apache Thrift compiler"
|
short_desc="Apache Thrift compiler"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="Apache-2.0"
|
license="Apache-2.0"
|
||||||
homepage="https://thrift.apache.org/"
|
homepage="https://thrift.apache.org/"
|
||||||
distfiles="http://www-us.apache.org/dist/thrift/${version}/thrift-${version}.tar.gz"
|
distfiles="https://github.com/apache/thrift/archive/v${version}.tar.gz"
|
||||||
checksum=7ad348b88033af46ce49148097afe354d513c1fca7c607b59c33ebb6064b5179
|
checksum=9cea30b9700153329ae1926cc05a20bbe3e8451ae270b0c8c5c5fe9929924cb3
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
makedepends+=" libatomic-devel"
|
makedepends+=" libatomic-devel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
configure_args+=" --disable-tests --disable-tutorial"
|
configure_args+=" -DBUILD_TESTING=OFF -DBUILD_TUTORIALS=OFF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
post_configure() {
|
post_configure() {
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
ppc64*) ;;
|
ppc64*) ;;
|
||||||
ppc*)
|
ppc*)
|
||||||
sed -i '/libthrift_la_LIBADD/s/$/ -latomic/' lib/cpp/Makefile
|
vsed -i '/libthrift_la_LIBADD/s/$/ -latomic/' lib/cpp/Makefile
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -35,8 +41,8 @@ thrift-devel_package() {
|
||||||
depends="${sourcepkg}>=${version}_${revision}"
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/include
|
vmove usr/include
|
||||||
vmove "usr/lib/*.a"
|
|
||||||
vmove "usr/lib/*.so"
|
vmove "usr/lib/*.so"
|
||||||
|
vmove usr/lib/cmake
|
||||||
vmove usr/lib/pkgconfig
|
vmove usr/lib/pkgconfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue