diff options
| -rw-r--r-- | php-pecl-xmlrpc.spec | 98 | ||||
| -rw-r--r-- | xmlrpc-php82.patch | 24 | ||||
| -rw-r--r-- | xmlrpc-tests.patch | 45 |
3 files changed, 93 insertions, 74 deletions
diff --git a/php-pecl-xmlrpc.spec b/php-pecl-xmlrpc.spec index 6ee4d69..ec92bd4 100644 --- a/php-pecl-xmlrpc.spec +++ b/php-pecl-xmlrpc.spec @@ -1,50 +1,51 @@ # remirepo spec file for php-pecl-xmlrpc # -# Copyright (c) 2020-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2020-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - -%if 0%{?scl:1} -%scl_package php-pecl-xmlrpc -%endif +%{?scl:%scl_package php-pecl-xmlrpc} # https://github.com/php/pecl-networking-xmlrpc/commits/master -%global gh_commit e71da6ad6f86fd149de14e42b54019edf3e629b7 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner php -%global gh_project pecl-networking-xmlrpc -#global gh_date 20200602 -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global pecl_name xmlrpc -%global with_tests 0%{!?_without_tests:1} -%global upver 1.0.0 -%global rcver RC3 -%global lower rc3 +%global gh_commit e71da6ad6f86fd149de14e42b54019edf3e629b7 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner php +%global gh_project pecl-networking-xmlrpc +#global gh_date 20200602 +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name xmlrpc +%global with_tests 0%{!?_without_tests:1} +%global upver 1.0.0 +%global rcver RC3 +%global rclower rc3 # After 20-xml -%global ini_name 30-%{pecl_name}.ini +%global ini_name 30-%{pecl_name}.ini +%if 0%{?gh_date} +%global sources %{gh_project}-%{gh_commit} +%else +%global sources %{pecl_name}-%{upver}%{?rcver} +%endif +%global _configure ../%{sources}/configure Summary: Functions to write XML-RPC servers and clients Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: %{upver}%{?rclower:~%{rclower}}%{?gh_date:.%{gh_date}} +Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is PHP -# Library is BSD -License: PHP and BSD +# Library is MIT +License: PHP-3.01 AND MIT URL: https://pecl.php.net/package/%{pecl_name} %if 0%{?gh_date} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{upver}-%{gh_short}.tar.gz %else -Source0: https://pecl.php.net/get/%{pecl_name}-%{upver}%{?rcver}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz %endif -Patch0: %{pecl_name}-php82.patch +Patch0: %{pecl_name}-tests.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -55,7 +56,6 @@ BuildRequires: %{?scl_prefix}php-xml Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-xml%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Set epoch so provides is > 0:8.0 Obsoletes: %{?scl_prefix}php-%{pecl_name} < 8.0.0 @@ -80,19 +80,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc -%if 0%{?gh_date} -mv %{gh_project}-%{gh_commit} NTS -%else -mv %{pecl_name}-%{upver}%{?rcver} NTS -%endif sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS -%patch0 -p1 -b .up +cd %{sources} +%patch -P0 -p1 -b .up # Check version as upstream often forget to update this extver=$(sed -n '/#define PHP_XMLRPC_VERSION/{s/.* "//;s/".*$//;p}' php_xmlrpc.h) @@ -109,9 +104,9 @@ extension=%{pecl_name} EOF +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif @@ -124,15 +119,16 @@ peclconf() { --with-php-config=$1 } -cd NTS -%{_bindir}/phpize -peclconf %{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +peclconf %{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclconf %{_bindir}/zts-php-config +peclconf %{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -155,22 +151,20 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test & Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check -cd NTS +cd %{sources} : Minimal load test for NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \ --define extension=xml \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' %if %{with_zts} -cd ../ZTS - : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=xml \ @@ -180,8 +174,6 @@ cd ../ZTS %endif %if %{with_tests} -cd ../NTS - : Run upstream test suite TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ %{__php} -n run-tests.php -q --show-diff @@ -190,8 +182,8 @@ TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl %files -%{?_licensedir:%license NTS/LICENSE} -%{?_licensedir:%license NTS/libxmlrpc/COPYING} +%{?_licensedir:%license %{sources}/LICENSE} +%{?_licensedir:%license %{sources}/libxmlrpc/COPYING} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -205,6 +197,12 @@ TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl %changelog +* Mon Jan 29 2024 Remi Collet <remi@remirepo.net> - 1.0.0~rc3-10 +- adapt tests for new libxml + +* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 1.0.0~rc3-3 +- build out of sources tree + * Thu Sep 15 2022 Remi Collet <remi@remirepo.net> - 1.0.0~rc3-2 - add upstream patch for PHP 8.2 diff --git a/xmlrpc-php82.patch b/xmlrpc-php82.patch deleted file mode 100644 index a7c89c4..0000000 --- a/xmlrpc-php82.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e83ef297bb23cc4e4de2cfb4bc83433902a196ef Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Thu, 15 Sep 2022 09:59:00 +0200 -Subject: [PATCH] fix test using dynamic properties - ---- - tests/bug74975.phpt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/bug74975.phpt b/tests/bug74975.phpt -index 1b35298..7d50036 100644 ---- a/tests/bug74975.phpt -+++ b/tests/bug74975.phpt -@@ -7,6 +7,7 @@ if (!extension_loaded("xmlrpc")) print "skip"; - --FILE-- - <?php - -+#[AllowDynamicProperties] - class Foo { - - } --- -2.37.2 - diff --git a/xmlrpc-tests.patch b/xmlrpc-tests.patch new file mode 100644 index 0000000..e96dd30 --- /dev/null +++ b/xmlrpc-tests.patch @@ -0,0 +1,45 @@ +From e83ef297bb23cc4e4de2cfb4bc83433902a196ef Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Thu, 15 Sep 2022 09:59:00 +0200 +Subject: [PATCH] fix test using dynamic properties + +--- + tests/bug74975.phpt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/bug74975.phpt b/tests/bug74975.phpt +index 1b35298..7d50036 100644 +--- a/tests/bug74975.phpt ++++ b/tests/bug74975.phpt +@@ -7,6 +7,7 @@ if (!extension_loaded("xmlrpc")) print "skip"; + --FILE-- + <?php + ++#[AllowDynamicProperties] + class Foo { + + } +-- +2.37.2 + +From 7dade03efe2aa11caee444968263e9f9bc8b2ea0 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Mon, 29 Jan 2024 16:00:24 +0100 +Subject: [PATCH] fix test expectation for 8.3 + +--- + tests/bug45556.phpt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/bug45556.phpt b/tests/bug45556.phpt +index 485f2c1..add52ed 100644 +--- a/tests/bug45556.phpt ++++ b/tests/bug45556.phpt +@@ -29,6 +29,6 @@ xmlrpc_server_call_method ($server, $request, NULL, $options); + --EXPECTF-- + Warning: xmlrpc_server_call_method(): Invalid callback 'foobar' passed in %s on line %d + +-Warning: xmlrpc_server_call_method(): XML parse error: [line 1, column 1, message: Invalid document end] Unable to add introspection data returned from bar::test() in %s on line %d ++Warning: xmlrpc_server_call_method(): XML parse error: [line 1, column 1, message: %s] Unable to add introspection data returned from bar::test() in %s on line %d + + Warning: xmlrpc_server_call_method(): Invalid callback 'foo::bar' passed in %s on line %d |
