diff options
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | 101.patch | 22 | ||||
-rw-r--r-- | 102.patch | 22 | ||||
-rw-r--r-- | 104.patch | 21 | ||||
-rw-r--r-- | libmemcached-last.spec | 56 |
5 files changed, 116 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/101.patch b/101.patch new file mode 100644 index 0000000..f2f9677 --- /dev/null +++ b/101.patch @@ -0,0 +1,22 @@ +From 90a4d45d23d63039ca06a59553bc64bd9911be82 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 23 Dec 2020 11:32:03 +0100 +Subject: [PATCH] fix libmemcached so version + +--- + CMakeVersions.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeVersions.txt b/CMakeVersions.txt +index 545e37dd..90942fd6 100644 +--- a/CMakeVersions.txt ++++ b/CMakeVersions.txt +@@ -35,7 +35,7 @@ set(LIBMEMCACHED_SO_VERSION_CUR 11) + set(LIBMEMCACHED_SO_VERSION_REV 0) + set(LIBMEMCACHED_SO_VERSION_AGE 0) + +-set(LIBMEMCACHED_SO_SOVERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VERSION_REV}) ++set(LIBMEMCACHED_SO_SOVERSION ${LIBMEMCACHED_SO_VERSION_CUR}) + set(LIBMEMCACHED_SO_VERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VERSION_REV}.${LIBMEMCACHED_SO_VERSION_AGE}) + + # diff --git a/102.patch b/102.patch new file mode 100644 index 0000000..6044365 --- /dev/null +++ b/102.patch @@ -0,0 +1,22 @@ +From a5275a0698ae71674ba53706716c20cd2c886cea Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 23 Dec 2020 15:15:41 +0100 +Subject: [PATCH] fix doc build with old sphinx + +--- + docs/conf.py.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/conf.py.in b/docs/conf.py.in +index c582244f..4dd33573 100644 +--- a/docs/conf.py.in ++++ b/docs/conf.py.in +@@ -13,7 +13,7 @@ import sys, os + #needs_sphinx = '1.0' + extensions = [@SPHINX_EXTENSIONS@] + templates_path = ['_templates'] +-source_suffix = ['.rst'] ++source_suffix = '.rst' + master_doc = 'index' + pygments_style = 'sphinx' + diff --git a/104.patch b/104.patch new file mode 100644 index 0000000..5b2071a --- /dev/null +++ b/104.patch @@ -0,0 +1,21 @@ +From 4ef24d8849ffcce9fdc78ef9907aa744a69687dc Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 23 Dec 2020 16:32:00 +0100 +Subject: [PATCH] fix for 32-bit + +--- + test/lib/MemcachedCluster.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/lib/MemcachedCluster.cpp b/test/lib/MemcachedCluster.cpp +index a443360b..4b1aa2c5 100644 +--- a/test/lib/MemcachedCluster.cpp ++++ b/test/lib/MemcachedCluster.cpp +@@ -143,6 +143,6 @@ void MemcachedCluster::enableReplication() { + + void MemcachedCluster::killOneServer() const { + const auto &servers = cluster.getServers(); +- const auto &victim = servers[random_num(0UL, servers.size() - 1)]; ++ const auto &victim = servers[random_num((size_t)0, servers.size() - 1)]; + ::kill(victim.getPid(), SIGKILL); + } diff --git a/libmemcached-last.spec b/libmemcached-last.spec index 2b660c7..7480277 100644 --- a/libmemcached-last.spec +++ b/libmemcached-last.spec @@ -9,10 +9,10 @@ # # Please, preserve the changelog entries # -# Lot of tests are broken making test suite unusable -%bcond_with tests -%global libname libmemcached +%bcond_without tests + +%global libname libmemcached # libmemcached >= 1.0.16 have soname 11 %if 0%{?rhel} == 7 @@ -25,13 +25,13 @@ Name: %{libname}-opt Name: %{libname} %endif -%global gh_commit 2f275201aac9994f7694acb67f5dee62adcb0424 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner m6w6 -%global gh_project libmemcached +%global gh_commit 2f275201aac9994f7694acb67f5dee62adcb0424 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner m6w6 +%global gh_project libmemcached -%global upstream_version 1.1.0 -%global upstream_prever beta1 +%global upstream_version 1.1.0 +%global upstream_prever beta1 Summary: Client library and command line tools for memcached server Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} @@ -41,18 +41,23 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz Patch0: https://patch-diff.githubusercontent.com/raw/m6w6/libmemcached/pull/101.patch +Patch1: https://patch-diff.githubusercontent.com/raw/m6w6/libmemcached/pull/102.patch +Patch2: https://patch-diff.githubusercontent.com/raw/m6w6/libmemcached/pull/104.patch -BuildRequires: gcc -BuildRequires: gcc-c++ %if 0%{?rhel} == 7 BuildRequires: cmake3 >= 3.9 +%global dtsenable source /opt/rh/devtoolset-7/enable +BuildRequires: devtoolset-7-toolchain +BuildRequires: python-sphinx %else BuildRequires: cmake >= 3.9 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: python3-sphinx %endif BuildRequires: cyrus-sasl-devel BuildRequires: flex BuildRequires: bison -BuildRequires: python-sphinx BuildRequires: memcached BuildRequires: systemtap-sdt-devel BuildRequires: libevent-devel > 2 @@ -95,6 +100,8 @@ This package contains the header files and development libraries for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. +Documentation: https://m6w6.github.io/libmemcached/ + %package libs Summary: %{libname} libraries @@ -117,8 +124,18 @@ This package is designed to be installed beside %{libname}. %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .pr101 +%patch1 -p1 -b .pr102 +%patch2 -p1 -b .pr104 + +# drop test hanging in mock +if [ "$(id -un)" != "remi" ]; then +rm test/tests/memcached/sasl.cpp +fi + %build +%{?dtsenable} + %if 0%{?rhel} == 7 %cmake3 \ %else @@ -126,6 +143,7 @@ This package is designed to be installed beside %{libname}. %endif -DBUILD_TESTING:BOOL=ON \ -DBUILD_DOCS_MAN:BOOL=ON \ + -DBUILD_DOCS_MANGZ:BOOL=OFF \ -DENABLE_SASL:BOOL=ON \ -DENABLE_DTRACE:BOOL=ON \ -DENABLE_HASH_HSIEH:BOOL=ON \ @@ -142,6 +160,8 @@ make %{?_smp_mflags} %install +%{?dtsenable} + %if 0%{?cmake_install:1} %cmake_install %else @@ -159,7 +179,11 @@ rm -r %{buildroot}%{_datadir}/doc/libmemcached/ %check %if %{with tests} : Run test suite +%if 0%{?ctest:1} +%ctest +%else make test +%endif %else : Skip test suite %endif @@ -223,10 +247,14 @@ make test %{_mandir}/man3/memcached* %{_mandir}/man3/hashkit* + %changelog * Wed Dec 23 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-2 -- add upstream patches and from - https://github.com/m6w6/libmemcached/pull/101 +- add patches from upstream and from + https://github.com/m6w6/libmemcached/pull/101 fix so version + https://github.com/m6w6/libmemcached/pull/102 fix for old sphinx + https://github.com/m6w6/libmemcached/pull/104 fix 32-bit +- enable test suite * Tue Dec 22 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-1 - update to 1.1.0-beta1 |