diff options
author | Remi Collet <remi@remirepo.net> | 2023-07-17 16:45:00 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-07-17 16:45:00 +0200 |
commit | 5cf4dd1d3ebdf374ec3121e5993ecfbe12f07e33 (patch) | |
tree | a83e9f851057f9bfaaf524b5dbd53332ae12ff4e /php-pecl-datadog-trace.spec | |
parent | 524b821019e16c578609d6f367fd1949e2df9095 (diff) |
update to 0.90.0
build out of sources tree
Diffstat (limited to 'php-pecl-datadog-trace.spec')
-rw-r--r-- | php-pecl-datadog-trace.spec | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec index 3bc57b4..28b95ce 100644 --- a/php-pecl-datadog-trace.spec +++ b/php-pecl-datadog-trace.spec @@ -22,12 +22,14 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini +%global sources %{proj_name}-%{version} +%global _configure ../%{sources}/configure %bcond_without tests Summary: APM and distributed tracing for PHP Name: %{?scl_prefix}php-pecl-datadog-trace -Version: 0.89.0 +Version: 0.90.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 @@ -86,14 +88,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -a2 -mv %{proj_name}-%{version} NTS # Don't install tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS +cd %{sources} : PEAR installer stuff sed -e 's:@php_dir@:%{pear_phpdir}:' \ -e 's:_BUILD_FROM_PECL_:1:' \ @@ -127,17 +128,14 @@ replace-with = "vendored-sources" [source.vendored-sources] directory = "$(dirname $PWD)/mycargo" 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 +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -158,8 +156,10 @@ EOF source /opt/%{scl_vendor}/%{scl}/enable %endif -cd NTS +cd %{sources} %{__phpize} + +cd ../NTS %configure \ --enable-ddtrace \ --with-php-config=%{__phpconfig} @@ -167,7 +167,6 @@ make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{__ztsphpize} %configure \ --enable-ddtrace \ --with-php-config=%{__ztsphpconfig} @@ -193,28 +192,29 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # PEAR stuff -mkdir -p %{buildroot}%{pear_phpdir}/datadog_trace/ -cp -pr NTS/bridge %{buildroot}%{pear_phpdir}/datadog_trace/bridge +mkdir -p %{buildroot}%{pear_phpdir}/datadog_trace/ +cp -pr %{sources}/bridge %{buildroot}%{pear_phpdir}/datadog_trace/bridge # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check +cd %{sources} export DD_TRACE_CLI_ENABLED=1 # Erratic results -rm ?TS/tests/ext/segfault_backtrace_*.phpt -rm ?TS/tests/ext/sandbox/memory_limit_graceful_bailout.phpt +rm tests/ext/segfault_backtrace_*.phpt +rm tests/ext/sandbox/memory_limit_graceful_bailout.phpt %if "%{php_version}" > "8.0" -rm ?TS/tests/ext/sandbox/fatal_errors_are_tracked_005.phpt +rm tests/ext/sandbox/fatal_errors_are_tracked_005.phpt %endif # XFAIL -find ?TS/tests/ -type f -exec grep -q -- '--XFAIL--' {} \; -delete -print +find tests/ -type f -exec grep -q -- '--XFAIL--' {} \; -delete -print # https://github.com/DataDog/dd-trace-php/issues/2115 -rm -r ?TS/tests/ext/telemetry +rm -r tests/ext/telemetry # DEP for ext dependencies, MOD for ext used in tests DEP="" @@ -227,7 +227,6 @@ MOD="-n -d ddtrace.request_init_hook=" [ -f %{php_extdir}/json.so ] && DEP="$DEP -d extension=json.so" [ -f %{php_extdir}/posix.so ] && MOD="$MOD -d extension=posix.so" -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini $DEP \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -236,13 +235,12 @@ cd NTS %if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{_bindir}/php \ -TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{_bindir}/php -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini $DEP \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ @@ -272,7 +270,7 @@ fi %files %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license NTS/LICENSE*} +%{?_licensedir:%license %{sources}/LICENSE*} %dir %{pear_phpdir}/datadog_trace %{pear_phpdir}/datadog_trace/bridge @@ -287,6 +285,10 @@ fi %changelog +* Mon Jul 17 2023 Remi Collet <remi@remirepo.net> - 0.90.0-1 +- update to 0.90.0 +- build out of sources tree + * Tue Jul 4 2023 Remi Collet <remi@remirepo.net> - 0.89.0-1 - update to 0.89.0 |