From 3ded1aac8651e5e9bbed3496434f805163db5e40 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Nov 2020 10:45:56 +0100 Subject: update to 4.1.1 drop patch merged upstream --- 294.patch | 109 ----------------------------------------------- REFLECTION | 2 +- php-pecl-skywalking.spec | 11 ++--- 3 files changed, 7 insertions(+), 115 deletions(-) delete mode 100644 294.patch diff --git a/294.patch b/294.patch deleted file mode 100644 index ba47917..0000000 --- a/294.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 4f50ecec5a1cfda6689c41fd0691526cf74cdde7 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 13 Nov 2020 08:49:03 +0100 -Subject: [PATCH] fix for PHP 8 - ---- - skywalking.cc | 7 +++++-- - src/sky_plugin_hyperf_guzzle.cc | 16 ++++++++++++++-- - src/sky_plugin_redis.cc | 8 ++++---- - 3 files changed, 23 insertions(+), 8 deletions(-) - -diff --git a/skywalking.cc b/skywalking.cc -index 31eda51..e27808f 100644 ---- a/skywalking.cc -+++ b/skywalking.cc -@@ -190,8 +190,11 @@ zend_module_dep skywalking_deps[] = { - ZEND_MOD_END - }; - -+ZEND_BEGIN_ARG_INFO_EX(arginfo_skywalking_trace_id, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ - const zend_function_entry skywalking_functions[] = { -- PHP_FE (skywalking_trace_id, NULL) -+ PHP_FE (skywalking_trace_id, arginfo_skywalking_trace_id) - PHP_FE_END - }; - -@@ -215,4 +218,4 @@ zend_module_entry skywalking_module_entry = { - ZEND_TSRMLS_CACHE_DEFINE() - #endif - ZEND_GET_MODULE(skywalking) --#endif -\ No newline at end of file -+#endif -diff --git a/src/sky_plugin_hyperf_guzzle.cc b/src/sky_plugin_hyperf_guzzle.cc -index ad851e0..68ded0a 100644 ---- a/src/sky_plugin_hyperf_guzzle.cc -+++ b/src/sky_plugin_hyperf_guzzle.cc -@@ -29,18 +29,30 @@ Span *sky_plugin_hyperf_guzzle(zend_execute_data *execute_data, const std::strin - if (arg_count >= 1) { - zval *request = ZEND_CALL_ARG(execute_data, 1); - zval uri; -+#if PHP_VERSION_ID < 80000 - zend_call_method(request, Z_OBJCE_P(request), nullptr, ZEND_STRL("geturi"), &uri, 0, nullptr, nullptr); -+#else -+ zend_call_method(Z_OBJ_P(request), Z_OBJCE_P(request), nullptr, ZEND_STRL("geturi"), &uri, 0, nullptr, nullptr); -+#endif - - if (!Z_ISUNDEF(uri)) { - zval scheme, host, port, path, query, to_string; - int _port = 80; -+#if PHP_VERSION_ID < 80000 - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getscheme"), &scheme, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getpath"), &path, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getquery"), &query, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("__tostring"), &to_string, 0, nullptr, nullptr); -- -+#else -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getscheme"), &scheme, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getpath"), &path, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getquery"), &query, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("__tostring"), &to_string, 0, nullptr, nullptr); -+#endif - if (!Z_ISUNDEF(scheme) && Z_TYPE(scheme) == IS_STRING) { - - if (strcmp(Z_STRVAL(scheme), "http") == 0 || strcmp(Z_STRVAL(scheme), "https") == 0) { -@@ -74,4 +86,4 @@ Span *sky_plugin_hyperf_guzzle(zend_execute_data *execute_data, const std::strin - } - - return nullptr; --} -\ No newline at end of file -+} -diff --git a/src/sky_plugin_redis.cc b/src/sky_plugin_redis.cc -index 450e5d7..003b517 100644 ---- a/src/sky_plugin_redis.cc -+++ b/src/sky_plugin_redis.cc -@@ -80,8 +80,8 @@ std::string sky_plugin_redis_peer(zend_execute_data *execute_data) { - zend_call_method(command, Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); - zend_call_method(command, Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - #else -- zend_call_method(Z_OBJCE_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -- zend_call_method(Z_OBJCE_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - #endif - - if (!Z_ISUNDEF(host) && !Z_ISUNDEF(port) && Z_TYPE(host) == IS_STRING) { -@@ -136,7 +136,7 @@ std::string sky_plugin_redis_bit_count_cmd(zend_execute_data *execute_data, std: - uint32_t arg_count = ZEND_CALL_NUM_ARGS(execute_data); - - if (arg_count >= 1) { -- for (int i = 1; i <= 3; ++i) { -+ for (uint32_t i = 1; i <= 3; ++i) { - if (i <= arg_count) { - zval *value = ZEND_CALL_ARG(execute_data, i); - if (Z_TYPE_P(value) == IS_LONG) { -@@ -154,4 +154,4 @@ std::string sky_plugin_redis_bit_count_cmd(zend_execute_data *execute_data, std: - return cmd; - } - return ""; --} -\ No newline at end of file -+} diff --git a/REFLECTION b/REFLECTION index e5b6381..cd9b473 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #117 skywalking version 4.1.0 ] { +Extension [ extension #117 skywalking version 4.1.1 ] { - Dependencies { Dependency [ json (Required) ] diff --git a/php-pecl-skywalking.spec b/php-pecl-skywalking.spec index 03e2a66..63f919a 100644 --- a/php-pecl-skywalking.spec +++ b/php-pecl-skywalking.spec @@ -20,16 +20,14 @@ Summary: The PHP instrument agent for Apache SkyWalking Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 4.1.0 +Version: 4.1.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: ASL 2.0 URL: https://pecl.php.net/package/%{pecl_name} -Patch0: https://patch-diff.githubusercontent.com/raw/SkyAPM/SkyAPM-php-sdk/pull/294.patch - BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 7.0 +BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-curl BuildRequires: %{?scl_prefix}php-json @@ -94,7 +92,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml pushd NTS -%patch0 -p1 -b .pr294 : Check version extver=$(sed -n '/#define PHP_SKYWALKING_VERSION /{s/.* "//;s/".*$//;p}' php_skywalking.h) @@ -246,6 +243,10 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \ # TODO : missing grpc in EPEL %changelog +* Thu Nov 19 2020 Remi Collet - 4.1.1-1 +- update to 4.1.1 +- drop patch merged upstream + * Fri Nov 13 2020 Remi Collet - 4.1.0-1 - update to 4.1.0 - drop patches merged upstream -- cgit