summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-05-18 14:15:09 +0200
committerRemi Collet <fedora@famillecollet.com>2015-05-18 14:15:09 +0200
commit3f7a27e4fd8b3f523571ed24e7885fc872142b74 (patch)
treeb00021d3cb1f8cb024c0dc8674edcc6ed4f764ce
parent9c9e9ca8c10ffa3e294c5d113e49d664380e9f9f (diff)
php 5.6 - add failed test list
-rw-r--r--APM-config.patch8
-rw-r--r--APM-upstream.patch101
-rw-r--r--REFLECTION8
-rw-r--r--php-pecl-apm.spec26
4 files changed, 24 insertions, 119 deletions
diff --git a/APM-config.patch b/APM-config.patch
index 94fe6bc..7332b68 100644
--- a/APM-config.patch
+++ b/APM-config.patch
@@ -9,7 +9,7 @@
; Application identifier, helps identifying which application is being monitored
; apm.application_id="My application"
; Enable the capture of events such as errors, notices, warnings,...
-@@ -26,7 +26,7 @@
+@@ -29,7 +29,7 @@
; SQLite configuration
; Whether to enable the sqlite driver
@@ -18,7 +18,7 @@
; Whether to collect stats for the sqlite driver (ATTENTION: Has an impact on performance!)
; apm.sqlite_stats_enabled=Off
; Error reporting level specific to the sqlite driver
-@@ -46,7 +46,7 @@
+@@ -49,7 +49,7 @@
; MySQL configuration
; Whether to enable the mysql driver
@@ -27,7 +27,7 @@
; Whether to collect stats for the mysql driver (ATTENTION: Has an impact on performance!)
; apm.mysql_stats_enabled=Off
; Error reporting level specific to the mysql driver
-@@ -68,7 +68,7 @@
+@@ -71,7 +71,7 @@
; StatsD configuration
; Whether to enable the statsd driver
@@ -36,7 +36,7 @@
; Whether to collect stats for the StatsD driver
; apm.statsd_stats_enabled=On
; Host of the statsd server
-@@ -78,7 +78,7 @@
+@@ -81,7 +81,7 @@
; Socket configuration
; Whether to enable the socket driver
diff --git a/APM-upstream.patch b/APM-upstream.patch
deleted file mode 100644
index 5d30be7..0000000
--- a/APM-upstream.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 922a92ba1f0fd0b771082b8d998003ebd60415e9 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Tue, 10 Mar 2015 08:18:34 +0100
-Subject: [PATCH] fix version reported in reflection
-
----
- apm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/apm.c b/apm.c
-index 8fae308..b9ddb51 100644
---- a/apm.c
-+++ b/apm.c
-@@ -115,7 +115,7 @@ zend_module_entry apm_module_entry = {
- PHP_RSHUTDOWN(apm),
- PHP_MINFO(apm),
- #if ZEND_MODULE_API_NO >= 20010901
-- "0.1.0",
-+ PHP_APM_VERSION,
- #endif
- PHP_MODULE_GLOBALS(apm),
- PHP_GINIT(apm),
-From c26e0d88df157f1ac5386c15036023f6954fd2c4 Mon Sep 17 00:00:00 2001
-From: Patrick Allaert <pa@ez.no>
-Date: Tue, 10 Mar 2015 16:33:31 +0100
-Subject: [PATCH] Fixed: global 'apm.enabled' switch not taken into account
- everywhere (thx @remicollet)
-
----
- driver_socket.c | 2 +-
- driver_sqlite3.c | 14 ++++++++------
- driver_statsd.c | 8 ++++++++
- 3 files changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/driver_socket.c b/driver_socket.c
-index 39daca5..40fcdd4 100644
---- a/driver_socket.c
-+++ b/driver_socket.c
-@@ -115,7 +115,7 @@ int apm_driver_socket_rshutdown(TSRMLS_D)
- struct addrinfo hints, *servinfo;
- char host[1024], *port;
-
-- if (!APM_G(socket_enabled)) {
-+ if (!(APM_G(enabled) && APM_G(socket_enabled))) {
- return SUCCESS;
- }
-
-diff --git a/driver_sqlite3.c b/driver_sqlite3.c
-index 4b0c4ef..f9bbe10 100644
---- a/driver_sqlite3.c
-+++ b/driver_sqlite3.c
-@@ -74,15 +74,17 @@ static int perform_db_access_checks(const char *path TSRMLS_DC)
-
- PHP_INI_MH(OnUpdateDBFile)
- {
-- if (new_value && new_value_length > 0) {
-- snprintf(APM_G(sqlite3_db_file), MAXPATHLEN, "%s/%s", new_value, DB_FILE);
-- disconnect(TSRMLS_C);
-+ if (APM_G(enabled) && APM_G(sqlite3_enabled)) {
-+ if (new_value && new_value_length > 0) {
-+ snprintf(APM_G(sqlite3_db_file), MAXPATHLEN, "%s/%s", new_value, DB_FILE);
-+ disconnect(TSRMLS_C);
-
-- if (perform_db_access_checks(new_value TSRMLS_CC) == FAILURE) {
-+ if (perform_db_access_checks(new_value TSRMLS_CC) == FAILURE) {
-+ APM_G(sqlite3_enabled) = 0;
-+ }
-+ } else {
- APM_G(sqlite3_enabled) = 0;
- }
-- } else {
-- APM_G(sqlite3_enabled) = 0;
- }
- return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
- }
-diff --git a/driver_statsd.c b/driver_statsd.c
-index a92c80a..4527d5e 100644
---- a/driver_statsd.c
-+++ b/driver_statsd.c
-@@ -110,6 +110,10 @@ int apm_driver_statsd_minit(int module_number TSRMLS_DC)
- struct addrinfo hints;
- char port[8];
-
-+ if (!(APM_G(enabled) && APM_G(statsd_enabled))) {
-+ return SUCCESS;
-+ }
-+
- memset(&hints, 0, sizeof hints);
- hints.ai_family = AF_INET;
- hints.ai_socktype = SOCK_DGRAM;
-@@ -129,6 +133,10 @@ int apm_driver_statsd_rinit(TSRMLS_D)
-
- int apm_driver_statsd_mshutdown(SHUTDOWN_FUNC_ARGS)
- {
-+ if (!(APM_G(enabled) && APM_G(statsd_enabled))) {
-+ return SUCCESS;
-+ }
-+
- freeaddrinfo(APM_G(statsd_servinfo));
-
- return SUCCESS;
diff --git a/REFLECTION b/REFLECTION
index 6f0f344..f80dfdb 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,7 +1,7 @@
-Extension [ <persistent> extension #171 apm version 2.0.2 ] {
+Extension [ <persistent> extension #180 apm version 2.0.3 ] {
- INI {
- Entry [ apm.enabled <ALL> ]
+ Entry [ apm.enabled <SYSTEM> ]
Current = ''
}
Entry [ apm.application_id <ALL> ]
@@ -32,7 +32,7 @@ Extension [ <persistent> extension #171 apm version 2.0.2 ] {
Current = '10'
}
Entry [ apm.dump_max_depth <ALL> ]
- Current = '4'
+ Current = '1'
}
Entry [ apm.sqlite_enabled <PERDIR> ]
Current = ''
@@ -50,7 +50,7 @@ Extension [ <persistent> extension #171 apm version 2.0.2 ] {
Current = '100'
}
Entry [ apm.sqlite_db_path <ALL> ]
- Current = '/var/php/apm/db'
+ Current = '/var/lib/php/apm/db'
}
Entry [ apm.sqlite_process_silenced_events <PERDIR> ]
Current = '1'
diff --git a/php-pecl-apm.spec b/php-pecl-apm.spec
index b72bbe2..9b9e137 100644
--- a/php-pecl-apm.spec
+++ b/php-pecl-apm.spec
@@ -1,4 +1,4 @@
-# spec file for php-pecl-apm
+# remirepo spec file for php-pecl-apm
#
# Copyright (c) 2015 Remi Collet
# License: CC-BY-SA
@@ -38,14 +38,12 @@
Name: %{?scl_prefix}php-pecl-apm
Summary: Alternative PHP Monitor
-Version: 2.0.2
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 2.0.3
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz
# Disable the extension and drivers by default
Patch0: %{proj_name}-config.patch
-# Upstream patches
-Patch1: %{proj_name}-upstream.patch
License: PHP
Group: Development/Languages
@@ -61,8 +59,6 @@ BuildRequires: sqlite-devel >= 3.6
BuildRequires: mysql-devel
BuildRequires: zlib-devel
-Requires(post): %{__pecl}
-Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
@@ -122,7 +118,7 @@ mv %{proj_name}-%{version} NTS
cd NTS
%patch0 -p0 -b .rpm
-%patch1 -p1 -b .upstream
+sed -e 's:/var/php/apm/db:%{_localstatedir}/lib/php/apm/db:' -i apm.ini
: Sanity check, really often broken
extver=$(sed -n '/#define PHP_APM_VERSION/{s/.* "//;s/".*$//;p}' php_apm.h)
@@ -182,6 +178,9 @@ install -D -m 644 ZTS/apm.ini %{buildroot}%{php_ztsinidir}/%{ini_name}
# Install the package XML file
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+# Default database dir
+install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/apm/db
+
cd NTS
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i
@@ -237,6 +236,8 @@ fi
%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{proj_name}
%{pecl_xmldir}/%{name}.xml
+%dir %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/apm
+%dir %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/apm/db
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -248,12 +249,17 @@ fi
%changelog
+* Mon May 18 2015 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
+- Update to 2.0.3 (stable)
+- drop runtime dependency on pear, new scriptlets
+- provide /var/lib/php/apm/db directory
+
* Tue Mar 10 2015 Remi Collet <remi@fedoraproject.org> - 2.0.2-2
- upstream patches
- fix provided configuration
* Tue Mar 10 2015 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
-- Update to 2.0.2
+- Update to 2.0.2 (stable)
- drop sub package, apm-web is now a separate project
- enable ZTS extension
@@ -264,7 +270,7 @@ fi
- fix permission of configuration file
* Sat Feb 21 2015 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
-- initial package, version 2.0.0
+- initial package, version 2.0.0 (stable)
- open upstream bugs:
https://github.com/patrickallaert/php-apm/issues/10 - configure
https://github.com/patrickallaert/php-apm/issues/11 - bad version