Skip to content

Commit

Permalink
Update list of RPM-based platforms
Browse files Browse the repository at this point in the history
Add Fedora and openSUSE
  • Loading branch information
avsej committed Oct 16, 2024
1 parent 79fe9cf commit 79c567b
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .valgrind_suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
glibc-libdl-1
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
...
fun:dl_open_worker
fun:_dl_catch_exception
...
}
{
glibc-libdl-2
Memcheck:Leak
match-leak-kinds: reachable
fun:calloc
...
fun:dl_open_worker
...
fun:_dl_catch_exception
...
}
{
glibc-libdl-3
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
...
fun:dl_open_worker
...
fun:_dl_catch_error
...
}
2 changes: 2 additions & 0 deletions cmake/Packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ if(COUCHBASE_CXX_CLIENT_RPM_TARGETS)
add_custom_target(packaging_srpm DEPENDS ${COUCHBASE_CXX_CLIENT_SRPM})

list(APPEND COUCHBASE_CXX_CLIENT_SUPPORTED_ROOTS
"opensuse-leap-15.5-${CMAKE_SYSTEM_PROCESSOR}"
"rocky-9-${CMAKE_SYSTEM_PROCESSOR}"
"rocky-8-${CMAKE_SYSTEM_PROCESSOR}"
"amazonlinux-2023-${CMAKE_SYSTEM_PROCESSOR}"
"fedora-40-${CMAKE_SYSTEM_PROCESSOR}"
)

message(STATUS "Supported build roots for RPM packages: ${COUCHBASE_CXX_CLIENT_SUPPORTED_ROOTS}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/Testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(COUCHBASE_CXX_CLIENT_ENABLE_VALGRIND)
if(VALGRIND)
set(VALGRIND_COMMAND "${VALGRIND}")
set(VALGRIND_COMMAND_OPTIONS
"-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe"
"-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe --suppressions=${PROJECT_SOURCE_DIR}/.valgrind_suppressions.txt"
)
set(MEMORYCHECK_COMMAND "${VALGRIND}")
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_COMMAND_OPTIONS}")
Expand Down
29 changes: 26 additions & 3 deletions cmake/couchbase-cxx-client.spec.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
%if 0%{?suse_version}
%global license_dir %{_datadir}/doc
%else
%global license_dir %{_docdir}
%endif

Name: couchbase-cxx-client
Summary: Couchbase C++ SDK
Version: @COUCHBASE_CXX_CLIENT_PACKAGE_VERSION@
Expand All @@ -6,7 +12,11 @@ Vendor: Couchbase, Inc.
Packager: Couchbase SDK Team <[email protected]>
License: ASL 2.0
URL: https://docs.couchbase.com/cxx-sdk/current/hello-world/overview.html
%if 0%{?suse_version} == 1500
BuildRequires: gcc13, gcc13-c++
%else
BuildRequires: gcc, gcc-c++
%endif
BuildRequires: cmake >= 3.19
Source0: @[email protected]

Expand Down Expand Up @@ -36,6 +46,10 @@ Development files for the Couchbase C++ SDK.
%cmake \
%if 0%{?rhel} == 8 || 0%{?rocky} == 8 || 0%{?ol} == 8
-S "." -B "redhat-linux-build" \
%endif
%if 0%{?suse_version} == 1500
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
%endif
-DBUILD_SHARED_LIBS=OFF \
-DCOUCHBASE_CXX_CLIENT_INSTALL=ON \
Expand All @@ -50,6 +64,9 @@ Development files for the Couchbase C++ SDK.
%if 0%{?rhel} == 8 || 0%{?rocky} == 8 || 0%{?ol} == 8
/usr/bin/cmake --build "redhat-linux-build" -j${RPM_BUILD_NCPUS} --verbose
%else
%if 0%{?suse_version} == 1500
cd build
%endif
%cmake_build
%endif

Expand All @@ -59,11 +76,17 @@ DESTDIR="%{buildroot}" /usr/bin/cmake --install "redhat-linux-build"
%else
%cmake_install
%endif
%if 0%{?suse_version} == 1500
%{__mkdir_p} %{buildroot}%{license_dir}/tao/json %{buildroot}%{_libdir}/cmake
%{__mv} %{buildroot}%{license_dir}/taocpp-json/tao/json/LICENSE %{buildroot}%{license_dir}/tao/json/LICENSE
%{__mv} %{buildroot}%{_datadir}/taocpp-json/cmake %{buildroot}%{_libdir}/cmake/taocpp-json
%{__mv} %{buildroot}%{_datadir}/pegtl/cmake %{buildroot}%{_libdir}/cmake/pegtl
%endif

%files
%license %{_docdir}/couchbase_cxx_client/LICENSE.txt
%license %{_docdir}/tao/pegtl/LICENSE
%license %{_docdir}/tao/json/LICENSE
%license %{license_dir}/couchbase_cxx_client/LICENSE.txt
%license %{license_dir}/tao/pegtl/LICENSE
%license %{license_dir}/tao/json/LICENSE
%{_libdir}/libcouchbase_cxx_client.so.*

%files tools
Expand Down
2 changes: 1 addition & 1 deletion core/origin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct traits<couchbase::core::columnar::security_options> {
{ "trust_only_pem_string", o.trust_only_pem_string },
{ "trust_only_platform", o.trust_only_platform },
{ "trust_only_certificates", o.trust_only_certificates.size() },
// TODO: add if/when we support the cipher_suites option
// TODO(JC): add if/when we support the cipher_suites option
// { "cipher_suites", utils::join_strings(o.cipher_suites, ":") },
};
}
Expand Down

0 comments on commit 79c567b

Please sign in to comment.