From 8e686507c7db25dd54dbb5c4ce7cd4d46dde6af1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 15 Jun 2023 15:52:14 +0200 Subject: update to 0.88.0 use vendored rust dependencies open https://github.com/DataDog/dd-trace-php/issues/2103 Cannot build OFFLINE --- PHPINFO | 15 +++++++++------ REFLECTION | 13 +++++++++++-- makedeps.sh | 21 +++++++++++++++++++++ php-pecl-datadog-trace.spec | 42 ++++++++++++++++++++++++++++++++++++++---- 4 files changed, 79 insertions(+), 12 deletions(-) create mode 100755 makedeps.sh diff --git a/PHPINFO b/PHPINFO index 2128031..115b2a7 100644 --- a/PHPINFO +++ b/PHPINFO @@ -7,14 +7,14 @@ For help, check out the documentation at https://docs.datadoghq.com/tracing/lang (c) Datadog 2020 Datadog tracing support => disabled -Version => 0.87.2 +Version => 0.88.0 DATADOG TRACER CONFIGURATION => { - "date": "2023-05-19T13:32:14Z", - "os_name": "Linux builder.remirepo.net 6.2.15-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 11 15:56:33 UTC 2023 x86_64", - "os_version": "6.2.15-200.fc37.x86_64", - "version": "0.87.2", + "date": "2023-06-15T13:08:11Z", + "os_name": "Linux builder.remirepo.net 6.3.7-100.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 9 15:21:15 UTC 2023 x86_64", + "os_version": "6.3.7-100.fc37.x86_64", + "version": "0.88.0", "lang": "php", - "lang_version": "8.1.19", + "lang_version": "8.1.20", "env": null, "enabled": true, "service": null, @@ -76,6 +76,7 @@ datadog.trace.cli_enabled => Off => Off datadog.trace.measure_compile_time => On => On datadog.trace.debug => Off => Off datadog.trace.enabled => Off => On +datadog.trace.telemetry_enabled => Off => Off datadog.trace.health_metrics_enabled => Off => Off datadog.trace.health_metrics_heartbeat_sample_rate => 0.001 => 0.001 datadog.trace.db_client_split_by_instance => Off => Off @@ -84,6 +85,8 @@ datadog.trace.redis_client_split_by_host => Off => Off datadog.trace.memory_limit => no value => no value datadog.trace.report_hostname => Off => Off datadog.trace.flush_collect_cycles => Off => Off +datadog.trace.remove_root_span_laravel_queue => On => On +datadog.trace.remove_autoinstrumentation_orphans => Off => Off datadog.trace.resource_uri_fragment_regex => no value => no value datadog.trace.resource_uri_mapping_incoming => no value => no value datadog.trace.resource_uri_mapping_outgoing => no value => no value diff --git a/REFLECTION b/REFLECTION index 74446ce..864b25c 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #122 ddtrace version 0.87.2 ] { +Extension [ extension #122 ddtrace version 0.88.0 ] { - Dependencies { Dependency [ json (Required) ] @@ -85,6 +85,9 @@ Extension [ extension #122 ddtrace version 0.87.2 ] { Current = '0' Default = 'true' } + Entry [ datadog.trace.telemetry_enabled ] + Current = 'false' + } Entry [ datadog.trace.health_metrics_enabled ] Current = 'false' } @@ -109,6 +112,12 @@ Extension [ extension #122 ddtrace version 0.87.2 ] { Entry [ datadog.trace.flush_collect_cycles ] Current = 'false' } + Entry [ datadog.trace.remove_root_span_laravel_queue ] + Current = 'true' + } + Entry [ datadog.trace.remove_autoinstrumentation_orphans ] + Current = 'false' + } Entry [ datadog.trace.resource_uri_fragment_regex ] Current = '' } @@ -723,7 +732,7 @@ Extension [ extension #122 ddtrace version 0.87.2 ] { Constant [ int DDTrace\DBM_PROPAGATION_DISABLED ] { 0 } Constant [ int DDTrace\DBM_PROPAGATION_SERVICE ] { 1 } Constant [ int DDTrace\DBM_PROPAGATION_FULL ] { 2 } - Constant [ string DD_TRACE_VERSION ] { 0.87.2 } + Constant [ string DD_TRACE_VERSION ] { 0.88.0 } Constant [ int DD_TRACE_PRIORITY_SAMPLING_AUTO_KEEP ] { 1 } Constant [ int DD_TRACE_PRIORITY_SAMPLING_AUTO_REJECT ] { 0 } Constant [ int DD_TRACE_PRIORITY_SAMPLING_USER_KEEP ] { 2 } diff --git a/makedeps.sh b/makedeps.sh new file mode 100755 index 0000000..a11cb39 --- /dev/null +++ b/makedeps.sh @@ -0,0 +1,21 @@ +#!/bin/sh +EXT=datadog_trace + +if [ $# -lt 1 ]; then + echo usage $0 version + exit 0 +fi +if [ -f $EXT-$1.tgz ]; then + echo "+ Unpack" + tar xf $EXT-$1.tgz $EXT-$1 + + pushd $EXT-$1 + echo "+ Fetch" + cargo vendor mycargo + + echo "+ Pack" + tar czf ../$EXT-deps-$1.tgz mycargo + popd +else + echo $EXT-$version.tgz missing +fi diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec index 537ea13..c5e6d6e 100644 --- a/php-pecl-datadog-trace.spec +++ b/php-pecl-datadog-trace.spec @@ -10,6 +10,7 @@ %scl_package php-pecl-datadog-trace %else %global _root_libdir %{_libdir} +%global _root_bindir %{_bindir} %endif # Defined in Fedora >= 37 and RHEL >= 10, in PHP >= 7.4 for remirepo @@ -32,13 +33,16 @@ Summary: APM and distributed tracing for PHP Name: %{?scl_prefix}php-pecl-datadog-trace -Version: 0.87.2 +Version: 0.88.0 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # extension is dual-licensed under Apache 2.0 or BSD3. # mpack is MIT License: (Apache-2.0 OR BSD-3-Clause) AND MIT URL: https://pecl.php.net/package/%{proj_name} Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz +# awfull hack, use a bundled rust registry +Source1: makedeps.sh +Source2: %{proj_name}-deps-%{version}.tgz # ddtrace only supports 64-bit platforms ExcludeArch: %{ix86} %{arm} @@ -50,6 +54,7 @@ BuildRequires: devtoolset-6-toolchain %global dtsprefix devtoolset-6- %endif BuildRequires: make +BuildRequires: cargo >= 1.60 BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-devel < 8.3 @@ -86,7 +91,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -q -c +%setup -q -c -a2 mv %{proj_name}-%{version} NTS # Don't install tests @@ -107,8 +112,30 @@ if test "x${extver}" != "x%{version}"; then : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi + +: Create cargo configuration to use vendor directory +mkdir .cargo +cat << EOF | tee .cargo/config.toml +[build] +rustc = "%{_root_bindir}/rustc" + +[env] +CFLAGS = "%{build_cflags}" +CXXFLAGS = "%{build_cxxflags}" +LDFLAGS = "%{build_ldflags}" + +[term] +verbose = true + +EOF + +: Parallel build +sed -e 's/(DDTRACE_CARGO) build /(DDTRACE_CARGO) build %{?_smp_mflags}/' -i config.m4 cd .. +: Required rust version +grep -h rust-version mycargo/*/Cargo.toml | sort -u | tail -n 8 + %if %{with_zts} # Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS @@ -183,8 +210,9 @@ rm ?TS/tests/ext/sandbox/memory_limit_graceful_bailout.phpt rm ?TS/tests/ext/sandbox/fatal_errors_are_tracked_005.phpt %endif # XFAIL -rm ?TS/tests/ext/sandbox/hook_function/01.phpt -rm ?TS/tests/ext/sandbox/hook_method/01.phpt +find ?TS/tests/ -type f -exec grep -q -- '--XFAIL--' {} \; -delete -print +# backtrace only +rm ?TS/tests/ext/telemetry/config.phpt # DEP for ext dependencies, MOD for ext used in tests DEP="" @@ -257,6 +285,12 @@ fi %changelog +* Thu Jun 15 2023 Remi Collet - 0.88.0-1 +- update to 0.88.0 +- use vendored rust dependencies +- open https://github.com/DataDog/dd-trace-php/issues/2103 + Cannot build OFFLINE + * Fri May 19 2023 Remi Collet - 0.87.2-1 - update to 0.87.2 -- cgit