summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-29 08:33:02 +0200
committerRemi Collet <remi@remirepo.net>2018-06-29 08:33:02 +0200
commite9500be0f1cb3424e51ad8997f198caf71446715 (patch)
tree907b8ddee61ef14be33212ee6070367450468548
parent712d9a4c332d2bdee0455da79a95ef74062d3fc7 (diff)
add patch for test suite with PHP 7.3 from https://github.com/nbs-system/snuffleupagus/pull/185
-rw-r--r--185.patch58
-rw-r--r--PHPINFO9
-rw-r--r--REFLECTION2
-rw-r--r--php-snuffleupagus.spec12
4 files changed, 78 insertions, 3 deletions
diff --git a/185.patch b/185.patch
new file mode 100644
index 0000000..55bf200
--- /dev/null
+++ b/185.patch
@@ -0,0 +1,58 @@
+From 221b40a82ee5a683e066d10e0e5a6a132661b999 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 29 Jun 2018 08:20:19 +0200
+Subject: [PATCH 1/2] relax test to pass with 7.3
+
+---
+ src/tests/harden_rand_noargs.phpt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/tests/harden_rand_noargs.phpt b/src/tests/harden_rand_noargs.phpt
+index 643a453..fdf8124 100644
+--- a/src/tests/harden_rand_noargs.phpt
++++ b/src/tests/harden_rand_noargs.phpt
+@@ -46,13 +46,13 @@ Warning: rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_no
+
+ Warning: mt_rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
+
+-Warning: rand() expects parameter 1 to be integer, string given in %s/tests/harden_rand_noargs.php on line %d
++Warning: rand() expects parameter 1 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
+
+-Warning: mt_rand() expects parameter 1 to be integer, string given in %s/tests/harden_rand_noargs.php on line %d
++Warning: mt_rand() expects parameter 1 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
+
+-Warning: rand() expects parameter 2 to be integer, string given in %s/tests/harden_rand_noargs.php on line %d
++Warning: rand() expects parameter 2 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
+
+-Warning: mt_rand() expects parameter 2 to be integer, string given in %s/tests/harden_rand_noargs.php on line %d
++Warning: mt_rand() expects parameter 2 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
+
+ Warning: rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
+
+
+From 5c1c20eec0588cd5425987df01a0ac2acd1b24aa Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 29 Jun 2018 08:21:17 +0200
+Subject: [PATCH 2/2] skip test with 7.3 as samesite is broken + add TODO
+
+---
+ src/sp_cookie_encryption.c | 5 +++--
+ src/tests/samesite_cookies.phpt | 5 ++++-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/tests/samesite_cookies.phpt b/src/tests/samesite_cookies.phpt
+index d010963..3247432 100644
+--- a/src/tests/samesite_cookies.phpt
++++ b/src/tests/samesite_cookies.phpt
+@@ -1,7 +1,10 @@
+ --TEST--
+ Cookie samesite
+ --SKIPIF--
+-<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
++<?php
++if (!extension_loaded("snuffleupagus")) die("skip");
++if (PHP_VERSION_ID >= 70300) die("skip BROKEN with 7.3");
++?>
+ --INI--
+ sp.configuration_file={PWD}/config/config_samesite_cookies.ini
+ --COOKIE--
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..ca19e23
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,9 @@
+
+snuffleupagus
+
+snuffleupagus support => enabled
+Version => 0.2.1
+Valid config => yes
+
+Directive => Local Value => Master Value
+sp.configuration_file => /etc/php.d/snuffleupagus-*.rules => /etc/php.d/snuffleupagus-*.rules
diff --git a/REFLECTION b/REFLECTION
index ba5f9ce..76bc407 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #135 snuffleupagus version 0.2.1 ] {
+Extension [ <persistent> extension #197 snuffleupagus version 0.2.1 ] {
- INI {
Entry [ sp.configuration_file <SYSTEM> ]
diff --git a/php-snuffleupagus.spec b/php-snuffleupagus.spec
index 2774397..a5bdddd 100644
--- a/php-snuffleupagus.spec
+++ b/php-snuffleupagus.spec
@@ -34,13 +34,16 @@ Version: 0.2.1
%if 0%{?gh_date}
Release: 1%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: LGPLv3
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pkg_name}-%{version}-%{gh_short}.tar.gz
+Patch0: https://patch-diff.githubusercontent.com/raw/nbs-system/snuffleupagus/pull/185.patch
+
+BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: pcre-devel
@@ -81,11 +84,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1 -b .pr185
+
cd src
# Only RPM build flags
sed -e '/^CFLAGS/d' -i config.m4
-# TODO not ok for now
# Sanity check, really often broken
grep PHP_SNUFFLEUPAGUS_VERSION php_snuffleupagus.h
extver=$(sed -n '/#define PHP_SNUFFLEUPAGUS_VERSION/{s/.* "//;s/".*$//;p}' php_snuffleupagus.h)
@@ -199,6 +203,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Jun 29 2018 Remi Collet <remi@remirepo.net> - 0.2.1-2
+- add patch for test suite with PHP 7.3 from
+ https://github.com/nbs-system/snuffleupagus/pull/185
+
* Wed Feb 7 2018 Remi Collet <remi@remirepo.net> - 0.2.1-1
- Update to 0.2.1