summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-16 06:30:50 +0100
committerRemi Collet <remi@remirepo.net>2020-11-16 06:30:50 +0100
commit524b82abd5b17120ad85e95611cfe1bfa49b5a1b (patch)
treed5e700b76dcc51c7f347fb05fbcd6cd3aa23a103
parent6529b60154bdd06c21f326e841c5224eee474e4b (diff)
update to 3.0.6
rename to libcouchbase6 to allow parallel installation with libcouchbase v2 relocate IO plugins installation using patch from https://github.com/couchbase/libcouchbase/pull/38
-rw-r--r--libcouchbase-0001-enforce-system-crypto-policies.patch6
-rw-r--r--libcouchbase-0002-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch82
-rw-r--r--libcouchbase-0002-do-not-install-plugins-into-libdir.patch80
-rw-r--r--libcouchbase-0003-fix-pkgconfig-paths.patch28
-rw-r--r--libcouchbase.spec100
5 files changed, 155 insertions, 141 deletions
diff --git a/libcouchbase-0001-enforce-system-crypto-policies.patch b/libcouchbase-0001-enforce-system-crypto-policies.patch
index 1cb4bd1..caf666a 100644
--- a/libcouchbase-0001-enforce-system-crypto-policies.patch
+++ b/libcouchbase-0001-enforce-system-crypto-policies.patch
@@ -12,8 +12,8 @@ diff --git a/src/ssl/ssl_common.c b/src/ssl/ssl_common.c
index c223114f..95170d33 100644
--- a/src/ssl/ssl_common.c
+++ b/src/ssl/ssl_common.c
-@@ -287,11 +287,7 @@ lcbio_pSSLCTX lcbio_ssl_new(const char *tsfile, const char *cafile, const char *
- lcb_error_t err_s;
+@@ -305,11 +305,7 @@ lcbio_pSSLCTX lcbio_ssl_new(const char *
+ lcb_STATUS err_s;
lcbio_pSSLCTX ret;
- static const char *default_ssl_cipher_list =
@@ -24,7 +24,7 @@ index c223114f..95170d33 100644
+ static const char *default_ssl_cipher_list = "PROFILE=SYSTEM";
const char* cipher_list = getenv("LCB_SSL_CIPHER_LIST");
- #if HAVE_CIPERSUITES
+ #ifdef HAVE_CIPHERSUITES
--
2.21.0
diff --git a/libcouchbase-0002-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch b/libcouchbase-0002-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch
new file mode 100644
index 0000000..9034b0c
--- /dev/null
+++ b/libcouchbase-0002-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch
@@ -0,0 +1,82 @@
+From 99729147fa930b8ffed4153dcae2bca62bebcdb0 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 12 Nov 2020 11:26:35 +0100
+Subject: [PATCH] add LCB_PLUGINS_DIR option to set directory for IO plugins
+
+---
+ CMakeLists.txt | 1 +
+ cmake/config-cmake.h.in | 4 ++--
+ plugins/io/libev/CMakeLists.txt | 2 +-
+ plugins/io/libevent/CMakeLists.txt | 2 +-
+ plugins/io/libuv/CMakeLists.txt | 2 +-
+ 5 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5789bac7..90061ee9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -41,6 +41,7 @@ endif()
+ OPTION(LCB_NO_TESTS "Disable building of tests" OFF)
+ OPTION(LCB_NO_TOOLS "Disable building of additional tools" OFF)
+ OPTION(LCB_NO_PLUGINS "Disable the building of IO plugins for external libs" OFF)
++SET(LCB_PLUGINS_DIR "libcouchbase" CACHE STRING "Directory for IO plugins")
+ OPTION(LCB_BUILD_LIBEVENT "Build the libevent plugin" ON)
+ OPTION(LCB_BUILD_LIBEV "Build the libev plugin (if available)" ON)
+ OPTION(LCB_BUILD_LIBUV "Build the libuv plugin (if available)" ON)
+diff --git a/cmake/config-cmake.h.in b/cmake/config-cmake.h.in
+index 30f66da8..1fc26d2a 100644
+--- a/cmake/config-cmake.h.in
++++ b/cmake/config-cmake.h.in
+@@ -61,7 +61,7 @@
+ #include "config_static.h"
+ #endif
+
+-#define LCB_LIBDIR "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
++#define LCB_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${LCB_PLUGINS_DIR}"
+
+ #define LCB_SYSTEM "${CMAKE_SYSTEM}"
+ #define LCB_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}"
+@@ -76,4 +76,4 @@
+ #cmakedefine HAVE_PKCS5_PBKDF2_HMAC
+ #cmakedefine LCB_DUMP_PACKETS
+
+-#cmakedefine LCB_TLS_LOG_KEYS
+\ No newline at end of file
++#cmakedefine LCB_TLS_LOG_KEYS
+diff --git a/plugins/io/libev/CMakeLists.txt b/plugins/io/libev/CMakeLists.txt
+index c2441d36..cf144f0e 100644
+--- a/plugins/io/libev/CMakeLists.txt
++++ b/plugins/io/libev/CMakeLists.txt
+@@ -28,4 +28,4 @@ ENDIF()
+
+ INSTALL(TARGETS
+ couchbase_libev
+- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${LCB_PLUGINS_DIR}")
+diff --git a/plugins/io/libevent/CMakeLists.txt b/plugins/io/libevent/CMakeLists.txt
+index 485d6342..339e5a95 100644
+--- a/plugins/io/libevent/CMakeLists.txt
++++ b/plugins/io/libevent/CMakeLists.txt
+@@ -24,7 +24,7 @@ IF(LCB_EMBED_PLUGIN_LIBEVENT)
+ SET(LCB_LINK_SPEC "${LCB_LINKS_SPEC} ${LIBEVENT_LIBRARIES}")
+ ELSE()
+ ADD_LIBRARY(couchbase_libevent SHARED plugin-libevent.c)
+- INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
++ INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${LCB_PLUGINS_DIR}")
+ TARGET_LINK_LIBRARIES(couchbase_libevent ${LIBEVENT_LIBRARIES})
+ ENDIF()
+
+diff --git a/plugins/io/libuv/CMakeLists.txt b/plugins/io/libuv/CMakeLists.txt
+index 46c63dd8..9954c0f5 100644
+--- a/plugins/io/libuv/CMakeLists.txt
++++ b/plugins/io/libuv/CMakeLists.txt
+@@ -40,5 +40,5 @@ INCLUDE_DIRECTORIES(AFTER ${LIBUV_INCLUDE_DIR})
+ ADD_DEFINITIONS(-DLIBCOUCHBASE_INTERNAL=1)
+ INSTALL(TARGETS
+ couchbase_libuv
+- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${LCB_PLUGINS_DIR}"
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+--
+2.25.4
+
diff --git a/libcouchbase-0002-do-not-install-plugins-into-libdir.patch b/libcouchbase-0002-do-not-install-plugins-into-libdir.patch
deleted file mode 100644
index 74a0528..0000000
--- a/libcouchbase-0002-do-not-install-plugins-into-libdir.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 3d7f066b7d97a8d05fcde0b6cb1b6ac521279d82 Mon Sep 17 00:00:00 2001
-From: Sergey Avseyev <sergey.avseyev@gmail.com>
-Date: Wed, 27 Sep 2017 02:04:00 +0300
-Subject: [PATCH] Do not install plugins into libdir
-
----
- cmake/config-cmake.h.in | 2 +-
- plugins/io/libev/CMakeLists.txt | 2 +-
- plugins/io/libevent/CMakeLists.txt | 2 +-
- plugins/io/libuv/CMakeLists.txt | 2 +-
- src/iofactory.c | 6 ++++++
- 5 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/cmake/config-cmake.h.in b/cmake/config-cmake.h.in
-index 81128091..f97d8bf5 100644
---- a/cmake/config-cmake.h.in
-+++ b/cmake/config-cmake.h.in
-@@ -56,7 +56,7 @@
-
- #cmakedefine LCB_USE_HDR_HISTOGRAM
-
--#define LCB_LIBDIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
-+#define LCB_LIBDIR "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
-
- #include "config_static.h"
- #endif
-diff --git a/plugins/io/libev/CMakeLists.txt b/plugins/io/libev/CMakeLists.txt
-index 6eaa62f6..1ad13736 100644
---- a/plugins/io/libev/CMakeLists.txt
-+++ b/plugins/io/libev/CMakeLists.txt
-@@ -26,4 +26,4 @@ ENDIF()
-
- INSTALL(TARGETS
- couchbase_libev
-- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
-diff --git a/plugins/io/libevent/CMakeLists.txt b/plugins/io/libevent/CMakeLists.txt
-index 1b96a9e3..95ff434b 100644
---- a/plugins/io/libevent/CMakeLists.txt
-+++ b/plugins/io/libevent/CMakeLists.txt
-@@ -22,7 +22,7 @@ IF(LCB_EMBED_PLUGIN_LIBEVENT)
- SET(LCB_LINK_SPEC "${LCB_LINKS_SPEC} ${LIBEVENT_LIBRARIES}")
- ELSE()
- ADD_LIBRARY(couchbase_libevent SHARED plugin-libevent.c)
-- INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+ INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
- TARGET_LINK_LIBRARIES(couchbase_libevent ${LIBEVENT_LIBRARIES})
- ENDIF()
-
-diff --git a/plugins/io/libuv/CMakeLists.txt b/plugins/io/libuv/CMakeLists.txt
-index 2492a835..86f31687 100644
---- a/plugins/io/libuv/CMakeLists.txt
-+++ b/plugins/io/libuv/CMakeLists.txt
-@@ -38,5 +38,5 @@ INCLUDE_DIRECTORIES(AFTER ${LIBUV_INCLUDE_DIR})
- ADD_DEFINITIONS(-DLIBCOUCHBASE_INTERNAL=1)
- INSTALL(TARGETS
- couchbase_libuv
-- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-diff --git a/src/iofactory.c b/src/iofactory.c
-index 74eae50c..ca1a2d1b 100644
---- a/src/iofactory.c
-+++ b/src/iofactory.c
-@@ -366,6 +366,12 @@ static lcb_error_t generate_options(plugin_info *pi,
- }
- ret = get_create_func(ours->v.v1.sofile, ours->v.v1.symbol, &plugin, want_debug);
- if (ret != LCB_SUCCESS) {
-+ char path[PATH_MAX];
-+ /* try to look up the so-file in the libdir */
-+ snprintf(path, PATH_MAX, "%s/%s", LCB_LIBDIR, ours->v.v1.sofile);
-+ ret = get_create_func(path, ours->v.v1.symbol, &plugin, want_debug);
-+ }
-+ if (ret != LCB_SUCCESS) {
- if (type) {
- *type = LCB_IO_OPS_SELECT;
- }
---
-2.13.6
-
diff --git a/libcouchbase-0003-fix-pkgconfig-paths.patch b/libcouchbase-0003-fix-pkgconfig-paths.patch
deleted file mode 100644
index 29e3985..0000000
--- a/libcouchbase-0003-fix-pkgconfig-paths.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8355c1d68e8825e4aa006418ccd91eadbac6c02a Mon Sep 17 00:00:00 2001
-From: Sergey Avseyev <sergey.avseyev@gmail.com>
-Date: Wed, 27 Sep 2017 12:30:44 +0300
-Subject: [PATCH] Fix pkgconfig paths
-
-Change-Id: I8459fc3d602266dd7bb9791f05f235da9308c562
----
- packaging/libcouchbase.pc.in | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/packaging/libcouchbase.pc.in b/packaging/libcouchbase.pc.in
-index 94820a65..c7171fcf 100644
---- a/packaging/libcouchbase.pc.in
-+++ b/packaging/libcouchbase.pc.in
-@@ -1,7 +1,7 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@
--includedir=${prefix}/include
--libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+exec_prefix=@CMAKE_INSTALL_PREFIX@
-+includedir=@CMAKE_INSTALL_PREFIX@/include
-+libdir=@CMAKE_INSTALL_LIBDIR@
-
- Name: libcouchbase @LCB_VERSION@
- Description: Couchbase client library
---
-2.13.5
-
diff --git a/libcouchbase.spec b/libcouchbase.spec
index 0ceba5f..0a1c68d 100644
--- a/libcouchbase.spec
+++ b/libcouchbase.spec
@@ -7,6 +7,15 @@
# Please, preserve the changelog entries
#
+%global libname libcouchbase
+%global soname 6
+
+%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
+%bcond_with rename
+%else
+%bcond_without rename
+%endif
+
%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8
%bcond_without tests
%else
@@ -14,39 +23,41 @@
%bcond_with tests
%endif
-%global with_dtrace 1
+%bcond_without dtrace
+%bcond_without uv
-%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7
-%global with_uv 1
+%if %{with rename}
+Name: %{libname}%{soname}
%else
-%global with_uv 0
+Name: %{libname}
%endif
-
-Name: libcouchbase
-Version: 2.10.8
+Version: 3.0.6
Release: 1%{?dist}
Summary: Couchbase client library
Group: System Environment/Libraries
License: ASL 2.0
URL: http://www.couchbase.com/communities/c/getting-started
-Source0: http://packages.couchbase.com/clients/c/%{name}-%{version}.tar.gz
-
-Patch0: %{name}-0001-enforce-system-crypto-policies.patch
-Patch1: %{name}-0002-do-not-install-plugins-into-libdir.patch
-Patch2: %{name}-0003-fix-pkgconfig-paths.patch
+Source0: http://packages.couchbase.com/clients/c/%{libname}-%{version}.tar.gz
+Patch0: %{libname}-0001-enforce-system-crypto-policies.patch
+Patch1: %{libname}-0002-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch
+%if 0%{?rhel} == 7
+%global dtsenable source /opt/rh/devtoolset-8/enable
+BuildRequires: devtoolset-8-toolchain
+%else
BuildRequires: gcc
BuildRequires: gcc-c++
+%endif
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: cmake >= 2.8.9
BuildRequires: pkgconfig(libevent) >= 2.0.20
BuildRequires: libev-devel >= 3
-%if %{with_uv}
+%if %{with uv}
BuildRequires: pkgconfig(libuv) >= 1
%endif
-%if %{with_dtrace}
+%if %{with dtrace}
BuildRequires: systemtap-sdt-devel >= 1.8
BuildRequires: systemtap-devel
%endif
@@ -73,12 +84,21 @@ HTTP transport.
This Couchbase Client Library for C and C++ provides a complete interface
to the functionality of Couchbase Server.
+%if %{with rename}
+This package is designed for parallel installation with libcouchbase
+%endif
%package devel
Summary: Development files for Couchbase client library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{with rename}
+Conflicts: %{libname}-devel < %{version}
+Provides: %{libname}-devel = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-devel < %{version}
+%endif
%description devel
The %{name}-devel package contains libraries and header files for
@@ -103,7 +123,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package provides libev back-end for libcouchbase.
-%if %{with_uv}
+%if %{with uv}
%package libuv
Summary: Couchbase client library - libuv IO back-end
Group: System Environment/Libraries
@@ -119,6 +139,12 @@ Summary: Couchbase tools
Group: Applications/System
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libevent%{?_isa} = %{version}-%{release}
+%if %{with rename}
+Conflicts: %{libname}-tools < %{version}
+Provides: %{libname}-tools = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-tools < %{version}
+%endif
%description tools
The %{name}-tools package contains some command line tools to manage
@@ -126,38 +152,45 @@ a Couchbase Server.
%prep
-%setup -q
+%setup -q -n %{libname}-%{version}
%patch0 -p1 -b .crypto
-%patch1 -p1 -b .plug
-%patch2 -p1 -b .pkgc
+%patch1 -p1 -b .plugdir
%build
+%{?dtsenable}
+gcc --version
+
%cmake \
-DLCB_BUILD_LIBEVENT=ON \
-DLCB_BUILD_LIBEV=ON \
-%if %{with_uv}
+%if %{with uv}
-DLCB_BUILD_LIBUV=ON \
%else
-DLCB_BUILD_LIBUV=OFF \
%endif
-%if %{with_dtrace}
+%if %{with dtrace}
-DLCB_BUILD_DTRACE=ON \
%else
-DLCB_BUILD_DTRACE=OFF \
%endif
-DLCB_NO_MOCK=1 \
+ -DLCB_PLUGINS_DIR:STRING=%{name} \
-B . -S .
make %{?_smp_mflags} V=1
%install
+%{?dtsenable}
+
make install DESTDIR=%{buildroot}
%check
%if %{with tests}
+%{?dtsenable}
+
# ARGS needed to pass arguments to ctest
export CTEST_OUTPUT_ON_FAILURE=1
make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
@@ -176,26 +209,27 @@ make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
%{!?_licensedir:%global license %%doc}
%doc README.markdown RELEASE_NOTES.markdown
%license LICENSE
-%{_libdir}/%{name}.so.2*
-%if %{with_dtrace}
-%{_datadir}/systemtap/tapset/libcouchbase.so*
+%{_libdir}/%{libname}.so.%{soname}*
+%if %{with dtrace}
+%{_datadir}/systemtap/tapset/%{libname}.so*
%endif
+%dir %{_libdir}/%{name}
%files libevent
-%{_libdir}/%{name}/%{name}_libevent.so
+%{_libdir}/%{name}/%{libname}_libevent.so
%files libev
-%{_libdir}/%{name}/%{name}_libev.so
+%{_libdir}/%{name}/%{libname}_libev.so
-%if %{with_uv}
+%if %{with uv}
%files libuv
-%{_libdir}/%{name}/%{name}_libuv.so
+%{_libdir}/%{name}/%{libname}_libuv.so
%endif
%files devel
-%{_includedir}/%{name}
-%{_libdir}/%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
+%{_includedir}/%{libname}
+%{_libdir}/%{libname}.so
+%{_libdir}/pkgconfig/%{libname}.pc
%files tools
%{_bindir}/cbc*
@@ -204,6 +238,12 @@ make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
%changelog
+* Thu Nov 12 2020 Remi Collet <remi@remirepo.net> - 3.0.6-1
+- update to 3.0.6
+- rename to libcouchbase6 to allow parallel installation with libcouchbase v2
+- relocate IO plugins installation using patch from
+ https://github.com/couchbase/libcouchbase/pull/38
+
* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.10.7-1
- update to 2.10.8