Compare commits

...
Sign in to create a new pull request.

32 commits

Author SHA1 Message Date
Benjamin A. Beasley
a3605889d2 Rebuilt for gtest 1.17.0 2025-11-12 10:05:07 +00:00
Fedora Release Engineering
2d4e90d1f1 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:01:54 +00:00
Michel Lind
8595ee4fe2 Update to the 2025.02.03.00 tag; Fixes: RHBZ#2341686
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2025-02-07 14:59:42 -06:00
Fedora Release Engineering
75bbf0a908 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:10:31 +00:00
Michel Lind
049869bec6
Update to the 2024.08.19.00 tag
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2024-08-21 14:00:40 -05:00
Michel Lind
1741a377a7
Update to 2024.07.22.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2024-07-26 14:19:26 -05:00
Fedora Release Engineering
00ff326c12 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 18:50:27 +00:00
Michel Lind
11e1367e67
Update to 2024.02.19.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2024-02-24 08:26:47 -06:00
Michel Lind
6810455f46
Update to 2024.01.22.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2024-01-25 10:47:58 -06:00
Fedora Release Engineering
ee3f9a88a9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:05:39 +00:00
Fedora Release Engineering
1bb73f1a30 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 14:56:23 +00:00
Michel Lind
a92afc6ac0
Update to 2023.10.16.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2023-10-17 22:21:43 -05:00
Michel Lind
b60e655ff7
Update to 2023.10.09.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2023-10-17 10:46:27 -05:00
Michel Lind
835f9a0ba2
Update to 2023.09.11.00
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2023-09-12 15:53:53 -05:00
Michel Alexandre Salim
cddbcc1224
Update to 17^2023.07.03.00
- Properly bump major version
- Patch to support fmt 10 (fixes: rhbz#2219451)
- Use SPDX license identifier

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2023-07-06 22:11:06 -05:00
Vitaly Zaitsev
d6bf600bb0
Rebuilt due to fmt 10 update. 2023-06-28 10:49:02 +02:00
Michel Alexandre Salim
5041ffc884
Reapply GCC workaround for epel9 x86_64
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2023-04-27 15:25:58 -05:00
Michel Alexandre Salim
955685469c
Update to 2023.04.24.00
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2023-04-25 14:30:53 -05:00
Fedora Release Engineering
8d4e2db7e0 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 23:23:09 +00:00
Mamoru TASAKA
7721ae9dc1 drop patches no longer needed - fixed in gcc side 2022-08-28 14:30:37 +09:00
Mamoru TASAKA
3936925a42 Add upstream gcc bugzilla reference, and remove the patch on F-38 2022-08-15 18:31:02 +09:00
Michel Alexandre Salim
e5ad4f5c96 Rebuild for folly 2022.07.11.00
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2022-07-21 16:06:48 -05:00
Fedora Release Engineering
bbf8d4ae72 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 22:28:12 +00:00
Mamoru TASAKA
985f76ba6b Workaround for gcc ICE with -Wclass-memaccess, enable ppc64le again, pull in upstream patch 2022-07-20 10:56:06 +09:00
Michel Alexandre Salim
60975319fc Update to snapshot from 20220314; remove patch working around thrift issue; enable aarch64 (resolves: rhbz#2036121); build tests
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-03-15 14:01:55 -07:00
Michel Alexandre Salim
22d447db55 Use clang on releases with GCC 12
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-03-08 19:29:23 -08:00
Michel Alexandre Salim
4913bb557a Add new patch and retire old merged patches
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-02-28 12:08:06 -08:00
Michel Alexandre Salim
6a43db44e4 Update to snapshot from 20220228; use new-style versioning
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-02-28 11:18:10 -08:00
Michel Alexandre Salim
c746c7083b Fix for finding gtest on EL8; exclude aarch64 instead of %%arm64
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-02-24 20:35:40 -08:00
Fedora Release Engineering
63963821d9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 22:47:24 +00:00
Michel Alexandre Salim
24028fcd60 Update to snapshot from 2021.12.20
Also list bugs for architecture build failures.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2021-12-29 12:02:38 -08:00
Michel Alexandre Salim
88720bff60 Initial Fedora package
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2021-12-29 10:41:11 -08:00
9 changed files with 302 additions and 0 deletions

12
.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
/CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz
/CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz
/cachelib-2023.04.24.00.tar.gz
/cachelib-2023.07.03.00.tar.gz
/cachelib-2023.09.11.00.tar.gz
/cachelib-2023.10.09.00.tar.gz
/cachelib-2023.10.16.00.tar.gz
/cachelib-2024.01.22.00.tar.gz
/cachelib-2024.02.19.00.tar.gz
/cachelib-2024.07.22.00.tar.gz
/cachelib-2024.08.19.00.tar.gz
/cachelib-2025.02.03.00.tar.gz

View file

@ -0,0 +1,43 @@
--- a/cachelib/cachebench/CMakeLists.txt
+++ b/cachelib/cachebench/CMakeLists.txt
@@ -41,25 +41,6 @@ target_link_libraries(cachelib_cachebenc
gflags
)
-add_library (cachelib_binary_trace_gen
- ./runner/Runner.cpp
- ./runner/Stressor.cpp
- ./util/CacheConfig.cpp
- ./util/Config.cpp
- ./workload/BlockChunkCache.cpp
- ./workload/BlockChunkReplayGenerator.cpp
- ./workload/PieceWiseCache.cpp
- ./workload/OnlineGenerator.cpp
- ./workload/WorkloadGenerator.cpp
- ./workload/PieceWiseReplayGenerator.cpp
- )
-add_dependencies(cachelib_binary_trace_gen thrift_generated_files)
-target_link_libraries(cachelib_binary_trace_gen PUBLIC
- cachelib_datatype
- cachelib_allocator
- gflags
-)
-
if ((CMAKE_SYSTEM_NAME STREQUAL Linux) AND
(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64))
else()
@@ -68,14 +49,11 @@ endif()
add_executable (cachebench main.cpp)
-add_executable (binary_trace_gen binary_trace_gen.cpp)
target_link_libraries(cachebench cachelib_cachebench)
-target_link_libraries(binary_trace_gen cachelib_binary_trace_gen)
install(
TARGETS
cachebench
- binary_trace_gen
DESTINATION ${BIN_INSTALL_DIR}
)

69
cachelib-find-gtest.patch Normal file
View file

@ -0,0 +1,69 @@
diff '--color=auto' -ruN CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/cmake/FindGTest.cmake CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/cmake/FindGTest.cmake
--- /dev/null
+++ b/cachelib/cmake/FindGTest.cmake
@@ -0,0 +1,54 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Find GTest
+#
+# This will define:
+# GTEST_FOUND
+# GTEST_INCLUDE_DIRS
+# GTEST_LIBRARIES
+# GTEST_MAIN_LIBRARIES
+# GTEST_BOTH_LIBRARIES
+
+find_path(GTEST_INCLUDE_DIRS gtest/gtest.h
+ HINTS
+ $ENV{GTEST_ROOT}/include
+ ${GTEST_ROOT}/include
+)
+
+find_library(GTEST_LIBRARIES
+ NAMES gtest
+ HINTS
+ $ENV{GTEST_ROOT}
+ ${GTEST_ROOT}
+)
+
+find_library(GTEST_MAIN_LIBRARIES
+ NAMES gtest_main
+ HINTS
+ $ENV{GTEST_ROOT}
+ ${GTEST_ROOT}
+)
+
+set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
+
+mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+ GTest GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
+
+if(GTEST_FOUND AND NOT GTEST_FIND_QUIETLY)
+ message(STATUS "GTEST: ${GTEST_INCLUDE_DIRS}")
+endif()
--- a/cachelib/CMakeLists.txt
+++ b/cachelib/CMakeLists.txt
@@ -97,7 +97,7 @@ find_package(Boost REQUIRED COMPONENTS
system filesystem regex context program_options thread)
find_package(Gflags REQUIRED)
find_package(Glog REQUIRED)
-find_package(GTest CONFIG REQUIRED)
+find_package(GTest REQUIRED)
find_package(folly CONFIG REQUIRED)
find_package(fizz CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)

View file

@ -0,0 +1,11 @@
--- a/cachelib/navy/CMakeLists.txt
+++ b/cachelib/navy/CMakeLists.txt
@@ -105,7 +105,7 @@ if (BUILD_TESTS)
add_test (scheduler/tests/ThreadPoolJobSchedulerTest.cpp)
add_test (driver/tests/DriverTest.cpp)
if (NOT MISSING_FALLOCATE)
- add_test (common/tests/DeviceTest.cpp)
+# add_test (common/tests/DeviceTest.cpp)
endif()
add_test (block_cache/tests/AllocatorTest.cpp)
add_test (block_cache/tests/RegionManagerTest.cpp)

View file

@ -0,0 +1,11 @@
--- a/cachelib/compact_cache/CCacheFixedLruBucket.h
+++ b/cachelib/compact_cache/CCacheFixedLruBucket.h
@@ -274,7 +274,7 @@ struct FixedLruBucket {
static void copyValue(T* destPtr, const T* srcPtr) {
XDCHECK(destPtr != nullptr);
XDCHECK(srcPtr != nullptr);
- memcpy(destPtr, srcPtr, sizeof(T));
+ memcpy(reinterpret_cast<void *>(destPtr), reinterpret_cast<const void *>(srcPtr), sizeof(T));
}
};
} // namespace cachelib

146
cachelib.spec Normal file
View file

@ -0,0 +1,146 @@
%bcond_with toolchain_clang
%if %{with toolchain_clang}
%global toolchain clang
%endif
%bcond_without build_tests
# tests not discoverable by ctest yet
%bcond_with check
%global forgeurl https://github.com/facebook/CacheLib
%global tag 2025.02.03.00
%global date %(echo %{tag} | sed -e 's|.00$||' | sed -e 's|\\.||g')
# disable forge macro snapinfo generation
# https://pagure.io/fedora-infra/rpmautospec/issue/240
%global distprefix %{nil}
%forgemeta
# see cachelib/allocator/CacheVersion.h's kCachelibVersion
%global major_ver 17
Name: cachelib
Version: %{major_ver}^%{date}
Release: %autorelease
Summary: Pluggable caching engine for scale high performance cache services
License: Apache-2.0
URL: %forgeurl
Source: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz
# DeviceTest needs common/FdpNvme.cpp. Disable for now
Patch: %{name}-fix-DeviceTest-FDP.diff
# incomplete dependencies, will sort out later
Patch: %{name}-disable-binary_trace_gen.diff
# needed on EL8; its gtest does not come with cmake files
Patch100: %{name}-find-gtest.patch
# Workaround for gcc issue (still needed on epel9 x86_64)
# https://bugzilla.redhat.com/show_bug.cgi?id=2108665
Patch200: %{name}-workaround-gcc-epel9-x86_64-bz2108665.patch
ExclusiveArch: x86_64 aarch64 ppc64le
BuildRequires: cmake
%if %{with toolchain_clang}
BuildRequires: clang
%else
BuildRequires: gcc-c++
%endif
BuildRequires: fbthrift-devel = %{tag}
BuildRequires: fizz-devel = %{tag}
BuildRequires: folly-devel = %{tag}
BuildRequires: mvfst-devel = %{tag}
%if %{with build_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: numactl-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
%autosetup -n CacheLib-%{tag} -N
%autopatch -p1 -M 99
%if 0%{?el8}
%autopatch -p1 -m 100 -M 199
%endif
%ifarch x86_64
%if 0%{?el9}
%autopatch -p1 -m 200 -M 209
%endif
%endif
%build
pushd %{name}
%cmake \
%if %{with build_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 build_tests}
# TODO: prevent tests being installed
rm -rf %{buildroot}%{_prefix}/tests
%endif
%if %{with check}
%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

7
get_version.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
PREFIX='constexpr uint64_t kCachelibVersion = '
SUFFIX=';'
echo $(grep "${PREFIX}" CacheLib-*/cachelib/allocator/CacheVersion.h |
sed -e "s|${PREFIX}||" | sed -e "s|${SUFFIX}||")

2
series Normal file
View file

@ -0,0 +1,2 @@
cachelib-fix-DeviceTest-FDP.diff
cachelib-disable-binary_trace_gen.diff

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (cachelib-2025.02.03.00.tar.gz) = 439e4941ed0ab42916342d8e702c31def0ae36ef52153ebac9d6b8bb26e9a9cef677ba1352ec5ffb4b962db8cca54151cde534c54e4427df2820a63ffb862ecd