The package rpms/cachelib.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cachelib.git/commit/?id=24028fcd6...
https://src.fedoraproject.org/cgit/rpms/cachelib.git/commit/?id=88720bff6....
Change:
+ExcludeArch: %{arm64}
+ExcludeArch: %{ix86}
Thanks.
Full change:
============
commit 24028fcd60461a87b040f9e0102ad3dc44e528cc
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Dec 29 11:40:00 2021 -0800
Update to snapshot from 2021.12.20
Also list bugs for architecture build failures.
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index 9b29ecb..c7443b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41.tar.gz
+/CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8.tar.gz
diff --git a/cachelib.spec b/cachelib.spec
index 860b9b3..449dfcb 100644
--- a/cachelib.spec
+++ b/cachelib.spec
@@ -6,8 +6,9 @@
%bcond_with tests
%global forgeurl
https://github.com/facebook/CacheLib
-%global commit e3703aade03d359d290936b334ab81ca4a856b41
-%global date 20211129
+%global commit c4904ef2524f396eb432392f8308a69dda926bd8
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global date 20211220
%forgemeta
# see cachelib/allocator/CacheVersion.h's kCachelibVersion
@@ -16,7 +17,9 @@
Name: cachelib
Version: %{major_ver}
-Release: %autorelease
+# using -s seems to add the snapinfo twice in the generated filename
+#
https://pagure.io/fedora-infra/rpmautospec/issue/240
+Release: %autorelease -e %{date}git%{shortcommit}
Summary: Pluggable caching engine for scale high performance cache services
License: ASL 2.0
@@ -33,13 +36,16 @@ Patch2: %{name}-versioned_so.patch
#
https://bugzilla.redhat.com/show_bug.cgi?id=1892151
ExcludeArch: s390x
# does not compile cleanly on 32-bit arches
-# TODO: file excludearch blocker
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2036124
%if 0%{?el8}
ExcludeArch: %{arm}
%else
ExcludeArch: %{arm32}
%endif
ExcludeArch: %{ix86}
+# build failure on aarch64
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2036121
+ExcludeArch: %{arm64}
BuildRequires: cmake
BuildRequires: gcc-c++
diff --git a/sources b/sources
index 1540f2e..6428f23 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (CacheLib-e3703aade03d359d290936b334ab81ca4a856b41.tar.gz) =
39b37b941cb5fafef2ed8748ccb1e19e69bb8509ab9d59212b0b42f26a66a622f5f22955d4dc2d49e18bdf6060a19c4101466cf7dfb1a8afd68e3fa1bc2f65bf
+SHA512 (CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8.tar.gz) =
6ce0a8783bd88d1b4673832cad5305971fe92dadb4f8a1423eaf5828e97c3b0f0100a70bdf97e476d66e3824d8e3841e7d971979aa8c57b8fa2b357870dd96cc
commit 88720bff603d75be2ce7fc293b85156004dec2ae
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Dec 29 10:41:11 2021 -0800
Initial Fedora package
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9b29ecb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41.tar.gz
diff --git a/cachelib-install_cachebench_so.patch b/cachelib-install_cachebench_so.patch
new file mode 100644
index 0000000..a7e4c5a
--- /dev/null
+++ b/cachelib-install_cachebench_so.patch
@@ -0,0 +1,19 @@
+diff -ruN
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/cachebench/CMakeLists.txt
CacheLib-install_cachebench_so/cachelib/cachebench/CMakeLists.txt
+---
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/cachebench/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
++++ CacheLib-install_cachebench_so/cachelib/cachebench/CMakeLists.txt 2021-12-22
11:23:22.159017377 -0800
+@@ -49,6 +49,15 @@
+ )
+
+
++if (BUILD_SHARED_LIBS)
++ install(
++ TARGETS cachelib_cachebench
++ EXPORT cachelib-exports
++ DESTINATION ${LIB_INSTALL_DIR}
++ )
++endif ()
++
++
+ if (BUILD_TESTS)
+ add_library (cachebench_test_support INTERFACE )
+ target_link_libraries (cachebench_test_support INTERFACE
diff --git a/cachelib-ld_gtest.patch b/cachelib-ld_gtest.patch
new file mode 100644
index 0000000..0e42dc9
--- /dev/null
+++ b/cachelib-ld_gtest.patch
@@ -0,0 +1,33 @@
+diff -ruN
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/common/CMakeLists.txt
CacheLib-ld_gtest/cachelib/common/CMakeLists.txt
+---
CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/common/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
++++ CacheLib-ld_gtest/cachelib/common/CMakeLists.txt 2021-12-22 10:21:59.259653149 -0800
+@@ -21,15 +21,11 @@
+ CountDownLatch.cpp
+ ${BLOOM_THRIFT_FILES}
+ hothash/HotHashDetector.cpp
+- hothash/HotHashDetectorTest.cpp
+ PercentileStats.cpp
+ PeriodicWorker.cpp
+ piecewise/GenericPieces.cpp
+- piecewise/GenericPiecesTest.cpp
+ piecewise/RequestRange.cpp
+- piecewise/RequestRangeTest.cpp
+ Serialization.cpp
+- TestUtils.cpp
+ Utils.cpp
+ )
+ add_dependencies(cachelib_common thrift_generated_files)
+@@ -51,7 +47,12 @@
+
+
+ if (BUILD_TESTS)
+- add_library (common_test_support INTERFACE)
++ add_library (common_test_support INTERFACE
++ TestUtils.cpp
++ hothash/HotHashDetectorTest.cpp
++ piecewise/GenericPiecesTest.cpp
++ piecewise/RequestRangeTest.cpp
++ )
+ target_link_libraries (common_test_support INTERFACE
+ cachelib_common
+ gflags
diff --git a/cachelib-versioned_so.patch b/cachelib-versioned_so.patch
new file mode 100644
index 0000000..496ea32
--- /dev/null
+++ b/cachelib-versioned_so.patch
@@ -0,0 +1,45 @@
+diff -ruN CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/CMakeLists.txt
CacheLib-versioned_so/cachelib/CMakeLists.txt
+--- CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/CMakeLists.txt 2021-11-29
13:01:49.000000000 -0800
++++ CacheLib-versioned_so/cachelib/CMakeLists.txt 2021-12-22 14:22:35.444840967 -0800
+@@ -24,14 +24,18 @@
+
+ #configure_file(cachelib/cachelib_config.h.in cachelib_config.h)
+
+-set(CACHELIB_MAJOR_VERSION 0)
++if (NOT DEFINED CACHELIB_MAJOR_VERSION)
++ set(CACHELIB_MAJOR_VERSION 0)
++endif ()
+ set(CACHELIB_MINOR_VERSION 1)
+ set(CACHELIB_PATCH_VERSION 0)
+ set(CACHELIB_VERSION
+ ${CACHELIB_MAJOR_VERSION}.${CACHELIB_MINOR_VERSION}.${CACHELIB_PATCH_VERSION})
+
+ set(PACKAGE_NAME "cachelib")
+-set(PACKAGE_VERSION "${CACHELIB_VERSION}")
++if (NOT DEFINED PACKAGE_VERSION)
++ set(PACKAGE_VERSION "${CACHELIB_VERSION}")
++endif ()
+ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
+ set(PACKAGE_BUGREPORT "https://github.com/facebook/TBD")
+@@ -361,6 +365,20 @@
+ #NAMESPACE cachelib::
+ DESTINATION ${CMAKE_INSTALL_DIR})
+
++if (BUILD_SHARED_LIBS)
++ set_target_properties(
++ cachelib_allocator
++ cachelib_cachebench
++ cachelib_common
++ cachelib_datatype
++ cachelib_navy
++ cachelib_shm
++ PROPERTIES
++ SOVERSION ${CACHELIB_MAJOR_VERSION}
++ VERSION ${PACKAGE_VERSION}
++ )
++endif ()
++
+ if (BUILD_TESTS)
+ get_property(TEST_BINARIES GLOBAL PROPERTY TEST_BINARIES)
+ #message(STATUS "=== Test binaries : ${TEST_BINARIES} ===")
diff --git a/cachelib.spec b/cachelib.spec
new file mode 100644
index 0000000..860b9b3
--- /dev/null
+++ b/cachelib.spec
@@ -0,0 +1,129 @@
+# Tests currently fail with
+#
/builddir/build/BUILD/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/compact_cache/tests/CCacheTests.cpp:159:1:
required from here
+#
/builddir/build/BUILD/CacheLib-e3703aade03d359d290936b334ab81ca4a856b41/cachelib/../cachelib/compact_cache/CCacheFixedLruBucket.h:277:11:
internal compiler error: Floating point exception
+# 277 | memcpy(destPtr, srcPtr, sizeof(T));
+# | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%bcond_with tests
+
+%global forgeurl
https://github.com/facebook/CacheLib
+%global commit e3703aade03d359d290936b334ab81ca4a856b41
+%global date 20211129
+%forgemeta
+
+# see cachelib/allocator/CacheVersion.h's kCachelibVersion
+%global major_ver 16
+
+
+Name: cachelib
+Version: %{major_ver}
+Release: %autorelease
+Summary: Pluggable caching engine for scale high performance cache services
+
+License: ASL 2.0
+URL: %forgeurl
+Source0: %forgesource
+# move TestUtils from cachelib_common to common_test_support to avoid ld issues
+Patch0: %{name}-ld_gtest.patch
+# need to install cachelib_cachebench when building shared libs
+Patch1: %{name}-install_cachebench_so.patch
+# and version them
+Patch2: %{name}-versioned_so.patch
+
+# Folly is known not to work on big-endian CPUs
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1892151
+ExcludeArch: s390x
+# does not compile cleanly on 32-bit arches
+# TODO: file excludearch blocker
+%if 0%{?el8}
+ExcludeArch: %{arm}
+%else
+ExcludeArch: %{arm32}
+%endif
+ExcludeArch: %{ix86}
+
+BuildRequires: cmake
+BuildRequires: gcc-c++
+BuildRequires: fbthrift-devel
+BuildRequires: fizz-devel
+BuildRequires: folly-devel
+%if %{with tests}
+BuildRequires: gmock-devel
+%endif
+# this is actually needed, because of
+# cachelib/navy/admission_policy/DynamicRandomAP.h
+BuildRequires: gtest-devel
+BuildRequires: libdwarf-devel
+BuildRequires: libzstd-devel
+BuildRequires: wangle-devel
+BuildRequires: zlib-devel
+BuildRequires: tsl-sparse-map-devel
+# BuildRequires: libatomic
+
+
+%global _description %{expand:
+CacheLib is a C++ library providing in-process high performance caching
+mechanism. CacheLib provides a thread safe API to build high throughput, low
+overhead caching services, with built-in ability to leverage DRAM and SSD
+caching transparently.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: cmake
+
+%description devel %{_description}
+
+The %{name}-devel package contains libraries and header files for developing
+applications that use %{name}.
+
+
+%prep
+%forgeautosetup -p1
+
+
+%build
+pushd %{name}
+%cmake \
+%if %{with tests}
+ -DBUILD_TESTS:BOOL=ON \
+%else
+ -DBUILD_TESTS:BOOL=OFF \
+%endif
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=FALSE \
+ -DCMAKE_INSTALL_DIR:PATH=%{_libdir}/cmake/%{name} \
+ -DCONFIGS_INSTALL_DIR:STRING=%{_datadir}/%{name}/test_configs \
+ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/%{name} \
+ -DCACHELIB_MAJOR_VERSION:STRING=%{major_ver} \
+ -DPACKAGE_VERSION:STRING=%{major_ver}.%{date}
+%cmake_build
+
+
+%install
+pushd %{name}
+%cmake_install
+
+
+%if %{with tests}
+%check
+pushd %{name}
+%ctest
+%endif
+
+
+%files
+%license LICENSE
+%doc BENCHMARKS.md CHANGELOG.md README.md examples
+%{_bindir}/cachebench
+%{_datadir}/%{name}
+%{_libdir}/*.so.*
+
+%files devel
+%{_includedir}/%{name}
+%{_libdir}/*.so
+%{_libdir}/cmake/%{name}
+
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..1540f2e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (CacheLib-e3703aade03d359d290936b334ab81ca4a856b41.tar.gz) =
39b37b941cb5fafef2ed8748ccb1e19e69bb8509ab9d59212b0b42f26a66a622f5f22955d4dc2d49e18bdf6060a19c4101466cf7dfb1a8afd68e3fa1bc2f65bf