## 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 %bcond_with toolchain_clang %if %{with toolchain_clang} %global toolchain clang %endif %ifarch x86_64 aarch64 # tests can be compiled, keep it that way # on aarch64 ctest doesn't seem to find tests yet %bcond_without check %else # tests don't compile cleanly on ppc64le yet %bcond_with check %endif # use this to re-test running all tests %bcond_with all_tests %if 0%{?el9} # pandoc is not in CS9 # https://bugzilla.redhat.com/show_bug.cgi?id=2035151 %bcond_with docs %else %bcond_without docs %endif %bcond_without python Name: folly Version: 2022.07.11.00 Release: %{autorelease} Summary: An open-source C++ library developed and used at Facebook License: ASL 2.0 URL: https://github.com/facebook/folly Source: %{url}/archive/v%{version}/folly-%{version}.tar.gz Patch: %{name}-fix_codel_test.patch Patch: %{name}-fix_async_udp_socket_integration_test.patch Patch: %{name}-skip_eliasfanocoding_test_non_x64.patch Patch: %{name}-gate_pico_spin_lock_64bit_only.patch # gcc considers __builtin_strlen not constant expression, don't use it Patch: %{name}-workaround-gcc-strlen-not-constant_expr.patch # TypeInfoTest with gtest 1.12 Patch: %{name}-typeinfotest-gtest1_12.patch # Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230 # Fixed in gcc-12.1.1-4 (not in -3) # /builddir/build/BUILD/folly-2022.07.11.00/folly/synchronization/test/AtomicUtilTest.cpp:241:3: internal compiler error: in pop_local_binding, at cp/name-lookup.cc:2474 # 241 | for (ref_ atomic : std::array{}) { # | ^~~ %if 0%{?fedora} <= 37 Patch: %{name}-gcc-pr106230-workaround.patch %endif ExclusiveArch: x86_64 aarch64 ppc64le BuildRequires: cmake %if %{with toolchain_clang} BuildRequires: clang BuildRequires: libatomic %else BuildRequires: gcc-c++ %endif # Docs dependencies %if %{with docs} BuildRequires: pandoc %endif # Library dependencies # for libiberty BuildRequires: binutils-devel BuildRequires: boost-devel BuildRequires: bzip2-devel BuildRequires: double-conversion-devel BuildRequires: fmt-devel BuildRequires: gflags-devel BuildRequires: glog-devel %if %{with check} BuildRequires: gmock-devel BuildRequires: gtest-devel %endif BuildRequires: libaio-devel BuildRequires: libdwarf-devel BuildRequires: libevent-devel BuildRequires: libsodium-devel BuildRequires: libunwind-devel # 0.7-3 fixes build on armv7hl BuildRequires: liburing-devel >= 0.7-3 BuildRequires: libzstd-devel BuildRequires: lz4-devel BuildRequires: openssl-devel BuildRequires: snappy-devel BuildRequires: xz-devel BuildRequires: zlib-devel %global _description %{expand: Folly (acronymed loosely after Facebook Open Source Library) is a library of C++14 components designed with practicality and efficiency in mind. Folly contains a variety of core library components used extensively at Facebook. In particular, it's often a dependency of Facebook's other open source C++ efforts and place where those projects can share code. It complements (as opposed to competing against) offerings such as Boost and of course std. In fact, we embark on defining our own component only when something we need is either not available, or does not meet the needed performance profile. We endeavor to remove things from folly if or when std or Boost obsoletes them. Performance concerns permeate much of Folly, sometimes leading to designs that are more idiosyncratic than they would otherwise be (see e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale is a unifying theme in all of Folly.} %description %{_description} %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: binutils-devel%{?_isa} Requires: boost-devel%{?_isa} Requires: bzip2-devel%{?_isa} Requires: cmake-filesystem Requires: double-conversion-devel%{?_isa} Requires: fmt-devel%{?_isa} Requires: glog-devel%{?_isa} Requires: libaio-devel%{?_isa} Requires: libdwarf-devel%{?_isa} Requires: libevent-devel%{?_isa} Requires: libsodium-devel%{?_isa} Requires: libunwind-devel%{?_isa} Requires: liburing-devel%{?_isa} >= 0.7-3 Requires: libzstd-devel%{?_isa} Requires: lz4-devel%{?_isa} Requires: openssl-devel%{?_isa} Requires: snappy-devel%{?_isa} Requires: xz-devel%{?_isa} Requires: zlib-devel%{?_isa} 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 docs} %package docs Summary: Documentation for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} %description docs %{_description} The %{name}-docs package contains documentation for %{name}. %endif %if %{with python} %package -n python3-%{name} Summary: Python bindings for %{name} BuildRequires: make BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(cython) BuildRequires: python3dist(wheel) Requires: %{name}%{?_isa} = %{version}-%{release} %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 %autosetup -p1 %if %{with python} # this file gets cached starting in 841d5087eda926eac1cb17c4683fd48b247afe50 # but it depends on executor_api.h which is generated alongside executor.cpp # delete this file so we regenerate both and allow the Python extension to be built rm folly/python/executor.cpp %endif %if %{with toolchain_clang} %ifarch ppc64le # folly/logging/example/logging_example: link failure wrt fmt sed -i folly/CMakeLists.txt -e '\@logging/example@s|add_subdirectory|#add_subdirectory|' %endif %endif %build %cmake \ -DBUILD_SHARED_LIBS=ON \ %if %{with python} -DPYTHON_EXTENSIONS=ON \ %endif %if %{with check} -DBUILD_TESTS=ON \ %endif -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \ %if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 -DLIBDWARF_INCLUDE_DIR=%{_includedir}/libdwarf-0 \ %endif -DPACKAGE_VERSION=%{version} %cmake_build %if %{with docs} # Build documentation make -C folly/docs %endif %install %cmake_install %if %{with check} %check %if %{with all_tests} %ctest %else # x86_64: disable flaky tests # ix86: some tests are still failing cd "%{__cmake_builddir}" EXCLUDED_TESTS= %ifarch x86_64 # flaky tests # from https://koji.fedoraproject.org/koji/taskinfo?taskID=89703014 EXCLUDED_TESTS='-E glog_test\.LogEveryMs\.basic' %endif %ifarch aarch64 # from https://copr.fedorainfracloud.org/coprs/salimma/folly-testing/build/4642135/ EXCLUDED_TESTS='-E cache_locality_test\.Getcpu\.VdsoGetcpu' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.FireOnce' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.CancelTimeout' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.DestroyTimeoutSet' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.SlowFast' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.ReschedTest' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.DefaultTimeout' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.IntrusivePtr' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.GetTimeRemaining' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.Level1' EXCLUDED_TESTS+='|timeseries_histogram_test\.TimeseriesHistogram\.Percentile' EXCLUDED_TESTS+='|memcpy_test\.folly_memcpy\.overlap' # from https://copr.fedorainfracloud.org/coprs/salimma/folly-testing/build/4642161/ EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.DeleteWheelInTimeout' EXCLUDED_TESTS+='|HHWheelTimerTest\.HHWheelTimerTest\.NegativeTimeout' # from https://koji.fedoraproject.org/koji/taskinfo?taskID=89699745 EXCLUDED_TESTS+='|cache_locality_test\.CacheLocality\.LinuxActual' EXCLUDED_TESTS+='|small_locks_test\.SmallLocks\.SpinLockCorrectness' EXCLUDED_TESTS+='|locks_test\.SpinLock\.Correctness' # flaky tests # from https://koji.fedoraproject.org/koji/taskinfo?taskID=89701407 EXCLUDED_TESTS+='|fbstring_test\.FBString\.testAllClauses' %endif %{__ctest} --output-on-failure --force-new-ctest-process %{?_smp_mflags} \ ${EXCLUDED_TESTS} cd - %endif %endif %files %license LICENSE %{_libdir}/*.so.%{version} %files devel %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_includedir}/* %{_libdir}/*.so %{_libdir}/cmake/%{name} %{_libdir}/pkgconfig/lib%{name}.pc %exclude %{_includedir}/folly/python %if %{with docs} %files docs %doc folly/docs/*.html %endif %if %{with python} %files -n python3-%{name} %{python3_sitearch}/%{name} %{python3_sitearch}/%{name}-0.0.1-py%{python3_version}.egg-info %exclude %{python3_sitearch}/%{name}/*.h %exclude %{python3_sitearch}/%{name}/*.pxd %files -n python3-%{name}-devel %{_includedir}/folly/python %{python3_sitearch}/%{name}/*.h %{python3_sitearch}/%{name}/*.pxd %endif %changelog * Mon Aug 15 2022 Mamoru TASAKA 2022.07.11.00-4 - Update for gcc changes: Enable test again working with recent gcc Add a workaround patch for gcc bug instead of disabling corresponding test * Thu Jul 21 2022 Fedora Release Engineering 2022.07.11.00-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Michel Alexandre Salim 2022.07.11.00-2 - Disable some flaky tests * Tue Jul 19 2022 Michel Alexandre Salim 2022.07.11.00-1 - Update to 2022.07.11.00 * Sun Jul 17 2022 Mamoru TASAKA 2022.03.14.00-6 - Rebuild for fmt-9 * Sat Jul 16 2022 Mamoru TASAKA 2022.03.14.00-5 - Fix FTBFS on F37 * Mon Jun 13 2022 Python Maint 2022.03.14.00-4 - Rebuilt for Python 3.11 * Wed May 04 2022 Thomas Rodgers 2022.03.14.00-3 - Rebuilt for Boost 1.78 * Wed Mar 16 2022 Michel Alexandre Salim 2022.03.14.00-2 - Fix Fedora <= 35 ppc64le build * 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; fix test executionl; enable tests on aarch64 * Sat Mar 05 2022 Michel Alexandre Salim 2022.02.28.00-5 - Fix ppc64le ExcludeArch to include F36 * Sat Mar 05 2022 Michel Alexandre Salim 2022.02.28.00-4 - Fix build on armv7hl; disable ppc64le build on F36+ for now * Fri Mar 04 2022 Michel Alexandre Salim 2022.02.28.00-3 - Fix test compilation failures on i686; exclude logging_example on ppc64le * Thu Mar 03 2022 Michel Alexandre Salim 2022.02.28.00-2 - Use clang on releases with GCC 12 (fixes: rhbz#2045117) * Wed Mar 02 2022 Michel Alexandre Salim 2022.02.28.00-1 - Update to 2022.02.28.00; drop static build * Wed Feb 23 2022 Michel Alexandre Salim 2022.02.21.00-1 - Update to 2022.02.21.00 (resolves: rhbz#2035851) * Wed Jan 19 2022 Michel Alexandre Salim 2022.01.17.00-1 - Update to 2022.01.17.00 * Tue Dec 28 2021 Michel Alexandre Salim 2021.12.20.00-3 - Fix libdwarf header detection for Fedora < 36 * Thu Dec 23 2021 Michel Alexandre Salim 2021.12.20.00-2 - Revert recent folly/lang/Badge.h changes to fix issues on GCC 11+ * Thu Dec 23 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-4 - Actually enable Fedora DWARF support in shared libs * Tue Dec 21 2021 Michel Alexandre Salim 2021.11.29.00-3 - Explicitly require gtest (not pulled in on EL8), drop test deps from -devel * Fri Dec 17 2021 Michel Alexandre Salim 2021.11.29.00-2 - Properly handle libdwarf on EL * Thu Dec 16 2021 Michel Alexandre Salim 2021.11.29.00-1 - Update to 2021.11.29.00; fix DWARF detection; switch back to OpenSSL 3.0 * Thu Nov 18 2021 Michel Alexandre Salim - 2021.11.15.00-3 - Switch Fedora >= 36 to openssl1.1 by default to fix Wangle - Opt in to rpmautospec * Thu Nov 18 2021 Michel Alexandre Salim - 2021.11.15.00-2 - Revert partial switch to openssl1.1 * Wed Nov 17 2021 Michel Alexandre Salim - 2021.11.15.00-1 - Update to 2021.11.15.00 * Fri Nov 12 2021 Michel Alexandre Salim - 2021.11.08.00-1 - Update to 2021.11.08.00 * 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 * Fri Jul 30 2021 Filipe Brandenburger - 2021.07.22.00-3 - Enable coroutines through -fcoroutines instead of -std=c++20. * Thu Jul 29 2021 Filipe Brandenburger - 2021.07.22.00-2 - Use C++20 standard, in order to enable C++ coroutines. * Tue Jul 27 2021 Michel Alexandre Salim - 2021.07.22.00-1 - Update to 2021.07.22.00 * Mon Jul 26 2021 Filipe Brandenburger - 2021.07.20.01-2 - Drop include of the immintrin.h header, due to conflict with the _serialize() macro defined in a header included by that file, starting with GCC 11. Fixes an fbthrift build breakage. * Sat Jul 24 2021 Michel Alexandre Salim - 2021.07.20.01-1 - Update to 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 * Thu Jul 08 2021 Davide Cavalca - 2021.06.28.00-1 - Update to 2021.06.28.00 * Mon Jul 05 2021 Richard Shaw - 2021.06.07.00-2 - Rebuild for new fmt version. * Wed Jun 09 2021 Michel Alexandre Salim - 2021.06.07.00-1 - Update to 2021.06.07.00 * 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 * Wed Apr 14 2021 Richard W.M. Jones - 2021.03.29.00-3 - Rebuild for updated liburing. * Tue Mar 30 2021 Jonathan Wakely - 2021.03.29.00-2 - Rebuilt for removed libstdc++ symbol (#1937698) * 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-2 - Use final version of SIGSTKSZ patch * Mon Mar 22 2021 Michel Alexandre Salim - 2021.03.22.00-1 - Update to 2021.03.22.00 - Update SIGSTKSZ patch based on upstream feedback * Mon Mar 15 2021 Michel Alexandre Salim - 2021.03.15.00-1 - Update to 2021.03.15.00 - Handle non-constant SIGSTKSZ in glibc > 2.33 * Wed Feb 03 2021 Michel Alexandre Salim - 2021.02.01.00-1 - Update to 2021.02.01.00 * Tue Jan 26 17:47:59 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:13:52 PST 2020 Michel Alexandre Salim - 2020.12.28.00-1 - Update to 2020.12.28.00 * Tue Dec 22 16:54:00 PST 2020 Michel Alexandre Salim - 2020.12.21.00-1 - Update to 2020.12.21.00 * Mon Nov 30 10:38:56 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 - Allow tests to be compiled * Mon Nov 9 2020 Michel Alexandre Salim - 2020.11.09.00-2 - Ship *.{h,pxd} in python3-folly-devel for python3-fbthrift - Install python/executor.h * Mon Nov 9 2020 Michel Alexandre Salim - 2020.11.09.00-1 - Update to 2020.11.09.00 * Fri Nov 6 2020 Michel Alexandre Salim - 2020.11.02.00-2 - Enable Python bindings by default * Mon Nov 2 2020 Michel Alexandre Salim - 2020.11.02.00-1 - Update to 2020.11.02.00 * Mon Oct 26 2020 Michel Alexandre Salim - 2020.10.26.00-1 - Update to 2020.10.26.00 - Build docs - Don't run tests if built without tests * Thu Oct 22 2020 Michel Alexandre Salim - 2020.10.19.00-4 - Put static cmake support files in its own directory - Add most folly BRs as folly-devel requirements, as dependent packages will need them * Wed Oct 21 2020 Michel Alexandre Salim - 2020.10.19.00-3 - Provide both shared and static libraries * Tue Oct 20 2020 Michel Alexandre Salim - 2020.10.19.00-2 - Add libiberty and zstd BRs - Try compiling Python extensions * Tue Oct 20 2020 Michel Alexandre Salim - 2020.10.19.00-1 - Update to 2020.10.19.00 - Fix compile error on i686 - Fix compile error on armv7hl (requires liburing >= 0.7-3) - Exclude s390x * Mon Oct 12 14:54:12 PDT 2020 Michel Alexandre Salim - 2020.10.12.00-1 - Initial package