From bced93752b2266c32f7ffc13a103a5c401327ef3 Mon Sep 17 00:00:00 2001 From: hfrenzel-guest Date: Sun, 4 May 2008 22:59:12 +0000 Subject: [PATCH] switched to nagios3 and other changes git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1441 98d490a6-b407-0410-aaaa-fdee166ba3f5 --- debian/README.Debian | 2 +- debian/apache.conf | 2 +- debian/changelog | 14 ++++++++++++++ debian/control | 2 +- debian/install | 1 + debian/links | 2 +- debian/overrides | 2 ++ debian/patches/pathnames.dpatch | 28 ++++++++++++++-------------- debian/postinst | 8 ++++---- debian/rules | 22 +++++++++++++++------- 10 files changed, 54 insertions(+), 29 deletions(-) create mode 100644 debian/overrides diff --git a/debian/README.Debian b/debian/README.Debian index dd6fb47..20ec66c 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -8,7 +8,7 @@ fine. NagVis uses the database account of ndoutils to connect to the database. I you change this account with reconfiguring ndoutils, don't forget to dpkg-reconfigure nagvis too to get the new configuration. -If you got still errors of not working NDOUtils, check your /etc/nagios2/nagios.cfg +If you got still errors of not working NDOUtils, check your /etc/nagios3/nagios.cfg if the broker module ndomod.o is enabled and check_external_commands=1 is set to get the table _programstatus updated. (See http://www.nagvis.org/docs/general/often_reported_errors#nagiosnotrunning) diff --git a/debian/apache.conf b/debian/apache.conf index 464b8fa..8d21c71 100644 --- a/debian/apache.conf +++ b/debian/apache.conf @@ -1,4 +1,4 @@ - + DirectoryIndex index.php diff --git a/debian/changelog b/debian/changelog index 60ab863..a0d170e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +nagvis (1:1.2.2-5) UNRELEASED; urgency=low + + * NOT RELEASED YET + * changed from nagios2 to nagios3 support (Closes: 479290) + * debian/rules: + + used install instead of mkdir or cp + * debian/postinst: + + added nagvis apache.conf symlink in /etc/apache2/conf.d + debian/control: + + added libapache2-mod-php5 to Depends + * override lintian warning package-contains-empty-directory + + -- Hendrik Frenzel Tue, 18 Mar 2008 19:12:30 +0100 + nagvis (1:1.2.2-4) unstable; urgency=low * debian/changelog: diff --git a/debian/control b/debian/control index dc1b628..4f72cf7 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Dm-Upload-Allowed: yes Package: nagvis Architecture: all -Depends: nagios2, ndoutils-mysql, ucf, dbconfig-common, php5-mysql, php5-gd +Depends: nagios3, ndoutils-mysql, libapache2-mod-php5, php5-mysql, php5-gd, ucf, dbconfig-common Description: Visualization addon for Nagios NagVis can be used to visualize Nagios Data, e.g. to display IT processes like a mail system or a network infrastructure. diff --git a/debian/install b/debian/install index bcc8ac4..9e319df 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1,4 @@ debian/tmp/etc/nagvis debian/tmp/etc/nagvis/maps debian/tmp/usr/share/nagvis +debian/tmp/usr/share/lintian/overrides diff --git a/debian/links b/debian/links index 3c913c4..bb1865f 100644 --- a/debian/links +++ b/debian/links @@ -2,4 +2,4 @@ etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/etc/maps etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/images/maps etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/etc/templates etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/images/templates -usr/share/nagvis/htdocs usr/share/nagios2/htdocs/nagvis +usr/share/nagvis/htdocs usr/share/nagios3/htdocs/nagvis diff --git a/debian/overrides b/debian/overrides new file mode 100644 index 0000000..1b94a80 --- /dev/null +++ b/debian/overrides @@ -0,0 +1,2 @@ +nagvis: package-contains-empty-directory usr/share/nagvis/htdocs/nagvis/images/shapes/ + diff --git a/debian/patches/pathnames.dpatch b/debian/patches/pathnames.dpatch index c652ea3..813af91 100755 --- a/debian/patches/pathnames.dpatch +++ b/debian/patches/pathnames.dpatch @@ -16,10 +16,10 @@ diff -urNad nagvis-1.2.2~/etc/nagvis.ini.php-sample nagvis-1.2.2/etc/nagvis.ini. +;base="/usr/share/nagvis/" ; absolute html NagVis path -;htmlbase="/nagios/nagvis" -+;htmlbase="/nagios2/nagvis" ++;htmlbase="/nagios3/nagvis" ; absolute html NagVis cgi path -;htmlcgi="/nagios/cgi-bin" -+;htmlcgi="/nagios2/cgi-bin" ++;htmlcgi="/nagios3/cgi-bin" ; options for the NDO-Backend ; in this example the ID of the Backend is "ndomy_1" you can define another ID. @@ -28,7 +28,7 @@ diff -urNad nagvis-1.2.2~/etc/nagvis.ini.php-sample nagvis-1.2.2/etc/nagvis.ini. ;maxtimewithoutupdate=180 ; path to the cgi-bin of this backend -;htmlcgi="/nagios/cgi-bin" -+;htmlcgi="/nagios2/cgi-bin" ++;htmlcgi="/nagios3/cgi-bin" ; map rotation pools ; in this example the browser switches between the maps demo and demo2 every 15 @@ -81,52 +81,52 @@ diff -urNad nagvis-1.2.2~/nagvis/includes/classes/GlobalMainCfg.php nagvis-1.2.2 'htmlbase' => Array('must' => 1, 'editable' => 1, - 'default' => '/nagios/nagvis', -+ 'default' => '/nagios2/nagvis', ++ 'default' => '/nagios3/nagvis', 'match' => MATCH_STRING_PATH), 'htmlcgi' => Array('must' => 1, 'editable' => 1, - 'default' => '/nagios/cgi-bin', -+ 'default' => '/nagios2/cgi-bin', ++ 'default' => '/nagios3/cgi-bin', 'match' => MATCH_STRING_PATH), 'htmlimages' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/', -+ 'default' => '/nagios2/nagvis/nagvis/images/', ++ 'default' => '/nagios3/nagvis/nagvis/images/', 'match' => MATCH_STRING_PATH), 'htmlhovertemplates' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/etc/templates/hover/', -+ 'default' => '/nagios2/nagvis/nagvis/etc/templates/hover/', ++ 'default' => '/nagios3/nagvis/nagvis/etc/templates/hover/', 'match' => MATCH_STRING_PATH), 'htmlheadertemplates' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/etc/templates/header/', -+ 'default' => '/nagios2/nagvis/nagvis/etc/templates/header/', ++ 'default' => '/nagios3/nagvis/nagvis/etc/templates/header/', 'match' => MATCH_STRING_PATH), 'htmlhovertemplateimages' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/templates/hover/', -+ 'default' => '/nagios2/nagvis/nagvis/images/templates/hover/', ++ 'default' => '/nagios3/nagvis/nagvis/images/templates/hover/', 'match' => MATCH_STRING_PATH), 'htmlheadertemplateimages' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/templates/header/', -+ 'default' => '/nagios2/nagvis/nagvis/images/templates/header/', ++ 'default' => '/nagios3/nagvis/nagvis/images/templates/header/', 'match' => MATCH_STRING_PATH), 'htmlicon' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/iconsets/', -+ 'default' => '/nagios2/nagvis/nagvis/images/iconsets/', ++ 'default' => '/nagios3/nagvis/nagvis/images/iconsets/', 'match' => MATCH_STRING_PATH), 'htmlshape' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/shape/', -+ 'default' => '/nagios2/nagvis/nagvis/images/shape/', ++ 'default' => '/nagios3/nagvis/nagvis/images/shape/', 'match' => MATCH_STRING_PATH), 'htmlmap' => Array('must' => 0, 'editable' => 0, - 'default' => '/nagios/nagvis/nagvis/images/maps/', -+ 'default' => '/nagios2/nagvis/nagvis/images/maps/', ++ 'default' => '/nagios3/nagvis/nagvis/images/maps/', 'match' => MATCH_STRING_PATH)), 'backend' => Array( 'backendtype' => Array('must' => 1, @@ -135,7 +135,7 @@ diff -urNad nagvis-1.2.2~/nagvis/includes/classes/GlobalMainCfg.php nagvis-1.2.2 'cgi' => Array('must' => 1, 'editable' => 1, - 'default' => '/usr/local/nagios/sbin/', -+ 'default' => '/usr/lib/cgi-bin/nagios2/', ++ 'default' => '/usr/lib/cgi-bin/nagios3/', 'match' => MATCH_STRING_PATH)))), 'rotation' => Array('rotationid' => Array('must' => 1, 'editable' => 1, diff --git a/debian/postinst b/debian/postinst index 58ed0fa..c40784c 100644 --- a/debian/postinst +++ b/debian/postinst @@ -26,7 +26,7 @@ fi # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package -setperm() { # thx 2 nagios2/debian/nagios2-common.postinst +setperm() { local user="$1" local group="$2" local mode="$3" @@ -50,9 +50,9 @@ case "$1" in setperm www-data www-data 0775 /usr/share/nagvis/htdocs/nagvis/etc/maps ucf /usr/share/nagvis/debian/apache.conf /etc/nagvis/apache.conf - #if ! [ -e /etc/apache2/conf.d/nagvis.conf ]; then - # ln -s /etc/nagvis/apache.conf /etc/apache2/conf.d/nagvis.conf - #fi + if [ ! -f /etc/apache2/conf.d/nagvis.conf ]; then + ln -s /etc/nagvis/apache.conf /etc/apache2/conf.d/nagvis.conf + fi ;; diff --git a/debian/rules b/debian/rules index 658bb97..09f1882 100755 --- a/debian/rules +++ b/debian/rules @@ -32,8 +32,12 @@ install: build dh_testroot dh_clean -k - mkdir -p $(DEST)/etc/nagvis $(DEST)/usr/share/nagvis/debian/ $(DEST)/usr/share/nagvis/htdocs/nagvis/ \ - $(DEST)/usr/share/nagvis/htdocs/wui/ $(DEST)/usr/share/nagvis/includes $(DEST)/usr/share/nagvis/wui/includes + install -d $(DEST)/etc/nagvis \ + $(DEST)/usr/share/nagvis/debian/ \ + $(DEST)/usr/share/nagvis/htdocs/nagvis/ \ + $(DEST)/usr/share/nagvis/htdocs/wui/ \ + $(DEST)/usr/share/nagvis/includes\ + $(DEST)/usr/share/nagvis/wui/includes cp -a etc/* $(DEST)/etc/nagvis mv $(DEST)/etc/nagvis/nagvis.ini.php-sample \ @@ -53,7 +57,7 @@ install: build done cp -a nagvis/images $(DEST)/usr/share/nagvis/htdocs/nagvis/ - mkdir -p $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/ + install -d $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/ cp -a nagvis/includes/css $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/ cp -a nagvis/includes/js $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/ cp -a nagvis/includes/languages $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/ @@ -67,11 +71,11 @@ install: build cp -a wui/*.php $(DEST)/usr/share/nagvis/htdocs/wui/ cp -a *.php $(DEST)/usr/share/nagvis/htdocs/ - mkdir -p $(DEST)/etc/nagvis/templates/ + install -d $(DEST)/etc/nagvis/templates/ cp -a nagvis/templates/* $(DEST)/etc/nagvis/templates/ # demo site - mkdir -p $(DEST)/demo/nagvis/images/maps $(DEST)/demo/etc/nagvis/maps + install -d $(DEST)/demo/nagvis/images/maps $(DEST)/demo/etc/nagvis/maps mv $(DEST)/etc/nagvis/maps/demo*.cfg $(DEST)/demo/etc/nagvis/maps/ mv $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps/nagvis-demo.png \ $(DEST)/demo/nagvis/images/maps/ @@ -79,8 +83,12 @@ install: build rm -rf $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps # config templates - mkdir -p $(DEST)/usr/share/nagvis/debian - cp debian/apache.conf $(DEST)/usr/share/nagvis/debian/ + install -m 755 -d $(DEST)/usr/share/nagvis/debian + install -m 644 debian/apache.conf $(DEST)/usr/share/nagvis/debian/ + + # lintian overrides + install -m 755 -d $(DEST)/usr/share/lintian/overrides + install -m 644 debian/overrides $(DEST)/usr/share/lintian/overrides/nagvis dh_installdirs dh_install -- 2.30.2