diff --git a/.gitignore b/.gitignore index 279cbbd..2b5e8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,8 @@ /qpid-proton-0.9.tar.gz /qpid-proton-0.10-rc1.tar.gz /qpid-proton-0.10.tar.gz +/qpid-proton-0.11.1.tar.gz +/qpid-proton-0.13.0.2016-02-01.tar.gz +/qpid-proton-0.13.0.2016-02-02.tar.gz +/qpid-proton-0.12.0.tar.gz +/qpid-proton-0.12.1.tar.gz diff --git a/0001-NO-JIRA-Fix-install-of-Perl-bindings.patch b/0001-NO-JIRA-Fix-install-of-Perl-bindings.patch deleted file mode 100644 index 11fdf61..0000000 --- a/0001-NO-JIRA-Fix-install-of-Perl-bindings.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fc37fa00539906cac2f0639c166fb233e826fe7e Mon Sep 17 00:00:00 2001 -From: "Darryl L. Pierce" -Date: Mon, 16 Mar 2015 09:15:22 -0400 -Subject: [PATCH 1/2] NO-JIRA: Fix install of Perl bindings - ---- - proton-c/bindings/perl/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt -index 9891c09..55cf032 100644 ---- a/proton-c/bindings/perl/CMakeLists.txt -+++ b/proton-c/bindings/perl/CMakeLists.txt -@@ -56,13 +56,13 @@ swig_link_libraries(cproton_perl ${BINDING_DEPS} ${PERL_LIBRARY}) - - if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8)) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so -- DESTINATION ${PERL_VENDORARCH_DIR} -+ DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl - COMPONENT Perl - ) - else() - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcproton_perl.so - RENAME cproton_perl.so -- DESTINATION ${PERL_VENDORARCH_DIR} -+ DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl - COMPONENT Perl - ) - endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8)) --- -2.1.0 - diff --git a/0001-PROTON-974-Accept-a-single-symbol-in-SASL-mechs-fram.patch b/0001-PROTON-974-Accept-a-single-symbol-in-SASL-mechs-fram.patch deleted file mode 100644 index 42bc28a..0000000 --- a/0001-PROTON-974-Accept-a-single-symbol-in-SASL-mechs-fram.patch +++ /dev/null @@ -1,66 +0,0 @@ -From caf9578be09e1540a9b1bb6a0a47abbaa62312ce Mon Sep 17 00:00:00 2001 -From: Andrew Stitcher -Date: Tue, 11 Aug 2015 16:21:39 -0400 -Subject: [PATCH] PROTON-974: Accept a single symbol in SASL mechs frame - As - well as an array of symbols - This is a specific interop issue with qpidd - AMQP 1.0 support - ---- - proton-c/src/sasl/sasl.c | 33 +++++++++++++++++++++++---------- - 1 file changed, 23 insertions(+), 10 deletions(-) - -diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c -index 6e1ce1d..fb98894 100644 ---- a/proton-c/src/sasl/sasl.c -+++ b/proton-c/src/sasl/sasl.c -@@ -671,24 +671,37 @@ int pn_do_mechanisms(pn_transport_t *transport, uint8_t frame_type, uint16_t cha - - // This scanning relies on pn_data_scan leaving the pn_data_t cursors - // where they are after finishing the scan -- int err = pn_data_scan(args, "D.[@["); -+ pn_string_t *mechs = pn_string(""); -+ -+ // Try array of symbols for mechanism list -+ bool array = false; -+ int err = pn_data_scan(args, "D.[?@[", &array); - if (err) return err; - -- pn_string_t *mechs = pn_string(""); -+ if (array) { -+ // Now keep checking for end of array and pull a symbol -+ while(pn_data_next(args)) { -+ pn_bytes_t s = pn_data_get_symbol(args); -+ if (pni_included_mech(transport->sasl->included_mechanisms, s)) { -+ pn_string_addf(mechs, "%*s ", (int)s.size, s.start); -+ } -+ } - -- // Now keep checking for end of array and pull a symbol -- while(pn_data_next(args)) { -- pn_bytes_t s = pn_data_get_symbol(args); -- if (pni_included_mech(transport->sasl->included_mechanisms, s)) { -- pn_string_addf(mechs, "%*s ", (int)s.size, s.start); -+ if (pn_string_size(mechs)) { -+ pn_string_buffer(mechs)[pn_string_size(mechs)-1] = 0; - } -- } -+ } else { -+ // No array of symbols; try single symbol -+ pn_data_rewind(args); -+ pn_bytes_t symbol; -+ int err = pn_data_scan(args, "D.[s]", &symbol); -+ if (err) return err; - -- if (pn_string_size(mechs)) { -- pn_string_buffer(mechs)[pn_string_size(mechs)-1] = 0; -+ pn_string_setn(mechs, symbol.start, symbol.size); - } - - if (pni_init_client(transport) && -+ pn_string_size(mechs) && - pni_process_mechanisms(transport, pn_string_get(mechs))) { - pni_sasl_set_desired_state(transport, SASL_POSTED_INIT); - } else { --- -1.8.3.1 - diff --git a/0002-PROTON-582-Added-in-missing-is_float-method-to-Perl-.patch b/0002-PROTON-582-Added-in-missing-is_float-method-to-Perl-.patch deleted file mode 100644 index f11448d..0000000 --- a/0002-PROTON-582-Added-in-missing-is_float-method-to-Perl-.patch +++ /dev/null @@ -1,73 +0,0 @@ -From ba8cee70089adfe64c2429a20eb5bee90d96b606 Mon Sep 17 00:00:00 2001 -From: "Darryl L. Pierce" -Date: Tue, 17 Mar 2015 09:04:31 -0400 -Subject: [PATCH 2/2] PROTON-582: Added in missing is_float method to Perl - bindings. - ---- - examples/perl/messenger/send.pl | 2 +- - proton-c/bindings/perl/lib/qpid/proton/Data.pm | 4 ++-- - proton-c/bindings/perl/lib/qpid/proton/Message.pm | 2 +- - proton-c/bindings/perl/lib/qpid/proton/utils.pm | 7 +++++++ - 4 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/examples/perl/messenger/send.pl b/examples/perl/messenger/send.pl -index b622b68..27893ce 100755 ---- a/examples/perl/messenger/send.pl -+++ b/examples/perl/messenger/send.pl -@@ -59,7 +59,7 @@ foreach (@messages) - { - $msg->set_address($address); - $msg->set_subject($subject); -- $msg->set_content($content); -+ $msg->set_body($content); - # try a few different body types - my $body_type = int(rand(6)); - $msg->set_property("sent", "" . localtime(time)); -diff --git a/proton-c/bindings/perl/lib/qpid/proton/Data.pm b/proton-c/bindings/perl/lib/qpid/proton/Data.pm -index 156e09a..494a8f3 100644 ---- a/proton-c/bindings/perl/lib/qpid/proton/Data.pm -+++ b/proton-c/bindings/perl/lib/qpid/proton/Data.pm -@@ -1165,8 +1165,8 @@ sub put_list_helper { - $self->enter; - - for my $value (@{$array}) { -- if (qpid::proton::is_num($value)) { -- if (qpid::proton::is_float($value)) { -+ if (qpid::proton::utils::is_num($value)) { -+ if (qpid::proton::utils::is_float($value)) { - $self->put_float($value); - } else { - $self->put_int($value); -diff --git a/proton-c/bindings/perl/lib/qpid/proton/Message.pm b/proton-c/bindings/perl/lib/qpid/proton/Message.pm -index b36caa7..0251b89 100644 ---- a/proton-c/bindings/perl/lib/qpid/proton/Message.pm -+++ b/proton-c/bindings/perl/lib/qpid/proton/Message.pm -@@ -438,7 +438,7 @@ sub set_body { - # be, which is going to be a best guess - if (!defined($body_type)) { - if (qpid::proton::utils::is_num($body)) { -- if (qpid::proton::is_float($body)) { -+ if (qpid::proton::utils::is_float($body)) { - $body_type = qpid::proton::FLOAT; - } else { - $body_type = qpid::proton::INT; -diff --git a/proton-c/bindings/perl/lib/qpid/proton/utils.pm b/proton-c/bindings/perl/lib/qpid/proton/utils.pm -index 5652535..0ab4e3e 100644 ---- a/proton-c/bindings/perl/lib/qpid/proton/utils.pm -+++ b/proton-c/bindings/perl/lib/qpid/proton/utils.pm -@@ -28,4 +28,11 @@ sub is_num { - $_[0] ^ $_[0] ? 0 : 1 - } - -+sub is_float { -+ my $val = $_[0]; -+ -+ return 1 if ($val - int($val)); -+ return 0; -+} -+ - 1; --- -2.1.0 - diff --git a/qpid-proton.spec b/qpid-proton.spec index 303bccc..5964199 100644 --- a/qpid-proton.spec +++ b/qpid-proton.spec @@ -1,5 +1,8 @@ %global proton_datadir %{_datadir}/proton-%{version} + +%if 0%{?fedora} %global gem_name qpid_proton +%endif # per https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Preventing_files.2Fdirectories_from_being_scanned_for_deps_.28pre-scan_filtering.29 %global __provides_exclude_from ^%{_datadir}/proton-%{version}/examples/.*$ @@ -13,40 +16,38 @@ } Name: qpid-proton -Version: 0.10 -Release: 3%{?dist} +Version: 0.12.1 +Release: 1%{?dist} +Group: System Environment/Libraries Summary: A high performance, lightweight messaging library License: ASL 2.0 URL: http://qpid.apache.org/proton/ -Source0: qpid-proton-%{version}/%{name}-%{version}.tar.gz - -%if (0%{?fedora} || 0%{?rhel} == 7) -BuildRequires: cmake >= 2.6 -%global cmake_exe %{cmake} -%endif - -%if 0%{?rhel} == 6 -BuildRequires: cmake28 -%global cmake_exe %{cmake28} -%endif - +Source0: %{name}-%{version}.tar.gz +BuildRequires: gcc +BuildRequires: cmake BuildRequires: swig BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: libuuid-devel BuildRequires: openssl-devel -BuildRequires: python +%if 0%{?fedora} +BuildRequires: python2-devel +BuildRequires: python3-devel +%endif +%if 0%{?rhel} BuildRequires: python-devel +%endif BuildRequires: epydoc +%if 0%{?fedora} BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) BuildRequires: cyrus-sasl-devel -Requires: cyrus-sasl-lib +%endif -Patch0: 0001-PROTON-974-Accept-a-single-symbol-in-SASL-mechs-fram.patch +#Patch0: proton.patch %description Proton is a high performance, lightweight messaging library. It can be used in @@ -56,12 +57,11 @@ standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem from any platform, environment, or language. - %package c +Group: System Environment/Libraries Summary: C libraries for Qpid Proton -Obsoletes: qpid-proton < %{version}-%{release} -Provides: qpid-proton = %{version}-%{release} - +Requires: cyrus-sasl-lib +Obsoletes: qpid-proton %description c %{summary}. @@ -76,33 +76,94 @@ Provides: qpid-proton = %{version}-%{release} %{_mandir}/man1/* %{_bindir}/proton-dump %{_libdir}/libqpid-proton.so.* - +%{_libdir}/cmake/Proton/Proton* %post c -p /sbin/ldconfig %postun c -p /sbin/ldconfig +%if 0%{?rhel} +%package cpp +Group: System Environment/Libraries +Summary: C++ libraries for Qpid Proton +Requires: qpid-proton-c%{?_isa} = %{version}-%{release} + +%description cpp +%{summary}. + +%files cpp +%defattr(-,root,root,-) +%dir %{proton_datadir} +%doc %{proton_datadir}/LICENSE +%doc %{proton_datadir}/README* +%doc %{proton_datadir}/TODO +%{_mandir}/man1/* +%{_libdir}/libqpid-proton-cpp.so.* +%{_libdir}/cmake/ProtonCpp/ProtonCpp* + +%post cpp -p /sbin/ldconfig +%postun cpp -p /sbin/ldconfig +%endif %package c-devel +Group: Development/System Requires: qpid-proton-c%{?_isa} = %{version}-%{release} Summary: Development libraries for writing messaging apps with Qpid Proton -Obsoletes: qpid-proton-devel < %{version}-%{release} -Provides: qpid-proton-devel = %{version}-%{release} - +Obsoletes: qpid-proton-devel %description c-devel %{summary}. - %files c-devel %defattr(-,root,root,-) %{_includedir}/proton +%if 0%{?rhel} +%exclude %{_includedir}/proton/*.hpp +%endif %{_libdir}/libqpid-proton.so %{_libdir}/pkgconfig/libqpid-proton.pc %{_libdir}/cmake/Proton +%if 0%{?fedora} %doc %{proton_datadir}/examples +%endif +%if 0%{?rhel} +%{_datadir}/proton-%{version}/examples +%endif +%exclude %{_datadir}/proton-%{version}/examples/cpp +%exclude %{_datadir}/proton-%{version}/examples/go +%exclude %{_datadir}/proton-%{version}/examples/java +%exclude %{_datadir}/proton-%{version}/examples/javascript +%exclude %{_datadir}/proton-%{version}/examples/php +%exclude %{_datadir}/proton-%{version}/examples/python +%exclude %{_datadir}/proton-%{version}/examples/ruby +%exclude %{_datadir}/proton-%{version}/examples/perl +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/recv +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/recv-async +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/send +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/send-async +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/CMakeFiles +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/Makefile +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/cmake_install.cmake +%exclude %{_datadir}/proton-%{version}/examples/c/messenger/CTestTestfile.cmake + +%if 0%{?rhel} +%package cpp-devel +Group: Development/System +Requires: qpid-proton-cpp%{?_isa} = %{version}-%{release} +Requires: qpid-proton-c-devel%{?_isa} = %{version}-%{release} +Summary: Development libraries for writing messaging apps with Qpid Proton + +%description cpp-devel +%{summary}. +%files cpp-devel +%defattr(-,root,root,-) +%{_includedir}/proton/*.hpp +%{_libdir}/pkgconfig/libqpid-proton-cpp.pc +%{_libdir}/libqpid-proton-cpp.so +%{_datadir}/proton-%{version}/examples/cpp +%endif %package c-devel-doc @@ -116,106 +177,162 @@ BuildArch: noarch %defattr(-,root,root,-) %doc %{proton_datadir}/docs/api-c +%if 0%{?rhel} +%package cpp-devel-doc +Summary: Documentation for the C++ development libraries for Qpid Proton +BuildArch: noarch + +%description cpp-devel-doc +%{summary}. + +%files cpp-devel-doc +%defattr(-,root,root,-) +%{proton_datadir}/docs/api-cpp +%endif %package -n python-qpid-proton +Group: System Environment/Libraries Summary: Python language bindings for the Qpid Proton messaging framework Requires: qpid-proton-c%{?_isa} = %{version}-%{release} Requires: python - %description -n python-qpid-proton %{summary}. - %files -n python-qpid-proton %defattr(-,root,root,-) %{python_sitearch}/_cproton.so %{python_sitearch}/cproton.* -%{python_sitearch}/proton +%{python_sitearch}/proton/* + +%if 0%{?fedora} +%package -n python3-qpid-proton +Group: System Environment/Libraries +Summary: Python language bindings for the Qpid Proton messaging framework +%{?python_provide:%python_provide python3-qpid-proton} +Requires: qpid-proton-c%{?_isa} = %{version}-%{release} + +%description -n python3-qpid-proton +%{summary}. + +%files -n python-qpid-proton +%defattr(-,root,root,-) +%{python2_sitearch}/* + +%files -n python3-qpid-proton +%defattr(-,root,root,-) +%{python3_sitearch}/* +%endif %package -n python-qpid-proton-doc +Group: Documentation Summary: Documentation for the Python language bindings for Qpid Proton BuildArch: noarch - %description -n python-qpid-proton-doc %{summary}. - %files -n python-qpid-proton-doc %defattr(-,root,root,-) %doc %{proton_datadir}/docs/api-py - - +%if 0%{?fedora} %package -n perl-qpid-proton Summary: Perl language bindings for Qpid Proton messaging framework -# Remove with Proton 0.11 -Obsoletes: perl-qpid_proton < %{version} -Provides: perl-qpid_proton = %{version}-%{release} - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: qpid-proton-c = %{version}-%{release} - %description -n perl-qpid-proton %{summary}. - %files -n perl-qpid-proton %doc LICENSE TODO README* %{perl_vendorarch}/* - +%endif %prep %setup -q -n %{name}-%{version} -%patch0 -p1 +#%patch0 -p1 %build -%cmake_exe \ +%if 0%{?fedora} +%cmake \ -DPROTON_DISABLE_RPATH=true \ - -DPYTHON_SITEARCH_PACKAGES=%{python_sitearch} \ - -DNOBUILD_RUBY=1 \ - -DNOBUILD_PHP=1 \ + -DBUILD_RUBY=OFF \ + -DBUILD_PHP=OFF \ -DSYSINSTALL_PYTHON=1 \ -DSYSINSTALL_PERL=1 \ - -DCHECK_SYSINSTALL_PYTHON=0 \ . -make all docs %{?_smp_mflags} - +%endif +%if 0%{?rhel} +%cmake -DPROTON_DISABLE_RPATH=true \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro,-z,now" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-z,relro" \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,-z,relro" \ + -DSYSINSTALL_BINDINGS=ON \ + -DBUILD_RUBY=OFF \ + -DBUILD_PERL=OFF \ + . +%endif +make all docs %{?_smp_mflags} +%if 0%{?fedora} +(cd proton-c/bindings/python; %py3_build) +%endif %install %make_install +%if 0%{?fedora} +(cd proton-c/bindings/python; %py3_install) +%endif CPROTON_BUILD=$PWD . ./config.sh chmod +x %{buildroot}%{python_sitearch}/_cproton.so find %{buildroot}%{proton_datadir}/examples/ -type f | xargs chmod -x - # clean up files that are not shipped rm -rf %{buildroot}%{_exec_prefix}/bindings rm -rf %{buildroot}%{_libdir}/java rm -rf %{buildroot}%{_libdir}/libproton-jni.so rm -rf %{buildroot}%{_datarootdir}/java rm -rf %{buildroot}%{_libdir}/proton.cmake - +%if 0%{?fedora} +rm -rf %{buildroot}%{_libdir}/cmake/ProtonCpp +rm -rf %{buildroot}%{_libdir}/*cpp* +rm -rf %{buildroot}%{_libdir}/pkgconfig/libqpid-proton-cpp.pc +rm -rf %{buildroot}%{proton_datadir}/docs/api-cpp +%endif +%if 0%{?rhel} +rm -rf %{buildroot}%{_libdir}/perl5 +rm -rf %{buildroot}%{_libdir}/php +rm -rf %{buildroot}%{_libdir}/ruby +rm -rf %{buildroot}%{_datarootdir}/php +rm -rf %{buildroot}%{_datarootdir}/perl5 +rm -rf %{buildroot}%{_datarootdir}/ruby +rm -rf %{buildroot}%{_sysconfdir}/php.d +%endif %check +%if 0%{?fedora} # check perl bindings pushd proton-c/bindings/perl make test popd +%endif %changelog +* Wed Mar 23 2016 Irina Boverman - 0.12.1-1 +- Rebased to 0.12.1 +- Added python3 installation + * Thu Feb 04 2016 Fedora Release Engineering - 0.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index b0b0dbb..2e2de47 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca38f75891672f96dfbdd89319a6e078 qpid-proton-0.10.tar.gz +8f046d11c88c3e485c26be35cced3e98 qpid-proton-0.12.1.tar.gz