summaryrefslogtreecommitdiffstats
path: root/php-pecl-skywalking.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-skywalking.spec')
-rw-r--r--php-pecl-skywalking.spec105
1 files changed, 53 insertions, 52 deletions
diff --git a/php-pecl-skywalking.spec b/php-pecl-skywalking.spec
index ae3b11e..6558781 100644
--- a/php-pecl-skywalking.spec
+++ b/php-pecl-skywalking.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-skywalking
#
-# Copyright (c) 2019-2021 Remi Collet
+# Copyright (c) 2019-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -15,17 +15,25 @@
# not supported by upstream
%global with_zts 0
%global ini_name 40-%{pecl_name}.ini
-# TODO need investigation
-%bcond_with tests
Summary: The PHP instrument agent for Apache SkyWalking
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 5.0.0
+Version: 5.0.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}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+# awfull hack, use a bundled rust registry
+Source1: makedeps.sh
+Source2: https://pecl.php.net/get/%{pecl_name}-deps-%{version}.tgz
+
+%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
+BuildRequires: devtoolset-6-toolchain
+%global dtsversion 6
+%global dtsenable source /opt/rh/devtoolset-6/enable
+%global dtsprefix devtoolset-6-
+%endif
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -34,12 +42,30 @@ BuildRequires: %{?scl_prefix}php-curl
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pcre
BuildRequires: libcurl-devel
-BuildRequires: protobuf-devel
-BuildRequires: protobuf-compiler
-BuildRequires: boost-devel
-# Missing in EPEL https://bugzilla.redhat.com/1757147
-BuildRequires: grpc-devel
-BuildRequires: grpc-plugins
+BuildRequires: cargo
+BuildRequires: rustfmt
+# Using system rust registry
+#BuildRequires: (crate(anyhow/default) >= 1.0.57 with crate(anyhow/default) < 2.0.0~)
+#BuildRequires: (crate(cbindgen/default) >= 0.23.0 with crate(cbindgen/default) < 0.24.0~)
+#BuildRequires: (crate(futures-util/default) >= 0.3.21 with crate(futures-util/default) < 0.4.0~)
+#BuildRequires: (crate(gethostname/default) >= 0.2.3 with crate(gethostname/default) < 0.3.0~)
+#*************: (crate(ipc-channel/default) >= 0.16.0 with crate(ipc-channel/default) < 0.17.0~)
+#*************: (crate(local-ip-address/default) >= 0.4.4 with crate(local-ip-address/default) < 0.5.0~)
+#BuildRequires: (crate(log/default) >= 0.4.1 with crate(log/default) < 0.5.0~)
+#BuildRequires: (crate(prost-derive/default) >= 0.8.0 with crate(prost-derive/default) < 0.9.0~)
+#BuildRequires: (crate(prost/default) >= 0.8.0 with crate(prost/default) < 0.9.0~)
+#BuildRequires: (crate(rand/default) >= 0.8.5 with crate(rand/default) < 0.9.0~)
+#BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)
+#BuildRequires: (crate(serde/serde_derive) >= 1.0.0 with crate(serde/serde_derive) < 2.0.0~)
+#BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0~)
+#BuildRequires: (crate(simplelog/default) >= 0.12.0 with crate(simplelog/default) < 0.13.0~)
+#BuildRequires: (crate(tokio/default) >= 1.0.0 with crate(tokio/default) < 2.0.0~)
+#BuildRequires: (crate(tokio/full) >= 1.0.0 with crate(tokio/full) < 2.0.0~)
+#*************: (crate(tonic-build/default) >= 0.5.2 with crate(tonic-build/default) < 0.6.0~)
+#*************: (crate(tonic/default) >= 0.5.2 with crate(tonic/default) < 0.6.0~)
+#BuildRequires: (crate(uuid/default) >= 1.0.0 with crate(uuid/default) < 2.0.0~)
+#BuildRequires: (crate(uuid/v4) >= 1.0.0 with crate(uuid/v4) < 2.0.0~)
+#BuildRequires: rust-packaging
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -57,19 +83,6 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
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
The package is the PHP instrumentation agent, which is compatible with
@@ -79,7 +92,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -c
+%setup -q -c -a2
mv %{pecl_name}-%{version} NTS
# Don't install/register tests
@@ -108,20 +121,23 @@ extension=%{pecl_name}.so
; Configuration
;skywalking.enable = Off
-;skywalking.version = 8
-;skywalking.app_code = 'hello_skywalking'
-;skywalking.authentication = ''
-;skywalking.grpc = '127.0.0.1:11800'
+;skywalking.service = 'hello_skywalking'
+;skywalking.service_instance = ''
+;skywalking.oap_version = '9.0.0'
+;skywalking.oap_cross_process_protocol = '3.0'
+;skywalking.oap_authentication = ''
+;skywalking.grpc_address = '127.0.0.1:11800'
;skywalking.grpc_tls_enable = Off
;skywalking.grpc_tls_pem_root_certs = ''
;skywalking.grpc_tls_pem_private_key = ''
;skywalking.grpc_tls_pem_cert_chain = ''
-;skywalking.log_enable = Off
+;skywalking.log_level = 'disable'
;skywalking.log_path = '/tmp/skywalking-php.log';
+;skywalking.curl_response_enable = Off
;skywalking.error_handler_enable = Off
;skywalking.mq_max_message_length = 20480
+;skywalking.mq_unique = 0
;skywalking.sample_n_per_3_secs = -1
-;skywalking.instance_name = ''
EOF
@@ -129,6 +145,8 @@ EOF
%build
%{?dtsenable}
+export CARGO_HOME=$PWD/mycargo
+
cd NTS
%{_bindir}/phpize
%configure \
@@ -206,26 +224,6 @@ OPT="-n -d extension=curl.so -d extension=json.so"
--modules | grep %{pecl_name}
%endif
-%if %{with tests}
-: Upstream test suite for NTS extension
-cd NTS
-TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-NO_INTERACTION=1 \
-TEST_PHP_EXECUTABLE=%{__php} \
-%{__php} -n run-tests.php --show-diff
-
-%if %{with_zts}
-: Upstream test suite for ZTS extension
-cd ../ZTS
-TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-NO_INTERACTION=1 \
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-%{__ztsphp} -n run-tests.php --show-diff
-%endif
-%endif
-
%files
%{?_licensedir:%license NTS/LICENSE}
@@ -240,9 +238,12 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
%{php_ztsextdir}/%{pecl_name}.so
%endif
-# TODO : missing grpc in EPEL
%changelog
+* Thu Jun 30 2022 Remi Collet <remi@remirepo.net> - 5.0.1-1
+- update to 5.0.1
+- use bundled rust registry
+
* Mon Jun 27 2022 Remi Collet <remi@remirepo.net> - 5.0.0-1
- update to 5.0.0
- open https://github.com/SkyAPM/SkyAPM-php-sdk/issues/493