From: wob-guest Date: Sun, 29 Nov 2009 18:29:25 +0000 (+0000) Subject: all images now in /var/lib/nagvis/images X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c7b4c2346df7e56736819aade481365f5b971382;p=pkg-nagvis.git all images now in /var/lib/nagvis/images workaround for bug in nagvis-1.4.5: apache alias /nagvis/nagvis/images (should be removed as soon as possible) todo: more cleanup in /usr/share/nagvis/htdocs/nagvis neccessary git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1798 98d490a6-b407-0410-aaaa-fdee166ba3f5 --- diff --git a/debian/apache.conf b/debian/apache.conf index 1683c74..90cac0c 100644 --- a/debian/apache.conf +++ b/debian/apache.conf @@ -1,4 +1,7 @@ # -- new style +Alias /nagvis/nagvis/templates /etc/nagvis/templates +Alias /nagvis/nagvis/gadgets /etc/nagvis/gadgets +Alias /nagvis/nagvis/images /var/lib/nagvis/images Alias /nagvis /usr/share/nagvis/htdocs # -- old style diff --git a/debian/changelog b/debian/changelog index 10a332e..30f19f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,14 +3,13 @@ nagvis (1:1.4.5-1) UNRELEASED; urgency=low * (NOT RELEASED YET) New upstream release [ Wolfgang Barth ] * New upstream version - * switching location of templates from /etc/nagvis/templates back to - /usr/share/nagvis/htdocs/nagvis/templates * User uploaded maps now in /var/lib/nagvis/images/maps (1.3.1: /etc/maps) to avoid security problems * Cache location nagvis/var ist now /var/cache/nagvis * nagios independent htmlbase /nagvis and corresponding apache.conf linked to /etc/apache2/conf.d * README.backends.Merlin added + * all images now in /var/lib/nagvis/images [ Alexander Wirt ] * New upstream version diff --git a/debian/dirs b/debian/dirs index df1351b..8b0050a 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,5 +1,4 @@ etc/nagvis/maps -etc/nagvis/templates var/lib/nagvis/images var/lib/nagvis/images/maps var/cache/nagvis diff --git a/debian/docs b/debian/docs index d306c60..bff8277 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1,2 @@ README -docs/Changelog +docs/changelog diff --git a/debian/examples b/debian/examples index bb3f378..4115939 100644 --- a/debian/examples +++ b/debian/examples @@ -1,2 +1,2 @@ -debian/nagvis/demo +debian/tmp/demo etc/nagvis.ini.php-sample diff --git a/debian/patches/00list b/debian/patches/00list index a02cbdb..dcdf9f8 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,2 +1,3 @@ 10_pathnames.dpatch 20_configpath.dpatch +30_GlobalMainCfg_bugfix.dpatch diff --git a/debian/patches/10_pathnames.dpatch b/debian/patches/10_pathnames.dpatch index cc3453e..4e55af9 100755 --- a/debian/patches/10_pathnames.dpatch +++ b/debian/patches/10_pathnames.dpatch @@ -7,8 +7,8 @@ @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-28 17:20:58.000000000 +0100 -@@ -24,17 +24,20 @@ ++++ trunk/etc/nagvis.ini.php-sample 2009-11-29 19:09:27.000000000 +0100 +@@ -24,17 +24,26 @@ ; Path definitions [paths] @@ -17,8 +17,14 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample +base="/usr/share/nagvis/htdocs/" +cfg="/etc/nagvis/" +var="/var/cache/nagvis/" -+map="/var/lib/nagvis/images/maps/" +mapcfg="/etc/nagvis/maps/" ++images="/var/lib/nagvis/images/" ++icon="/var/lib/nagvis/images/iconsets/" ++shape="/var/lib/nagvis/images/shapes/" ++map="/var/lib/nagvis/images/maps/" ++headertemplate="/etc/nagvis/templates/header/" ++hovertemplate="/etc/nagvis/templates/hover/" ++contexttemplate="/etc/nagvis/templates/context/" ; absolute html NagVis path -;htmlbase="/nagios/nagvis" +htmlbase="/nagvis" @@ -34,7 +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 +126,7 @@ +@@ -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 @@ -43,7 +49,7 @@ diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample ; Show the automap in the lists (Map index and dropdown menu in header) ;showinlists=1 -@@ -158,8 +161,8 @@ +@@ -158,8 +167,8 @@ ; ---------------------------- ; Example definition of a livestatus backend. In this case the backend_id is live_1 @@ -54,7 +60,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 +189,9 @@ +@@ -186,9 +195,9 @@ ;htmlcgi="/nagios/cgi-bin" ; in this example the ID of the Backend is "ndo2fs_1" you can define another ID. @@ -66,7 +72,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 +201,18 @@ +@@ -198,37 +207,18 @@ ; path to the cgi-bin of this backend ;htmlcgi="/nagios/cgi-bin" diff --git a/debian/patches/30_GlobalMainCfg_bugfix.dpatch b/debian/patches/30_GlobalMainCfg_bugfix.dpatch new file mode 100755 index 0000000..e18f0d9 --- /dev/null +++ b/debian/patches/30_GlobalMainCfg_bugfix.dpatch @@ -0,0 +1,19 @@ +#! /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/rules b/debian/rules index 5ac8ae8..ce276f5 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,7 @@ include /usr/share/dpatch/dpatch.make DEST = debian/nagvis +TMP = debian/tmp configure: configure-stamp configure-stamp: @@ -33,9 +34,18 @@ install: build dh_clean -k dh_installdirs dh_install + + # -- images to /var + mv $(DEST)/usr/share/nagvis/htdocs/nagvis/images/* $(DEST)/var/lib/nagvis/images/. + + # -- templates + mv $(DEST)/usr/share/nagvis/htdocs/nagvis/templates $(DEST)/etc/nagvis/. + + # -- gadgets + mv $(DEST)/usr/share/nagvis/htdocs/nagvis/gadgets $(DEST)/etc/nagvis/. [ -x /usr/bin/html2text ] && \ - /usr/bin/html2text -ascii -nobs < docs/en_US/changelog.html > docs/Changelog + /usr/bin/html2text -ascii -nobs < docs/en_US/changelog.html > docs/changelog mv $(DEST)/etc/nagvis/nagvis.ini.php-sample \ $(DEST)/usr/share/nagvis/debian/ sed -e 's/^[; ]*\(\