From 5e4849bb98adc96e0ea1bc215c21e8725fdbe581 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Sun, 6 Apr 2008 03:41:21 +0000 Subject: [PATCH] - Fix use of rrd_update in php bindings (#437558) --- ...-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch | 12 ++++++++++++ rrdtool.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch diff --git a/rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch b/rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch new file mode 100644 index 0000000..7fb0ccd --- /dev/null +++ b/rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch @@ -0,0 +1,12 @@ +diff -Naurp rrdtool.orig/php4/rrdtool.c rrdtool/php4/rrdtool.c +--- rrdtool.orig/php4/rrdtool.c 2007-06-16 01:32:23.000000000 -0400 ++++ rrdtool/php4/rrdtool.c 2008-04-05 23:37:04.000000000 -0400 +@@ -381,7 +381,7 @@ PHP_FUNCTION(rrd_update) + argv[3] = estrdup(opt->value.str.val); + + optind = 0; opterr = 0; +- if ( rrd_update(3, &argv[1]) != -1 ) ++ if ( rrd_update(2, &argv[2]) != -1 ) + { + RETVAL_TRUE; + } diff --git a/rrdtool.spec b/rrdtool.spec index e34c31c..7575782 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -10,13 +10,14 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool Version: 1.3 -Release: 0.9.%{betaver}%{?dist} +Release: 0.10.%{betaver}%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ #Source0: http://oss.oetiker.ch/%{name}/pub/%{name}-%{version}.tar.gz Source0: http://oss.oetiker.ch/rrdtool/pub/beta/%{name}-%{version}%{betaver}.tar.gz Source1: php4-%{svnrev}.tar.gz +Patch1: rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: dejavu-lgc-fonts BuildRequires: gcc-c++, openssl-devel, freetype-devel @@ -140,6 +141,9 @@ The %{name}-ruby package includes RRDtool bindings for Ruby. %prep %setup -q -n %{name}-%{pretag} %{?with_php: -a 1} +%if %{with_php} +%patch1 -p1 +%endif # Fix to find correct python dir on lib64 %{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \ @@ -316,6 +320,9 @@ find examples/ -type f -exec chmod 0644 {} \; %endif %changelog +* Sat Apr 05 2008 Jarod Wilson 1.3.0-0.10.beta4 +- Fix use of rrd_update in php bindings (#437558) + * Mon Mar 3 2008 Tom "spot" Callaway 1.3.0-0.9.beta4 - rebuild for new perl (again)