## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec %if 0%{?fedora} == 36 # Folly is compiled with Clang - Now F37 folly is compiled with gcc # Also, on F37 build of fbthrift fails with clang on aarch64 %bcond_without toolchain_clang %else %bcond_with toolchain_clang %endif %if %{with toolchain_clang} %global toolchain clang %endif # requires python3-Cython >= 0.29.17 for libcpp.utility.move %if 0%{?fedora} || 0%{?rhel} >= 9 %bcond_without python %else %bcond_with python %endif # 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 check Name: fbthrift Version: 2022.03.14.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 # causes deleted function error, revert # traced to https://github.com/facebook/fbthrift/blob/c1be51b727557db4696c9f39fff114dd44eaba4b/thrift/lib/py3/serializer.pyx#L80 Patch0: %{name}-revert_serializer_fix.patch # when compiling with clang but with gcc's libstdc++, this is needed Patch1: %{name}-fix_contextstack.patch # Folly is known not to work on big-endian CPUs # https://bugzilla.redhat.com/show_bug.cgi?id=1894635 ExcludeArch: s390x %if 0%{?fedora} == 36 # fmt code breaks: https://bugzilla.redhat.com/show_bug.cgi?id=2061022 ExcludeArch: ppc64le %endif BuildRequires: cmake %if %{with toolchain_clang} BuildRequires: clang %else BuildRequires: gcc-c++ %endif # Tool dependencies BuildRequires: bison BuildRequires: chrpath BuildRequires: flex # Library dependencies BuildRequires: fizz-devel = %{version} BuildRequires: folly-devel = %{version} BuildRequires: wangle-devel = %{version} # Test dependencies %if %{with check} BuildRequires: gmock-devel BuildRequires: gtest-devel %endif %global _description %{expand: Thrift is a serialization and RPC framework for service communication. Thrift enables these features in all major languages, and there is strong support for C++, Python, Hack, and Java. Most services at Facebook are written using Thrift for RPC, and some storage systems use Thrift for serializing records on disk. Facebook Thrift is not a distribution of Apache Thrift. This is an evolved internal branch of Thrift that Facebook re-released to open source community in February 2014. Facebook Thrift was originally released closely tracking Apache Thrift but is now evolving in new directions. In particular, the compiler was rewritten from scratch and the new implementation features a fully asynchronous Thrift server.} %description %{_description} %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Conflicts: thrift-devel Obsoletes: %{name}-static < 2022.02.28.00-1 %description devel %{_description} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %if %{with python} %package -n python3-%{name} Summary: Python bindings for %{name} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-folly-devel BuildRequires: python3dist(cython) BuildRequires: python3dist(wheel) Requires: %{name}%{?_isa} = %{version}-%{release} Conflicts: python3-thrift %description -n python3-%{name} %{_description} The python3-%{name} package contains Python bindings for %{name}. %package -n python3-%{name}-devel Summary: Development files for python3-%{name} Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: python3-%{name}%{?_isa} = %{version}-%{release} %description -n python3-%{name}-devel %{_description} The python3-%{name}-devel package contains libraries and header files for developing applications that use python3-%{name}. %endif %prep %setup -q %patch0 -p1 %if %{with toolchain_clang} %patch1 -p1 %endif %build %cmake \ -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \ -DCMAKE_SKIP_INSTALL_RPATH=TRUE \ -DPACKAGE_VERSION=%{version} \ %if %{with python} -Dthriftpy3=ON \ %endif %if %{with check} -Denable_tests=ON %else -Denable_tests=OFF %endif %cmake_build %install %cmake_install # find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %if %{with python} # Delete RPATHs chrpath --delete \ $RPM_BUILD_ROOT%{python3_sitearch}/thrift/py3/*.so %endif %if %{with check} %check %ctest %endif %files %license LICENSE %{_bindir}/thrift1 %{_libdir}/*.so.* %files devel %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_includedir}/* %{_libdir}/*.so %{_libdir}/cmake/%{name} %exclude %{_includedir}/thrift/lib/py3 %if %{with python} %files -n python3-%{name} %{python3_sitearch}/thrift %{python3_sitearch}/thrift-0.0.1-py%{python3_version}.egg-info %exclude %{python3_sitearch}/thrift/py3/*.pxd %files -n python3-%{name}-devel %{_includedir}/thrift/lib/py3 %{python3_sitearch}/thrift/*.pxd %{python3_sitearch}/thrift/py3/*.pxd %endif %changelog * Tue Jul 19 2022 Mamoru TASAKA 2022.03.14.00-4 - Rebuild for fmt-9, and enable ppc64le again * Sat Jul 16 2022 Mamoru TASAKA 2022.03.14.00-3 - Rebuild with gcc to fix FTBFS on aarch64 * Wed May 04 2022 Thomas Rodgers 2022.03.14.00-2 - Rebuilt for Boost 1.78 * Mon Mar 14 2022 Michel Alexandre Salim 2022.03.14.00-1 - Update to 2022.03.14.00 * Tue Mar 08 2022 Michel Alexandre Salim 2022.03.07.00-1 - Update to 2022.03.07.00 (resolves: rhbz#2059325) * Sat Mar 05 2022 Michel Alexandre Salim 2022.02.28.00-1 - Update to 2022.02.28.00; drop static build; use clang on releases with GCC 12 * Thu Feb 24 2022 Michel Alexandre Salim 2022.02.21.00-1 - Update to 2022.02.21.00 (resolves: rhbz#2035844) * Thu Jan 20 2022 Fedora Release Engineering 2022.01.17.00-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Jan 19 2022 Michel Alexandre Salim 2022.01.17.00-1 - Update to 2022.01.17.00 * Fri Dec 24 2021 Michel Alexandre Salim 2021.12.20.00-1 - Update to 2021.12.20.00 * Wed Dec 22 2021 Michel Alexandre Salim 2021.11.29.00-2 - Drop coroutine specific compiler flags * Fri Dec 17 2021 Michel Alexandre Salim 2021.11.29.00-1 - Update to 2021.11.29.00 * 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