diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | php-7.2.patch | 79 |
3 files changed, 97 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = php-suhosin7-git pkgdesc = An advanced protection system for PHP installations pkgver = 0.10.0dev.r58.ge55e273 - pkgrel = 1 + pkgrel = 2 url = http://suhosin.org/ arch = i686 arch = x86_64 @@ -10,9 +10,11 @@ pkgbase = php-suhosin7-git depends = php provides = php-suhosin7=0.10.0dev.r58.ge55e273 conflicts = php-suhosin7 - backup = etc/php/conf.d/$__pkgname.ini + backup = etc/php/conf.d/suhosin7.ini source = php-suhosin7::git+https://github.com/sektioneins/suhosin7.git + source = php-7.2.patch md5sums = SKIP + md5sums = 70da87c05c34e16f6953f27b9cc13e74 pkgname = php-suhosin7-git @@ -5,7 +5,7 @@ pkgname=php-suhosin7-git _pkgname=${pkgname%-git} __pkgname=${_pkgname#php-} pkgver=0.10.0dev.r58.ge55e273 -pkgrel=1 +pkgrel=2 pkgdesc='An advanced protection system for PHP installations' arch=('i686' 'x86_64') url='http://suhosin.org/' @@ -14,22 +14,30 @@ depends=('php') checkdepends=('php-cgi') provides=("$_pkgname=$pkgver") conflicts=("$_pkgname") -backup=('etc/php/conf.d/$__pkgname.ini') -source=("$_pkgname"::"git+https://github.com/sektioneins/$__pkgname.git") -md5sums=('SKIP') +backup=("etc/php/conf.d/$__pkgname.ini") +source=("$_pkgname"::"git+https://github.com/sektioneins/$__pkgname.git" + 'php-7.2.patch') +md5sums=('SKIP' + '70da87c05c34e16f6953f27b9cc13e74') + +prepare() { + cd $_pkgname + + patch -p1 < ../php-7.2.patch +} build() { cd $_pkgname phpize - ./configure --prefix=/usr --enable-$__pkgname + ./configure --prefix=/usr --enable-$__pkgname --enable-$__pkgname-experimental --enable-static=no make } check() { cd $_pkgname - NO_INTERACTION=1 REPORT_EXIT_STATUS=1 make -k test + make test NO_INTERACTION=1 REPORT_EXIT_STATUS=1 } package() { diff --git a/php-7.2.patch b/php-7.2.patch new file mode 100644 index 000000000000..5600d8269fba --- /dev/null +++ b/php-7.2.patch @@ -0,0 +1,79 @@ +diff --git a/.travis.yml b/.travis.yml +index 213b493..bb5c9a8 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -7,6 +7,7 @@ group: edge + php: + - 7.0 + - 7.1 ++ - 7.2 + + env: + - CC=gcc-4.8 CFLAGS="" +diff --git a/php_suhosin7.h b/php_suhosin7.h +index fb9cf90..2435196 100644 +--- a/php_suhosin7.h ++++ b/php_suhosin7.h +@@ -23,8 +23,8 @@ extern zend_module_entry suhosin7_module_entry; + + #define SUHOSIN7_EXT_VERSION "0.10.0dev" + +-#if PHP_VERSION_ID < 70000 | PHP_VERSION_ID >= 70200 +-#error Suhosin7 works with PHP 7.0 and 7.1 only! Looking for Suhosin for PHP 5.x? Take a look at https://www.suhosin.org/ ++#if PHP_VERSION_ID < 70000 | PHP_VERSION_ID >= 70300 ++#error Suhosin7 works with PHP 7.0 and 7.1 and 7.2 only! Looking for Suhosin for PHP 5.x? Take a look at https://www.suhosin.org/ + #endif + + #ifdef PHP_WIN32 +diff --git a/tests/session/PHPSESSID_max_id_length_ok.phpt b/tests/session/PHPSESSID_max_id_length_ok.phpt +index 2673d08..5d7772f 100644 +--- a/tests/session/PHPSESSID_max_id_length_ok.phpt ++++ b/tests/session/PHPSESSID_max_id_length_ok.phpt +@@ -5,6 +5,8 @@ PHPSESSID session id not too long + --INI-- + suhosin.session.max_id_length=32 + session.hash_bits_per_character=4 ++session.sid_length=32 ++session.sid_bits_per_character=4 + --COOKIE-- + PHPSESSID=12345678901234567890123456789012; + --FILE-- +diff --git a/tests/session/PHPSESSID_max_id_length_toolong.phpt b/tests/session/PHPSESSID_max_id_length_toolong.phpt +index 6bd71fb..9909757 100644 +--- a/tests/session/PHPSESSID_max_id_length_toolong.phpt ++++ b/tests/session/PHPSESSID_max_id_length_toolong.phpt +@@ -5,6 +5,8 @@ PHPSESSID session id too long + --INI-- + suhosin.session.max_id_length=32 + session.hash_bits_per_character=4 ++session.sid_length=32 ++session.sid_bits_per_character=4 + --COOKIE-- + PHPSESSID=123456789012345678901234567890123; + --FILE-- +diff --git a/tests/session/max_id_length_ok.phpt b/tests/session/max_id_length_ok.phpt +index dbecebd..15f46a9 100644 +--- a/tests/session/max_id_length_ok.phpt ++++ b/tests/session/max_id_length_ok.phpt +@@ -5,6 +5,8 @@ session id not too long + --INI-- + suhosin.session.max_id_length=32 + session.hash_bits_per_character=4 ++session.sid_length=32 ++session.sid_bits_per_character=4 + session.use_strict_mode=0 + --FILE-- + <?php +diff --git a/tests/session/max_id_length_toolong.phpt b/tests/session/max_id_length_toolong.phpt +index a8ec4cc..a7dd652 100644 +--- a/tests/session/max_id_length_toolong.phpt ++++ b/tests/session/max_id_length_toolong.phpt +@@ -5,6 +5,8 @@ session id too long + --INI-- + suhosin.session.max_id_length=32 + session.hash_bits_per_character=4 ++session.sid_length=32 ++session.sid_bits_per_character=4 + --FILE-- + <?php + session_id('123456789012345678901234567890123'); |