From 109d6c65de2335db9c7c98186afe04f04aec6a3c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Sep 2021 09:05:57 +0200 Subject: rebuild for 8.1.0RC1 --- gearman-php81.patch | 36 ++++++++++++++++++++++++++++++++++++ php-pecl-gearman.spec | 32 +++++++++++++++++++++++++++++--- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 gearman-php81.patch diff --git a/gearman-php81.patch b/gearman-php81.patch new file mode 100644 index 0000000..0452954 --- /dev/null +++ b/gearman-php81.patch @@ -0,0 +1,36 @@ +From 7da13e4babc17067b2b45d6b37041c3c8ed91637 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 11 Jun 2021 08:05:40 +0200 +Subject: [PATCH] remove ZVAL_NEW_ARR usage + +--- + php_gearman_worker.c | 2 +- + tests/skipifconnect.inc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/php_gearman_worker.c b/php_gearman_worker.c +index 21b64e4..7ab5f6e 100644 +--- a/php_gearman_worker.c ++++ b/php_gearman_worker.c +@@ -91,7 +91,7 @@ zend_object *gearman_worker_obj_new(zend_class_entry *ce) { + zend_object_std_init(&(intern->std), ce); + object_properties_init(&intern->std, ce); + +- ZVAL_NEW_ARR(&intern->cb_list); ++ array_init(&intern->cb_list); + zend_hash_init(Z_ARRVAL(intern->cb_list), 0, NULL, cb_list_dtor, 0); + + intern->std.handlers = &gearman_worker_obj_handlers; +diff --git a/tests/skipifconnect.inc b/tests/skipifconnect.inc +index e4df5e3..ca0e1db 100644 +--- a/tests/skipifconnect.inc ++++ b/tests/skipifconnect.inc +@@ -4,7 +4,7 @@ if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); + + require_once('connect.inc'); + +-$sock = fsockopen($host, $port); ++$sock = @fsockopen($host, $port); + if ($sock === false) { + die("skip unable to connect"); + } diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec index ec47d3a..8da46ec 100644 --- a/php-pecl-gearman.spec +++ b/php-pecl-gearman.spec @@ -21,19 +21,22 @@ %global ini_name 40-%{pecl_name}.ini %endif +%bcond_without tests + %global extver 2.1.0 %global libver 1.1.0 - Name: %{?sub_prefix}php-pecl-gearman Version: %{extver} -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: PHP wrapper to libgearman License: PHP URL: https://pecl.php.net/package/gearman Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: %{pecl_name}-php81.patch + BuildRequires: libgearman-devel > %{libver} BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -70,6 +73,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} <= %{version} +%endif %endif @@ -92,11 +98,15 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml -extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h) +pushd NTS +%patch0 -p1 + +extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' php_gearman.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is ${extver}, expecting %{version}. exit 1 fi +popd cat >%{ini_name} < - 2.1.0-5 +- rebuild for 8.1.0RC1 + +* Fri Jun 11 2021 Remi Collet - 2.1.0-4 +- add upstream patch for PHP 8.1 +- run test suite in %%check + * Fri Apr 30 2021 Remi Collet - 2.1.0-3 - F34 rebuild for https://github.com/remicollet/remirepo/issues/174 -- cgit