Code

git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1833 98d490a6-b407-0410...
authorhfrenzel-guest <hfrenzel-guest@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Thu, 4 Mar 2010 16:07:41 +0000 (16:07 +0000)
committerhfrenzel-guest <hfrenzel-guest@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Thu, 4 Mar 2010 16:07:41 +0000 (16:07 +0000)
debian/changelog
debian/control
debian/patches/00list
debian/patches/10_pathnames.dpatch
debian/patches/20_configpath.dpatch [deleted file]
debian/patches/30_GlobalMainCfg_bugfix.dpatch [deleted file]
debian/patches/php5.3-deprecated-ereg.dpatch [new file with mode: 0755]
debian/patches/visibility_magic-set-method.dpatch [new file with mode: 0755]
debian/rules

index 30f19f5592573851217f25ba2e282735a1c46a8e..7d2e3d92f7a79d7e289511678d80f07b2952a83b 100644 (file)
@@ -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 <hfrenzel@scunc.net>  Fri, 19 Feb 2010 12:33:48 +0100
+
 nagvis (1:1.4.5-1) UNRELEASED; urgency=low
 
   * (NOT RELEASED YET) New upstream release
index 4c028eda8528658642122b33c8e8465c8a5f716a..75f01d97c192623d9764f31cb3d7693295199df2 100644 (file)
@@ -4,7 +4,7 @@ Priority: extra
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
 Uploaders: Jan Wagner <waja@cyconet.org>, Alexander Wirt <formorer@debian.org>, Hendrik Frenzel <hfrenzel@scunc.net>, Wolfgang Barth <wob@swobspace.net> 
 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
index dcdf9f80b574ee230949aad2bdeec069b2ba91b0..e1c801989c5078af10c967236ca60b19aaa41db5 100644 (file)
@@ -1,3 +1,3 @@
 10_pathnames.dpatch
-20_configpath.dpatch
-30_GlobalMainCfg_bugfix.dpatch
+php5.3-deprecated-ereg
+visibility_magic-set-method
index 4e55af9d9e1c4806c2434900a506accb2dc924d8..2d0e76ce2dd34f53978b4cdb4064486bbd5cff1c 100755 (executable)
@@ -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 (executable)
index aa67c8b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_configpath.dpatch by Wolfgang Barth <wob@swobspace.net>
-##
-## 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 (executable)
index e18f0d9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_GlobalMainCfg_bugfix.dpatch by Wolfgang Barth <wob@swobspace.net>
-##
-## 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 (executable)
index 0000000..815b3f5
--- /dev/null
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## php5.3-deprecated-ereg.dpatch by Hendrik Frenzel <hfrenzel@scunc.net>
+##
+## 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 (executable)
index 0000000..b76d11d
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## visibility_magic-set-method.dpatch by Hendrik Frenzel <hfrenzel@scunc.net>
+##
+## 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 <michael_luebben@web.de>
+        */
+-      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 <michael_luebben@web.de>
+        */
+-      private function __set($name, $value) {
++      public function __set($name, $value) {
+               $this->name = $value;
+       }
index d97f20fb2d3c492f1df508146a194e47c9821e3f..aff715c55d20a24b9191f4cc5ea7d5ade37bd1ef 100755 (executable)
@@ -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/.