summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--opencensus-tests.patch36
-rw-r--r--php-pecl-opencensus.spec35
3 files changed, 48 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/opencensus-tests.patch b/opencensus-tests.patch
new file mode 100644
index 0000000..fde5970
--- /dev/null
+++ b/opencensus-tests.patch
@@ -0,0 +1,36 @@
+From 294a85ebe3f183680ae0f8ad18f122afad588127 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 13 Sep 2022 09:18:32 +0200
+Subject: [PATCH] fix 8.2 deprecation
+
+---
+ ext/tests/basic_context.phpt | 2 +-
+ ext/tests/inherit_context.phpt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ext/tests/basic_context.phpt b/ext/tests/basic_context.phpt
+index 8f162aa26..832103e50 100644
+--- a/ext/tests/basic_context.phpt
++++ b/ext/tests/basic_context.phpt
+@@ -4,7 +4,7 @@ OpenCensus Trace: Basic Context Test
+ <?php
+
+ $res = opencensus_trace_set_context('traceid', 1234);
+-echo "Set context: ${res}\n";
++echo "Set context: {$res}\n";
+
+ $context = opencensus_trace_context();
+ $class = get_class($context);
+diff --git a/ext/tests/inherit_context.phpt b/ext/tests/inherit_context.phpt
+index be3965f42..4728a592f 100644
+--- a/ext/tests/inherit_context.phpt
++++ b/ext/tests/inherit_context.phpt
+@@ -4,7 +4,7 @@ OpenCensus Trace: Root inherits from context
+ <?php
+
+ $res = opencensus_trace_set_context('traceid', 1234);
+-echo "Set context: ${res}\n";
++echo "Set context: {$res}\n";
+
+ opencensus_trace_begin('root', []);
+ opencensus_trace_begin('inner', []);
diff --git a/php-pecl-opencensus.spec b/php-pecl-opencensus.spec
index fad8e56..a1795d4 100644
--- a/php-pecl-opencensus.spec
+++ b/php-pecl-opencensus.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-opencensus
#
-# Copyright (c) 2017-2021 Remi Collet
+# Copyright (c) 2017-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -11,7 +11,6 @@
%undefine _strict_symbol_defs_build
%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
%scl_package php-pecl-opencensus
%endif
@@ -28,13 +27,15 @@
#global upstream_prever RC2
Summary: A stats collection and distributed tracing framework
-Name: %{?sub_prefix}php-pecl-opencensus
+Name: %{?scl_prefix}php-pecl-opencensus
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: ASL 2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: %{pecl_name}-tests.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
# upstream say 7.0 but https://github.com/census-instrumentation/opencensus-php/issues/274
@@ -49,26 +50,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-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
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
%description
@@ -93,7 +74,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-sed -e 's/ZVAL_DESTRUCTOR/zval_dtor/' -i *.c
+%patch0 -p2
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_OPENCENSUS_VERSION/{s/.* "//;s/".*$//;p}' php_opencensus.h)
@@ -233,6 +214,10 @@ fi
%changelog
+* Tue Sep 13 2022 Remi Collet <remi@remirepo.net> - 0.3.0-3
+- add patch for test suite with PHP 8.2 from
+ https://github.com/census-instrumentation/opencensus-php/pull/286
+
* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 0.3.0-2
- rebuild for 8.1.0RC1