summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-11-03 07:16:50 +0100
committerRemi Collet <remi@php.net>2021-11-03 07:16:50 +0100
commit3d6ee752d177778a399bfa0c3e84b1f150921ba5 (patch)
tree44d4088f07659532f91ad43b661e1f010df0f72b
parent425bec7fa9d54e63568a40ae74167da66a3ad00f (diff)
update to 4.2.0
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION8
-rw-r--r--php-pecl-skywalking.spec12
-rw-r--r--skywalking-build.patch179
4 files changed, 199 insertions, 2 deletions
diff --git a/PHPINFO b/PHPINFO
index d338720..8784987 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -15,3 +15,5 @@ skywalking.log_enable => Off => Off
skywalking.log_path => /tmp/skywalking-php.log => /tmp/skywalking-php.log
skywalking.error_handler_enable => Off => Off
skywalking.mq_max_message_length => 20480 => 20480
+skywalking.sample_n_per_3_secs => -1 => -1
+skywalking.instance_name => no value => no value
diff --git a/REFLECTION b/REFLECTION
index 2788be2..32ff1c0 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 skywalking version 4.1.2 ] {
+Extension [ <persistent> extension #128 skywalking version 4.2.0 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -47,6 +47,12 @@ Extension [ <persistent> extension #120 skywalking version 4.1.2 ] {
Entry [ skywalking.mq_max_message_length <ALL> ]
Current = '20480'
}
+ Entry [ skywalking.sample_n_per_3_secs <ALL> ]
+ Current = '-1'
+ }
+ Entry [ skywalking.instance_name <ALL> ]
+ Current = ''
+ }
}
- Functions {
diff --git a/php-pecl-skywalking.spec b/php-pecl-skywalking.spec
index 6f44962..60ab0b6 100644
--- a/php-pecl-skywalking.spec
+++ b/php-pecl-skywalking.spec
@@ -20,12 +20,15 @@
Summary: The PHP instrument agent for Apache SkyWalking
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 4.1.3
+Version: 4.2.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}
+# Revert to old config.m4
+Patch0: %{pecl_name}-build.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -88,6 +91,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd NTS
+%patch0 -p1
: Check version
extver=$(sed -n '/#define PHP_SKYWALKING_VERSION /{s/.* "//;s/".*$//;p}' php_skywalking.h)
@@ -121,6 +125,9 @@ extension=%{pecl_name}.so
;skywalking.log_path = '/tmp/skywalking-php.log';
;skywalking.error_handler_enable = Off
;skywalking.mq_max_message_length = 20480
+;skywalking.sample_n_per_3_secs = -1
+;skywalking.instance_name = ''
+
EOF
@@ -241,6 +248,9 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
# TODO : missing grpc in EPEL
%changelog
+* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 4.2.0-1
+- update to 4.2.0
+
* Thu Aug 26 2021 Remi Collet <remi@remirepo.net> - 4.1.3-1
- update to 4.1.3
- open https://github.com/SkyAPM/SkyAPM-php-sdk/issues/429
diff --git a/skywalking-build.patch b/skywalking-build.patch
new file mode 100644
index 0000000..9d089c4
--- /dev/null
+++ b/skywalking-build.patch
@@ -0,0 +1,179 @@
+--- skywalking-4.2.0/config.m4 2021-11-03 02:32:29.000000000 +0100
++++ skywalking-4.1.2/config.m4 2021-04-30 06:50:56.000000000 +0200
+@@ -1,17 +1,8 @@
+ PHP_REQUIRE_CXX()
+ CXXFLAGS="$CXXFLAGS -Wall -std=c++11 -Wno-deprecated-register"
+
+-PHP_ARG_ENABLE([skywalking],
+- [whether to enable skywalking support],
+- [AS_HELP_STRING([--enable-skywalking],
+- [Enable skywalking support])],
+- [yes])
+-
+-PHP_ARG_WITH([grpc],,
+- [AS_HELP_STRING([[--with-grpc[=DIR]]],
+- [gRPC: gPRC support])],
+- [no],
+- [no])
++PHP_ARG_ENABLE(skywalking, whether to enable skywalking support,
++[ --enable-skywalking Enable skywalking support])
+
+ if test "$PHP_THREAD_SAFETY" == "yes"; then
+ AC_MSG_ERROR([skywalking does not support ZTS])
+@@ -46,80 +37,35 @@
+
+ if test "$PHP_SKYWALKING" != "no"; then
+
+- dnl grpc
+- if test "$PHP_GRPC" == "no"; then
+- AC_MSG_ERROR([skywalking extension requires gRPC extension, add --with-grpc=[DIR]])
+- fi
++ SEARCH_PATH="/usr/local /usr"
++ SEARCH_GRPC_FOR="/include/grpc/grpc.h"
++ SEARCH_PROTOBUF_FOR="/include/google/protobuf/message.h"
++
++ AC_MSG_CHECKING([for grpc and protobuf files in default path])
++ for i in $SEARCH_PATH ; do
++ if test -r $i/$SEARCH_GRPC_FOR; then
++ GRPC_DIR=$i
++ AC_MSG_RESULT(found in $i)
++ fi
+
+- SEARCH_GRPC_FOR="libgrpc.a libgpr.a libgrpc++.a libupb.a libaddress_sorting.a third_party/protobuf/libprotobuf.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/re2/libre2.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/status/libabsl_status.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/strings/libabsl_strings.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/strings/libabsl_strings_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/strings/libabsl_str_format_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/strings/libabsl_cord.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/numeric/libabsl_int128.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/types/libabsl_bad_optional_access.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/synchronization/libabsl_synchronization.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/synchronization/libabsl_graphcycles_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/base/libabsl_base.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/base/libabsl_throw_delegate.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/base/libabsl_raw_logging_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/base/libabsl_malloc_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/base/libabsl_spinlock_wait.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/time/libabsl_time.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/time/libabsl_time_zone.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/debugging/libabsl_symbolize.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/debugging/libabsl_stacktrace.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/abseil-cpp/absl/debugging/libabsl_debugging_internal.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/cares/cares/lib/libcares.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/boringssl-with-bazel/libssl.a"
+- SEARCH_GRPC_FOR="$SEARCH_GRPC_FOR third_party/boringssl-with-bazel/libcrypto.a"
+- AC_MSG_CHECKING([for grpc files in $PHP_GRPC path])
+- for i in $SEARCH_GRPC_FOR ; do
+- target=$PHP_GRPC/cmake/build/$i
+- if test -r $target; then
+- AC_MSG_RESULT(found in $target)
+- else
+- AC_MSG_ERROR([not found $target])
++ if test -r $i/$SEARCH_PROTOBUF_FOR; then
++ PROTOBUF_DIR=$i
++ AC_MSG_RESULT(found in $i)
+ fi
+ done
+
++ if test -z "$GRPC_DIR"; then
++ AC_MSG_RESULT([not found])
++ AC_MSG_ERROR([Please reinstall the grpc distribution])
++ fi
+
+- PHP_ADD_INCLUDE($PHP_GRPC/include)
+- PHP_ADD_INCLUDE($PHP_GRPC/third_party/protobuf/src)
+-
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/libgrpc++.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/libgrpc.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/libgpr.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/libupb.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/libaddress_sorting.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/protobuf/libprotobuf.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/re2/libre2.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/status/libabsl_status.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/strings/libabsl_strings.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/strings/libabsl_strings_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/strings/libabsl_str_format_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/strings/libabsl_cord.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/numeric/libabsl_int128.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/types/libabsl_bad_optional_access.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/synchronization/libabsl_synchronization.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/synchronization/libabsl_graphcycles_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/base/libabsl_base.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/base/libabsl_throw_delegate.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/base/libabsl_raw_logging_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/base/libabsl_malloc_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/base/libabsl_spinlock_wait.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/time/libabsl_time.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/time/libabsl_time_zone.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/debugging/libabsl_symbolize.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/debugging/libabsl_stacktrace.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/abseil-cpp/absl/debugging/libabsl_debugging_internal.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/cares/cares/lib/libcares.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/boringssl-with-bazel/libssl.a"
+- SKYWALKING_EXTRA_LDFLAGS="$SKYWALKING_EXTRA_LDFLAGS $PHP_GRPC/cmake/build/third_party/boringssl-with-bazel/libcrypto.a"
+- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SKYWALKING_EXTRA_LDFLAGS"
++ if test -z "$PROTOBUF_DIR"; then
++ AC_MSG_RESULT([not found])
++ AC_MSG_ERROR([Please reinstall the protobuf distribution])
++ fi
+
++ PHP_ADD_INCLUDE($GRPC_DIR/include)
++ PHP_ADD_INCLUDE($PROTOBUF_DIR/include)
+ LIBS="-lpthread $LIBS"
+
+ SKYWALKING_SHARED_LIBADD="-lpthread $SKYWALKING_SHARED_LIBADD"
+@@ -137,11 +83,38 @@
+ ;;
+ esac
+
+- AC_PATH_PROG(PROTOC, protoc, no, $PHP_GRPC/cmake/build/third_party/protobuf)
++
++
++ GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib}
++ PHP_ADD_LIBPATH($GRPC_LIBDIR)
++
++ PHP_CHECK_LIBRARY(gpr, gpr_now,
++ [
++ PHP_ADD_LIBRARY(gpr,, SKYWALKING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY(gpr)
++ AC_DEFINE(HAVE_GPRLIB,1,[ ])
++ ],[
++ AC_MSG_ERROR([wrong gpr lib version or lib not found])
++ ],[
++ -L$GRPC_LIBDIR
++ ])
++
++ PHP_CHECK_LIBRARY(grpc, grpc_channel_destroy,
++ [
++ PHP_ADD_LIBRARY(grpc,,SKYWALKING_SHARED_LIBADD)
++ PHP_ADD_LIBRARY(grpc++,,SKYWALKING_SHARED_LIBADD)
++ AC_DEFINE(HAVE_GRPCLIB,1,[ ])
++ ],[
++ AC_MSG_ERROR([wrong grpc lib version or lib not found])
++ ],[
++ -L$GRPC_LIBDIR
++ ])
++
++ AC_PATH_PROG(PROTOC, protoc, no)
+ if ! test -x "$PROTOC"; then
+ AC_MSG_ERROR([protoc command missing, please reinstall the protobuf distribution])
+ fi
+- AC_PATH_PROG(GRPC_CPP_PLUGIN, grpc_cpp_plugin, no, $PHP_GRPC/cmake/build)
++ AC_PATH_PROG(GRPC_CPP_PLUGIN, grpc_cpp_plugin, no)
+ if ! test -x "$GRPC_CPP_PLUGIN"; then
+ AC_MSG_ERROR([grpc_cpp_plugin command missing, please reinstall the grpc distribution])
+ fi
+@@ -153,6 +126,10 @@
+ $PROTOC -I src/protocol/v3 --grpc_out=src/network/v3 --plugin=protoc-gen-grpc=$GRPC_CPP_PLUGIN --cpp_out=src/network/v3 src/protocol/v3/management/*.proto
+ find src -name "*.grpc.pb.cc" | while read id; do mv $id ${id/.grpc/_grpc}; done
+
++ PROTOBUF_LIBDIR=$PROTOBUF_DIR/${PROTOBUF_LIB_SUBDIR-lib}
++ PHP_ADD_LIBPATH($PROTOBUF_LIBDIR)
++ PHP_ADD_LIBRARY(protobuf,,SKYWALKING_SHARED_LIBADD)
++ AC_DEFINE(HAVE_PROTOBUFLIB,1,[ ])
+
+ PHP_SUBST(SKYWALKING_SHARED_LIBADD)
+
+