summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--e41d11bb55aa16da57e152fecfce30a50b454c0d.patch22
-rw-r--r--php-pecl-taint.spec22
3 files changed, 50 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/e41d11bb55aa16da57e152fecfce30a50b454c0d.patch b/e41d11bb55aa16da57e152fecfce30a50b454c0d.patch
new file mode 100644
index 0000000..873fc8b
--- /dev/null
+++ b/e41d11bb55aa16da57e152fecfce30a50b454c0d.patch
@@ -0,0 +1,22 @@
+From e41d11bb55aa16da57e152fecfce30a50b454c0d Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 29 Jun 2017 08:23:04 +0200
+Subject: [PATCH] silent the each operator (for 7.2)
+
+---
+ tests/bug63123.phpt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/bug63123.phpt b/tests/bug63123.phpt
+index 705a954..ca44e28 100644
+--- a/tests/bug63123.phpt
++++ b/tests/bug63123.phpt
+@@ -10,7 +10,7 @@ taint.enable=1
+ $str = 'a,' . 'b';
+ taint($str);
+ $a = explode(',', $str);
+-while (list($key, $val) = each($a)) {
++while (list($key, $val) = @each($a)) {
+ echo $val;
+ }
+
diff --git a/php-pecl-taint.spec b/php-pecl-taint.spec
index 2a93367..b517513 100644
--- a/php-pecl-taint.spec
+++ b/php-pecl-taint.spec
@@ -27,13 +27,15 @@ Version: 2.0.2
Release: 0.8.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
%else
-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;')}}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
License: PHP
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
+Patch0: e41d11bb55aa16da57e152fecfce30a50b454c0d.patch
+
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -48,6 +50,10 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
@@ -91,6 +97,10 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .upstream
+# see https://github.com/laruence/taint/issues/55
+sed -e '/PHP_VERSION_ID/s/70200/70300/' -i php_taint.h
+
# When this file will be removed, clean the description.
[ -f EXPERIMENTAL ] || exit 1
@@ -119,6 +129,8 @@ EOF
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure \
@@ -137,6 +149,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
# Install the NTS stuff
make -C NTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -222,6 +236,12 @@ fi
%changelog
+* Thu Jun 29 2017 Remi Collet <remi@fedoraproject.org> - 2.0.2-4
+- ignore PHP_VERSION_ID check as test suite is ok with PHP 7.2
+ see https://github.com/laruence/taint/issues/55
+- add patch for test suite with PHP 7.2 from
+ https://github.com/laruence/taint/pull/56 (merged)
+
* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-3
- rebuild with PHP 7.1.0 GA