summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-28 08:14:42 +0200
committerRemi Collet <remi@remirepo.net>2018-06-28 08:14:42 +0200
commit1fe91f9c6435be0e972eb2201e2c60dd7cd51d61 (patch)
treecde72098c9b64c3c90881528cd0db25552f26baa
parente9f715e3e70406ac5ec267acae0ce84221c4f414 (diff)
add upstream patch for PHP 7.3
-rw-r--r--PHPINFO10
-rw-r--r--REFLECTION2
-rw-r--r--edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e.patch52
-rw-r--r--php-pinba.spec11
4 files changed, 72 insertions, 3 deletions
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..4a46e5e
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,10 @@
+
+pinba
+
+Pinba support => enabled
+Extension version => 1.1.1
+
+Directive => Local Value => Master Value
+pinba.server => no value => no value
+pinba.enabled => 0 => 0
+pinba.auto_flush => 1 => 1
diff --git a/REFLECTION b/REFLECTION
index 3740131..ce0f99e 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 pinba version 1.1.1 ] {
+Extension [ <persistent> extension #122 pinba version 1.1.1 ] {
- INI {
Entry [ pinba.server <ALL> ]
diff --git a/edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e.patch b/edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e.patch
new file mode 100644
index 0000000..59a2338
--- /dev/null
+++ b/edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e.patch
@@ -0,0 +1,52 @@
+From edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e Mon Sep 17 00:00:00 2001
+From: Antony Dovgal <tony@daylessday.org>
+Date: Mon, 23 Apr 2018 12:26:50 +0300
+Subject: [PATCH] fix build with PHP master
+
+update news and current version
+---
+ NEWS | 4 ++++
+ php_pinba.h | 2 +-
+ pinba.c | 12 ++++++++++++
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/pinba.c b/pinba.c
+index 561b40c..a7b2ecf 100644
+--- a/pinba.c
++++ b/pinba.c
+@@ -1292,7 +1292,11 @@ static PHP_FUNCTION(pinba_timer_start)
+ timeval_cvt(&t->tmp_ru_stime, &u.ru_stime);
+ }
+ /* refcount++ so that the timer is shut down only on request finish if not stopped manually */
++#if PHP_VERSION_ID < 70300
+ GC_REFCOUNT(rsrc)++;
++#else
++ GC_ADDREF(rsrc);
++#endif
+ RETURN_RES(rsrc);
+ }
+ /* }}} */
+@@ -1351,7 +1355,11 @@ static PHP_FUNCTION(pinba_timer_add)
+ t->rsrc_id = rsrc->handle;
+
+ /* refcount++ so that the timer is shut down only on request finish if not stopped manually */
++#if PHP_VERSION_ID < 70300
+ GC_REFCOUNT(rsrc)++;
++#else
++ GC_ADDREF(rsrc);
++#endif
+ RETURN_RES(rsrc);
+ }
+ /* }}} */
+@@ -1808,7 +1816,11 @@ static PHP_FUNCTION(pinba_timers_get)
+ continue;
+ }
+ /* refcount++ */
++#if PHP_VERSION_ID < 70300
+ GC_REFCOUNT(rsrc)++;
++#else
++ GC_ADDREF(rsrc);
++#endif
+ add_next_index_resource(return_value, rsrc);
+ }
+ }
diff --git a/php-pinba.spec b/php-pinba.spec
index a0056eb..299268c 100644
--- a/php-pinba.spec
+++ b/php-pinba.spec
@@ -26,13 +26,15 @@ Version: 1.1.1
%if 0%{?gh_date:1}
Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: LGPLv2+
-Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+Patch0: https://github.com/tony2001/pinba_extension/commit/edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e.patch
+
+BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-tokenizer
@@ -71,6 +73,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
mv %{gh_project}-%{gh_commit} NTS
cd NTS
+%patch0 -p1 -b .up
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PINBA_VERSION/{s/.* "//;s/".*$//;p}' php_pinba.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
@@ -176,6 +180,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Jun 28 2018 Remi Collet <remi@remirepo.net> - 1.1.1-2
+- add upstream patch for PHP 7.3
+
* Thu Feb 1 2018 Remi Collet <remi@remirepo.net> - 1.1.1-1
- update to 1.1.1