summaryrefslogtreecommitdiffstats
path: root/php-pecl-datadog-trace.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-06-15 15:52:14 +0200
committerRemi Collet <remi@php.net>2023-06-15 15:52:14 +0200
commit8e686507c7db25dd54dbb5c4ce7cd4d46dde6af1 (patch)
tree71099f9a8bbda00daff990d35137e47c85096e0f /php-pecl-datadog-trace.spec
parent5abf3ffd7c3e357e6e6f243e8b91057229673aed (diff)
update to 0.88.0
use vendored rust dependencies open https://github.com/DataDog/dd-trace-php/issues/2103 Cannot build OFFLINE
Diffstat (limited to 'php-pecl-datadog-trace.spec')
-rw-r--r--php-pecl-datadog-trace.spec42
1 files changed, 38 insertions, 4 deletions
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 <remi@remirepo.net> - 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 <remi@remirepo.net> - 0.87.2-1
- update to 0.87.2