From b13daea536975ec78a750955ef0e2d6205bafec0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Apr 2021 11:54:32 +0200 Subject: update to 0.11.0 add patch to not install the static library, from https://github.com/alanxz/rabbitmq-c/pull/665 --- compat_reports/0.10.0_to_0.11.0/compat_report.html | 638 +++++++++++++++++++++ librabbitmq.spec | 43 +- librabbitmq.xml | 2 +- rabbitmq-c-static.patch | 41 ++ 4 files changed, 712 insertions(+), 12 deletions(-) create mode 100644 compat_reports/0.10.0_to_0.11.0/compat_report.html create mode 100644 rabbitmq-c-static.patch diff --git a/compat_reports/0.10.0_to_0.11.0/compat_report.html b/compat_reports/0.10.0_to_0.11.0/compat_report.html new file mode 100644 index 0000000..5d36b39 --- /dev/null +++ b/compat_reports/0.10.0_to_0.11.0/compat_report.html @@ -0,0 +1,638 @@ + + + + + + + + + +librabbitmq: 0.10.0 to 0.11.0 compatibility report + + + +

API compatibility report for the librabbitmq library between 0.10.0 and 0.11.0 versions on x86_64

+ +
+
+ Binary
Compatibility
+ Source
Compatibility
+
+

Test Info


+ + + + + + + +
Library Namelibrabbitmq
Version #10.10.0
Version #20.11.0
Archx86_64
GCC Version10
SubjectBinary Compatibility
+

Test Results


+ + + + + + +
Total Header Files4
Total Libraries1
Total Symbols / Types111 / 106
Compatibility100%
+

Problem Summary


+ + + + + + + + + +
SeverityCount
Added Symbols-3
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low5
Problems with
Constants
Low0
+ +

Added Symbols  3 


+amqp_ssl_socket.h, librabbitmq.so.4.5.0
+amqp_set_ssl_engine ( char const* engine )
+amqp_ssl_socket_set_key_engine ( amqp_socket_t* self, char const* cert, char const* key )
+amqp_ssl_socket_set_key_passwd ( amqp_socket_t* self, char const* passwd )
+
+to the top
+ +

Problems with Symbols, Low Severity  5 


+amqp.h, librabbitmq.so.4.4.0
+ +[+] amqp_consume_message ( amqp_connection_state_t state, amqp_envelope_t* envelope, struct timeval* timeout, int flags )  1  +
+ + +[+] amqp_set_handshake_timeout ( amqp_connection_state_t state, struct timeval* timeout )  1  +
+ + +[+] amqp_set_rpc_timeout ( amqp_connection_state_t state, struct timeval* timeout )  1  +
+ + +[+] amqp_simple_wait_frame_noblock ( amqp_connection_state_t state, amqp_frame_t* decoded_frame, struct timeval* tv )  1  +
+ + +[+] amqp_socket_open_noblock ( amqp_socket_t* self, char const* host, int port, struct timeval* timeout )  1  +
+ +
+to the top
+

Header Files  4 


+
+amqp.h
+amqp_framing.h
+amqp_ssl_socket.h
+amqp_tcp_socket.h
+
+
to the top
+

Libraries  1 


+
+librabbitmq.so.4.4.0
+
+
to the top
+


+

Test Info


+ + + + + + +
Library Namelibrabbitmq
Version #10.10.0
Version #20.11.0
Archx86_64
SubjectSource Compatibility
+

Test Results


+ + + + + + +
Total Header Files4
Total Libraries1
Total Symbols / Types111 / 106
Compatibility100%
+

Problem Summary


+ + + + + + + + + +
SeverityCount
Added Symbols-3
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low1
+ +

Added Symbols  3 


+amqp_ssl_socket.h
+amqp_set_ssl_engine ( char const* engine )
+amqp_ssl_socket_set_key_engine ( amqp_socket_t* self, char const* cert, char const* key )
+amqp_ssl_socket_set_key_passwd ( amqp_socket_t* self, char const* passwd )
+
+to the top
+ +

Problems with Constants, Low Severity  1 


+amqp.h
+ +[+] AMQP_VERSION_MINOR +
+ + +
+to the top
+

Header Files  4 


+
+amqp.h
+amqp_framing.h
+amqp_ssl_socket.h
+amqp_tcp_socket.h
+
+
to the top
+

Libraries  1 


+
+librabbitmq.so.4.4.0
+
+
to the top
+



+ +
+ + diff --git a/librabbitmq.spec b/librabbitmq.spec index c4c1226..ba34365 100644 --- a/librabbitmq.spec +++ b/librabbitmq.spec @@ -3,19 +3,21 @@ # # Fedora spec file for librabbitmq # -# Copyright (c) 2012-2020 Remi Collet +# Copyright (c) 2012-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit ffe918a5fcef72038a88054dca3c56762b1953d4 +%bcond_without tests + +%global gh_commit a64c08c68aff34d49a2ac152f04988cd921084f9 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner alanxz %global gh_project rabbitmq-c %global libname librabbitmq -# soname 4 since 0.6.0 (Fedora 23 / EL-7) 0.7.0/4.1, 0.8.0/4.2, 0.9.0/4.3, 0.10.0/4.4 +# soname 4 since 0.6.0 (Fedora 23 / EL-7) 0.7.0/4.1, 0.8.0/4.2, 0.9.0/4.3 (EL-8), 0.10.0/4.4, 0.11.0/4.5 # soname 1 up to 0.5.2 %global soname 4 @@ -25,13 +27,16 @@ Name: %{libname}-last Name: %{libname} %endif Summary: Client library for AMQP -Version: 0.10.0 -Release: 3%{?dist} +Version: 0.11.0 +Release: 1%{?dist} License: MIT URL: https://github.com/alanxz/rabbitmq-c Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +# don't install static library +Patch0: %{gh_project}-static.patch + BuildRequires: gcc BuildRequires: cmake > 2.8 # https://github.com/alanxz/rabbitmq-c/issues/503 @@ -48,7 +53,7 @@ Obsoletes: %{libname}-last <= %{version} %description This is a C-language AMQP client library for use with AMQP servers speaking protocol versions 0-9-1. -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" This package is designed to be installed beside system %{libname}. %endif @@ -56,7 +61,7 @@ This package is designed to be installed beside system %{libname}. %package devel Summary: Header files and development libraries for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" Conflicts: %{libname}-devel < %{version} Provides: %{libname}-devel = %{version}-%{release} %else @@ -71,7 +76,7 @@ for %{name}. %package tools Summary: Example tools built using the librabbitmq package Requires: %{name}%{?_isa} = %{version} -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" Conflicts: %{libname}-tools < %{version} Provides: %{libname}-tools = %{version}-%{release} %else @@ -91,6 +96,7 @@ amqp-publish Publish a message on an AMQP server %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 # Copy sources to be included in -devel docs. cp -pr examples Examples @@ -103,7 +109,12 @@ sed -e '/test_basic/d' -i tests/CMakeLists.txt # static lib required for tests %cmake \ -DBUILD_TOOLS_DOCS:BOOL=ON \ - -DBUILD_STATIC_LIBS:BOOL=ON \ +%if %{with tests} + -DINSTALL_STATIC_LIBS:BOOL=OFF \ +%else + -DBUILD_TESTS:BOOL=OFF \ + -DBUILD_STATIC_LIBS:BOOL=OFF \ +%endif -S . %if 0%{?cmake_build:1} @@ -120,19 +131,23 @@ make %{_smp_mflags} make install DESTDIR="%{buildroot}" %endif -rm %{buildroot}%{_libdir}/%{libname}.a - %check : check .pc is usable grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1 +: check cmake files are usable +grep static %{buildroot}%{_libdir}/cmake/rabbitmq-c/*.cmake && exit 1 +%if %{with tests} : upstream tests %if 0%{?ctest:1} %ctest %else make test %endif +%else +: Tests disabled +%endif %if 0%{?fedora} < 28 && 0%{?rhel} < 8 @@ -153,6 +168,7 @@ make test %{_libdir}/%{libname}.so %{_includedir}/amqp* %{_libdir}/pkgconfig/%{libname}.pc +%{_libdir}/cmake/rabbitmq-c %files tools %{_bindir}/amqp-* @@ -163,6 +179,11 @@ make test ## NOTICE: 0.8.0 available in RHEL 7.5, 0.9.0 in RHEL 8.0 %changelog +* Thu Apr 1 2021 Remi Collet - 0.11.0-1 +- update to 0.11.0 +- add patch to not install the static library, from + https://github.com/alanxz/rabbitmq-c/pull/665 + * Thu Aug 13 2020 Remi Collet - 0.10.0-3 - fix cmake macros usage, FTBFS #1863670 diff --git a/librabbitmq.xml b/librabbitmq.xml index decd6b1..2f559ab 100644 --- a/librabbitmq.xml +++ b/librabbitmq.xml @@ -9,7 +9,7 @@ -0.10.0 +0.11.0 diff --git a/rabbitmq-c-static.patch b/rabbitmq-c-static.patch new file mode 100644 index 0000000..0315347 --- /dev/null +++ b/rabbitmq-c-static.patch @@ -0,0 +1,41 @@ +From a8c05cb16afbf852fc584f2c2d31d2f7f0e3a48d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 1 Apr 2021 11:21:36 +0200 +Subject: [PATCH] add option to install or not the static library + +--- + CMakeLists.txt | 1 + + librabbitmq/CMakeLists.txt | 8 +++++--- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a9a29fdd..a7cf8f2c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,6 +245,7 @@ endif() + + option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON) + option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON) ++option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON) + + option(BUILD_EXAMPLES "Build Examples" ON) + option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND}) +diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt +index d8dcd262..72b4a875 100644 +--- a/librabbitmq/CMakeLists.txt ++++ b/librabbitmq/CMakeLists.txt +@@ -154,9 +154,11 @@ if (BUILD_STATIC_LIBS) + set_target_properties(rabbitmq-static PROPERTIES VERSION ${RMQ_VERSION} SOVERSION ${RMQ_SOVERSION} OUTPUT_NAME rabbitmq) + endif (WIN32) + +- install(TARGETS rabbitmq-static EXPORT "${targets_export_name}" +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ) ++ if (INSTALL_STATIC_LIBS) ++ install(TARGETS rabbitmq-static EXPORT "${targets_export_name}" ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ endif (INSTALL_STATIC_LIBS) + + if (NOT DEFINED RMQ_LIBRARY_TARGET) + set(RMQ_LIBRARY_TARGET rabbitmq-static) -- cgit