diff options
-rw-r--r-- | libmemcached-build.patch | 21 | ||||
-rw-r--r-- | libmemcached-fix-linking-with-libpthread.patch | 19 | ||||
-rw-r--r-- | libmemcached-last.spec | 139 | ||||
-rw-r--r-- | libmemcached-sasl.patch | 62 |
4 files changed, 69 insertions, 172 deletions
diff --git a/libmemcached-build.patch b/libmemcached-build.patch deleted file mode 100644 index df58c9f..0000000 --- a/libmemcached-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ./clients/memflush.cc.old ./clients/memflush.cc ---- ./clients/memflush.cc.old 2017-02-12 10:12:59.615209225 +0100 -+++ ./clients/memflush.cc 2017-02-12 10:13:39.998382783 +0100 -@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) - { - options_parse(argc, argv); - -- if (opt_servers == false) -+ if (!opt_servers) - { - char *temp; - -@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) - opt_servers= strdup(temp); - } - -- if (opt_servers == false) -+ if (!opt_servers) - { - std::cerr << "No Servers provided" << std::endl; - exit(EXIT_FAILURE); diff --git a/libmemcached-fix-linking-with-libpthread.patch b/libmemcached-fix-linking-with-libpthread.patch deleted file mode 100644 index e5e21c4..0000000 --- a/libmemcached-fix-linking-with-libpthread.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up libmemcached-1.0.16/build-aux/ltmain.sh.orig libmemcached-1.0.16/build-aux/ltmain.sh ---- libmemcached-1.0.16/build-aux/ltmain.sh.orig 2013-12-03 16:36:53.222107642 +0100 -+++ libmemcached-1.0.16/build-aux/ltmain.sh 2013-12-03 16:37:35.770132249 +0100 -@@ -5664,6 +5664,15 @@ func_mode_link () - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac -+ # As we are forced to pass -nostdlib to g++ during linking, the option -+ # -pthread{,s} is not in effect; add the -lpthread to $deplist -+ # explicitly to link correctly. -+ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then -+ case "$arg" in -+ -pthread*) func_append deplibs " -lpthread" ;; -+ esac -+ fi -+ - continue - ;; - diff --git a/libmemcached-last.spec b/libmemcached-last.spec index 0c1f03e..7b5caa4 100644 --- a/libmemcached-last.spec +++ b/libmemcached-last.spec @@ -3,65 +3,61 @@ # # Fedora spec file for libmemcached # -# Copyright (c) 2009-2019 Remi Collet +# Copyright (c) 2009-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # Lot of tests are broken making test suite unusable -%global with_tests %{?_witht_tests:1}%{!?_with_tests:0} -%global with_sasl 1 +%bcond_with tests + %global libname libmemcached # libmemcached >= 1.0.16 have soname 11 -%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +%if 0%{?rhel} == 7 %global move_to_opt 1 Name: %{libname}-opt %global _prefix /opt/%{libname} %global __arch_install_post /bin/true %else -%global move_to_opt 1 +%global move_to_opt 0 Name: %{libname} %endif +%global gh_commit e95ca0e7956f0d54b318284167a39aa3fd74c89c +%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 Summary: Client library and command line tools for memcached server -Version: 1.0.18 -Release: 2%{?dist} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist} License: BSD -URL: http://libmemcached.org/ -# Original sources: -# http://launchpad.net/libmemcached/1.0/%%{version}/+download/libmemcached-%%{version}.tar.gz -# The source tarball must be repackaged to remove the Hsieh hash -# code, since the license is non-free. When upgrading, download the new -# source tarball, and run "./strip-hsieh.sh <version>" to produce the -# "-exhsieh" tarball. -Source0: %{libname}-%{version}-exhsieh.tar.gz +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 BuildRequires: gcc BuildRequires: gcc-c++ -%if %{with_sasl} -BuildRequires: cyrus-sasl-devel +%if 0%{?rhel} == 7 +BuildRequires: cmake3 >= 3.9 +%else +BuildRequires: cmake >= 3.9 %endif +BuildRequires: cyrus-sasl-devel BuildRequires: flex BuildRequires: bison BuildRequires: python-sphinx BuildRequires: memcached BuildRequires: systemtap-sdt-devel - -%if 0%{?rhel} == 6 -BuildRequires: libevent2-devel -%else BuildRequires: libevent-devel > 2 -%endif Provides: bundled(bobjenkins-hash) Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Patch0: libmemcached-fix-linking-with-libpthread.patch -# Fix: ISO C++ forbids comparison between pointer and integer [-fpermissive] -Patch1: %{libname}-build.patch %description libmemcached is a C/C++ client library and tools for the memcached server @@ -90,9 +86,7 @@ memtouch Touches a key Summary: Header files and development libraries for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig -%if %{with_sasl} Requires: cyrus-sasl-devel%{?_isa} -%endif %description devel This package contains the header files and development libraries @@ -119,55 +113,49 @@ This package is designed to be installed beside %{libname}. %prep -%setup -q -n %{libname}-%{version} -%patch0 -p1 -b .link -%patch1 -p1 -b .build - -mkdir examples -cp -p tests/*.{cc,h} examples/ +%setup -q -n %{gh_project}-%{gh_commit} %build -# option --with-memcached=false to disable server binary check (as we don't run test) -%configure \ -%if %{with_tests} - --with-memcached=%{_bindir}/memcached \ +%if 0%{?rhel} == 7 +%cmake3 \ %else - --with-memcached=false \ +%cmake \ %endif -%if %{with_sasl} - --enable-sasl \ + -DBUILD_TESTING:BOOL=ON \ + -DBUILD_DOCS_MAN:BOOL=ON \ + -DENABLE_SASL:BOOL=ON \ + -DENABLE_DTRACE:BOOL=ON \ + -DENABLE_HASH_HSIEH:BOOL=ON \ + -DENABLE_HASH_FNV64:BOOL=ON \ + -DENABLE_HASH_MURMUR:BOOL=ON \ + -DENABLE_MEMASLAP:BOOL=ON \ + -S . + +%if 0%{?cmake_build:1} +%cmake_build %else - --disable-sasl \ +make %{?_smp_mflags} %endif - --enable-libmemcachedprotocol \ - --enable-memaslap \ - --enable-dtrace \ - --disable-static - -%if 0%{?fedora} < 14 && 0%{?rhel} < 7 -# for warning: unknown option after '#pragma GCC diagnostic' kind -sed -e 's/-Werror//' -i Makefile -%endif - -make %{_smp_mflags} V=1 %install -make install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" +%if 0%{?cmake_install:1} +%cmake_install +%else +make install DESTDIR=%{buildroot} +%endif -# Hack: when sphinx-build too old (fedora < 14 and rhel < 7) -# install upstream provided man pages -if [ ! -d %{buildroot}%{_mandir}/man1 ]; then - install -d %{buildroot}%{_mandir}/man1 - install -p -m 644 man/*1 %{buildroot}%{_mandir}/man1 - install -d %{buildroot}%{_mandir}/man3 - install -p -m 644 man/*3 %{buildroot}%{_mandir}/man3 -fi +# See https://github.com/m6w6/libmemcached/issues/97 +mkdir -p %{buildroot}%{_libdir}/cmake +mv %{buildroot}%{_datadir}/libmemcached/cmake %{buildroot}%{_libdir}/cmake/libmemcached +mv %{buildroot}%{_datadir}/libmemcached/example.cnf support + +rm -r %{buildroot}%{_datadir}/doc/libmemcached/ %check -%if %{with_tests} +%if %{with tests} : Run test suite make test %else @@ -187,13 +175,12 @@ make test %dir %{_mandir}/man1 %endif %{_bindir}/mem* -%exclude %{_libdir}/lib*.la %{_mandir}/man1/mem* %files libs %{!?_licensedir:%global license %%doc} -%doc AUTHORS README THANKS TODO ChangeLog -%license COPYING +%doc ChangeLog-*.md +%license LICENSE %if %{move_to_opt} %dir %{_prefix} %dir %{_datadir} @@ -206,24 +193,28 @@ make test %{_libdir}/libmemcachedutil.so.2* %files devel -%doc examples +%doc example +%doc BUGS.md CONTRIBUTING.md README.md +%doc support/example.cnf %if %{move_to_opt} %dir %{_includedir} %dir %{_datadir}/aclocal %dir %{_mandir}/man3 %dir %{_libdir}/pkgconfig +%dir %{_libdir}/cmake %endif %{_includedir}/libmemcached -%{_includedir}/libmemcached-1.0 +%{_includedir}/libmemcached-1* %{_includedir}/libhashkit -%{_includedir}/libhashkit-1.0 -%{_includedir}/libmemcachedprotocol-0.0 -%{_includedir}/libmemcachedutil-1.0 +%{_includedir}/libhashkit-1* +%{_includedir}/libmemcachedprotocol-0* +%{_includedir}/libmemcachedutil-1* %{_libdir}/libhashkit.so %{_libdir}/libmemcached.so %{_libdir}/libmemcachedprotocol.so %{_libdir}/libmemcachedutil.so %{_libdir}/pkgconfig/libmemcached.pc +%{_libdir}/cmake/libmemcached %{_datadir}/aclocal/ax_libmemcached.m4 %{_mandir}/man3/libmemcached* %{_mandir}/man3/libhashkit* @@ -231,6 +222,14 @@ make test %{_mandir}/man3/hashkit* %changelog +* Tue Dec 22 2020 Remi Collet <remi@remirepo.net> - 1.1.0~beta1-1 +- update to 1.1.0-beta1 +- sources from https://github.com/m6w6/libmemcached +- open https://github.com/m6w6/libmemcached/issues/97 cmake files path +- open https://github.com/m6w6/libmemcached/issues/98 soname +- open https://github.com/m6w6/libmemcached/issues/99 build warning +- open https://github.com/m6w6/libmemcached/issues/100 headers path + * Fri Jan 11 2019 Remi Collet <remi@remirepo.net> - 1.0.18-2 - improve dependency filtering diff --git a/libmemcached-sasl.patch b/libmemcached-sasl.patch deleted file mode 100644 index 104f60b..0000000 --- a/libmemcached-sasl.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -up libmemcached-0.44/libmemcached/include.am.sasl libmemcached-0.44/libmemcached/include.am ---- libmemcached-0.44/libmemcached/include.am.sasl 2010-10-02 16:34:33.000000000 +0200 -+++ libmemcached-0.44/libmemcached/include.am 2010-10-02 16:35:27.000000000 +0200 -@@ -149,7 +149,7 @@ libmemcached_libmemcachedprotocol_la_DEP - endif - - if HAVE_SASL --libmemcached_libmemcached_la_LDFLAGS+= $(LIBSASL) -+libmemcached_libmemcached_la_LIBADD += $(LTLIBSASL2) - libmemcached_libmemcached_la_SOURCES += libmemcached/sasl.c - endif - -diff -up libmemcached-0.44/support/libmemcached.pc.in.sasl libmemcached-0.44/support/libmemcached.pc.in ---- libmemcached-0.44/support/libmemcached.pc.in.sasl 2010-10-02 08:20:58.000000000 +0200 -+++ libmemcached-0.44/support/libmemcached.pc.in 2010-10-02 08:24:07.000000000 +0200 -@@ -6,5 +6,5 @@ includedir=@includedir@ - Name: libmemcached - Description: libmemcached C library. - Version: @VERSION@ --Libs: -L${libdir} -lmemcached -+Libs: @LTLIBSASL2@ -L${libdir} -lmemcached - Cflags: -I${includedir} ---- libmemcached-0.46/Makefile.in.orig 2011-02-19 17:54:29.000000000 +0100 -+++ libmemcached-0.46/Makefile.in 2011-02-19 17:54:51.000000000 +0100 -@@ -113,7 +113,7 @@ - @BUILD_BYTEORDER_TRUE@am__append_4 = libmemcached/libbyteorder.la - @BUILD_BYTEORDER_TRUE@am__append_5 = libmemcached/libbyteorder.la - @BUILD_BYTEORDER_TRUE@am__append_6 = libmemcached/libbyteorder.la --@HAVE_SASL_TRUE@am__append_7 = $(LIBSASL) -+@HAVE_SASL_TRUE@am__append_7 = $(LTLIBSASL2) - @HAVE_SASL_TRUE@am__append_8 = libmemcached/sasl.c - @HAVE_DTRACE_TRUE@am__append_9 = libmemcached/dtrace_probes.h - @HAVE_DTRACE_TRUE@am__append_10 = libmemcached/dtrace_probes.h -@@ -291,6 +291,7 @@ - $(am_libmemcached_libbyteorder_la_OBJECTS) - @BUILD_BYTEORDER_TRUE@am_libmemcached_libbyteorder_la_rpath = - am__DEPENDENCIES_1 = -+@HAVE_SASL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) - am__libmemcached_libmemcached_la_SOURCES_DIST = \ - libmemcached/allocators.c libmemcached/analyze.c \ - libmemcached/auto.c libmemcached/behavior.c \ -@@ -396,7 +397,6 @@ - PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) - am_clients_memcapable_OBJECTS = clients/memcapable.$(OBJEXT) - clients_memcapable_OBJECTS = $(am_clients_memcapable_OBJECTS) --@HAVE_SASL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) - am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) clients/libutilities.la \ - libmemcached/libmemcached.la $(am__DEPENDENCIES_2) - clients_memcapable_DEPENDENCIES = $(am__DEPENDENCIES_3) \ -@@ -974,9 +974,10 @@ - libmemcached_libmemcached_la_LIBADD = $(LIBM) \ - libmemcached/libmemcachedcallbacks.la \ - libmemcached/libmemcachedinternal.la \ -- libhashkit/libhashkitinc.la $(am__append_5) $(am__append_13) -+ libhashkit/libhashkitinc.la $(am__append_5) $(am__append_7) \ -+ $(am__append_13) - libmemcached_libmemcached_la_LDFLAGS = ${AM_LDFLAGS} -version-info \ -- ${MEMCACHED_LIBRARY_VERSION} $(am__append_7) $(am__append_26) -+ ${MEMCACHED_LIBRARY_VERSION} $(am__append_26) - libmemcached_libmemcachedutil_la_SOURCES = \ - libmemcached/util/ping.c \ - libmemcached/util/pool.c \ |