diff --git a/proton.patch b/proton.patch index e0fab7b..c9fc8f4 100644 --- a/proton.patch +++ b/proton.patch @@ -1,40 +1,56 @@ -diff -rc qpid-proton-0.40.0.orig/CMakeLists.txt qpid-proton-0.40.0/CMakeLists.txt -*** qpid-proton-0.40.0.orig/CMakeLists.txt Fri Nov 29 12:08:10 2024 ---- qpid-proton-0.40.0/CMakeLists.txt Fri Nov 29 12:08:31 2024 -*************** -*** 42,48 **** - if (NOT DEFINED Python_FIND_FRAMEWORK) - set(Python_FIND_FRAMEWORK "LAST") - endif () -! find_package(Python 3.9 - REQUIRED COMPONENTS Interpreter - OPTIONAL_COMPONENTS Development) - ---- 42,48 ---- - if (NOT DEFINED Python_FIND_FRAMEWORK) - set(Python_FIND_FRAMEWORK "LAST") - endif () -! find_package(Python 3.13 - REQUIRED COMPONENTS Interpreter - OPTIONAL_COMPONENTS Development) - -diff -rc qpid-proton-0.40.0.orig/python/CMakeLists.txt qpid-proton-0.40.0/python/CMakeLists.txt -*** qpid-proton-0.40.0.orig/python/CMakeLists.txt Fri Nov 29 12:08:10 2024 ---- qpid-proton-0.40.0/python/CMakeLists.txt Fri Nov 29 12:09:04 2024 -*************** -*** 74,80 **** - COMMAND ${PN_ENV_SCRIPT} -- - PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR} - LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c" -! ${Python_EXECUTABLE} -m sphinx "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs") - add_dependencies(docs docs-py) - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/" - DESTINATION "${PROTON_SHARE}/docs/api-py" ---- 74,80 ---- - COMMAND ${PN_ENV_SCRIPT} -- - PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR} - LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c" -! sphinx-build "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs") - add_dependencies(docs docs-py) - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/" - DESTINATION "${PROTON_SHARE}/docs/api-py" +diff -ruN qpid-proton-0.38.0.orig/CMakeLists.txt qpid-proton-0.38.0/CMakeLists.txt +--- qpid-proton-0.38.0.orig/CMakeLists.txt 2022-11-07 11:35:09.000000000 -0500 ++++ qpid-proton-0.38.0/CMakeLists.txt 2022-11-23 10:19:17.963751717 -0500 +@@ -42,7 +42,7 @@ + if (NOT DEFINED Python_FIND_FRAMEWORK) + set(Python_FIND_FRAMEWORK "LAST") + endif () +-find_package(Python 3.6 ++find_package(Python 3.9 + REQUIRED COMPONENTS Interpreter + OPTIONAL_COMPONENTS Development) + +diff -ruN qpid-proton-0.38.0.orig/cpp/src/map_test.cpp qpid-proton-0.38.0/cpp/src/map_test.cpp +--- qpid-proton-0.38.0.orig/cpp/src/map_test.cpp 2022-11-07 11:35:09.000000000 -0500 ++++ qpid-proton-0.38.0/cpp/src/map_test.cpp 2023-01-26 10:49:44.159634165 -0500 +@@ -114,6 +114,20 @@ + ASSERT_THROWS(conversion_error, m.value(bad)); + } + ++void test_copy_constructor() { ++ proton::map m = std::map{{"a", 2}, {"b", 3}}; ++ ASSERT_EQUAL(scalar(2), m.get("a")); ++ ASSERT_EQUAL(scalar(3), m.get("b")); ++ ASSERT_EQUAL(2U, m.size()); ++} ++ ++void test_initializer_list_constructor() { ++ proton::map m({{"a", 2}, {"b", 3}}); ++ ASSERT_EQUAL(scalar(2), m.get("a")); ++ ASSERT_EQUAL(scalar(3), m.get("b")); ++ ASSERT_EQUAL(2U, m.size()); ++} ++ + } + + int main(int, char**) { +@@ -122,5 +136,7 @@ + RUN_TEST(failed, test_use()); + RUN_TEST(failed, test_cppmap()); + RUN_TEST(failed, test_value()); ++ RUN_TEST(failed, test_copy_constructor()); ++ RUN_TEST(failed, test_initializer_list_constructor()); + return failed; + } +diff -ruN qpid-proton-0.38.0.orig/python/CMakeLists.txt qpid-proton-0.38.0/python/CMakeLists.txt +--- qpid-proton-0.38.0.orig/python/CMakeLists.txt 2022-11-07 11:35:09.000000000 -0500 ++++ qpid-proton-0.38.0/python/CMakeLists.txt 2022-11-23 10:20:07.216991810 -0500 +@@ -101,7 +101,7 @@ + COMMAND ${PN_ENV_SCRIPT} -- + PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_SOURCE_DIR} + LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/c" +- ${Python_EXECUTABLE} -m sphinx "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs") ++ sphinx-build "${CMAKE_CURRENT_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs") + add_dependencies(docs docs-py) + install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/" + DESTINATION "${PROTON_SHARE}/docs/api-py" diff --git a/qpid-proton.spec b/qpid-proton.spec index 9642a4d..e598a42 100644 --- a/qpid-proton.spec +++ b/qpid-proton.spec @@ -7,8 +7,8 @@ %undefine __brp_mangle_shebangs Name: qpid-proton -Version: 0.40.0 -Release: 2%{?dist} +Version: 0.38.0 +Release: 10%{?dist} Summary: A high performance, lightweight messaging library # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 @@ -16,6 +16,7 @@ URL: http://qpid.apache.org/proton/ Source0: %{name}-%{version}.tar.gz Patch0: proton.patch + Source1: licenses.xml %global proton_licensedir %{_licensedir}/proton @@ -24,10 +25,13 @@ Source1: licenses.xml BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: make BuildRequires: cmake +BuildRequires: swig +BuildRequires: pkgconfig +BuildRequires: doxygen BuildRequires: libuuid-devel BuildRequires: openssl-devel +<<<<<<< HEAD BuildRequires: cyrus-sasl-devel BuildRequires: cyrus-sasl-plain BuildRequires: cyrus-sasl-md5 @@ -38,10 +42,20 @@ BuildRequires: python3-build BuildRequires: python3-cffi BuildRequires: python3-pip BuildRequires: python3-setuptools +======= +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-rpm-macros +>>>>>>> parent of 055360c (Rebases 0.40.0) BuildRequires: python3-sphinx BuildRequires: python3-wheel -BuildRequires: pkgconfig - +BuildRequires: glibc-headers +BuildRequires: cyrus-sasl-devel +BuildRequires: jsoncpp-devel +BuildRequires: python3-setuptools +BuildRequires: libuv-devel +BuildRequires: nspr-devel +#BuildRequires: opentelemetry-cpp-devel %description Proton is a high performance, lightweight messaging library. It can be used in @@ -164,6 +178,7 @@ Obsoletes: qpid-proton-cpp-devel-docs %doc %{proton_datadir}/examples/cpp/README.dox %doc %{proton_datadir}/examples/cpp/CMakeLists.txt %doc %{proton_datadir}/examples/cpp/ssl-certs +%doc %{proton_datadir}/examples/cpp/tracing.dox %doc %{proton_datadir}/examples/cpp/tutorial.dox @@ -211,6 +226,7 @@ BuildArch: noarch %prep %setup -q -n %{name}-%{version} + %build mkdir -p BLD cd BLD @@ -233,13 +249,16 @@ cd BLD # Need to remove anything built by the python cmake build in proton # so that we rebuild from scratch rm -rf build +# Need to do the python package build here as we rely on the qpid-proton-core +# library to be installed so we don't duplicate it inside the extension +# That is also why we have to point pkg-config at the installed library +PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig %py3_build_wheel %global whl_tags cp%{python3_version_nodots}-cp%{python3_version_nodots}-%(echo %{python3_platform} | tr -- - _) -cd .. %py3_install_wheel python_qpid_proton-%{version}-%{whl_tags}.whl # We seem to need to strip the build extension otherwise it seems to embed a reference to # the buildroot in the debug info which fails the rpmbuild - probably because we massaged # the pkgconfig path above -strip %{buildroot}%{python3_sitearch}/cproton*.so) +strip %{buildroot}%{python3_sitearch}/_cproton*.so) install -dm 755 %{buildroot}%{proton_licensedir} install -pm 644 %{SOURCE1} %{buildroot}%{proton_licensedir} @@ -308,12 +327,6 @@ rm -f %{buildroot}%{proton_datadir}/CMakeLists.txt %check %changelog -* Wed Dec 04 2024 Hirotaka Wakabayashi - 0.40.0-2 -- Update licenses.xml - -* Fri Nov 29 2024 Hirotaka Wakabayashi - 0.40.0-1 -- Rebased to 0.40.0 - * Wed Jul 24 2024 Miroslav Suchý - 0.38.0-10 - convert license to SPDX