summaryrefslogtreecommitdiffstats
path: root/php-pecl-datadog-trace.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-datadog-trace.spec')
-rw-r--r--php-pecl-datadog-trace.spec94
1 files changed, 65 insertions, 29 deletions
diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec
index 3118678..ac727b2 100644
--- a/php-pecl-datadog-trace.spec
+++ b/php-pecl-datadog-trace.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-datadog-trace
#
-# Copyright (c) 2019-2020 Remi Collet
+# Copyright (c) 2019-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -26,7 +26,7 @@
Summary: APM and distributed tracing for PHP
Name: %{?sub_prefix}php-pecl-datadog-trace
-Version: 0.48.2
+Version: 0.56.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
@@ -37,12 +37,15 @@ Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz
# ddtrace only supports 64-bit platforms
ExcludeArch: %{ix86} %{arm}
-%if 0%{?rhel} == 6
+%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
BuildRequires: devtoolset-6-toolchain
-%else
-BuildRequires: %{?dtsprefix}gcc
+%global dtsversion 6
+%global dtsenable source /opt/rh/devtoolset-6/enable
+%global dtsprefix devtoolset-6-
%endif
-BuildRequires: %{?scl_prefix}php-devel > 5.6
+BuildRequires: make
+BuildRequires: %{?dtsprefix}gcc
+BuildRequires: %{?scl_prefix}php-devel >= 5.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: curl-devel
# For tests
@@ -56,6 +59,9 @@ BuildRequires: %{?scl_prefix}php-posix
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
+%if "%{php_version}" > "8.0"
+Requires: %{?scl_prefix}php-curl%{?_isa}
+%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -68,21 +74,15 @@ Provides: %{?scl_prefix}php-pecl-%{safe_name}%{?_isa} = %{version}-%{rele
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{safe_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{safe_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{safe_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{safe_name} <= %{version}
%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
%endif
@@ -105,11 +105,11 @@ cd NTS
: PEAR installer stuff
sed -e 's:@php_dir@:%{pear_phpdir}:' \
-e 's:_BUILD_FROM_PECL_:1:' \
- -i src/ext/ddtrace.c
+ -i ext/php?/ddtrace.c
-cp src/ext/mpack/LICENSE LICENSE.mpack
+cp ext/vendor/mpack/LICENSE LICENSE.mpack
: Sanity check, really often broken
-extver=$(sed -n '/#define PHP_DDTRACE_VERSION /{s/.* "//;s/".*$//;p}' src/ext/version.h)
+extver=$(sed -n '/#define PHP_DDTRACE_VERSION /{s/.* "//;s/".*$//;p}' ext/version.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}.
exit 1
@@ -133,9 +133,6 @@ EOF
%build
-%if 0%{?rhel} == 6
-source /opt/rh/devtoolset-6/enable
-%endif
%{?dtsenable}
cd NTS
@@ -156,9 +153,6 @@ make %{?_smp_mflags}
%install
-%if 0%{?rhel} == 6
-source /opt/rh/devtoolset-6/enable
-%endif
%{?dtsenable}
make -C NTS install INSTALL_ROOT=%{buildroot}
@@ -189,34 +183,46 @@ done
# Erratic results
rm ?TS/tests/ext/segfault_backtrace_*.phpt
rm ?TS/tests/ext/sandbox/memory_limit_graceful_bailout.phpt
+%if "%{php_version}" > "8.0"
+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
+# DEP for ext dependencies, MOD for ext used in tests
+DEP=""
MOD="-n -d ddtrace.request_init_hook="
+%if "%{php_version}" > "8.0"
+[ -f %{php_extdir}/curl.so ] && DEP="$DEP -d extension=curl.so"
+%else
[ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so"
+%endif
[ -f %{php_extdir}/json.so ] && MOD="$MOD -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 \
+%{__php} --no-php-ini $DEP \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{_bindir}/php \
-TEST_PHP_ARGS="$MOD -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{_bindir}/php -n run-tests.php -q --show-diff
%if %{with_zts}
cd ../ZTS
: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
+%{__ztsphp} --no-php-ini $DEP \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$MOD -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q --show-diff
%endif
@@ -259,6 +265,36 @@ fi
%changelog
+* Fri Mar 5 2021 Remi Collet <remi@remirepo.net> - 0.56.0-1
+- update to 0.56.0
+
+* Fri Feb 5 2021 Remi Collet <remi@remirepo.net> - 0.55.0-1
+- update to 0.55.0
+- open https://github.com/DataDog/dd-trace-php/pull/1144
+ add missing dependency on curl extension for PHP 8
+
+* Thu Jan 21 2021 Remi Collet <remi@remirepo.net> - 0.54.0-1
+- update to 0.54.0
+
+* Thu Dec 31 2020 Remi Collet <remi@remirepo.net> - 0.53.0-1
+- update to 0.53.0
+
+* Tue Dec 1 2020 Remi Collet <remi@remirepo.net> - 0.52.0-1
+- update to 0.52.0
+
+* Wed Nov 18 2020 Remi Collet <remi@remirepo.net> - 0.51.0-1
+- update to 0.51.0
+
+* Fri Nov 6 2020 Remi Collet <remi@remirepo.net> - 0.50.0-1
+- update to 0.50.0
+
+* Thu Oct 15 2020 Remi Collet <remi@remirepo.net> - 0.49.0-1
+- update to 0.49.0
+- allow PHP 5.4 and 5.5
+
+* Tue Sep 22 2020 Remi Collet <remi@remirepo.net> - 0.48.3-1
+- update to 0.48.3
+
* Fri Sep 11 2020 Remi Collet <remi@remirepo.net> - 0.48.2-1
- update to 0.48.2