public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Alexandre Salim <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/cachelib] epel10.3: Initial Fedora package
Date: Thu, 08 Oct 2026 09:23:07 GMT [thread overview]
Message-ID: <179145138729.1.6289816677590432447.rpms-cachelib-88720bff603d@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cachelib
Branch : epel10.3
Commit : 88720bff603d75be2ce7fc293b85156004dec2ae
Author : Michel Alexandre Salim <salimma@fedoraproject.org>
Date : 2021-12-29T10:41:11-08:00
Stats : +228/-0 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/cachelib/c/88720bff603d75be2ce7fc293b85156004dec2ae?branch=epel10.3
Log:
Initial Fedora package
Signed-off-by: Michel Alexandre Salim <salimma@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
reply other threads:[~2026-10-08 9:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179145138729.1.6289816677590432447.rpms-cachelib-88720bff603d@fedoraproject.org \
--to=salimma@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox