From 126afa2e0c9f707166f31b3ef78471b68e1a0a04 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Wed, 2 Aug 2006 14:43:17 +0000 Subject: [PATCH] - One more addition to initrrdtool patch, to fully revert and correct upstream changeset 839 - Sync fix for no python in minimal fc4 buildroots --- rrdtool-1.2.15-initrrdtool.patch | 18 ++++++++++++------ rrdtool.spec | 10 ++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/rrdtool-1.2.15-initrrdtool.patch b/rrdtool-1.2.15-initrrdtool.patch index 37d0ac0..0506c6b 100644 --- a/rrdtool-1.2.15-initrrdtool.patch +++ b/rrdtool-1.2.15-initrrdtool.patch @@ -1,24 +1,23 @@ ---- rrdtool-1.2.15/bindings/python/rrdtoolmodule.c.initrrdtool 2006-07-14 08:11:26.000000000 -0400 -+++ rrdtool-1.2.15/bindings/python/rrdtoolmodule.c 2006-08-01 15:21:49.000000000 -0400 -@@ -48,8 +48,8 @@ +diff -ur rrdtool-1.2.15.orig/bindings/python/rrdtoolmodule.c rrdtool-1.2.15/bindings/python/rrdtoolmodule.c +--- rrdtool-1.2.15.orig/bindings/python/rrdtoolmodule.c 2006-07-14 08:11:26.000000000 -0400 ++++ rrdtool-1.2.15/bindings/python/rrdtoolmodule.c 2006-08-02 10:20:38.000000000 -0400 +@@ -48,8 +48,7 @@ extern int opterr; /* forward declaration to keep compiler happy */ -/*void initrrdtool(void);*/ -void initrrdtoolmodule(void); +void initrrdtool(void); -+/*void initrrdtoolmodule(void);*/ static int create_args(char *command, PyObject *args, int *argc, char ***argv) -@@ -518,13 +518,13 @@ +@@ -518,19 +517,18 @@ /* Initialization function for the module */ void -/*initrrdtool(void)*/ -initrrdtoolmodule(void) +initrrdtool(void) -+/*initrrdtoolmodule(void)*/ { PyObject *m, *d, *t; @@ -28,3 +27,10 @@ /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); + + SET_STRCONSTANT(d, __version__); +- ErrorObject = PyErr_NewException("rrdtoolmodule.error", NULL, NULL); ++ ErrorObject = PyErr_NewException("rrdtool.error", NULL, NULL); + PyDict_SetItemString(d, "error", ErrorObject); + + /* Check for errors */ diff --git a/rrdtool.spec b/rrdtool.spec index df0f584..b47c6fb 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -4,7 +4,7 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool Version: 1.2.15 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL Group: Applications/Databases URL: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/ @@ -18,7 +18,8 @@ BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0 BuildRequires: freetype-devel, python-devel >= 2.3 %{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')} -%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]')} +# eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot +%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")} %description RRD is the Acronym for Round Robin Database. RRD is a system to store and @@ -221,6 +222,11 @@ find examples/ -type f -exec chmod 0644 {} \; %{php_extdir}/rrdtool.so %changelog +* Wed Aug 02 2006 Jarod Wilson 1.2.15-3 +- One more addition to initrrdtool patch, to fully revert + and correct upstream changeset 839 +- Fix for no python in minimal fc4 buildroots + * Tue Aug 1 2006 Mihai Ibanescu 1.2.15-2 - Fixed rrdtool-python to import the module properly (patch rrdtool-1.2.15-initrrdtool.patch)