From 2251c7e998c49ecab0880c5409dc41412f400957 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Nov 19 2021 18:54:51 +0000 Subject: - Update to 2021.11.15.00 - Opt in to rpmautospec - Patch to support disabling Python tests, and disable all tests for now because of an include path problem Signed-off-by: Michel Alexandre Salim --- diff --git a/.gitignore b/.gitignore index 3606075..d64e3a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/fbthrift-2021.11.08.00.tar.gz +/fbthrift-????.??.??.??.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..96f9839 --- /dev/null +++ b/changelog @@ -0,0 +1,121 @@ +* Thu Nov 18 2021 Michel Alexandre Salim - 2021.11.15.00-1 +- Update to 2021.11.15.00 +- Opt in to rpmautospec +- Patch to support disabling Python tests, and disable all tests for now + because of an include path problem + +* Tue Sep 14 2021 Sahana Prasad - 2021.08.02.00-3 +- Rebuilt with OpenSSL 3.0.0 + +* Fri Aug 06 2021 Jonathan Wakely - 2021.08.02.00-2 +- Rebuilt for Boost 1.76 + +* Thu Aug 5 2021 Filipe Brandenburger - 2021.08.02.00-1 +- Update to 2021.08.02.00 +- Drop now upstreamed patch to fix Cython build of stream. +- Use _fbprefix for _serialize and _deserialize. + +* Sun Aug 1 2021 Michel Alexandre Salim - 2021.07.22.00-1 +- Update to 2021.07.22.00 +- Fix stream compilation on i686 and armv7hl + +* Wed Jul 28 2021 Filipe Brandenburger - 2021.06.28.00-6 +- Use C++20 standard, in order to enable C++ coroutines. + +* Wed Jul 28 2021 Filipe Brandenburger - 2021.06.28.00-5 +- Include stream.{pxd,pyx,cpp} build in thrift/lib/py3 CMakeLists. + +* Mon Jul 26 2021 Filipe Brandenburger - 2021.06.28.00-4 +- Remove patch to rename _serialize, now that folly has been + updated to not include the problematic header file. + +* Sun Jul 25 2021 Michel Alexandre Salim - 2021.06.28.00-3 +- Rebuilt for Folly 2021.07.20.01 + +* Wed Jul 21 2021 Fedora Release Engineering - 2021.06.28.00-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jul 12 2021 Michel Alexandre Salim - 2021.06.28.00-1 +- Update to 2021.06.28.00 + +* Mon Jul 05 2021 Richard Shaw - 2021.05.10.00-3 +- Rebuild for new fmt version. + +* Fri Jun 04 2021 Python Maint - 2021.05.10.00-2 +- Rebuilt for Python 3.10 + +* Mon May 10 2021 Michel Alexandre Salim - 2021.05.10.00-1 +- Update to 2021.05.10.00 + +* Mon Apr 26 2021 Michel Alexandre Salim - 2021.04.26.00-1 +- Update to 2021.04.26.00 + +* Fri Apr 16 2021 Michel Alexandre Salim - 2021.04.12.00-1 +- Update to 2021.04.12.00 + +* Mon Mar 29 2021 Michel Alexandre Salim - 2021.03.29.00-1 +- Update to 2021.03.29.00 + +* Wed Mar 24 2021 Michel Alexandre Salim - 2021.03.22.00-1 +- Update to 2021.03.22.00 + +* Mon Mar 15 2021 Michel Alexandre Salim - 2021.03.15.00-1 +- Update to 2021.03.15.00 + +* Wed Feb 03 2021 Michel Alexandre Salim - 2021.02.01.00-1 +- Update to 2021.02.01.00 + +* Tue Jan 26 17:50:22 PST 2021 Michel Alexandre Salim - 2021.01.25.00-1 +- Update to 2021.01.25.00 + +* Tue Jan 26 2021 Fedora Release Engineering - 2020.12.28.00-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Jonathan Wakely - 2020.12.28.00-2 +- Rebuilt for Boost 1.75 + +* Tue Dec 29 12:15:55 PST 2020 Michel Alexandre Salim - 2020.12.28.00-1 +- Update to 2020.12.28.00 + +* Tue Dec 22 16:57:24 PST 2020 Michel Alexandre Salim - 2020.12.21.00-1 +- Update to 2020.12.21.00 + +* Mon Nov 30 10:42:52 PST 2020 Michel Alexandre Salim - 2020.11.30.00-1 +- Update to 2020.11.30.00 + +* Mon Nov 23 2020 Michel Alexandre Salim - 2020.11.23.00-1 +- Update to 2020.11.23.00 + +* Mon Nov 16 2020 Michel Alexandre Salim - 2020.11.16.00-1 +- Update to 2020.11.16.00 + +* Fri Nov 13 2020 Filipe Brandenburger - 2020.11.09.00-3 +- Update CMakeList and setup.py for python3 to include all modules and + to include enums source together with the types module. + +* Tue Nov 10 2020 Michel Alexandre Salim - 2020.11.09.00-2 +- Enable Python binding by default + +* Mon Nov 9 2020 Michel Alexandre Salim - 2020.11.09.00-1 +- Update to 2020.11.09.00 +- Enable Python binding + +* Wed Nov 4 2020 Michel Alexandre Salim - 2020.11.02.00-3 +- Rebase patch on top of upstream CMakeLists.txt change + +* Wed Nov 4 2020 Michel Alexandre Salim - 2020.11.02.00-2 +- Enable static subpackage on architectures where fizz-static is available + +* Mon Nov 2 2020 Michel Alexandre Salim - 2020.11.02.00-1 +- Update to 2020.11.02.00 +- Fix undefined symbol warnings + +* Mon Nov 2 2020 Michel Alexandre Salim - 2020.10.26.00-3 +- Mark fbthrift-devel as conflicting with thrift-devel +- Disable RPATH when installing libraries + +* Thu Oct 29 2020 Michel Alexandre Salim - 2020.10.26.00-2 +- Use shorter, canonical URL for source + +* Tue Oct 27 2020 Michel Alexandre Salim - 2020.10.26.00-1 +- Initial package diff --git a/fbthrift-disable-assert-armv7hl.patch b/fbthrift-disable-assert-armv7hl.patch deleted file mode 100644 index 4a8be01..0000000 --- a/fbthrift-disable-assert-armv7hl.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 09459891450e13e7cf2fa6fe36958cf63bf3df32 Mon Sep 17 00:00:00 2001 -From: Michel Alexandre Salim -Date: Fri, 30 Jul 2021 21:43:36 -0700 -Subject: [PATCH] Disable armv7hl size assertion - -Signed-off-by: Michel Alexandre Salim ---- - thrift/lib/cpp2/async/ServerPublisherStream.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/thrift/lib/cpp2/async/ServerPublisherStream.h b/thrift/lib/cpp2/async/ServerPublisherStream.h -index 471dc7505..a91a56264 100644 ---- a/thrift/lib/cpp2/async/ServerPublisherStream.h -+++ b/thrift/lib/cpp2/async/ServerPublisherStream.h -@@ -155,9 +155,11 @@ class ServerPublisherStream : private StreamServerCallback { - } credits; - - CreditBuffer() { -+ #if !FOLLY_ARM - static_assert( - sizeof credits == sizeof buffer, - "CreditBuffer members must be the same size"); -+ #endif - credits.isSet = true; - credits.val = 0; - } --- -2.31.1 - diff --git a/fbthrift-fix_std_min-comparison-i686.patch b/fbthrift-fix_std_min-comparison-i686.patch deleted file mode 100644 index ecb04e9..0000000 --- a/fbthrift-fix_std_min-comparison-i686.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 01718ea5fc8f9bdf228214398f1f99ceaa7fbe79 Mon Sep 17 00:00:00 2001 -From: Michel Alexandre Salim -Date: Fri, 30 Jul 2021 15:30:52 -0700 -Subject: [PATCH] Fix `std::min` comparison on i686 - -Explicitly cast the second argument to `uint64_t` since otherwise, -on `i686` it is detected to be an `int64_t` instead - -Signed-off-by: Michel Alexandre Salim ---- - thrift/lib/cpp2/async/ServerPublisherStream.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/thrift/lib/cpp2/async/ServerPublisherStream.h b/thrift/lib/cpp2/async/ServerPublisherStream.h -index d2a90d542..471dc7505 100644 ---- a/thrift/lib/cpp2/async/ServerPublisherStream.h -+++ b/thrift/lib/cpp2/async/ServerPublisherStream.h -@@ -168,7 +168,7 @@ class ServerPublisherStream : private StreamServerCallback { - } - void addCredits(int64_t delta) { - DCHECK(credits.isSet); -- credits.val = std::min(maxCreditVal, credits.val + delta); -+ credits.val = std::min(maxCreditVal, static_cast(credits.val + delta)); - } - bool hasCredit() { return credits.isSet && credits.val; } - void storeBuffer(Queue&& buf) { --- -2.31.1 - diff --git a/fbthrift-toggle_py_tests.patch b/fbthrift-toggle_py_tests.patch new file mode 100644 index 0000000..bfde07d --- /dev/null +++ b/fbthrift-toggle_py_tests.patch @@ -0,0 +1,10 @@ +--- fbthrift-2021.11.15.00/thrift/lib/py3/CMakeLists.txt.no_tests 2021-11-15 00:28:52.000000000 -0800 ++++ fbthrift-2021.11.15.00/thrift/lib/py3/CMakeLists.txt 2021-11-19 10:16:36.796748134 -0800 +@@ -143,4 +143,6 @@ + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cybld)" + ) + +-add_subdirectory(test) ++if (enable_tests) ++ add_subdirectory(test) ++endif () diff --git a/fbthrift-use-fbthrift-prefix-for-serdes.patch b/fbthrift-use-fbthrift-prefix-for-serdes.patch deleted file mode 100644 index 207efb7..0000000 --- a/fbthrift-use-fbthrift-prefix-for-serdes.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -Naur fbthrift-2021.08.02.00.orig/thrift/compiler/generate/templates/py3/types.pyx.mustache fbthrift-2021.08.02.00/thrift/compiler/generate/templates/py3/types.pyx.mustache ---- fbthrift-2021.08.02.00.orig/thrift/compiler/generate/templates/py3/types.pyx.mustache 2021-08-01 20:30:09.000000000 -0700 -+++ fbthrift-2021.08.02.00/thrift/compiler/generate/templates/py3/types.pyx.mustache 2021-08-05 17:36:54.984646402 -0700 -@@ -393,13 +393,13 @@ - self._fbthrift_struct_size = {{struct:size}} - - {{^struct:exception?}} -- cdef _fbthrift_iobuf.IOBuf _serialize({{struct:name}} self, __Protocol proto): -+ cdef _fbthrift_iobuf.IOBuf _fbthrift_serialize({{struct:name}} self, __Protocol proto): - cdef unique_ptr[_fbthrift_iobuf.cIOBuf] data - with nogil: - data = cmove(serializer.cserialize[c{{struct:name}}](self._cpp_obj.get(), proto)) - return _fbthrift_iobuf.from_unique_ptr(cmove(data)) - -- cdef cuint32_t _deserialize({{struct:name}} self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0: -+ cdef cuint32_t _fbthrift_deserialize({{struct:name}} self, const _fbthrift_iobuf.cIOBuf* buf, __Protocol proto) except? 0: - cdef cuint32_t needed - {{! - This is a special case, we need to construct an empty _cpp_obj because -diff -Naur fbthrift-2021.08.02.00.orig/thrift/lib/py3/serializer.pyx fbthrift-2021.08.02.00/thrift/lib/py3/serializer.pyx ---- fbthrift-2021.08.02.00.orig/thrift/lib/py3/serializer.pyx 2021-08-01 20:30:09.000000000 -0700 -+++ fbthrift-2021.08.02.00/thrift/lib/py3/serializer.pyx 2021-08-05 17:37:15.888836367 -0700 -@@ -27,7 +27,7 @@ - if not isinstance(protocol, Protocol): - raise TypeError(f"{protocol} must of type Protocol") - cdef Struct cy_struct = tstruct -- return cy_struct._serialize(protocol) -+ return cy_struct._fbthrift_serialize(protocol) - - - def deserialize_with_length(structKlass, buf not None, protocol=Protocol.COMPACT): -@@ -39,7 +39,7 @@ - - cdef IOBuf iobuf = buf if isinstance(buf, IOBuf) else IOBuf(buf) - try: -- length = cy_struct._deserialize(iobuf._this, protocol) -+ length = cy_struct._fbthrift_deserialize(iobuf._this, protocol) - return cy_struct, length - except Exception as e: - raise Error.__new__(Error, *e.args) from None -diff -Naur fbthrift-2021.08.02.00.orig/thrift/lib/py3/types.pxd fbthrift-2021.08.02.00/thrift/lib/py3/types.pxd ---- fbthrift-2021.08.02.00.orig/thrift/lib/py3/types.pxd 2021-08-01 20:30:09.000000000 -0700 -+++ fbthrift-2021.08.02.00/thrift/lib/py3/types.pxd 2021-08-05 17:37:33.724998448 -0700 -@@ -141,8 +141,8 @@ - cdef object _fbthrift_hash - cdef object __weakref__ - cdef size_t _fbthrift_struct_size -- cdef IOBuf _serialize(self, Protocol proto) -- cdef uint32_t _deserialize(self, const cIOBuf* buf, Protocol proto) except? 0 -+ cdef IOBuf _fbthrift_serialize(self, Protocol proto) -+ cdef uint32_t _fbthrift_deserialize(self, const cIOBuf* buf, Protocol proto) except? 0 - cdef object _fbthrift_isset(self) - cdef bint _fbthrift_noncomparable_eq(self, other) - cdef object _fbthrift_cmp_sametype(self, other, int op) -diff -Naur fbthrift-2021.08.02.00.orig/thrift/lib/py3/types.pyx fbthrift-2021.08.02.00/thrift/lib/py3/types.pyx ---- fbthrift-2021.08.02.00.orig/thrift/lib/py3/types.pyx 2021-08-01 20:30:09.000000000 -0700 -+++ fbthrift-2021.08.02.00/thrift/lib/py3/types.pyx 2021-08-05 17:38:03.470268753 -0700 -@@ -130,10 +130,10 @@ - """ - Base class for all thrift structs - """ -- cdef IOBuf _serialize(self, Protocol proto): -+ cdef IOBuf _fbthrift_serialize(self, Protocol proto): - return IOBuf(b'') - -- cdef uint32_t _deserialize(self, const cIOBuf* buf, Protocol proto) except? 0: -+ cdef uint32_t _fbthrift_deserialize(self, const cIOBuf* buf, Protocol proto) except? 0: - return 0 - - cdef object _fbthrift_isset(self): diff --git a/fbthrift.spec b/fbthrift.spec index 5e476c0..2c569cc 100644 --- a/fbthrift.spec +++ b/fbthrift.spec @@ -15,20 +15,23 @@ %global _static_builddir static_build +# tests currently failing +# gmake[2]: *** [thrift/lib/py3/test/CMakeFiles/testing-py3-target.dir/build.make:82: thrift/lib/py3/test/gen-py3/testing_constants.h] Error 1 +# [FAILURE:/builddir/build/BUILD/fbthrift-2021.11.15.00/thrift/lib/py3/test/testing.thrift:17] Could not find include file thrift/annotation/cpp.thrift +%bcond_with tests + # Use C++20 standard, required for folly coroutines. %global build_cxxflags -std=c++20 %{optflags} Name: fbthrift -Version: 2021.11.08.00 -Release: 1%{?dist} +Version: 2021.11.15.00 +Release: %autorelease Summary: Facebook's branch of Apache Thrift, including a new C++ server License: ASL 2.0 URL: https://github.com/facebook/fbthrift Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch1: %{name}-fix_std_min-comparison-i686.patch -Patch2: %{name}-disable-assert-armv7hl.patch -Patch3: %{name}-use-fbthrift-prefix-for-serdes.patch +Patch0: %{name}-toggle_py_tests.patch # Folly is known not to work on big-endian CPUs # https://bugzilla.redhat.com/show_bug.cgi?id=1894635 @@ -138,7 +141,11 @@ popd %if %{with python} -Dthriftpy3=ON \ %endif +%if %{with tests} -Denable_tests=ON +%else + -Denable_tests=OFF +%endif %cmake_build @@ -197,6 +204,7 @@ chrpath --delete \ %changelog +%autochangelog * Fri Nov 12 2021 Michel Alexandre Salim - 2021.11.08.00-1 - Update to 2021.11.08.00 diff --git a/sources b/sources index 8954a49..a259a49 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fbthrift-2021.11.08.00.tar.gz) = d9b89f7a569e723eeb5125cb4e5582fdab8f94924ea0feac0faea4878f85c66caefd2dfc3743cfb7877438e9811d68982f61df033c5ebfb62ee7890898876a69 +SHA512 (fbthrift-2021.11.15.00.tar.gz) = c3f3a13d69dc3578e3af83e15b7cd6b01f6d38c4a79a02ec1a626c8bec52bce569f536262371985ee52d1428513c303c3fe1b2a4a9107146c94c7471ef998ab7