summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-09 11:00:58 +0200
committerRemi Collet <remi@remirepo.net>2021-06-09 11:00:58 +0200
commit18c39f73848fc2f88fabeb3dfa7d7bb189d2e5ed (patch)
tree26d518e67f6dd666e5c1bdee299b7cfca54cfee8
parentfe1c71af5415c89f038976885eea4911939fb760 (diff)
add upstream patch for test suite with PHP 8.1
run tests in parallel (7.4+)
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-mcrypt.spec32
3 files changed, 27 insertions, 10 deletions
diff --git a/PHPINFO b/PHPINFO
index 555f35f..b11e4d6 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,7 +3,8 @@ mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
-Version => 2.5.8
+Extension version => 1.0.4
+Library version => 2.5.8
Api No => 20021217
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream
diff --git a/REFLECTION b/REFLECTION
index fe94299..7d48f0b 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #117 mcrypt version 1.0.4 ] {
+Extension [ <persistent> extension #119 mcrypt version 1.0.4 ] {
- INI {
Entry [ mcrypt.algorithms_dir <ALL> ]
diff --git a/php-pecl-mcrypt.spec b/php-pecl-mcrypt.spec
index 724ae8c..6b63776 100644
--- a/php-pecl-mcrypt.spec
+++ b/php-pecl-mcrypt.spec
@@ -19,15 +19,18 @@
Summary: Bindings for the libmcrypt library
Name: %{?scl_prefix}php-pecl-mcrypt
Version: 1.0.4
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: https://pecl.php.net/package/mcrypt
-Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+
+Patch0: 0001-add-extension-version-in-phpinfo.patch
+Patch1: 0002-drop-null-value-deprecated-in-8.1.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7.2
+BuildRequires: %{?scl_prefix}php-devel >= 7.2
BuildRequires: libmcrypt-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -66,6 +69,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
@@ -85,6 +91,9 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1
+%patch1 -p1
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_MCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_mcrypt.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -149,9 +158,6 @@ done
%check
-export REPORT_EXIT_STATUS=1
-export NO_INTERACTION=1
-
# Warning: Use of undefined constant MCRYPT_CBC - assumed 'MCRYPT_CBC'
rm ?TS/tests/bug8040.phpt
@@ -162,10 +168,16 @@ cd NTS
--define extension=%{pecl_name} \
--modules | grep %{pecl_name}
+%if "%{php_version}" > "7.4"
+OPT="%{?_smp_mflags} -q --show-diff"
+%else
+OPT="-q --show-diff"
+%endif
+
: upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php $OPT
%if %{with_zts}
cd ../ZTS
@@ -178,7 +190,7 @@ cd ../ZTS
: upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-%{__ztsphp} -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php $OPT
%endif
@@ -217,6 +229,10 @@ fi
%changelog
+* Wed Jun 9 2021 Remi Collet <remi@remirepo.net> - 1.0.4-4
+- add upstream patch for test suite with PHP 8.1
+- run tests in parallel (7.4+)
+
* Fri Apr 30 2021 Remi Collet <remi@remirepo.net> - 1.0.4-3
- F34 rebuild for https://github.com/remicollet/remirepo/issues/174