From ecf2a4235c2a7cd8f5bd9b65e1a9aed5adf9f463 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 16 Mar 2022 20:47:02 -0700 Subject: [PATCH 01/25] Disable building tests when compiling with GCC Signed-off-by: Michel Alexandre Salim --- cachelib.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cachelib.spec b/cachelib.spec index e9cf337..7147c1b 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -7,9 +7,16 @@ %if %{with toolchain_clang} %global toolchain clang +%bcond_without build_tests +%else +# failure when compiled with GCC 11: +# /builddir/build/BUILD/CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/tests/CCacheTests.cpp:114:1: required from here +# /builddir/build/BUILD/CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/../cachelib/compact_cache/CCacheFixedLruBucket.h:277:11: internal compiler error: Floating point exception +# 277 | memcpy(destPtr, srcPtr, sizeof(T)); +# | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%bcond_with build_tests %endif -%bcond_without build_tests # tests not discoverable by ctest yet %bcond_with check From 985f76ba6b9851a26bfe2ba2f910bd5d00444ff8 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 20 Jul 2022 10:56:06 +0900 Subject: [PATCH 02/25] Workaround for gcc ICE with -Wclass-memaccess, enable ppc64le again, pull in upstream patch --- cachelib-avoid-bind-packed-buffer.patch | 39 +++++++++++++++++++++++ cachelib-workaround-gcc12-bz2108665.patch | 11 +++++++ cachelib.spec | 11 +++++-- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 cachelib-avoid-bind-packed-buffer.patch create mode 100644 cachelib-workaround-gcc12-bz2108665.patch diff --git a/cachelib-avoid-bind-packed-buffer.patch b/cachelib-avoid-bind-packed-buffer.patch new file mode 100644 index 0000000..afd3dd4 --- /dev/null +++ b/cachelib-avoid-bind-packed-buffer.patch @@ -0,0 +1,39 @@ +From 2114d3fe8b60992e4b98c2e4e07761649aa47d89 Mon Sep 17 00:00:00 2001 +From: Jimmy Lu +Date: Tue, 28 Jun 2022 15:48:00 -0700 +Subject: [PATCH] DO NOT COMMIT YET - Do not "pack" FixedArraySize elements + +Summary: +DO NOT COMMIT YET. +Needs to be discussed. + +Remove the FOLLY_PACK_ATTR to avoid packing the FixedArraySize elements. +This avoids the C++ error "cannot bind unpacked field". + +C.f. D24538466 (https://github.com/facebook/CacheLib/commit/ab1f75cbdcc1c40a48e0f6eaf76488ce482cbd2a) . + +Reviewed By: haowu14 + +Differential Revision: D35907647 + +fbshipit-source-id: 7e3ed0a9bc78c1eb1818a2e725361a5c2fceaca1 +--- + cachelib/datatype/FixedSizeArray.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/cachelib/datatype/FixedSizeArray.h b/cachelib/datatype/FixedSizeArray.h +index 6d6a1fa5b..9155ad60e 100644 +--- a/cachelib/datatype/FixedSizeArray.h ++++ b/cachelib/datatype/FixedSizeArray.h +@@ -26,8 +26,10 @@ namespace cachelib { + + namespace detail { + // @param T must be a POD like type ++// Note that packing is not guaranteed with this data structure. User ++// of FixedSizeArray must ensure their type is packed if they need it. + template +-class FOLLY_PACK_ATTR FixedSizeArrayLayout { ++class FixedSizeArrayLayout { + public: + // Compute the storage required for the number of elements + static uint32_t computeStorageSize(uint32_t numElements) { diff --git a/cachelib-workaround-gcc12-bz2108665.patch b/cachelib-workaround-gcc12-bz2108665.patch new file mode 100644 index 0000000..7fc45a2 --- /dev/null +++ b/cachelib-workaround-gcc12-bz2108665.patch @@ -0,0 +1,11 @@ +--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h.orig 2022-03-15 02:49:38.000000000 +0900 ++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h 2022-07-20 02:03:03.028073719 +0900 +@@ -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(destPtr), reinterpret_cast(srcPtr), sizeof(T)); + } + }; + } // namespace cachelib diff --git a/cachelib.spec b/cachelib.spec index e9cf337..8a1a1ea 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -1,4 +1,4 @@ -%if 0%{?fedora} >= 36 +%if 0%{?fedora} == 36 # Folly is compiled with Clang %bcond_without toolchain_clang %else @@ -34,13 +34,18 @@ License: ASL 2.0 URL: %forgeurl Source0: %forgesource Patch0: %{name}-fix_test_linking.patch +# Workaround for gcc issue: +# https://bugzilla.redhat.com/show_bug.cgi?id=2108665 +Patch1: %{name}-workaround-gcc12-bz2108665.patch +# https://github.com/facebook/CacheLib/commit/2114d3fe8b60992e4b98c2e4e07761649aa47d89 +Patch2: %{name}-avoid-bind-packed-buffer.patch # needed on EL8; its gtest does not come with cmake files Patch100: %{name}-find-gtest.patch # Folly is known not to work on big-endian CPUs # https://bugzilla.redhat.com/show_bug.cgi?id=1892151 ExcludeArch: s390x -%if 0%{?fedora} >= 36 +%if 0%{?fedora} == 36 # fmt code breaks: https://bugzilla.redhat.com/show_bug.cgi?id=2061022 ExcludeArch: ppc64le %endif @@ -98,6 +103,8 @@ applications that use %{name}. %prep %forgesetup %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %if 0%{?el8} %patch100 -p1 %endif From bbf8d4ae72906b34322237ec85256606c5302f8f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 22:28:12 +0000 Subject: [PATCH 03/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering From e5ad4f5c96af948030ce848148532c6bc0b33c1c Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 21 Jul 2022 16:06:48 -0500 Subject: [PATCH 04/25] Rebuild for folly 2022.07.11.00 Signed-off-by: Michel Alexandre Salim --- cachelib.spec | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/cachelib.spec b/cachelib.spec index 8a1a1ea..4f2fd20 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -1,9 +1,4 @@ -%if 0%{?fedora} == 36 -# Folly is compiled with Clang -%bcond_without toolchain_clang -%else %bcond_with toolchain_clang -%endif %if %{with toolchain_clang} %global toolchain clang @@ -42,21 +37,7 @@ Patch2: %{name}-avoid-bind-packed-buffer.patch # needed on EL8; its gtest does not come with cmake files Patch100: %{name}-find-gtest.patch -# Folly is known not to work on big-endian CPUs -# https://bugzilla.redhat.com/show_bug.cgi?id=1892151 -ExcludeArch: s390x -%if 0%{?fedora} == 36 -# fmt code breaks: https://bugzilla.redhat.com/show_bug.cgi?id=2061022 -ExcludeArch: ppc64le -%endif -# does not compile cleanly on 32-bit arches -# https://bugzilla.redhat.com/show_bug.cgi?id=2036124 -%if 0%{?el8} -ExcludeArch: %{arm} -%else -ExcludeArch: %{arm32} -%endif -ExcludeArch: %{ix86} +ExclusiveArch: x86_64 aarch64 ppc64le BuildRequires: cmake %if %{with toolchain_clang} From 3936925a42367b7f757c827d00c458d57a62a562 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 15 Aug 2022 18:31:02 +0900 Subject: [PATCH 05/25] Add upstream gcc bugzilla reference, and remove the patch on F-38 --- cachelib.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cachelib.spec b/cachelib.spec index 4f2fd20..b5f5350 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -31,6 +31,8 @@ Source0: %forgesource Patch0: %{name}-fix_test_linking.patch # Workaround for gcc issue: # https://bugzilla.redhat.com/show_bug.cgi?id=2108665 +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105634 +# Fixed in gcc-12.1.1-4 Patch1: %{name}-workaround-gcc12-bz2108665.patch # https://github.com/facebook/CacheLib/commit/2114d3fe8b60992e4b98c2e4e07761649aa47d89 Patch2: %{name}-avoid-bind-packed-buffer.patch @@ -84,7 +86,9 @@ applications that use %{name}. %prep %forgesetup %patch0 -p1 +%if 0%{?fedora} <= 37 %patch1 -p1 +%endif %patch2 -p1 %if 0%{?el8} %patch100 -p1 From 7721ae9dc1c3c87ac333b3c2d9e80ed6cc0b2878 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 28 Aug 2022 14:30:37 +0900 Subject: [PATCH 06/25] drop patches no longer needed - fixed in gcc side --- cachelib.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cachelib.spec b/cachelib.spec index b5f5350..cbc7739 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -29,11 +29,6 @@ License: ASL 2.0 URL: %forgeurl Source0: %forgesource Patch0: %{name}-fix_test_linking.patch -# Workaround for gcc issue: -# https://bugzilla.redhat.com/show_bug.cgi?id=2108665 -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105634 -# Fixed in gcc-12.1.1-4 -Patch1: %{name}-workaround-gcc12-bz2108665.patch # https://github.com/facebook/CacheLib/commit/2114d3fe8b60992e4b98c2e4e07761649aa47d89 Patch2: %{name}-avoid-bind-packed-buffer.patch # needed on EL8; its gtest does not come with cmake files @@ -86,9 +81,6 @@ applications that use %{name}. %prep %forgesetup %patch0 -p1 -%if 0%{?fedora} <= 37 -%patch1 -p1 -%endif %patch2 -p1 %if 0%{?el8} %patch100 -p1 From 8d4e2db7e0291c38cdbdc090cde339f1414017e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 23:23:09 +0000 Subject: [PATCH 07/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 955685469c70ed62e941719f1fef90fe3ee669cb Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 25 Apr 2023 14:30:53 -0500 Subject: [PATCH 08/25] Update to 2023.04.24.00 Signed-off-by: Michel Alexandre Salim --- .gitignore | 1 + cachelib-add_missing_includes.diff | 10 ++++ cachelib-avoid-bind-packed-buffer.patch | 39 ---------------- cachelib-fix_test_linking.patch | 61 ------------------------- cachelib.spec | 21 ++++----- sources | 2 +- 6 files changed, 21 insertions(+), 113 deletions(-) create mode 100644 cachelib-add_missing_includes.diff delete mode 100644 cachelib-avoid-bind-packed-buffer.patch delete mode 100644 cachelib-fix_test_linking.patch diff --git a/.gitignore b/.gitignore index efd78cc..d17a447 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz /CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz +/cachelib-2023.04.24.00.tar.gz diff --git a/cachelib-add_missing_includes.diff b/cachelib-add_missing_includes.diff new file mode 100644 index 0000000..5849cb3 --- /dev/null +++ b/cachelib-add_missing_includes.diff @@ -0,0 +1,10 @@ +--- a/cachelib/cachebench/consistency/ShortThreadId.cpp ++++ b/cachelib/cachebench/consistency/ShortThreadId.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + namespace facebook { + namespace cachelib { diff --git a/cachelib-avoid-bind-packed-buffer.patch b/cachelib-avoid-bind-packed-buffer.patch deleted file mode 100644 index afd3dd4..0000000 --- a/cachelib-avoid-bind-packed-buffer.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 2114d3fe8b60992e4b98c2e4e07761649aa47d89 Mon Sep 17 00:00:00 2001 -From: Jimmy Lu -Date: Tue, 28 Jun 2022 15:48:00 -0700 -Subject: [PATCH] DO NOT COMMIT YET - Do not "pack" FixedArraySize elements - -Summary: -DO NOT COMMIT YET. -Needs to be discussed. - -Remove the FOLLY_PACK_ATTR to avoid packing the FixedArraySize elements. -This avoids the C++ error "cannot bind unpacked field". - -C.f. D24538466 (https://github.com/facebook/CacheLib/commit/ab1f75cbdcc1c40a48e0f6eaf76488ce482cbd2a) . - -Reviewed By: haowu14 - -Differential Revision: D35907647 - -fbshipit-source-id: 7e3ed0a9bc78c1eb1818a2e725361a5c2fceaca1 ---- - cachelib/datatype/FixedSizeArray.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/cachelib/datatype/FixedSizeArray.h b/cachelib/datatype/FixedSizeArray.h -index 6d6a1fa5b..9155ad60e 100644 ---- a/cachelib/datatype/FixedSizeArray.h -+++ b/cachelib/datatype/FixedSizeArray.h -@@ -26,8 +26,10 @@ namespace cachelib { - - namespace detail { - // @param T must be a POD like type -+// Note that packing is not guaranteed with this data structure. User -+// of FixedSizeArray must ensure their type is packed if they need it. - template --class FOLLY_PACK_ATTR FixedSizeArrayLayout { -+class FixedSizeArrayLayout { - public: - // Compute the storage required for the number of elements - static uint32_t computeStorageSize(uint32_t numElements) { diff --git a/cachelib-fix_test_linking.patch b/cachelib-fix_test_linking.patch deleted file mode 100644 index fd9df62..0000000 --- a/cachelib-fix_test_linking.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/allocator/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/allocator/CMakeLists.txt ---- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/allocator/CMakeLists.txt 2022-03-14 10:49:38.000000000 -0700 -+++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/allocator/CMakeLists.txt 2022-03-15 14:00:37.874691691 -0700 -@@ -77,7 +77,8 @@ - DESTINATION ${LIB_INSTALL_DIR} ) - - if (BUILD_TESTS) -- add_library (allocator_test_support -+ add_library (allocator_test_support OBJECT -+ ../common/TestUtils.cpp - ${DATASTRUCT_TESTS_THRIFT_FILES} - ./nvmcache/tests/NvmTestBase.cpp - ./memory/tests/TestBase.cpp -diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/benchmarks/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/benchmarks/CMakeLists.txt ---- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/benchmarks/CMakeLists.txt 2022-03-14 10:49:38.000000000 -0700 -+++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/benchmarks/CMakeLists.txt 2022-03-15 13:21:46.885003006 -0700 -@@ -44,7 +44,7 @@ - add_test (CachelibTickerClockBench.cpp) - add_test (CompactCacheBench.cpp) - add_test (HashMapBenchmark.cpp) -- add_test (ItemsReaperBench.cpp) -+ add_test (ItemsReaperBench.cpp allocator_test_support) - add_test (tl-bench/main.cpp) - add_test (MMTypeAccessBench.cpp) - add_test (MMTypeBench.cpp) -diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/common/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/common/CMakeLists.txt ---- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/common/CMakeLists.txt 2022-03-14 10:49:38.000000000 -0700 -+++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/common/CMakeLists.txt 2022-03-15 12:15:28.818925017 -0700 -@@ -76,12 +76,12 @@ - add_test (tests/CohortTests.cpp) - add_test (tests/CounterTests.cpp) - add_test (tests/CountMinSketchTest.cpp) -- add_test (tests/EventInterfaceTest.cpp cachelib_allocator) -+ add_test (tests/EventInterfaceTest.cpp allocator_test_support) - add_test (tests/HashTests.cpp) - add_test (tests/IteratorsTests.cpp) - add_test (tests/MutexTests.cpp) - add_test (tests/PeriodicWorkerTest.cpp) -- add_test (tests/SerializationTest.cpp cachelib_allocator) -+ add_test (tests/SerializationTest.cpp allocator_test_support) - add_test (tests/UtilTests.cpp) - add_test (tests/CountDownLatchTest.cpp) - add_test (tests/UtilTestsRSS.cpp) -diff '--color=auto' -ruN CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CMakeLists.txt CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/compact_cache/CMakeLists.txt ---- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CMakeLists.txt 2022-03-14 10:49:38.000000000 -0700 -+++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291-fix_test_linking/cachelib/compact_cache/CMakeLists.txt 2022-03-15 11:33:00.611186014 -0700 -@@ -12,11 +12,10 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --add_library (compact_cache_test_support INTERFACE) --add_dependencies(compact_cache_test_support INTERFACE thrift_generated_files) -- - if (BUILD_TESTS) -- target_link_libraries (compact_cache_test_support INTERFACE -+ add_library (compact_cache_test_support OBJECT ../common/TestUtils.cpp) -+ -+ target_link_libraries (compact_cache_test_support PUBLIC - cachelib_allocator - glog::glog - gflags diff --git a/cachelib.spec b/cachelib.spec index cbc7739..452fdb9 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,9 +9,8 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global commit bd22b0eb79f7e2326f77a22c278c48e454882291 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global date 20220314 +%global tag 2023.04.24.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} @@ -21,16 +20,14 @@ %global major_ver 16 Name: cachelib -Version: %{major_ver}^%{date}git%{shortcommit} +Version: %{major_ver}^%{date} Release: %autorelease Summary: Pluggable caching engine for scale high performance cache services License: ASL 2.0 URL: %forgeurl -Source0: %forgesource -Patch0: %{name}-fix_test_linking.patch -# https://github.com/facebook/CacheLib/commit/2114d3fe8b60992e4b98c2e4e07761649aa47d89 -Patch2: %{name}-avoid-bind-packed-buffer.patch +Source0: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz +Patch0: %{name}-add_missing_includes.diff # needed on EL8; its gtest does not come with cmake files Patch100: %{name}-find-gtest.patch @@ -53,6 +50,7 @@ BuildRequires: gmock-devel BuildRequires: gtest-devel BuildRequires: libdwarf-devel BuildRequires: libzstd-devel +BuildRequires: numactl-devel BuildRequires: wangle-devel BuildRequires: zlib-devel BuildRequires: tsl-sparse-map-devel @@ -79,11 +77,10 @@ applications that use %{name}. %prep -%forgesetup -%patch0 -p1 -%patch2 -p1 +%autosetup -n CacheLib-%{tag} -N +%autopatch -p1 -M 99 %if 0%{?el8} -%patch100 -p1 +%autopatch -p1 -m 100 -M 199 %endif diff --git a/sources b/sources index 9425ec2..39916fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz) = 38643e57c51047abf9888b4442c305cf9de9c42bd1560cdb68edabd10158ce9d904eb1bdef546228e3818679135d6d6147c3b2d4c021ea0ad177f53f9f215305 +SHA512 (cachelib-2023.04.24.00.tar.gz) = 6cc979da911cad5beb80aec4f340b3ef42f2ba6cfa49855cea9c2367a4b1af92874822cf369c1e52485bb34a5c6263159c331ba962319ec7769f7645a8d0112d From 5041ffc884dcb6132eb2ed0e83da24dc904a0f8b Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 27 Apr 2023 15:25:58 -0500 Subject: [PATCH 09/25] Reapply GCC workaround for epel9 x86_64 Signed-off-by: Michel Alexandre Salim --- ...> cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch | 0 cachelib.spec | 8 ++++++++ 2 files changed, 8 insertions(+) rename cachelib-workaround-gcc12-bz2108665.patch => cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch (100%) diff --git a/cachelib-workaround-gcc12-bz2108665.patch b/cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch similarity index 100% rename from cachelib-workaround-gcc12-bz2108665.patch rename to cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch diff --git a/cachelib.spec b/cachelib.spec index 452fdb9..8c495f0 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -30,6 +30,9 @@ Source0: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz Patch0: %{name}-add_missing_includes.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 @@ -82,6 +85,11 @@ applications that use %{name}. %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 From d6bf600bb003881225d084f0492d7f3204286a85 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Wed, 28 Jun 2023 10:49:02 +0200 Subject: [PATCH 10/25] Rebuilt due to fmt 10 update. From cddbcc1224e6d0b45ab0af641e894cdbadf90ca9 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 6 Jul 2023 22:11:06 -0500 Subject: [PATCH 11/25] 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 --- .gitignore | 1 + cachelib-fix_for_atomic_formatting.patch | 29 +++++++++++++++++++ ...elib-fix_for_atomic_formatting_part2.patch | 16 ++++++++++ cachelib.spec | 10 ++++--- sources | 2 +- 5 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 cachelib-fix_for_atomic_formatting.patch create mode 100644 cachelib-fix_for_atomic_formatting_part2.patch diff --git a/.gitignore b/.gitignore index d17a447..4ab2e52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /CacheLib-03dcb9bbddb977b5ec6e9ba6c5b1a53cac521f85.tar.gz /CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291.tar.gz /cachelib-2023.04.24.00.tar.gz +/cachelib-2023.07.03.00.tar.gz diff --git a/cachelib-fix_for_atomic_formatting.patch b/cachelib-fix_for_atomic_formatting.patch new file mode 100644 index 0000000..6efb3b7 --- /dev/null +++ b/cachelib-fix_for_atomic_formatting.patch @@ -0,0 +1,29 @@ +From 39f1f92f6f039e7b1a161b5302fd9b8952fc97f8 Mon Sep 17 00:00:00 2001 +From: Dan Melnic +Date: Thu, 6 Jul 2023 17:42:20 -0700 +Subject: [PATCH] Fix for atomic formatting + +Summary: static assertion failed: Cannot format an argument + +Reviewed By: vitaut + +Differential Revision: D47277406 + +fbshipit-source-id: 4e784997d72860a9447cc069c72f0e4bf92af7e0 +--- + cachelib/navy/admission_policy/DynamicRandomAP.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cachelib/navy/admission_policy/DynamicRandomAP.cpp b/cachelib/navy/admission_policy/DynamicRandomAP.cpp +index 3a8a1aa09..d8238415b 100644 +--- a/cachelib/navy/admission_policy/DynamicRandomAP.cpp ++++ b/cachelib/navy/admission_policy/DynamicRandomAP.cpp +@@ -189,7 +189,7 @@ void DynamicRandomAP::updateThrottleParamsLocked(std::chrono::seconds curTime) { + XLOGF(INFO, + "max write rate {} will be used because target current write rate {} " + "exceeds it.", +- maxRate_, curTargetRate); ++ maxRate_.load(), curTargetRate); + curTargetRate = maxRate_; + } + writeStats_.curTargetRate = curTargetRate; diff --git a/cachelib-fix_for_atomic_formatting_part2.patch b/cachelib-fix_for_atomic_formatting_part2.patch new file mode 100644 index 0000000..a5b029c --- /dev/null +++ b/cachelib-fix_for_atomic_formatting_part2.patch @@ -0,0 +1,16 @@ +--- a/cachelib/cachebench/cache/ItemRecords.h ++++ b/cachelib/cachebench/cache/ItemRecords.h +@@ -102,11 +102,11 @@ class ItemRecords { + } + if (record.destructCount != 0) { + XLOGF(ERR, "unexpected destructCount {} for item {}, context {}|{}", +- record.destructCount, item.getKey(), data.context, record.context); ++ record.destructCount, item.getKey().toString(), data.context, record.context); + } + if (record.version != ptr->getVersion()) { + XLOGF(ERR, "unexpected version {}|{} for item {}", record.version, +- ptr->getVersion(), item.getKey()); ++ ptr->getVersion(), item.getKey().toString()); + } + ++record.destructCount; + diff --git a/cachelib.spec b/cachelib.spec index 8c495f0..dac82e6 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2023.04.24.00 +%global tag 2023.07.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 @@ -17,17 +17,19 @@ %forgemeta # see cachelib/allocator/CacheVersion.h's kCachelibVersion -%global major_ver 16 +%global major_ver 17 Name: cachelib Version: %{major_ver}^%{date} Release: %autorelease Summary: Pluggable caching engine for scale high performance cache services -License: ASL 2.0 +License: Apache-2.0 URL: %forgeurl Source0: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz -Patch0: %{name}-add_missing_includes.diff +# needed for compiling with fmt 10 +Patch0: %{url}/commit/39f1f92f6f039e7b1a161b5302fd9b8952fc97f8.patch#/%{name}-fix_for_atomic_formatting.patch +Patch1: %{name}-fix_for_atomic_formatting_part2.patch # 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) diff --git a/sources b/sources index 39916fa..18f7fd3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2023.04.24.00.tar.gz) = 6cc979da911cad5beb80aec4f340b3ef42f2ba6cfa49855cea9c2367a4b1af92874822cf369c1e52485bb34a5c6263159c331ba962319ec7769f7645a8d0112d +SHA512 (cachelib-2023.07.03.00.tar.gz) = aa5ab56e36bbf7197eeb8b21dcb7c0abe6947e2e37d0665a1ead0492b01dd71c6b4ab2c7e63637b49ac3b077d0507799176d4a525efd4513e1f6cca2332d919f From 835f9a0ba20d4780b3203a20b3f8ec9f687e62d8 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Tue, 12 Sep 2023 15:53:53 -0500 Subject: [PATCH 12/25] Update to 2023.09.11.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib-add_missing_includes.diff | 10 ------- cachelib-fix_for_atomic_formatting.patch | 29 ------------------- ...elib-fix_for_atomic_formatting_part2.patch | 16 ---------- cachelib.spec | 6 ++-- sources | 2 +- 6 files changed, 4 insertions(+), 60 deletions(-) delete mode 100644 cachelib-add_missing_includes.diff delete mode 100644 cachelib-fix_for_atomic_formatting.patch delete mode 100644 cachelib-fix_for_atomic_formatting_part2.patch diff --git a/.gitignore b/.gitignore index 4ab2e52..d79f42c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /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 diff --git a/cachelib-add_missing_includes.diff b/cachelib-add_missing_includes.diff deleted file mode 100644 index 5849cb3..0000000 --- a/cachelib-add_missing_includes.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- a/cachelib/cachebench/consistency/ShortThreadId.cpp -+++ b/cachelib/cachebench/consistency/ShortThreadId.cpp -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - namespace facebook { - namespace cachelib { diff --git a/cachelib-fix_for_atomic_formatting.patch b/cachelib-fix_for_atomic_formatting.patch deleted file mode 100644 index 6efb3b7..0000000 --- a/cachelib-fix_for_atomic_formatting.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 39f1f92f6f039e7b1a161b5302fd9b8952fc97f8 Mon Sep 17 00:00:00 2001 -From: Dan Melnic -Date: Thu, 6 Jul 2023 17:42:20 -0700 -Subject: [PATCH] Fix for atomic formatting - -Summary: static assertion failed: Cannot format an argument - -Reviewed By: vitaut - -Differential Revision: D47277406 - -fbshipit-source-id: 4e784997d72860a9447cc069c72f0e4bf92af7e0 ---- - cachelib/navy/admission_policy/DynamicRandomAP.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cachelib/navy/admission_policy/DynamicRandomAP.cpp b/cachelib/navy/admission_policy/DynamicRandomAP.cpp -index 3a8a1aa09..d8238415b 100644 ---- a/cachelib/navy/admission_policy/DynamicRandomAP.cpp -+++ b/cachelib/navy/admission_policy/DynamicRandomAP.cpp -@@ -189,7 +189,7 @@ void DynamicRandomAP::updateThrottleParamsLocked(std::chrono::seconds curTime) { - XLOGF(INFO, - "max write rate {} will be used because target current write rate {} " - "exceeds it.", -- maxRate_, curTargetRate); -+ maxRate_.load(), curTargetRate); - curTargetRate = maxRate_; - } - writeStats_.curTargetRate = curTargetRate; diff --git a/cachelib-fix_for_atomic_formatting_part2.patch b/cachelib-fix_for_atomic_formatting_part2.patch deleted file mode 100644 index a5b029c..0000000 --- a/cachelib-fix_for_atomic_formatting_part2.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/cachelib/cachebench/cache/ItemRecords.h -+++ b/cachelib/cachebench/cache/ItemRecords.h -@@ -102,11 +102,11 @@ class ItemRecords { - } - if (record.destructCount != 0) { - XLOGF(ERR, "unexpected destructCount {} for item {}, context {}|{}", -- record.destructCount, item.getKey(), data.context, record.context); -+ record.destructCount, item.getKey().toString(), data.context, record.context); - } - if (record.version != ptr->getVersion()) { - XLOGF(ERR, "unexpected version {}|{} for item {}", record.version, -- ptr->getVersion(), item.getKey()); -+ ptr->getVersion(), item.getKey().toString()); - } - ++record.destructCount; - diff --git a/cachelib.spec b/cachelib.spec index dac82e6..7b209d6 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2023.07.03.00 +%global tag 2023.09.11.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 @@ -27,9 +27,6 @@ Summary: Pluggable caching engine for scale high performance cache servic License: Apache-2.0 URL: %forgeurl Source0: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz -# needed for compiling with fmt 10 -Patch0: %{url}/commit/39f1f92f6f039e7b1a161b5302fd9b8952fc97f8.patch#/%{name}-fix_for_atomic_formatting.patch -Patch1: %{name}-fix_for_atomic_formatting_part2.patch # 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) @@ -55,6 +52,7 @@ BuildRequires: gmock-devel BuildRequires: gtest-devel BuildRequires: libdwarf-devel BuildRequires: libzstd-devel +BuildRequires: mvfst-devel BuildRequires: numactl-devel BuildRequires: wangle-devel BuildRequires: zlib-devel diff --git a/sources b/sources index 18f7fd3..ae47469 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2023.07.03.00.tar.gz) = aa5ab56e36bbf7197eeb8b21dcb7c0abe6947e2e37d0665a1ead0492b01dd71c6b4ab2c7e63637b49ac3b077d0507799176d4a525efd4513e1f6cca2332d919f +SHA512 (cachelib-2023.09.11.00.tar.gz) = b9fff11bc27e4a5e4d519cd7cb53f95bd451e670c0452c80c1e1722a351b3172226e5b3da66d906aa649310493378015aa724cbfc216aed828fd49322a21311b From b60e655ff7a35380fb47da3b85252c6536228674 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Tue, 17 Oct 2023 10:35:42 -0500 Subject: [PATCH 13/25] Update to 2023.10.09.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib.spec | 2 +- get_version.sh | 7 +++++++ sources | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 get_version.sh diff --git a/.gitignore b/.gitignore index d79f42c..3d37001 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /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 diff --git a/cachelib.spec b/cachelib.spec index 7b209d6..78364f2 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2023.09.11.00 +%global tag 2023.10.09.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 diff --git a/get_version.sh b/get_version.sh new file mode 100755 index 0000000..375a450 --- /dev/null +++ b/get_version.sh @@ -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}||") diff --git a/sources b/sources index ae47469..93a9b17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2023.09.11.00.tar.gz) = b9fff11bc27e4a5e4d519cd7cb53f95bd451e670c0452c80c1e1722a351b3172226e5b3da66d906aa649310493378015aa724cbfc216aed828fd49322a21311b +SHA512 (cachelib-2023.10.09.00.tar.gz) = f52302c93d0939457f39b7440db86b52011b5871ae8ded605f6c3a7ed014cd818e98baa8883626680322da6e161562d47595111e7cabb46a97ec0c6a40e89c0b From a92afc6ac0cf974c0406fc7d00fb15829698c789 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Tue, 17 Oct 2023 22:21:43 -0500 Subject: [PATCH 14/25] Update to 2023.10.16.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3d37001..d57fe65 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /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 diff --git a/cachelib.spec b/cachelib.spec index 78364f2..db7ebf6 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2023.10.09.00 +%global tag 2023.10.16.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 diff --git a/sources b/sources index 93a9b17..f1dffa0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2023.10.09.00.tar.gz) = f52302c93d0939457f39b7440db86b52011b5871ae8ded605f6c3a7ed014cd818e98baa8883626680322da6e161562d47595111e7cabb46a97ec0c6a40e89c0b +SHA512 (cachelib-2023.10.16.00.tar.gz) = ce702bc1bfe137e63277f9ec777cf3a16861e37158ae4b8b1afed1e349f569c7e0a78a2fea99b56885ec45136c89260df8f3b43a440d977471b8fcde0cfd28c8 From 1bb73f1a3086a352df849b0b81de515d818fd234 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 14:56:23 +0000 Subject: [PATCH 15/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ee3f9a88a90d7f2f28b9c7dc7a367ba0157a31a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 23 Jan 2024 01:05:39 +0000 Subject: [PATCH 16/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6810455f46ff5c9a2562ba909e8f5ca96e8011fe Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Thu, 25 Jan 2024 10:47:58 -0600 Subject: [PATCH 17/25] Update to 2024.01.22.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib-find-gtest.patch | 11 +++++------ cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch | 4 ++-- cachelib.spec | 10 +++++----- series | 2 ++ sources | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 series diff --git a/.gitignore b/.gitignore index d57fe65..a194474 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /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 diff --git a/cachelib-find-gtest.patch b/cachelib-find-gtest.patch index b9cce71..5a874d1 100644 --- a/cachelib-find-gtest.patch +++ b/cachelib-find-gtest.patch @@ -1,6 +1,6 @@ diff '--color=auto' -ruN CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/cmake/FindGTest.cmake CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/cmake/FindGTest.cmake ---- CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/cmake/FindGTest.cmake 1969-12-31 16:00:00.000000000 -0800 -+++ CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/cmake/FindGTest.cmake 2022-02-24 20:08:51.087790319 -0800 +--- /dev/null ++++ b/cachelib/cmake/FindGTest.cmake @@ -0,0 +1,54 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# @@ -56,10 +56,9 @@ diff '--color=auto' -ruN CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cache +if(GTEST_FOUND AND NOT GTEST_FIND_QUIETLY) + message(STATUS "GTEST: ${GTEST_INCLUDE_DIRS}") +endif() -diff '--color=auto' -ruN CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/CMakeLists.txt CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/CMakeLists.txt ---- CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8/cachelib/CMakeLists.txt 2021-12-20 07:22:18.000000000 -0800 -+++ CacheLib-c4904ef2524f396eb432392f8308a69dda926bd8-find-gtest/cachelib/CMakeLists.txt 2022-02-24 20:12:39.078602510 -0800 -@@ -93,7 +93,7 @@ +--- 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) diff --git a/cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch b/cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch index 7fc45a2..5b88103 100644 --- a/cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch +++ b/cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch @@ -1,5 +1,5 @@ ---- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h.orig 2022-03-15 02:49:38.000000000 +0900 -+++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h 2022-07-20 02:03:03.028073719 +0900 +--- 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); diff --git a/cachelib.spec b/cachelib.spec index db7ebf6..fd62a4d 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2023.10.16.00 +%global tag 2024.01.22.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 @@ -41,9 +41,10 @@ BuildRequires: clang %else BuildRequires: gcc-c++ %endif -BuildRequires: fbthrift-devel -BuildRequires: fizz-devel -BuildRequires: folly-devel +BuildRequires: fbthrift-devel = %{tag} +BuildRequires: fizz-devel = %{tag} +BuildRequires: folly-devel = %{tag} +BuildRequires: mvfst-devel = %{tag} %if %{with build_tests} BuildRequires: gmock-devel %endif @@ -52,7 +53,6 @@ BuildRequires: gmock-devel BuildRequires: gtest-devel BuildRequires: libdwarf-devel BuildRequires: libzstd-devel -BuildRequires: mvfst-devel BuildRequires: numactl-devel BuildRequires: wangle-devel BuildRequires: zlib-devel diff --git a/series b/series new file mode 100644 index 0000000..cd0f15d --- /dev/null +++ b/series @@ -0,0 +1,2 @@ +cachelib-find-gtest.patch +cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch diff --git a/sources b/sources index f1dffa0..e01fd4c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2023.10.16.00.tar.gz) = ce702bc1bfe137e63277f9ec777cf3a16861e37158ae4b8b1afed1e349f569c7e0a78a2fea99b56885ec45136c89260df8f3b43a440d977471b8fcde0cfd28c8 +SHA512 (cachelib-2024.01.22.00.tar.gz) = 9f58568f379a2f28f44526055820c75010af79cf65b8a800182ea3d218a0a158ffab9d9e93f9dcd07c5febc06bf74f4c92e15d26c26f4ef9cf6dc933bc3ec87d From 11e1367e67f73f7dbefdf011d5bdb51dc3ed8ea6 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Sat, 24 Feb 2024 08:26:47 -0600 Subject: [PATCH 18/25] Update to 2024.02.19.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a194474..545ff02 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /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 diff --git a/cachelib.spec b/cachelib.spec index fd62a4d..aa4c717 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2024.01.22.00 +%global tag 2024.02.19.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 diff --git a/sources b/sources index e01fd4c..4e7905a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2024.01.22.00.tar.gz) = 9f58568f379a2f28f44526055820c75010af79cf65b8a800182ea3d218a0a158ffab9d9e93f9dcd07c5febc06bf74f4c92e15d26c26f4ef9cf6dc933bc3ec87d +SHA512 (cachelib-2024.02.19.00.tar.gz) = b0ac756fede25119c77515819c32b7b6ab5d0236d3e0e39d6609c6de32184f4a59dc34100f4805c7bcd749c641036c30f2e16b57e0881408e0760b4d11fb03c9 From 00ff326c121a6ff1b1e826c660b55d16ab95a17a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 18:50:27 +0000 Subject: [PATCH 19/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 1741a377a780bf965787b8426672329e5d1cc42f Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 26 Jul 2024 14:19:26 -0500 Subject: [PATCH 20/25] Update to 2024.07.22.00 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib-fix-DeviceTest-FDP.diff | 11 ++++++++ ...-fix-libcachelib_allocator-MockDevice.diff | 26 +++++++++++++++++++ cachelib-fix-nvme-data-gating.diff | 18 +++++++++++++ cachelib-fmt11-fix.diff | 11 ++++++++ cachelib.spec | 13 ++++++++-- series | 6 +++-- sources | 2 +- 8 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 cachelib-fix-DeviceTest-FDP.diff create mode 100644 cachelib-fix-libcachelib_allocator-MockDevice.diff create mode 100644 cachelib-fix-nvme-data-gating.diff create mode 100644 cachelib-fmt11-fix.diff diff --git a/.gitignore b/.gitignore index 545ff02..9e27303 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /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 diff --git a/cachelib-fix-DeviceTest-FDP.diff b/cachelib-fix-DeviceTest-FDP.diff new file mode 100644 index 0000000..26c5566 --- /dev/null +++ b/cachelib-fix-DeviceTest-FDP.diff @@ -0,0 +1,11 @@ +--- a/cachelib/navy/CMakeLists.txt ++++ b/cachelib/navy/CMakeLists.txt +@@ -103,7 +103,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) diff --git a/cachelib-fix-libcachelib_allocator-MockDevice.diff b/cachelib-fix-libcachelib_allocator-MockDevice.diff new file mode 100644 index 0000000..94e07aa --- /dev/null +++ b/cachelib-fix-libcachelib_allocator-MockDevice.diff @@ -0,0 +1,26 @@ +--- a/cachelib/allocator/nvmcache/NavySetup.cpp ++++ b/cachelib/allocator/nvmcache/NavySetup.cpp +@@ -23,7 +23,6 @@ + #include "cachelib/allocator/nvmcache/NavyConfig.h" + #include "cachelib/navy/Factory.h" + #include "cachelib/navy/scheduler/JobScheduler.h" +-#include "cachelib/navy/testing/MockDevice.h" + + namespace facebook { + namespace cachelib { +@@ -369,6 +368,7 @@ std::unique_ptr cre + bool itemDestructorEnabled) { + auto device = createDevice(config, std::move(encryptor)); + ++#if 0 + if (config.hasDeviceDataCorruptionForTesting()) { + // Use mock device. This is for testing + auto mockDevice = std::make_unique( +@@ -392,6 +392,7 @@ std::unique_ptr cre + + device = std::move(mockDevice); + } ++#endif + + auto proto = cachelib::navy::createCacheProto(); + auto* devicePtr = device.get(); diff --git a/cachelib-fix-nvme-data-gating.diff b/cachelib-fix-nvme-data-gating.diff new file mode 100644 index 0000000..b76186a --- /dev/null +++ b/cachelib-fix-nvme-data-gating.diff @@ -0,0 +1,18 @@ +--- a/cachelib/navy/common/FdpNvme.h ++++ b/cachelib/navy/common/FdpNvme.h +@@ -83,6 +83,7 @@ enum nvme_io_opcode { + nvme_cmd_io_mgmt_recv = 0x12, + nvme_cmd_io_mgmt_send = 0x1d, + }; ++#endif + + // NVMe specific data for a device + // +@@ -127,7 +128,6 @@ class NvmeData { + uint32_t maxTfrSize_; + uint64_t startLba_; + }; +-#endif + + // FDP specific info and handling + // diff --git a/cachelib-fmt11-fix.diff b/cachelib-fmt11-fix.diff new file mode 100644 index 0000000..e50c731 --- /dev/null +++ b/cachelib-fmt11-fix.diff @@ -0,0 +1,11 @@ +--- a/cachelib/navy/common/Types.h ++++ b/cachelib/navy/common/Types.h +@@ -83,6 +83,8 @@ inline std::ostream& operator<<(std::ost + inline std::ostream& operator<<(std::ostream& os, DestructorEvent e) { + return os << "DestructorEvent::" << toString(e); + } ++ ++inline int format_as(Status s) { return folly::to_underlying(s); } + } // namespace navy + } // namespace cachelib + } // namespace facebook diff --git a/cachelib.spec b/cachelib.spec index aa4c717..a792356 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2024.02.19.00 +%global tag 2024.07.22.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 @@ -26,7 +26,16 @@ Summary: Pluggable caching engine for scale high performance cache servic License: Apache-2.0 URL: %forgeurl -Source0: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz +Source: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz +# add missing formatter for Status +Patch: %{name}-fmt11-fix.diff +# NvmeData is not part of nvme.h, it was wrongly gated +# so if we have nvme.h it is missing +Patch: %{name}-fix-nvme-data-gating.diff +# allocator/nvmecache/NavySetup.cpp should not reference test code +Patch: %{name}-fix-libcachelib_allocator-MockDevice.diff +# DeviceTest needs common/FdpNvme.cpp. Disable for now +Patch: %{name}-fix-DeviceTest-FDP.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) diff --git a/series b/series index cd0f15d..3bc10fb 100644 --- a/series +++ b/series @@ -1,2 +1,4 @@ -cachelib-find-gtest.patch -cachelib-workaround-gcc-epel9-x86_64-bz2108665.patch +cachelib-fmt11-fix.diff +cachelib-fix-nvme-data-gating.diff +cachelib-fix-libcachelib_allocator-MockDevice.diff +cachelib-fix-DeviceTest-FDP.diff diff --git a/sources b/sources index 4e7905a..c97cd52 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2024.02.19.00.tar.gz) = b0ac756fede25119c77515819c32b7b6ab5d0236d3e0e39d6609c6de32184f4a59dc34100f4805c7bcd749c641036c30f2e16b57e0881408e0760b4d11fb03c9 +SHA512 (cachelib-2024.07.22.00.tar.gz) = 7942501f40565bf59347fb6427901abbfcc0ae631082eb1e214a89f5ae021ae5bb52e847fbac4050e4468c6170c0d8df8af75c2d5dbb757e049e1e508260d2fa From 049869bec6e090aa56d44ebd75803960d4d2c643 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Wed, 21 Aug 2024 14:00:40 -0500 Subject: [PATCH 21/25] Update to the 2024.08.19.00 tag Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib-fix-nvme-data-gating.diff | 18 ------------------ cachelib-fmt11-fix.diff | 11 ----------- cachelib.spec | 7 +------ series | 2 -- sources | 2 +- 6 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 cachelib-fix-nvme-data-gating.diff delete mode 100644 cachelib-fmt11-fix.diff diff --git a/.gitignore b/.gitignore index 9e27303..d5f4bd2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /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 diff --git a/cachelib-fix-nvme-data-gating.diff b/cachelib-fix-nvme-data-gating.diff deleted file mode 100644 index b76186a..0000000 --- a/cachelib-fix-nvme-data-gating.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- a/cachelib/navy/common/FdpNvme.h -+++ b/cachelib/navy/common/FdpNvme.h -@@ -83,6 +83,7 @@ enum nvme_io_opcode { - nvme_cmd_io_mgmt_recv = 0x12, - nvme_cmd_io_mgmt_send = 0x1d, - }; -+#endif - - // NVMe specific data for a device - // -@@ -127,7 +128,6 @@ class NvmeData { - uint32_t maxTfrSize_; - uint64_t startLba_; - }; --#endif - - // FDP specific info and handling - // diff --git a/cachelib-fmt11-fix.diff b/cachelib-fmt11-fix.diff deleted file mode 100644 index e50c731..0000000 --- a/cachelib-fmt11-fix.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cachelib/navy/common/Types.h -+++ b/cachelib/navy/common/Types.h -@@ -83,6 +83,8 @@ inline std::ostream& operator<<(std::ost - inline std::ostream& operator<<(std::ostream& os, DestructorEvent e) { - return os << "DestructorEvent::" << toString(e); - } -+ -+inline int format_as(Status s) { return folly::to_underlying(s); } - } // namespace navy - } // namespace cachelib - } // namespace facebook diff --git a/cachelib.spec b/cachelib.spec index a792356..2736b2a 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2024.07.22.00 +%global tag 2024.08.19.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 @@ -27,11 +27,6 @@ Summary: Pluggable caching engine for scale high performance cache servic License: Apache-2.0 URL: %forgeurl Source: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz -# add missing formatter for Status -Patch: %{name}-fmt11-fix.diff -# NvmeData is not part of nvme.h, it was wrongly gated -# so if we have nvme.h it is missing -Patch: %{name}-fix-nvme-data-gating.diff # allocator/nvmecache/NavySetup.cpp should not reference test code Patch: %{name}-fix-libcachelib_allocator-MockDevice.diff # DeviceTest needs common/FdpNvme.cpp. Disable for now diff --git a/series b/series index 3bc10fb..2e56495 100644 --- a/series +++ b/series @@ -1,4 +1,2 @@ -cachelib-fmt11-fix.diff -cachelib-fix-nvme-data-gating.diff cachelib-fix-libcachelib_allocator-MockDevice.diff cachelib-fix-DeviceTest-FDP.diff diff --git a/sources b/sources index c97cd52..833868c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2024.07.22.00.tar.gz) = 7942501f40565bf59347fb6427901abbfcc0ae631082eb1e214a89f5ae021ae5bb52e847fbac4050e4468c6170c0d8df8af75c2d5dbb757e049e1e508260d2fa +SHA512 (cachelib-2024.08.19.00.tar.gz) = 6d8f2be8b772770f924c101a5a4ec9ff3f1e5ee6f7d3eba28102debceadb3de4174347cf9e6eaaba1b6d0a10a8466d4ee325ee21d5f6b931b4603805264ae145 From 75bbf0a908d51a3003f1d828615cf8a7952cc4ae Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 13:10:31 +0000 Subject: [PATCH 22/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 8595ee4fe2a7ec97cd28eb19e28a633d9d342696 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 7 Feb 2025 14:59:42 -0600 Subject: [PATCH 23/25] Update to the 2025.02.03.00 tag; Fixes: RHBZ#2341686 Signed-off-by: Michel Lind --- .gitignore | 1 + cachelib-disable-binary_trace_gen.diff | 43 +++++++++++++++++++ cachelib-fix-DeviceTest-FDP.diff | 2 +- ...-fix-libcachelib_allocator-MockDevice.diff | 26 ----------- cachelib.spec | 6 +-- series | 2 +- sources | 2 +- 7 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 cachelib-disable-binary_trace_gen.diff delete mode 100644 cachelib-fix-libcachelib_allocator-MockDevice.diff diff --git a/.gitignore b/.gitignore index d5f4bd2..e0522c2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /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 diff --git a/cachelib-disable-binary_trace_gen.diff b/cachelib-disable-binary_trace_gen.diff new file mode 100644 index 0000000..84b8cee --- /dev/null +++ b/cachelib-disable-binary_trace_gen.diff @@ -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} + ) + diff --git a/cachelib-fix-DeviceTest-FDP.diff b/cachelib-fix-DeviceTest-FDP.diff index 26c5566..424b24c 100644 --- a/cachelib-fix-DeviceTest-FDP.diff +++ b/cachelib-fix-DeviceTest-FDP.diff @@ -1,6 +1,6 @@ --- a/cachelib/navy/CMakeLists.txt +++ b/cachelib/navy/CMakeLists.txt -@@ -103,7 +103,7 @@ if (BUILD_TESTS) +@@ -105,7 +105,7 @@ if (BUILD_TESTS) add_test (scheduler/tests/ThreadPoolJobSchedulerTest.cpp) add_test (driver/tests/DriverTest.cpp) if (NOT MISSING_FALLOCATE) diff --git a/cachelib-fix-libcachelib_allocator-MockDevice.diff b/cachelib-fix-libcachelib_allocator-MockDevice.diff deleted file mode 100644 index 94e07aa..0000000 --- a/cachelib-fix-libcachelib_allocator-MockDevice.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- a/cachelib/allocator/nvmcache/NavySetup.cpp -+++ b/cachelib/allocator/nvmcache/NavySetup.cpp -@@ -23,7 +23,6 @@ - #include "cachelib/allocator/nvmcache/NavyConfig.h" - #include "cachelib/navy/Factory.h" - #include "cachelib/navy/scheduler/JobScheduler.h" --#include "cachelib/navy/testing/MockDevice.h" - - namespace facebook { - namespace cachelib { -@@ -369,6 +368,7 @@ std::unique_ptr cre - bool itemDestructorEnabled) { - auto device = createDevice(config, std::move(encryptor)); - -+#if 0 - if (config.hasDeviceDataCorruptionForTesting()) { - // Use mock device. This is for testing - auto mockDevice = std::make_unique( -@@ -392,6 +392,7 @@ std::unique_ptr cre - - device = std::move(mockDevice); - } -+#endif - - auto proto = cachelib::navy::createCacheProto(); - auto* devicePtr = device.get(); diff --git a/cachelib.spec b/cachelib.spec index 2736b2a..28eedaf 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -9,7 +9,7 @@ %bcond_with check %global forgeurl https://github.com/facebook/CacheLib -%global tag 2024.08.19.00 +%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 @@ -27,10 +27,10 @@ Summary: Pluggable caching engine for scale high performance cache servic License: Apache-2.0 URL: %forgeurl Source: %{url}/archive/v%{tag}/%{name}-%{tag}.tar.gz -# allocator/nvmecache/NavySetup.cpp should not reference test code -Patch: %{name}-fix-libcachelib_allocator-MockDevice.diff # 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) diff --git a/series b/series index 2e56495..e1b4b30 100644 --- a/series +++ b/series @@ -1,2 +1,2 @@ -cachelib-fix-libcachelib_allocator-MockDevice.diff cachelib-fix-DeviceTest-FDP.diff +cachelib-disable-binary_trace_gen.diff diff --git a/sources b/sources index 833868c..6d89fce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cachelib-2024.08.19.00.tar.gz) = 6d8f2be8b772770f924c101a5a4ec9ff3f1e5ee6f7d3eba28102debceadb3de4174347cf9e6eaaba1b6d0a10a8466d4ee325ee21d5f6b931b4603805264ae145 +SHA512 (cachelib-2025.02.03.00.tar.gz) = 439e4941ed0ab42916342d8e702c31def0ae36ef52153ebac9d6b8bb26e9a9cef677ba1352ec5ffb4b962db8cca54151cde534c54e4427df2820a63ffb862ecd From 2d4e90d1f14f4ffe1900505ed7c473cc43e750cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 18:01:54 +0000 Subject: [PATCH 24/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From a3605889d268601b3ea1902155f9836d69788096 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 12 Nov 2025 10:05:07 +0000 Subject: [PATCH 25/25] Rebuilt for gtest 1.17.0