From 57940aef00cf34694e78fc6f63a37b712e92a9aa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 23 Sep 2022 08:03:16 +0200 Subject: update to 4.1.0 --- REFLECTION | 450 ++++++++++++++++++++++++++++++++++++++--------- php-pecl-luasandbox.spec | 47 ++--- 2 files changed, 384 insertions(+), 113 deletions(-) diff --git a/REFLECTION b/REFLECTION index 021c45a..edb3814 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #80 luasandbox version 4.0.2 ] { +Extension [ extension #81 luasandbox version 4.1.0 ] { - Classes [10] { Class [ class LuaSandbox ] { @@ -28,7 +28,7 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Parameters [2] { Parameter #0 [ $code ] - Parameter #1 [ $chunkName ] + Parameter #1 [ $chunkName = ] } } @@ -36,7 +36,7 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Parameters [2] { Parameter #0 [ $code ] - Parameter #1 [ $chunkName ] + Parameter #1 [ $chunkName = ] } } @@ -87,7 +87,7 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { Method [ public method enableProfiler ] { - Parameters [1] { - Parameter #0 [ $period ] + Parameter #0 [ $period = ] } } @@ -100,7 +100,7 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { Method [ public method getProfilerFunctionReport ] { - Parameters [1] { - Parameter #0 [ $units ] + Parameter #0 [ $units = ] } } @@ -129,7 +129,7 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { } } - Class [ class LuaSandboxError extends Exception implements Throwable ] { + Class [ class LuaSandboxError extends Exception implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -144,53 +144,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxRuntimeError extends LuaSandboxError implements Throwable ] { + Class [ class LuaSandboxRuntimeError extends LuaSandboxError implements Stringable, Throwable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -205,53 +240,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxFatalError extends LuaSandboxError implements Throwable ] { + Class [ class LuaSandboxFatalError extends LuaSandboxError implements Stringable, Throwable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -266,53 +336,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxSyntaxError extends LuaSandboxFatalError implements Throwable ] { + Class [ class LuaSandboxSyntaxError extends LuaSandboxFatalError implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -327,53 +432,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxMemoryError extends LuaSandboxFatalError implements Throwable ] { + Class [ class LuaSandboxMemoryError extends LuaSandboxFatalError implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -388,53 +528,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxErrorError extends LuaSandboxFatalError implements Throwable ] { + Class [ class LuaSandboxErrorError extends LuaSandboxFatalError implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -449,53 +624,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxTimeoutError extends LuaSandboxFatalError implements Throwable ] { + Class [ class LuaSandboxTimeoutError extends LuaSandboxFatalError implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -510,53 +720,88 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class LuaSandboxEmergencyTimeoutError extends LuaSandboxFatalError implements Throwable ] { + Class [ class LuaSandboxEmergencyTimeoutError extends LuaSandboxFatalError implements Throwable, Stringable ] { - Constants [4] { Constant [ public int RUN ] { 2 } @@ -571,48 +816,83 @@ Extension [ extension #80 luasandbox version 4.0.2 ] { - Static methods [0] { } - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + - Properties [5] { + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ public $luaTrace = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } diff --git a/php-pecl-luasandbox.spec b/php-pecl-luasandbox.spec index 6705923..4473855 100644 --- a/php-pecl-luasandbox.spec +++ b/php-pecl-luasandbox.spec @@ -1,22 +1,22 @@ # remirepo spec file for php-pecl-luasandbox # -# Copyright (c) 2015-2021 Remi Collet +# Copyright (c) 2015-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-luasandbox %else %global _root_libdir %{_libdir} %endif +%bcond_without tests + %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global proj_name LuaSandbox %global pecl_name luasandbox -%global with_tests 0%{!?_without_tests:1} %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else @@ -24,8 +24,8 @@ %endif Summary: Lua interpreter with limits and safe environment -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 4.0.2 +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 4.1.0 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT URL: https://pecl.php.net/package/%{proj_name} @@ -50,23 +50,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -88,6 +71,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +sed -e '/LUASANDBOX_VERSION/s/4.0.2/%{version}/' -i luasandbox_version.h + : Sanity check, really often broken extver=$(sed -n '/#define LUASANDBOX_VERSION /{s/.* "//;s/".*$//;p}' luasandbox_version.h) if test "x${extver}" != "x%{version}"; then @@ -161,12 +146,12 @@ cd NTS --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep -i %{pecl_name} +%if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{_bindir}/php -n run-tests.php --show-diff +%{_bindir}/php -n run-tests.php -q -P --show-diff +%endif %if %{with_zts} cd ../ZTS @@ -176,11 +161,11 @@ cd ../ZTS --modules | grep -i %{pecl_name} : Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ +%if %{with tests} TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q -P --show-diff +%endif %endif @@ -219,6 +204,12 @@ fi %changelog +* Fri Sep 23 2022 Remi Collet - 4.1.0-1 +- update to 4.1.0 + +* Tue Sep 20 2022 Remi Collet - 4.0.2-2 +- add upstream patch for 8.2 + * Wed May 19 2021 Remi Collet - 4.0.2-1 - update to 4.0.2 (no change) -- cgit