diff options
-rw-r--r-- | php-pecl-rrd-dev.spec | 13 | ||||
-rw-r--r-- | rrd-upstream.patch | 291 |
2 files changed, 6 insertions, 298 deletions
diff --git a/php-pecl-rrd-dev.spec b/php-pecl-rrd-dev.spec index 1b5d9d2..4cde1c5 100644 --- a/php-pecl-rrd-dev.spec +++ b/php-pecl-rrd-dev.spec @@ -21,22 +21,18 @@ %else %global ini_name 40-%{pecl_name}.ini %endif -%global prever beta2 +%global prever beta3 Summary: PHP Bindings for rrdtool Name: %{?scl_prefix}php-pecl-rrd Version: 2.0.0 -Release: 0.2.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 0.3.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/rrd Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz -# http://svn.php.net/viewvc?view=revision&revision=336981 -# http://svn.php.net/viewvc?view=revision&revision=336985 -Patch0: %{pecl_name}-upstream.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: rrdtool @@ -96,7 +92,6 @@ mv %{pecl_name}-%{version}%{?prever} NTS sed -e 's/role="test"/role="src"/' -i package.xml cd NTS -%patch0 -p3 -b .upstream # Sanity check, really often broken extver=$(sed -n '/#define PHP_RRD_VERSION/{s/.* "//;s/".*$//;p}' php_rrd.h) @@ -225,6 +220,10 @@ fi %changelog +* Sat Jun 27 2015 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.3.beta3 +- update to 2.0.0beta3 +- drop upstream patches + * Wed Jun 24 2015 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.2.beta2 - rebuild for "rh_layout" (php70) diff --git a/rrd-upstream.patch b/rrd-upstream.patch deleted file mode 100644 index 20d0f2b..0000000 --- a/rrd-upstream.patch +++ /dev/null @@ -1,291 +0,0 @@ ---- pecl/rrd/trunk/rrd_create.c 2015/06/16 16:14:28 336980 -+++ pecl/rrd/trunk/rrd_create.c 2015/06/16 16:20:26 336981 -@@ -102,9 +102,9 @@ - PHP_METHOD(RRDCreator, __construct) - { - rrd_create_object *intern_obj; -- char *path; int path_length; -+ char *path; size_t path_length; - /* better to set defaults for optional parameters */ -- char *start_time = NULL; int start_time_length = 0; -+ char *start_time = NULL; size_t start_time_length = 0; - long step = 0; - int argc = ZEND_NUM_ARGS(); - -@@ -146,7 +146,7 @@ - { - rrd_create_object *intern_obj; - char *desc, *rrd_source_desc; -- int desc_length; -+ size_t desc_length; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &desc, &desc_length) == FAILURE) { - return; -@@ -181,7 +181,7 @@ - { - rrd_create_object *intern_obj; - char *desc, *rrd_archive_desc; -- int desc_length; -+ size_t desc_length; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &desc, &desc_length) == FAILURE) { - return; -@@ -284,7 +284,7 @@ - PHP_FUNCTION(rrd_create) - { - char *filename; -- int filename_length; -+ size_t filename_length; - zval *zv_arr_options; - rrd_args *argv; - ---- pecl/rrd/trunk/rrd_graph.c 2015/06/16 16:14:28 336980 -+++ pecl/rrd/trunk/rrd_graph.c 2015/06/16 16:20:26 336981 -@@ -89,7 +89,7 @@ - { - rrd_graph_object *intern_obj; - char *path; -- int path_length; -+ size_t path_length; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &path, &path_length) == FAILURE) { - return; -@@ -294,7 +294,7 @@ - PHP_FUNCTION(rrd_graph) - { - char *filename; -- int filename_length; -+ size_t filename_length; - zval *zv_arr_options; - rrd_args *argv; - /* returned values if rrd_graph doesn't fail */ ---- pecl/rrd/trunk/rrd_info.c 2015/06/16 16:14:28 336980 -+++ pecl/rrd/trunk/rrd_info.c 2015/06/16 16:20:26 336981 -@@ -25,7 +25,7 @@ - PHP_FUNCTION(rrd_info) - { - char *filename; -- int filename_length; -+ size_t filename_length; - /* list of arguments for rrd_info call, it's more efficient then u - * usage of rrd_args, because there isn't array of arguments in parameters - */ ---- pecl/rrd/trunk/rrd_update.c 2015/06/16 16:14:28 336980 -+++ pecl/rrd/trunk/rrd_update.c 2015/06/16 16:20:26 336981 -@@ -83,7 +83,7 @@ - { - rrd_update_object *intern_obj; - char *path; -- int path_length; -+ size_t path_length; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &path, &path_length) == FAILURE) { - return; -@@ -107,7 +107,7 @@ - rrd_args *update_argv; - - char *time = NULL; -- int time_str_length = 0; -+ size_t time_str_length = 0; - - int argc = ZEND_NUM_ARGS(); - zend_string *zs_ds_name; -@@ -215,7 +215,7 @@ - PHP_FUNCTION(rrd_update) - { - char *filename; -- int filename_length; -+ size_t filename_length; - zval *zv_arr_options; - rrd_args *argv; - -Index: rrd_create.c -=================================================================== ---- pecl/rrd/trunk/rrd_create.c (révision 336981) -+++ pecl/rrd/trunk/rrd_create.c (copie de travail) -@@ -30,7 +30,6 @@ - of having dedicated creating/cloning/destruction functions - */ - typedef struct _rrd_create_object { -- zend_object std; - /** path to newly created rrd file */ - char *file_path; - /* "--start" parameters in rrd create */ -@@ -41,6 +40,7 @@ - zval zv_arr_data_sources; - /* "RRA" parameters in rrd create */ - zval zv_arr_archives; -+ zend_object std; - } rrd_create_object; - - /** -@@ -79,7 +79,7 @@ - static zend_object *rrd_create_object_new(zend_class_entry *ce) - { - rrd_create_object *intern_obj = ecalloc(1, sizeof(rrd_create_object) + -- sizeof(zval) * (ce->default_properties_count - 1)); -+ zend_object_properties_size(ce)); - intern_obj->file_path = NULL; - intern_obj->start_time = NULL; - ZVAL_UNDEF(&intern_obj->zv_step); -@@ -329,7 +329,7 @@ - PHP_ME(RRDCreator, save, NULL, ZEND_ACC_PUBLIC) - PHP_ME(RRDCreator, addDataSource, arginfo_rrdcreator_description, ZEND_ACC_PUBLIC) - PHP_ME(RRDCreator, addArchive, arginfo_rrdcreator_description, ZEND_ACC_PUBLIC) -- {NULL, NULL, NULL} -+ PHP_FE_END - }; - - /* minit hook, called from main module minit */ -Index: rrd_graph.c -=================================================================== ---- pecl/rrd/trunk/rrd_graph.c (révision 336981) -+++ pecl/rrd/trunk/rrd_graph.c (copie de travail) -@@ -32,9 +32,9 @@ - * of having dedicated creating/cloning/destruction functions - */ - typedef struct _rrd_graph_object { -- zend_object std; - char *file_path; - zval zv_arr_options; -+ zend_object std; - } rrd_graph_object; - - /** -@@ -69,7 +69,7 @@ - static zend_object *rrd_graph_object_new(zend_class_entry *ce) - { - rrd_graph_object *intern_obj = ecalloc(1, sizeof(rrd_graph_object) + -- sizeof(zval) * (ce->default_properties_count - 1)); -+ zend_object_properties_size(ce)); - intern_obj->file_path = NULL; - ZVAL_UNDEF(&intern_obj->zv_arr_options); - -@@ -370,7 +370,7 @@ - PHP_ME(RRDGraph, save, NULL, ZEND_ACC_PUBLIC) - PHP_ME(RRDGraph, saveVerbose, NULL, ZEND_ACC_PUBLIC) - PHP_ME(RRDGraph, setOptions, arginfo_rrd_options, ZEND_ACC_PUBLIC) -- {NULL, NULL, NULL} -+ PHP_FE_END - }; - - /* minit hook, called from main module minit */ -Index: rrd_update.c -=================================================================== ---- pecl/rrd/trunk/rrd_update.c (révision 336981) -+++ pecl/rrd/trunk/rrd_update.c (copie de travail) -@@ -31,9 +31,9 @@ - * of having dedicated creating/cloning/destruction functions - */ - typedef struct _rrd_update_object { -- zend_object std; - /** path to newly created rrd file */ - char *file_path; -+ zend_object std; - } rrd_update_object; - - /** -@@ -63,8 +63,8 @@ - */ - static zend_object *rrd_update_object_new(zend_class_entry *ce) - { -- rrd_update_object *intern_obj = ecalloc(1, sizeof(rrd_update_object) + -- sizeof(zval) * (ce->default_properties_count - 1)); -+ rrd_update_object *intern_obj = ecalloc(1, sizeof(rrd_update_object) + -+ zend_object_properties_size(ce)); - intern_obj->file_path = NULL; - - zend_object_std_init(&intern_obj->std, ce); -@@ -257,7 +257,7 @@ - static zend_function_entry rrd_update_methods[] = { - PHP_ME(RRDUpdater, __construct, arginfo_rrdupdater_construct, ZEND_ACC_PUBLIC) - PHP_ME(RRDUpdater, update, arginfo_rrdupdater_update, ZEND_ACC_PUBLIC) -- {NULL, NULL, NULL} -+ PHP_FE_END - }; - - /* minit hook, called from main module minit */ -@@ -271,5 +271,5 @@ - memcpy(&rrd_update_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - rrd_update_handlers.clone_obj = NULL; - rrd_update_handlers.offset = XtOffsetOf(rrd_update_object, std); -- rrd_update_handlers.free_obj = rrd_update_object_dtor; -+ rrd_update_handlers.free_obj = rrd_update_object_dtor; - } -Index: rrd.c -=================================================================== ---- pecl/rrd/trunk/rrd.c (revision 336979) -+++ pecl/rrd/trunk/rrd.c (working copy) -@@ -17,6 +17,9 @@ - #include "ext/standard/info.h" - - #include <rrd.h> -+#ifdef HAVE_RRDC_DISCONNECT -+#include <rrd_client.h> -+#endif - - #include "php_rrd.h" - #include "rrd_graph.h" -@@ -47,7 +50,7 @@ - PHP_FUNCTION(rrd_fetch) - { - char *filename; -- int filename_length; -+ size_t filename_length; - zval *zv_arr_options; - rrd_args *argv; - /* returned values if rrd_fetch doesn't fail */ -@@ -147,7 +150,7 @@ - PHP_FUNCTION(rrd_first) - { - char *filename; -- int filename_length; -+ size_t filename_length; - long rraindex = 0; - /* return value from rrd_first_r call */ - time_t rrd_first_return_val; -@@ -183,7 +186,7 @@ - PHP_FUNCTION(rrd_last) - { - char *filename; -- int filename_length; -+ size_t filename_length; - /* return value from rrd_first_r call */ - time_t rrd_last_return_val; - -@@ -212,7 +215,7 @@ - PHP_FUNCTION(rrd_lastupdate) - { - char *filename; -- int filename_length; -+ size_t filename_length; - /* list of arguments for rrd_lastupdate call, it's more efficient then - * usage of rrd_args, because there isn't array of arguments in parameters - */ -@@ -297,7 +300,7 @@ - PHP_FUNCTION(rrd_restore) - { - char *xml_filename, *rrd_filename; -- int xml_filename_length, rrd_filename_length; -+ size_t xml_filename_length, rrd_filename_length; - zval *zv_arr_options = NULL; - /* this is merge of options and rrd_filename. This is needed because - * rrd_args_init_by_phparray allows only one filename as argument, so -@@ -349,7 +352,7 @@ - PHP_FUNCTION(rrd_tune) - { - char *filename; -- int filename_length; -+ size_t filename_length; - zval *zv_arr_options; - rrd_args *argv; - -@@ -569,7 +572,7 @@ - PHP_FE(rrdc_disconnect, NULL) - #endif - PHP_FE(rrd_version, NULL) -- {NULL, NULL, NULL} -+ PHP_FE_END - }; - /* }}} */ - |