diff options
-rw-r--r-- | 0001-fix-ZTS-build-on-PHP-7.patch | 142 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pecl-luasandbox.spec | 10 |
3 files changed, 6 insertions, 148 deletions
diff --git a/0001-fix-ZTS-build-on-PHP-7.patch b/0001-fix-ZTS-build-on-PHP-7.patch deleted file mode 100644 index 69b1abf..0000000 --- a/0001-fix-ZTS-build-on-PHP-7.patch +++ /dev/null @@ -1,142 +0,0 @@ -From cea90a7fe86db551234f02c4046258ffbf696e59 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 9 Oct 2018 08:28:10 +0200 -Subject: [PATCH] fix ZTS build on PHP 7+ - ---- - luasandbox.c | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/luasandbox.c b/luasandbox.c -index ab9eabe..6a4d561 100644 ---- a/luasandbox.c -+++ b/luasandbox.c -@@ -606,7 +606,7 @@ struct luasandbox_load_helper_params { - php_luasandbox_obj * sandbox; - zval *zthis; - zval *return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls; - #endif - char *code; -@@ -618,7 +618,7 @@ static int luasandbox_load_helper_protected(lua_State* L) { - struct luasandbox_load_helper_params *p = (struct luasandbox_load_helper_params *)lua_touserdata(L, 1); - int status; - zval *return_value = p->return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls = p->tsrm_ls; - #endif - -@@ -695,7 +695,7 @@ static void luasandbox_load_helper(int binary, INTERNAL_FUNCTION_PARAMETERS) - luasandbox_timer_unpause(&p.sandbox->timer); - - p.zthis = getThis(); --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - p.tsrm_ls = tsrm_ls; - #endif - p.return_value = return_value; -@@ -768,7 +768,7 @@ PHP_METHOD(LuaSandbox, loadBinary) - static int luasandbox_safe_trace_to_zval(lua_State* L) { - zval *zsandbox = (zval *)lua_touserdata(L, 2); - zval *ztrace = (zval *)lua_touserdata(L, 3); --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls = (void ***)lua_touserdata(L, 4); - #endif - -@@ -847,7 +847,7 @@ static void luasandbox_handle_error(php_luasandbox_obj * sandbox, int status TSR - lua_pushlightuserdata(L, LUASANDBOX_GET_CURRENT_ZVAL_PTR(sandbox)); - lua_pushlightuserdata(L, ztrace); - lua_pushlightuserdata(L, --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - tsrm_ls - #else - NULL -@@ -1272,7 +1272,7 @@ struct LuaSandbox_callFunction_params { - php_luasandbox_obj * sandbox; - zval *zthis; - zval *return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls; - #endif - char *name; -@@ -1284,7 +1284,7 @@ struct LuaSandbox_callFunction_params { - static int LuaSandbox_callFunction_protected(lua_State* L) { - struct LuaSandbox_callFunction_params *p = (struct LuaSandbox_callFunction_params *)lua_touserdata(L, 1); - zval *return_value = p->return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls = p->tsrm_ls; - #endif - -@@ -1322,7 +1322,7 @@ PHP_METHOD(LuaSandbox, callFunction) - - p.zthis = getThis(); - p.return_value = return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - p.tsrm_ls = tsrm_ls; - #endif - status = lua_cpcall(L, LuaSandbox_callFunction_protected, &p); -@@ -1357,7 +1357,7 @@ PHP_METHOD(LuaSandbox, callFunction) - struct LuaSandbox_wrapPhpFunction_params { - zval *zthis; - zval *return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls; - #endif - zval *z; -@@ -1366,7 +1366,7 @@ struct LuaSandbox_wrapPhpFunction_params { - static int LuaSandbox_wrapPhpFunction_protected(lua_State* L) { - struct LuaSandbox_wrapPhpFunction_params *p = (struct LuaSandbox_wrapPhpFunction_params *)lua_touserdata(L, 1); - zval *return_value = p->return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls = p->tsrm_ls; - #endif - -@@ -1404,7 +1404,7 @@ PHP_METHOD(LuaSandbox, wrapPhpFunction) - } - - p.return_value = return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - p.tsrm_ls = tsrm_ls; - #endif - status = lua_cpcall(L, LuaSandbox_wrapPhpFunction_protected, &p); -@@ -1494,7 +1494,7 @@ PHP_METHOD(LuaSandboxFunction, __construct) - struct LuaSandboxFunction_call_params { - php_luasandbox_obj * sandbox; - zval *return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls; - #endif - php_luasandboxfunction_obj *func; -@@ -1505,7 +1505,7 @@ struct LuaSandboxFunction_call_params { - static int LuaSandboxFunction_call_protected(lua_State* L) { - struct LuaSandboxFunction_call_params *p = (struct LuaSandboxFunction_call_params *)lua_touserdata(L, 1); - zval *return_value = p->return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - void ***tsrm_ls = p->tsrm_ls; - #endif - -@@ -1523,7 +1523,7 @@ PHP_METHOD(LuaSandboxFunction, call) - int status; - - p.return_value = return_value; --#ifdef ZTS -+#if defined(ZTS) && PHP_VERSION_ID < 70000 - p.tsrm_ls = tsrm_ls; - #endif - p.numArgs = 0; --- -2.14.4 - @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #15 luasandbox version 3.0.2 ] { +Extension [ <persistent> extension #107 luasandbox version 3.0.3 ] { - Classes [10] { Class [ <internal:luasandbox> class LuaSandbox ] { diff --git a/php-pecl-luasandbox.spec b/php-pecl-luasandbox.spec index f64eacc..9a04820 100644 --- a/php-pecl-luasandbox.spec +++ b/php-pecl-luasandbox.spec @@ -25,14 +25,12 @@ Summary: Lua interpreter with limits and safe environment Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 3.0.2 +Version: 3.0.3 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT URL: http://pecl.php.net/package/%{proj_name} Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz -Patch1: 0001-fix-ZTS-build-on-PHP-7.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear @@ -106,8 +104,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch1 -p1 -b.zts - : Sanity check, really often broken extver=$(sed -n '/#define LUASANDBOX_VERSION /{s/.* "//;s/".*$//;p}' luasandbox_version.h) if test "x${extver}" != "x%{version}"; then @@ -236,6 +232,10 @@ fi %changelog +* Thu Oct 11 2018 Remi Collet <remi@remirepo.net> - 3.0.3-1 +- update to 3.0.3 +- drop patch merged upstream + * Tue Oct 9 2018 Remi Collet <remi@remirepo.net> - 3.0.2-1 - initial package, version 3.0.2 (stable) - add patch to fix ZTS build with PHP 7+ |