summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--274.patch30
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION26
-rw-r--r--php-pecl-skywalking.spec43
5 files changed, 87 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/274.patch b/274.patch
new file mode 100644
index 0000000..80f2d64
--- /dev/null
+++ b/274.patch
@@ -0,0 +1,30 @@
+From 16ed1a4d463014d93b1ddfb432323d00a4ba17a6 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 15 Oct 2020 10:58:51 +0200
+Subject: [PATCH] use cxx for link, and drop uneeded libstdc++
+
+---
+ config.m4 | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/config.m4 b/config.m4
+index adb7f77..f110c4d 100644
+--- a/config.m4
++++ b/config.m4
+@@ -78,7 +78,6 @@ if test "$PHP_SKYWALKING" != "no"; then
+ PHP_ADD_LIBRARY(c++,1,SKYWALKING_SHARED_LIBADD)
+ ;;
+ *)
+- PHP_ADD_LIBRARY(stdc++,1,SKYWALKING_SHARED_LIBADD)
+ PHP_ADD_LIBRARY(rt,,SKYWALKING_SHARED_LIBADD)
+ PHP_ADD_LIBRARY(rt)
+ ;;
+@@ -152,7 +151,7 @@ if test "$PHP_SKYWALKING" != "no"; then
+ src/network/v3/language-agent/Tracing_grpc.pb.cc \
+ src/network/v3/management/Management_grpc.pb.cc \
+ src/network/v3/management/Management.pb.cc \
+- , $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
++ , $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, cxx)
+ fi
+
+ if test -r $phpincludedir/ext/mysqli/mysqli_mysqlnd.h; then
diff --git a/PHPINFO b/PHPINFO
index 8e41e35..a5ec400 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -5,4 +5,9 @@ Directive => Local Value => Master Value
skywalking.enable => Off => Off
skywalking.version => 8 => 8
skywalking.app_code => hello_skywalking => hello_skywalking
-skywalking.sock_path => /tmp/sky-agent.sock => /tmp/sky-agent.sock
+skywalking.authentication => no value => no value
+skywalking.grpc => 127.0.0.1:11800 => 127.0.0.1:11800
+skywalking.grpc_tls_enable => 0 => 0
+skywalking.grpc_tls_pem_root_certs => no value => no value
+skywalking.grpc_tls_pem_private_key => no value => no value
+skywalking.grpc_tls_pem_cert_chain => no value => no value
diff --git a/REFLECTION b/REFLECTION
index deefb59..fbec808 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #114 skywalking version 3.3.2 ] {
+Extension [ <persistent> extension #116 skywalking version 4.0.0 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -17,16 +17,28 @@ Extension [ <persistent> extension #114 skywalking version 3.3.2 ] {
Entry [ skywalking.app_code <ALL> ]
Current = 'hello_skywalking'
}
- Entry [ skywalking.sock_path <ALL> ]
- Current = '/tmp/sky-agent.sock'
+ Entry [ skywalking.authentication <ALL> ]
+ Current = ''
+ }
+ Entry [ skywalking.grpc <ALL> ]
+ Current = '127.0.0.1:11800'
+ }
+ Entry [ skywalking.grpc_tls_enable <ALL> ]
+ Current = '0'
+ }
+ Entry [ skywalking.grpc_tls_pem_root_certs <ALL> ]
+ Current = ''
+ }
+ Entry [ skywalking.grpc_tls_pem_private_key <ALL> ]
+ Current = ''
+ }
+ Entry [ skywalking.grpc_tls_pem_cert_chain <ALL> ]
+ Current = ''
}
}
- Functions {
- Function [ <internal:skywalking> function skywalking_get_trace_info ] {
-
- - Parameters [0] {
- }
+ Function [ <internal:skywalking> function skywalking_trace_id ] {
}
}
}
diff --git a/php-pecl-skywalking.spec b/php-pecl-skywalking.spec
index 862d83e..adc39f8 100644
--- a/php-pecl-skywalking.spec
+++ b/php-pecl-skywalking.spec
@@ -11,27 +11,35 @@
%scl_package php-pecl-skywalking
%endif
-%global pecl_name skywalking
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 40-%{pecl_name}.ini
+%global pecl_name skywalking
+# not supported by upstream
+%global with_zts 0
+%global ini_name 40-%{pecl_name}.ini
# TODO need investigation
%global with_tests 0%{?_with_tests:1}
Summary: The PHP instrument agent for Apache SkyWalking
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 3.3.2
+Version: 4.0.0
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/274.patch
+
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7.1
+BuildRequires: %{?scl_prefix}php-devel > 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-curl
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pcre
BuildRequires: libcurl-devel
+BuildRequires: protobuf-devel
+BuildRequires: protobuf-compiler
+# Missing in EPEL https://bugzilla.redhat.com/1757147
+BuildRequires: grpc-devel
+BuildRequires: grpc-plugins
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -49,19 +57,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -89,6 +94,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd NTS
+%patch0 -p1 -b .pr
+
: Check version
extver=$(sed -n '/#define PHP_SKYWALKING_VERSION /{s/.* "//;s/".*$//;p}' php_skywalking.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -111,7 +118,12 @@ extension=%{pecl_name}.so
;skywalking.enable = Off
;skywalking.version = 8
;skywalking.app_code = 'hello_skywalking'
-;skywalking.sock_path = '/tmp/sky-agent.sock'
+;skywalking.authentication = ''
+;skywalking.grpc = '127.0.0.1:11800'
+;skywalking.grpc_tls_enable = 0
+;skywalking.grpc_tls_pem_root_certs = ''
+;skywalking.grpc_tls_pem_private_key = ''
+;skywalking.grpc_tls_pem_cert_chain = ''
EOF
@@ -231,6 +243,11 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
%changelog
+* Thu Oct 15 2020 Remi Collet <remi@remirepo.net> - 4.0.0-1
+- update to 4.0.0
+- add patch to properly use cxx for link from
+ https://github.com/SkyAPM/SkyAPM-php-sdk/pull/274
+
* Fri Jun 5 2020 Remi Collet <remi@remirepo.net> - 3.3.2-1
- update to 3.3.2