From 0f435f612d48b5d038f0b08b82b38bc6c7865c7f Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mar 24 2022 22:23:35 +0000 Subject: Disable Forge macros, it interferes with both rpmautospec and PackIt; drop upstreamed patch Signed-off-by: Michel Alexandre Salim --- 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 e9cf337..fdc8fef 100644 --- a/cachelib.spec +++ b/cachelib.spec @@ -17,10 +17,6 @@ %global commit bd22b0eb79f7e2326f77a22c278c48e454882291 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20220314 -# 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 16 @@ -32,8 +28,7 @@ Summary: Pluggable caching engine for scale high performance cache servic License: ASL 2.0 URL: %forgeurl -Source0: %forgesource -Patch0: %{name}-fix_test_linking.patch +Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz # needed on EL8; its gtest does not come with cmake files Patch100: %{name}-find-gtest.patch @@ -96,8 +91,7 @@ applications that use %{name}. %prep -%forgesetup -%patch0 -p1 +%setup -q -n CacheLib-%{commit} %if 0%{?el8} %patch100 -p1 %endif