From b55e41ab4bd9a428e1c4c153692e8e06b88480fa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Aug 21 2023 07:42:00 +0000 Subject: update to 2.0.0 build out of sources tree --- diff --git a/.gitignore b/.gitignore index 4adb1f5..f1852b0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ package-*.xml /amqp-1.11.0beta.tgz /amqp-1.11.0RC1.tgz /amqp-1.11.0.tgz +/amqp-2.0.0.tgz diff --git a/418.patch b/418.patch deleted file mode 100644 index 3a09262..0000000 --- a/418.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ad6e2ddaf8421e992fea2d2e77c491255d6a035b Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 17 Jun 2022 14:00:36 +0200 -Subject: [PATCH] Fix: Deprecated: Creation of dynamic property (8.2) - ---- - tests/bug_62354.phpt | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tests/bug_62354.phpt b/tests/bug_62354.phpt -index d2a173b3..6330476c 100644 ---- a/tests/bug_62354.phpt -+++ b/tests/bug_62354.phpt -@@ -4,7 +4,9 @@ Constructing AMQPQueue with AMQPConnection segfaults - - --FILE-- - conn = new AMQPConnection(); - $funcs = array( -@@ -20,4 +22,4 @@ getLogin => 'guest' - getPassword => 'guest' - getPort => 5672 - getVHost => '/' --isConnected => false -\ No newline at end of file -+isConnected => false diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec index 8cff5d6..9a06e7f 100644 --- a/php-pecl-amqp.spec +++ b/php-pecl-amqp.spec @@ -7,35 +7,33 @@ # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - +%bcond_with tests %global with_zts 0%{?__ztsphp:1} -%global with_tests 0%{?_with_tests:1} %global pecl_name amqp %global ini_name 40-%{pecl_name}.ini -%global upstream_version 1.11.0 +%global upstream_version 2.0.0 #global upstream_prever RC1 #global upstream_lower rc1 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure Summary: Communicate with any AMQP compliant server Name: php-pecl-amqp Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 7%{?dist} +Release: 1%{?dist} License: PHP-3.01 URL: https://pecl.php.net/package/amqp Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -Patch0: https://patch-diff.githubusercontent.com/raw/php-amqp/php-amqp/pull/418.patch - BuildRequires: make BuildRequires: gcc -BuildRequires: php-devel >= 5.6 +BuildRequires: php-devel >= 7.4 BuildRequires: php-pear -BuildRequires: pkgconfig(librabbitmq) >= 0.7.1 -%if %{with_tests} +BuildRequires: pkgconfig(librabbitmq) >= 0.8.0 +%if %{with tests} BuildRequires: rabbitmq-server +BuildRequires: hostname %endif Requires: php(zend-abi) = %{php_zend_api} @@ -62,14 +60,9 @@ sed -e 's/role="test"/role="src"/' \ -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS -cd NTS -%patch -P0 -p1 -b .php82 - -sed -e 's/CFLAGS="-I/CFLAGS="$CFLAGS -I/' -i config.m4 - +cd %{sources} # Upstream often forget to change this -extver=$(sed -n '/#define PHP_AMQP_VERSION/{s/.* "//;s/".*$//;p}' php_amqp.h) +extver=$(sed -n '/#define PHP_AMQP_VERSION /{s/.* "//;s/".*$//;p}' php_amqp_version.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 @@ -123,25 +116,29 @@ extension = %{pecl_name}.so ;amqp.cacert = '' ;amqp.cert = '' ;amqp.key = '' -;amqp.verify = '' -;amqp.sasl_method = 0 +;amqp.verify = 1 +;amqp.sasl_method = 'AMQP_SASL_METHOD_PLAIN' +;amqp.serialization_depth = 128 +;amqp.deserialization_depth = 128 EOF +mkdir NTS %if %{with_zts} -cp -pr NTS ZTS +mkdir ZTS %endif %build -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config +%configure --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -161,7 +158,7 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -cd NTS +cd %{sources} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -180,7 +177,7 @@ done -m | grep '^%{pecl_name}$' %endif -%if %{with_tests} +%if %{with tests} mkdir log run base : Launch the RabbitMQ service export LANG=C.UTF-8 @@ -191,19 +188,17 @@ export RABBITMQ_MNESIA_BASE=$PWD/base /usr/lib/rabbitmq/bin/rabbitmqctl wait $RABBITMQ_PID_FILE ret=0 -pushd NTS +pushd %{sources} : Run the upstream test Suite for NTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ %{__php} -n run-tests.php -q --show-diff || ret=1 -popd %if %{with_zts} -pushd ZTS : Run the upstream test Suite for ZTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ %{__ztsphp} -n run-tests.php -q --show-diff || ret=1 -popd %endif +popd : Cleanup if [ -s $RABBITMQ_PID_FILE ]; then @@ -216,7 +211,7 @@ exit $ret %files -%license NTS/LICENSE +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -230,6 +225,10 @@ exit $ret %changelog +* Mon Aug 21 2023 Remi Collet - 2.0.0-1 +- update to 2.0.0 +- build out of sources tree + * Fri Jul 21 2023 Fedora Release Engineering - 1.11.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index da38eb0..6ffb077 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (amqp-1.11.0.tgz) = 0f0220fc2f1f9109640e096ab38a4bb06b2569a336b83f527d18dae2b8c21efaf383dade807ee5bb3dbf4447bc3548c15f38ac18155762fe7920ef8939bc0321 +SHA512 (amqp-2.0.0.tgz) = 0f946a6ff6005389d89a5f648353ddf6b99ca4b118efc5344bad0729cabb23299b55c74d9ef122d731fe9fb7f6265affd9a40e23a4394fbece9b3903c264f0ef