diff options
author | Remi Collet <remi@remirepo.net> | 2021-02-06 06:22:40 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-02-06 06:22:40 +0100 |
commit | 9c8fb7c1b8c286e612948e84328dfcfe46f96606 (patch) | |
tree | d792a9f87685bb8f72ffd81e4fda44cb3071e500 | |
parent | 8df608aba06b851377a9d6e5a6085541725e11d2 (diff) |
update to 1.2.1
drop patch merged upstream
-rw-r--r-- | 69.patch | 117 | ||||
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pecl-scoutapm.spec | 12 |
4 files changed, 8 insertions, 125 deletions
diff --git a/69.patch b/69.patch deleted file mode 100644 index 3589d4b..0000000 --- a/69.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 4d1ec38c5cdf104f4167faf47378c4f19e7c25b9 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 5 Feb 2021 12:05:28 +0100 -Subject: [PATCH 1/3] fix globals init and ZTS - ---- - config.m4 | 2 +- - zend_scoutapm.c | 15 ++++++++++++++- - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/config.m4 b/config.m4 -index 771fc1d..5e8d1d0 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -80,7 +80,7 @@ if test "$PHP_SCOUTAPM" != "no"; then - STD_CFLAGS="-g -O0 -Wall" - fi - -- PHP_SCOUTAPM_CFLAGS="$STD_CFLAGS $MAINTAINER_CFLAGS" -+ PHP_SCOUTAPM_CFLAGS="-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $STD_CFLAGS $MAINTAINER_CFLAGS" - - PHP_NEW_EXTENSION(scoutapm, zend_scoutapm.c scout_curl_wrapper.c scout_file_wrapper.c scout_pdo_wrapper.c, - $ext_shared,,$PHP_SCOUTAPM_CFLAGS,,yes) -diff --git a/zend_scoutapm.c b/zend_scoutapm.c -index 739dc66..7139a52 100644 ---- a/zend_scoutapm.c -+++ b/zend_scoutapm.c -@@ -82,6 +82,12 @@ PHP_MINFO_FUNCTION(scoutapm) - php_info_print_table_end(); - } - -+static -+PHP_GINIT_FUNCTION(scoutapm) -+{ -+ scoutapm_globals->handlers_set = 0; -+} -+ - /* scoutapm_module_entry provides the metadata/information for PHP about this PHP module */ - static zend_module_entry scoutapm_module_entry = { - STANDARD_MODULE_HEADER, -@@ -94,7 +100,7 @@ static zend_module_entry scoutapm_module_entry = { - PHP_MINFO(scoutapm), /* module information */ - PHP_SCOUTAPM_VERSION, /* module version */ - PHP_MODULE_GLOBALS(scoutapm), /* module global variables */ -- NULL, -+ PHP_GINIT(scoutapm), /* init global */ - NULL, - NULL, - STANDARD_MODULE_PROPERTIES_EX -@@ -105,6 +111,9 @@ static zend_module_entry scoutapm_module_entry = { - * Instead, see `zend_scoutapm_startup` - we load the module there. - ZEND_GET_MODULE(scoutapm); - */ -+#if defined(COMPILE_DL_SCOUTAPM) && defined(ZTS) -+ZEND_TSRMLS_CACHE_DEFINE() -+#endif - - /* extension_version_info is used by PHP */ - zend_extension_version_info extension_version_info = { -@@ -178,6 +187,10 @@ static PHP_RINIT_FUNCTION(scoutapm) - int handler_index; - zend_class_entry *ce; - -+#if defined(COMPILE_DL_SCOUTAPM) && defined(ZTS) -+ ZEND_TSRMLS_CACHE_UPDATE(); -+#endif -+ - SCOUTAPM_DEBUG_MESSAGE("Initialising stacks..."); - SCOUTAPM_G(observed_stack_frames_count) = 0; - SCOUTAPM_G(observed_stack_frames) = calloc(0, sizeof(scoutapm_stack_frame)); - -From 2794f94a9ce0e30451a2d1fd64701e4500644453 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 5 Feb 2021 12:15:56 +0100 -Subject: [PATCH 2/3] zero all globals - ---- - zend_scoutapm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/zend_scoutapm.c b/zend_scoutapm.c -index 7139a52..2b70a07 100644 ---- a/zend_scoutapm.c -+++ b/zend_scoutapm.c -@@ -85,7 +85,7 @@ PHP_MINFO_FUNCTION(scoutapm) - static - PHP_GINIT_FUNCTION(scoutapm) - { -- scoutapm_globals->handlers_set = 0; -+ memset(scoutapm_globals, 0, sizeof(zend_scoutapm_globals)); - } - - /* scoutapm_module_entry provides the metadata/information for PHP about this PHP module */ - -From 8330d02f790a0aa6f82a94d13b2b94a9d6f8a109 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 5 Feb 2021 14:15:59 +0100 -Subject: [PATCH 3/3] missing ZEND_TSRMLS_CACHE_UPDATE in GINIT - ---- - zend_scoutapm.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/zend_scoutapm.c b/zend_scoutapm.c -index 2b70a07..5be730b 100644 ---- a/zend_scoutapm.c -+++ b/zend_scoutapm.c -@@ -85,6 +85,9 @@ PHP_MINFO_FUNCTION(scoutapm) - static - PHP_GINIT_FUNCTION(scoutapm) - { -+#if defined(COMPILE_DL_SCOUTAPM) && defined(ZTS) -+ ZEND_TSRMLS_CACHE_UPDATE(); -+#endif - memset(scoutapm_globals, 0, sizeof(zend_scoutapm_globals)); - } - @@ -2,7 +2,7 @@ scoutapm scoutapm support => enabled -Version => 1.2.0 +Version => 1.2.1 curl functions => Yes file functions => Yes pdo functions => Yes @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #119 scoutapm version 1.2.0 ] { +Extension [ <persistent> extension #119 scoutapm version 1.2.1 ] { - Functions { Function [ <internal:scoutapm> function scoutapm_get_calls ] { diff --git a/php-pecl-scoutapm.spec b/php-pecl-scoutapm.spec index 3212b1c..d4cc400 100644 --- a/php-pecl-scoutapm.spec +++ b/php-pecl-scoutapm.spec @@ -17,14 +17,12 @@ Summary: Native Extension Component for ScoutAPM's PHP Agent Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.2.0 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 1.2.1 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz License: PHP URL: https://pecl.php.net/package/%{pecl_name} -Patch0: https://patch-diff.githubusercontent.com/raw/scoutapp/scout-apm-php-ext/pull/69.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.1 @@ -79,8 +77,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml pushd NTS -%patch0 -p1 - : Check version extver=$(sed -n '/#define PHP_SCOUTAPM_VERSION /{s/.* "//;s/".*$//;p}' zend_scoutapm.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -215,6 +211,10 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \ %changelog +* Sat Feb 6 2021 Remi Collet <remi@remirepo.net> - 1.2.1-1 +- update to 1.2.1 +- drop patch merged upstream + * Fri Feb 5 2021 Remi Collet <remi@remirepo.net> - 1.2.0-2 - add patch for PHP 8 / ZTS from https://github.com/scoutapp/scout-apm-php-ext/pull/69 |