From: hfrenzel-guest Date: Thu, 4 Mar 2010 16:07:41 +0000 (+0000) Subject: git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1833 98d490a6-b407-0410... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=46360b123fd7658bb1802cbf597f07ecb0424410;p=pkg-nagvis.git git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1833 98d490a6-b407-0410-aaaa-fdee166ba3f5 --- diff --git a/debian/changelog b/debian/changelog index 30f19f5..7d2e3d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +nagvis (1:1.4.6-1) UNRELEASED; urgency=low + + * (NOT RELEASED YET) + + [ Hendrik Frenzel ] + * New upstream version + * Patched deprecated ereg to preg_match to get them work with php 5.3+ + + -- Hendrik Frenzel Fri, 19 Feb 2010 12:33:48 +0100 + nagvis (1:1.4.5-1) UNRELEASED; urgency=low * (NOT RELEASED YET) New upstream release diff --git a/debian/control b/debian/control index 4c028ed..75f01d9 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: Debian Nagios Maintainer Group Uploaders: Jan Wagner , Alexander Wirt , Hendrik Frenzel , Wolfgang Barth Build-Depends: debhelper (>= 6.0.7~), dpatch -Standards-Version: 3.8.3 +Standards-Version: 3.8.4 Homepage: http://www.nagvis.org Vcs-Svn: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/nagvis/trunk/ @@ -12,7 +12,7 @@ Dm-Upload-Allowed: yes Package: nagvis Architecture: all -Depends: ${misc:Depends}, libapache2-mod-php5, php5-mysql, php5-gd, ucf, dbconfig-common, graphviz +Depends: ${misc:Depends}, php5-common (>= 5.3.0), libapache2-mod-php5, php5-mysql, php5-gd, ucf, dbconfig-common, graphviz Recommends: nagios3, ndoutils-mysql Description: Visualization addon for Nagios NagVis can be used to visualize Nagios Data, e.g. to display IT processes like diff --git a/debian/patches/00list b/debian/patches/00list index dcdf9f8..e1c8019 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,3 +1,3 @@ 10_pathnames.dpatch -20_configpath.dpatch -30_GlobalMainCfg_bugfix.dpatch +php5.3-deprecated-ereg +visibility_magic-set-method diff --git a/debian/patches/10_pathnames.dpatch b/debian/patches/10_pathnames.dpatch index 4e55af9..2d0e76c 100755 --- a/debian/patches/10_pathnames.dpatch +++ b/debian/patches/10_pathnames.dpatch @@ -5,9 +5,9 @@ ## DP: No description. @DPATCH@ -diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ---- trunk~/etc/nagvis.ini.php-sample 2009-11-27 16:41:36.000000000 +0100 -+++ trunk/etc/nagvis.ini.php-sample 2009-11-29 19:09:27.000000000 +0100 +diff -urNad nagvis-1.4.6~/etc/nagvis.ini.php-sample nagvis-1.4.6/etc/nagvis.ini.php-sample +--- nagvis-1.4.6~/etc/nagvis.ini.php-sample 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/etc/nagvis.ini.php-sample 2010-03-01 18:40:01.000000000 +0100 @@ -24,17 +24,26 @@ ; Path definitions @@ -40,16 +40,7 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ; background color of maps ;backgroundcolor="#fff" ; Enable/Disable the context menu on map objects. With the context menu you are -@@ -123,7 +132,7 @@ - ; Default root host (NagVis uses this if it can't detect it via NDO) - ;defaultroot="" - ; Path to the graphviz binaries (dot,neato,...); Only needed if not in ENV PATH --;graphvizpath="/usr/bin/" -+graphvizpath="/usr/bin" - ; Show the automap in the lists (Map index and dropdown menu in header) - ;showinlists=1 - -@@ -158,8 +167,8 @@ +@@ -158,8 +168,8 @@ ; ---------------------------- ; Example definition of a livestatus backend. In this case the backend_id is live_1 @@ -60,7 +51,7 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ;socket="unix:/usr/local/nagios/var/rw/live" ; in this example the ID of the Backend is "ndomy_1" you can define another ID. -@@ -186,9 +195,9 @@ +@@ -186,9 +196,9 @@ ;htmlcgi="/nagios/cgi-bin" ; in this example the ID of the Backend is "ndo2fs_1" you can define another ID. @@ -72,32 +63,7 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ; Path to the ndo2fs var directory where the VOLATILE and PERSISTENT directories are ;path="/usr/local/ndo2fs/var" ; Name of the instance to get the data from -@@ -198,37 +207,18 @@ - ; path to the cgi-bin of this backend - ;htmlcgi="/nagios/cgi-bin" - --; in this example the ID of the Backend is "merlinmy_1" you can define another ID. --[backend_merlinmy_1] --; type of backend - MUST be set --backendtype="merlinmy" --; hostname for Merlin db --;dbhost="localhost" --; portname for Merlin db --;dbport=3306 --; database name for Merlin db --;dbname="merlin" --; username for Merlin db --;dbuser="merlin" --; password for Merlin db --;dbpass="merlin" --; maximum delay of the Merlin Database in seconds --;maxtimewithoutupdate=180 --; path to the cgi-bin of this backend --;htmlcgi="/nagios/cgi-bin" -- - ; ---------------------------- - ; Rotation pool definitions - ; ---------------------------- +@@ -223,12 +233,12 @@ ; in this example the browser switches between the maps demo and demo2 every 15 ; seconds, the rotation is enabled by url: index.php?rotation=demo @@ -113,3 +79,22 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ; ------------------------------------------------------------------------------ ; Below you find some advanced stuff +diff -urNad nagvis-1.4.6~/nagvis/includes/defines/global.php nagvis-1.4.6/nagvis/includes/defines/global.php +--- nagvis-1.4.6~/nagvis/includes/defines/global.php 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/nagvis/includes/defines/global.php 2010-03-01 18:39:30.000000000 +0100 +@@ -61,13 +61,13 @@ + define('DEBUGLEVEL', 4); + + // Path to the debug file +-define('DEBUGFILE', '../var/nagvis-debug.log'); ++define('DEBUGFILE', '/var/log/nagvis-debug.log'); + + // NagVis Version + define('CONST_VERSION', '1.4.6'); + + // Path to the main configuration file +-define('CONST_MAINCFG', '../etc/nagvis.ini.php'); ++define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php'); + + // Needed minimal PHP version + define('CONST_NEEDED_PHP_VERSION', '5.0'); diff --git a/debian/patches/20_configpath.dpatch b/debian/patches/20_configpath.dpatch deleted file mode 100755 index aa67c8b..0000000 --- a/debian/patches/20_configpath.dpatch +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20_configpath.dpatch by Wolfgang Barth -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/nagvis/includes/defines/global.php trunk/nagvis/includes/defines/global.php ---- trunk~/nagvis/includes/defines/global.php 2009-11-27 16:41:36.000000000 +0100 -+++ trunk/nagvis/includes/defines/global.php 2009-11-27 18:38:59.000000000 +0100 -@@ -61,13 +61,13 @@ - define('DEBUGLEVEL', 4); - - // Path to the debug file --define('DEBUGFILE', '../var/nagvis-debug.log'); -+define('DEBUGFILE', '/var/log/nagvis-debug.log'); - - // NagVis Version - define('CONST_VERSION', '1.4.5'); - - // Path to the main configuration file --define('CONST_MAINCFG', '../etc/nagvis.ini.php'); -+define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php'); - - // Needed minimal PHP version - define('CONST_NEEDED_PHP_VERSION', '5.0'); diff --git a/debian/patches/30_GlobalMainCfg_bugfix.dpatch b/debian/patches/30_GlobalMainCfg_bugfix.dpatch deleted file mode 100755 index e18f0d9..0000000 --- a/debian/patches/30_GlobalMainCfg_bugfix.dpatch +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 30_GlobalMainCfg_bugfix.dpatch by Wolfgang Barth -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/nagvis/includes/classes/GlobalMainCfg.php trunk/nagvis/includes/classes/GlobalMainCfg.php ---- trunk~/nagvis/includes/classes/GlobalMainCfg.php 2009-11-27 16:41:36.000000000 +0100 -+++ trunk/nagvis/includes/classes/GlobalMainCfg.php 2009-11-29 18:54:35.000000000 +0100 -@@ -348,7 +348,7 @@ - 'editable' => 0, - 'default' => '', - 'match' => MATCH_STRING_PATH), -- 'hovercontext' => Array('must' => 0, -+ 'contexttemplate' => Array('must' => 0, - 'editable' => 0, - 'default' => '', - 'match' => MATCH_STRING_PATH), diff --git a/debian/patches/php5.3-deprecated-ereg.dpatch b/debian/patches/php5.3-deprecated-ereg.dpatch new file mode 100755 index 0000000..815b3f5 --- /dev/null +++ b/debian/patches/php5.3-deprecated-ereg.dpatch @@ -0,0 +1,50 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## php5.3-deprecated-ereg.dpatch by Hendrik Frenzel +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad nagvis-1.4.6~/nagvis/includes/classes/GlobalMainCfg.php nagvis-1.4.6/nagvis/includes/classes/GlobalMainCfg.php +--- nagvis-1.4.6~/nagvis/includes/classes/GlobalMainCfg.php 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/nagvis/includes/classes/GlobalMainCfg.php 2010-03-01 18:06:16.000000000 +0100 +@@ -791,15 +791,15 @@ + + // loop given elements for checking: => all given attributes valid + foreach($vars AS $key => $val) { +- if(!ereg('^comment_',$key)) { +- if(ereg('^backend_', $type)) { ++ if(!preg_match('/^comment_/',$key)) { ++ if(preg_match('/^backend_/', $type)) { + if(isset($this->validConfig['backend']['options'][$this->getValue($type,'backendtype')]) + && is_array($this->validConfig['backend']['options'][$this->getValue($type,'backendtype')])) { + $arrValidConfig = array_merge($this->validConfig['backend'], $this->validConfig['backend']['options'][$this->getValue($type,'backendtype')]); + } else { + $arrValidConfig = $this->validConfig['backend']; + } +- } elseif(ereg('^rotation_', $type)) { ++ } elseif(preg_match('/^rotation_/', $type)) { + $arrValidConfig = $this->validConfig['rotation']; + } else { + $arrValidConfig = $this->validConfig[$type]; +@@ -821,7 +821,7 @@ + return FALSE; + } else { + // Workaround to get the configured string back +- if(ereg('^rotation_', $type) && $key == 'maps') { ++ if(preg_match('/^rotation_/', $type) && $key == 'maps') { + foreach($val AS $intId => $arrStep) { + if(isset($arrStep['label']) && $arrStep['label'] != '') { + $label = $arrStep['label'].':'; +diff -urNad nagvis-1.4.6~/wui/form_handler.php nagvis-1.4.6/wui/form_handler.php +--- nagvis-1.4.6~/wui/form_handler.php 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/wui/form_handler.php 2010-03-01 18:06:39.000000000 +0100 +@@ -252,7 +252,7 @@ + // is status for this map there? + $file = file($CORE->MAINCFG->getValue('paths', 'mapcfg').'autobackup.status'); + foreach($file AS $key => $val) { +- if(ereg("^".$mapname."=",$val)) { ++ if(preg_match("/^".$mapname."=/",$val)) { + // $arr[1] is value + $arr = explode('=',$val); + diff --git a/debian/patches/visibility_magic-set-method.dpatch b/debian/patches/visibility_magic-set-method.dpatch new file mode 100755 index 0000000..b76d11d --- /dev/null +++ b/debian/patches/visibility_magic-set-method.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## visibility_magic-set-method.dpatch by Hendrik Frenzel +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad nagvis-1.4.6~/nagvis/includes/classes/validator/GlobalValidatorInteger.php nagvis-1.4.6/nagvis/includes/classes/validator/GlobalValidatorInteger.php +--- nagvis-1.4.6~/nagvis/includes/classes/validator/GlobalValidatorInteger.php 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/nagvis/includes/classes/validator/GlobalValidatorInteger.php 2010-03-04 15:03:24.000000000 +0100 +@@ -53,10 +53,10 @@ + * + * @param string $name Name from variable + * @param $value Value for variable +- * @access private ++ * @access public + * @author Michael Luebben + */ +- private function __set($name, $value) { ++ public function __set($name, $value) { + $this->name = $value; + } + +diff -urNad nagvis-1.4.6~/nagvis/includes/classes/validator/GlobalValidatorString.php nagvis-1.4.6/nagvis/includes/classes/validator/GlobalValidatorString.php +--- nagvis-1.4.6~/nagvis/includes/classes/validator/GlobalValidatorString.php 2010-02-04 21:51:13.000000000 +0100 ++++ nagvis-1.4.6/nagvis/includes/classes/validator/GlobalValidatorString.php 2010-03-04 15:04:56.000000000 +0100 +@@ -53,10 +53,10 @@ + * + * @param string $name Name from variable + * @param $value Value for variable +- * @access private ++ * @access public + * @author Michael Luebben + */ +- private function __set($name, $value) { ++ public function __set($name, $value) { + $this->name = $value; + } + diff --git a/debian/rules b/debian/rules index d97f20f..aff715c 100755 --- a/debian/rules +++ b/debian/rules @@ -36,15 +36,15 @@ install: build dh_clean -k dh_installdirs dh_install - + # -- images to /var rm -f $(DEST)/usr/share/nagvis/htdocs/nagvis/images/*/.gitignore rm -f $(DEST)/usr/share/nagvis/htdocs/nagvis/images/*/*/.gitignore mv $(DEST)/usr/share/nagvis/htdocs/nagvis/images/* $(DEST)/var/lib/nagvis/images/. - - # -- templates + + # -- templates mv $(DEST)/usr/share/nagvis/htdocs/nagvis/templates $(DEST)/etc/nagvis/. - + # -- gadgets mv $(DEST)/usr/share/nagvis/htdocs/nagvis/gadgets $(DEST)/etc/nagvis/.