From: tolimar Date: Mon, 5 Mar 2012 13:31:09 +0000 (+0000) Subject: Completly redo packaging and prepare new upstream version X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=708ed6557297ecc274fcbe8f3dae70c893877405;p=pkg-nagvis.git Completly redo packaging and prepare new upstream version git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@2002 98d490a6-b407-0410-aaaa-fdee166ba3f5 --- diff --git a/debian/README.Debian b/debian/README.Debian index 7baeb53..d2cd024 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,40 +1,83 @@ nagvis for Debian ------------------ +================= -Since Version 1:1.4.6-1.1 you may also use nagvis with a remote database. -However you'll need to configure the Database settings by hand. +As of version 1.6.4-1 nagvis uses the check-mk-livestatus backend as +default to gather its information, however you'll have to manually activate +that module in your Nagios or Icinga setup. -Please see /usr/share/nagvis/debian/nagvis.ini.php-sample for an example -configuration file, and place it at /etc/nagvis/nagvis.ini.php. - -- Alexander Reichle-Schmehl Wed, 13 Oct 2010 15:44:01 +0200 +Sadly currently it's not possible to make the package just work out of the +box. However, you'll only need to do two steps by hand to get NagVis up +and running: +1) Actiate the check-mk-livestatus backend (if not already done). +2) Grant the www-data User Access to the check-mk-livestatus socket. -Starting with 1.4.5, there are changes from older packages. +See sections bellow for details. -* URL and CGI-Path: -Since nagvis now can be used with other systems like icinga or web interface -like ninja, the htdocs path is no longer part of nagios3 directory structure. -The new directory for nagvis is now /usr/share/nagvis/htdocs/nagvis. The -authentication therefore has to be configured separately. Have a look at -/etc/nagvis/apache.conf and edit it for your needs. - -- Wolfgang Barth Sat, 28 Nov 2009 12:00:00 +0200 +Passwords +========= -Thank you using the NagVis addon for Nagios Network Monitoring System. +After successfull installation you should be able to access NagVis via +http://$host/nagvis/. To login you can use the user accoung "admin" +(password "admin") or "guest" (with password "guest"). -To get it work you have to be sure the ndoutils package is installed and works -fine. NagVis uses the database account of ndoutils to connect to the database. If -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/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) -There are some examples in /usr/share/doc/nagvis/examples/demo to see NagVis -functionality. Just copy the files in demo/ to the appropriate location and change -its owner and group to be www-data:www-data. +Using NagVis with Icinga: +========================= - -- Hendrik Frenzel Sat, 14 Jul 2007 11:27:33 +0200 +Add the following line to your /etc/icinga/icinga.cfg file: +-------- +broker_module=/usr/lib/check_mk/livestatus.o /var/lib/icinga/rw/live +-------- + +This will activate check-mk-livestatus. Please see +/usr/share/doc/check-mk-livestatus/README.Debian for more details and +further pointers. + +You have to grant the www-data user read/write access to MK Livestatus' +socket. This may be done by runninf the following commands: + +-------- +/etc/init.d/icinga stop +dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw +dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga +/etc/init.d/icinga start +-------- + +This will also enable support for external commands. Please see +/usr/share/doc/icinga/README.Debian section "External Commands" for further +details and implications. + + +Using NagVis with Nagios: +========================= + +Add the following line to your /etc/nagios3/nagios.cfg file: + +-------- +broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/rw/live +-------- + +This will activate check-mk-livestatus. Please see +/usr/share/doc/check-mk-livestatus/README.Debian for more details and +further pointers. + +You have to grant the www-data user read/write access to MK Livestatus' +socket. This may be done by runninf the following commands: + +-------- +/etc/init.d/nagios3 stop +dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw +dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3 +/etc/init.d/nagios3 start +-------- + +This will also enable support for external commands. Please see +/usr/share/doc/nagios3/README.Debian section "External Commands" for further +details and implications. + + + -- Alexander Reichle-Schmehl Wed, 22 Feb 2012 15:22:51 +0100 diff --git a/debian/README.backends.Merlin b/debian/README.backends.Merlin deleted file mode 100644 index c1a43ec..0000000 --- a/debian/README.backends.Merlin +++ /dev/null @@ -1,25 +0,0 @@ -Starting with 1.4 NagVis supports Merlin as a replacement to ndoutils. -Simply set backendtype to merlinmy, the rest of configuration is similar -to ndoutils. - -Here is an example: - -; 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" - diff --git a/debian/README.source b/debian/README.source index f0fe49a..6076650 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,3 +1,9 @@ -We use dpatch for patch handling inside our package(s). Please see -/usr/share/doc/dpatch/README.source.gz (if you have installed dpatch) for -documentation about dpatch. +nagvis for Debian +----------------- + +This package uses quilt as patch management. More details on its usage may +be found in /usr/share/doc/quilt/README.source after installing the quilt +package. + + + diff --git a/debian/apache.conf b/debian/apache.conf deleted file mode 100644 index 8c1b32c..0000000 --- a/debian/apache.conf +++ /dev/null @@ -1,29 +0,0 @@ -# -- 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/docs /usr/share/doc/nagvis/docs -Alias /nagvis /usr/share/nagvis/htdocs - -# the FollowSymlinks option is only considere in a directory section, not -# in a DirectoryMatch section. Setting it here. - - Options FollowSymLinks - - -# -- old style -# Alias /nagios3/nagvis /usr/share/nagvis/htdocs - -# -- use basic authentification from nagios3 package -# please adapt to your needs - - DirectoryIndex index.php - - Order Allow,Deny - Allow From All - - AuthName "NagVis Access" - AuthType Basic - AuthUserFile /etc/nagios3/htpasswd.users - require valid-user - diff --git a/debian/changelog b/debian/changelog index 0b8f008..a3fb735 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,16 +2,20 @@ nagvis (1:1.6.4-1) UNRELEASED; urgency=low * NOT RELEASED YET * New upstream release (Closes: #659723, #638234) + * Rework debian/* move to dh and quilt and (hopefully) easier generell + packaging * Update package description: Now also works with Icinga * Change Package dependencies: Drop all ndo and mysql related stuff, - as we want to use mk livestatus + as we want to use MK Livestatus + * Using MK Livestatus address DB-Configuration (Closes: #626456) + * That's now the best we can do to make NagVis work out of the box + (Closes: #655064) + * Redo packageing from scratch, old stuff was unmaintainable * Update debian/copyright - * Rework post{inst,rm} to not configure database * removed patches/php5.3-deprecated-ereg.dpatch; applied upstream * removed patches/fix-get_class-object.dpatch; no longer needed * removed patches/visibility_magic-set-method.dpatch; no longer needed - * rework debian/rules and install files - * updated debian/config.patch + * Move example maps in separate nagvis-demos package -- Alexander Reichle-Schmehl Mon, 26 Sep 2011 16:29:25 +0200 diff --git a/debian/compat b/debian/compat index 7ed6ff8..7f8f011 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 diff --git a/debian/config b/debian/config deleted file mode 100644 index d3d7ea7..0000000 --- a/debian/config +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -e - -. /usr/share/debconf/confmodule - -db_input high nagvis/monitoring_system || true -db_go || true - - diff --git a/debian/control b/debian/control index 8a3f9a2..aeba191 100644 --- a/debian/control +++ b/debian/control @@ -3,16 +3,16 @@ Section: net Priority: extra Maintainer: Debian Nagios Maintainer Group Uploaders: Jan Wagner , Alexander Wirt , Alexander Reichle-Schmehl -Build-Depends: debhelper (>= 6.0.7~), dpatch +Build-Depends: debhelper (>= 7.0.50~), quilt Standards-Version: 3.9.2 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/ -Dm-Upload-Allowed: yes Package: nagvis Architecture: all -Depends: ${misc:Depends}, php5-common (>= 5.3.0), libapache2-mod-php5, php5-gd, ucf, graphviz, php5-sqlite, php-net-socket, check-mk-livestatus +Depends: ${misc:Depends}, php5-common (>= 5.3.0), libapache2-mod-php5, php5-gd, ucf, graphviz, php5-sqlite, php-net-socket, php-gettext, check-mk-livestatus +Suggests: nagvis-demos Description: Visualization addon for Nagios or Icinga NagVis can be used to visualize Nagios or Icinga Data, e.g. to display IT processes like a mail system or a network infrastructure. @@ -26,3 +26,23 @@ Description: Visualization addon for Nagios or Icinga * Define Sub-Map icons wich represent a complete NagVis Map of Hosts/Services/Groups in one icon (drill down) * Visualization of complete IT Processes using self drawn graphics + +Package: nagvis-demos +Architecture: all +Depends: ${misc:Depends}, nagvis (= ${source:Version}) +Description: Demo Mapgs for NagVis + NagVis can be used to visualize Nagios or Icinga Data, e.g. to display IT + processes like a mail system or a network infrastructure. + . + Key features are: + . + * Display of single Hosts or Services + * Display the state of a Host dependent on the state of its services + ("recognize services") + * Visualization of Host- oder Servicegroups with one icon + * Define Sub-Map icons wich represent a complete NagVis Map of + Hosts/Services/Groups in one icon (drill down) + * Visualization of complete IT Processes using self drawn graphics + . + This package contains some demonstration maps. + diff --git a/debian/copyright b/debian/copyright index beb3cef..071bb1b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,33 +1,54 @@ -This package was debianized by Hendrik Frenzel -and by Wolfgang Barth . It is now maintained by -Alexander Reichle-Schmehl +This work was packaged for Debian by: + + Debian Nagios Maintainer Group on Wed, 22 Feb 2012 15:22:51 +0100 + +It was downloaded from: + + http://www.nagvis.org/downloads + +Upstream Authors: + + NagVis Project + Lars Michelsen + Michael Luebben -Files: * Copyright: - © 2007 Lars Michelsen - © 2007 Michael Luebben + + 2007 Lars Michelsen + 2007 Michael Luebben + License: - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - On Debian systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL'. + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + Files: share/frontend/nagvis-js/ext/dwoo-1.1.0/* Copyright: (c) 2008, Jordi Boggiano License: BSD Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . + modification, are permitted provided that the following conditions are +met: + . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Dwoo nor the names of its contributors may be - used to endorse or promote products derived from this software + * Neither the name of Dwoo nor the names of its contributors may be + used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY JORDI BOGGIANO ''AS IS'' AND ANY @@ -46,14 +67,14 @@ Copyright: (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - . + . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - . + . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - . + . * Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -69,13 +90,27 @@ License: BSD (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: debian/* -Copyright: © 2007-2008 Hendrik Frenzel - © 2009 by Wolfgang Barth - © 2010, 2011 by Alexander Reichle-Schmehl -License: GPL-2+ - The Debian packaging information is under the GPL, version 2 or later. + +Files: share/server/core/ext/php-gettext-1.0.9/* +Copyright: 2005 Steven Armstrong + 2003, 2005, 2006, 2009 Danilo Segan + 2005 Nico Kaiser +License: GPLv2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is: + + Copyright (C) 2012 Alexander Reichle-Schmehl + +you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + diff --git a/debian/demo_pool.ini.php b/debian/demo_pool.ini.php new file mode 100644 index 0000000..dfb4e49 --- /dev/null +++ b/debian/demo_pool.ini.php @@ -0,0 +1,17 @@ +; +; the line above is to prevent +; viewing this file from web. +; DON'T REMOVE IT! + +; 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 +[rotation_demo] +; These steps are rotated. The single steps may have optional prefixes like "Demo2:" +; which are used as display text on the index pages rotation list. +; You may also add external URLs as steps. Simply enclose the url using [] +; instead of the map name. It is also possible to add automaps to rotations, +; add an @ sign before the automap name to add an automap to the rotation. +maps="demo-germany,demo-ham-racks,demo-load,demo-muc-srv1" +; rotation interval (seconds) +interval=5 + diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 8b0050a..0000000 --- a/debian/dirs +++ /dev/null @@ -1,4 +0,0 @@ -etc/nagvis/maps -var/lib/nagvis/images -var/lib/nagvis/images/maps -var/cache/nagvis diff --git a/debian/docs b/debian/docs index e845566..724e084 100644 --- a/debian/docs +++ b/debian/docs @@ -1 +1,2 @@ README +TODO diff --git a/debian/examples b/debian/examples deleted file mode 100644 index 4115939..0000000 --- a/debian/examples +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/demo -etc/nagvis.ini.php-sample diff --git a/debian/install b/debian/install deleted file mode 100644 index 9d30939..0000000 --- a/debian/install +++ /dev/null @@ -1,5 +0,0 @@ -etc/* /etc/nagvis -docs /usr/share/doc/nagvis -share/ /usr/share/nagvis/htdocs -debian/apache.conf /usr/share/nagvis/debian -debian/apache.conf /etc/nagvis diff --git a/debian/links b/debian/links deleted file mode 100644 index 54f1423..0000000 --- a/debian/links +++ /dev/null @@ -1,6 +0,0 @@ -etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/etc/maps -var/lib/nagvis/images/maps usr/share/nagvis/htdocs/nagvis/images/maps -var/cache/nagvis usr/share/nagvis/htdocs/var -etc/nagvis/apache.conf etc/apache2/conf.d/nagvis.conf -usr/share/nagios/htdocs/images/logos/logos /var/lib/nagvis/images/shapes/logos -usr/share/nagios/htdocs/images/logos/base /var/lib/nagvis/images/shapes/base diff --git a/debian/nagvis-demos.install b/debian/nagvis-demos.install new file mode 100644 index 0000000..8fa7fa1 --- /dev/null +++ b/debian/nagvis-demos.install @@ -0,0 +1,15 @@ +debian/demo_pool.ini.php etc/nagvis/conf.d/ +etc/conf.d/demo.ini.php etc/nagvis/conf.d/ +etc/automaps/demo-overview.cfg etc/nagvis/automaps/ +etc/maps/demo-ham-racks.cfg etc/nagvis/maps/ +etc/maps/demo-overview.cfg etc/nagvis/maps/ +etc/maps/demo-germany.cfg etc/nagvis/maps/ +etc/maps/demo-load.cfg etc/nagvis/maps/ +etc/maps/demo-muc-srv1.cfg etc/nagvis/maps/ +share/userfiles/images/shapes/demo_traffic_load_legend.png var/cache/nagvis/userfiles/images/shapes/ +share/userfiles/images/shapes/demo-wan-cloud.png var/cache/nagvis/userfiles/images/shapes/ +share/userfiles/images/maps/demo-host.png var/cache/nagvis/userfiles/images/maps/ +share/userfiles/images/maps/demo-overview.png var/cache/nagvis/userfiles/images/maps/ +share/userfiles/images/maps/demo-ham-racks.png var/cache/nagvis/userfiles/images/maps/ +share/userfiles/images/maps/demo-germany.png var/cache/nagvis/userfiles/images/maps/ +share/userfiles/images/maps/demo-load.png var/cache/nagvis/userfiles/images/maps/ diff --git a/debian/nagvis-demos.lintian-overrides b/debian/nagvis-demos.lintian-overrides new file mode 100644 index 0000000..46aeafb --- /dev/null +++ b/debian/nagvis-demos.lintian-overrides @@ -0,0 +1,7 @@ +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/maps/demo-germany.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/maps/demo-ham-racks.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/maps/demo-host.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/maps/demo-load.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/maps/demo-overview.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/shapes/demo-wan-cloud.png +nagvis-demos: file-in-unusual-dir var/cache/nagvis/userfiles/images/shapes/demo_traffic_load_legend.png diff --git a/debian/nagvis.config b/debian/nagvis.config new file mode 100644 index 0000000..4f1952b --- /dev/null +++ b/debian/nagvis.config @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +db_input high nagvis/monitoring_system|| true +db_go || true diff --git a/debian/nagvis.dirs b/debian/nagvis.dirs new file mode 100644 index 0000000..349018a --- /dev/null +++ b/debian/nagvis.dirs @@ -0,0 +1,5 @@ +var/cache/nagvis +var/cache/nagvis/tmpl/cache +var/cache/nagvis/tmpl/compile +etc/nagvis/profiles +etc/apache2/conf.d/ diff --git a/debian/nagvis.docs b/debian/nagvis.docs new file mode 100644 index 0000000..cd23f36 --- /dev/null +++ b/debian/nagvis.docs @@ -0,0 +1,2 @@ +etc/nagvis.ini.php-sample +etc/apache2-nagvis.conf-sample diff --git a/debian/nagvis.install b/debian/nagvis.install new file mode 100644 index 0000000..f6aade4 --- /dev/null +++ b/debian/nagvis.install @@ -0,0 +1,4 @@ +share/userfiles/ var/cache/nagvis +share/ usr/share/nagvis +docs/ usr/share/nagvis +etc/* etc/nagvis diff --git a/debian/nagvis.links b/debian/nagvis.links new file mode 100644 index 0000000..a2c763e --- /dev/null +++ b/debian/nagvis.links @@ -0,0 +1,6 @@ +/var/cache/nagvis/userfiles /usr/share/nagvis/share/userfiles +/usr/share/nagvis/docs /usr/share/doc/nagvis/html +/usr/share/nagvis/docs /usr/share/nagvis/share/docs +/etc/nagvis /usr/share/nagvis/etc +/var/cache/nagvis /usr/share/nagvis/var +/usr/share/php/php-gettext /usr/share/nagvis/share/server/core/ext/php-gettext-1.0.9 diff --git a/debian/nagvis.lintian-overrides b/debian/nagvis.lintian-overrides new file mode 100644 index 0000000..15ac89c --- /dev/null +++ b/debian/nagvis.lintian-overrides @@ -0,0 +1,95 @@ +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/gadgets/gadgets_core.php +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/gadgets/std_bar.php +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/gadgets/std_html_bar.php +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/gadgets/std_speedometer.php +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/gadgets/std_speedometer2.php +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/20x20.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_ack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_critical.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_down.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_downtime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_error.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_ok.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_pending.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_sack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_sdowntime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_unchecked.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_unknown.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_unreachable.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_up.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_big_warning.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_ack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_critical.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_down.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_downtime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_error.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_ok.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_pending.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_sack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_sdowntime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_unchecked.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_unknown.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_unreachable.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_up.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_medium_warning.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_ack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_critical.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_down.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_downtime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_error.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_ok.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_pending.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_sack.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_sdowntime.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_unchecked.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_unknown.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_unreachable.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_up.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/iconsets/std_small_warning.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/shapes/std_dummy.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.control_delete.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.control_drag.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.control_modify.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.control_togglemid.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.folder_closed.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.folder_open.gif +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.header.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.header_down.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.header_hide.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.header_over.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/images/templates/default.header_show.png +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/sounds/std_critical.mp3 +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/sounds/std_down.mp3 +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/sounds/std_error.mp3 +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/sounds/std_unreachable.mp3 +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/sounds/std_warning.mp3 +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.automap.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.automapModifyParams.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.automapToMap.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.changePassword.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.context.css +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.context.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.css +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.header.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.header.js +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.hover.css +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.hover.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.index.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.info.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.login.css +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.login.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.manageRoles.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.map.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.multisiteMaps.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.overview.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.search.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.url.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.userMgmt.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiEditMainCfg.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiManageBackends.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiManageBackgrounds.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiManageMaps.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiManageShapes.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiMapAddModify.html +nagvis: file-in-unusual-dir var/cache/nagvis/userfiles/templates/default.wuiMapManageTmpl.html + diff --git a/debian/nagvis.postinst b/debian/nagvis.postinst new file mode 100644 index 0000000..2d83af3 --- /dev/null +++ b/debian/nagvis.postinst @@ -0,0 +1,120 @@ +#!/bin/sh +# postinst script for nagvis +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + # Source debconf library. + . /usr/share/debconf/confmodule + db_get nagvis/monitoring_system + MONITORING="$RET" + case "$MONITORING" in + "icinga") + ## Creating Configuration file for Nagvis + nagvis_tmp=$(mktemp) + zcat /usr/share/doc/nagvis/nagvis.ini.php-sample.gz | sed \ + -e "s#;file_group=\"\"#file_group=\"www-data\"#g" \ + -e "s#;file_mode=\"660\"#file_mode=\"660\"#g" \ + -e "s#;base=\"/usr/local/nagvis/\"#base=\"/usr/share/nagvis/\"#" \ + -e "s#;htmlbase=\"/nagvis\"#htmlbase=\"/nagvis\"#" \ + -e "s#;htmlcgi=\"/nagios/cgi-bin\"#htmlcgi=\"/icinga/cgi-bin\"#" \ + -e "s#;socket=\"unix:/usr/local/nagios/var/rw/live\"#socket=\"unix:/var/lib/icinga/rw/live\"#" \ + -e "s#\[rotation_demo\]#;\[rotation_demo\]#" \ + -e "s#interval=15#;interval=15#" \ + -e "s#maps=\"demo-germany,demo-ham-racks,demo-load,demo-muc-srv1\"#;maps=\"demo-germany,demo-ham-racks,demo-load,demo-muc-srv1\"#" \ + > "$nagvis_tmp" + chgrp www-data "$nagvis_tmp" + chmod g+rw "$nagvis_tmp" + ucf --debconf-ok "$nagvis_tmp" /etc/nagvis/nagvis.ini.php + ucfr nagvis /etc/nagvis/nagvis.ini.php + rm -f "$nagvis_tmp" + ## Creating Configuration snipplet for Apache + apache_tmp=$(mktemp) + sed -e "s#@NAGVIS_PATH@#/usr/share/nagvis/share/#g" \ + -e "s#@NAGVIS_WEB@#/nagvis#g" \ + -e "s#@NAGIOS_PATH@/etc#/etc/icinga#g" \ + < /usr/share/doc/nagvis/apache2-nagvis.conf-sample \ + > "$apache_tmp" + chmod go+r "$apache_tmp" + ucf --debconf-ok "$apache_tmp" /etc/apache2/conf.d/nagvis.conf + ucfr nagvis /etc/apache2/conf.d/nagvis.conf + rm -f "$apache_tmp" + # When the use removed the configuration file, we don't + # have to reload apache; might confuse users (or even fail) + if [ -f /etc/apache2/conf.d/nagvis.conf ] ; then + invoke-rc.d apache2 reload + fi + ;; + "nagios") + ## Creating Configuration file for Nagvis + nagvis_tmp=$(mktemp) + zcat /usr/share/doc/nagvis/nagvis.ini.php-sample.gz | sed \ + -e "s#;file_group=\"\"#file_group=\"www-data\"#g" \ + -e "s#;file_mode=\"660\"#file_mode=\"660\"#g" \ + -e "s#;base=\"/usr/local/nagvis/\"#base=\"/usr/share/nagvis/\"#" \ + -e "s#;htmlbase=\"/nagvis\"#htmlbase=\"/nagvis\"#" \ + -e "s#;htmlcgi=\"/nagios/cgi-bin\"#htmlcgi=\"/nagios/cgi-bin\"#" \ + -e "s#;socket=\"unix:/usr/local/nagios/var/rw/live\"#socket=\"unix:/var/lib/nagios3/rw/live\"#" \ + -e "s#\[rotation_demo\]#;\[rotation_demo\]#" \ + -e "s#interval=15#;interval=15#" \ + -e "s#maps=\"demo-germany,demo-ham-racks,demo-load,demo-muc-srv1\"#;maps=\"demo-germany,demo-ham-racks,demo-load,demo-muc-srv1\"#" \ + > "$nagvis_tmp" + chgrp www-data "$nagvis_tmp" + chmod g+rw "$nagvis_tmp" + ucf --debconf-ok "$nagvis_tmp" /etc/nagvis/nagvis.ini.php + ucfr nagvis /etc/nagvis/nagvis.ini.php + rm -f "$nagvis_tmp" + ## Creating Configuration snipplet for Apache + apache_tmp=$(mktemp) + sed -e "s#@NAGVIS_PATH@#/usr/share/nagvis/share/#g" \ + -e "s#@NAGVIS_WEB@#/nagvis#g" \ + -e "s#@NAGIOS_PATH@/etc#/etc/nagios3#g" \ + < /usr/share/doc/nagvis/apache2-nagvis.conf-sample \ + > "$apache_tmp" + chmod go+r "$apache_tmp" + ucf --debconf-ok "$apache_tmp" /etc/apache2/conf.d/nagvis.conf + ucfr nagvis /etc/apache2/conf.d/nagvis.conf + rm -f "$apache_tmp" + # When the use removed the configuration file, we don't + # have to reload apache; might confuse users (or even fail) + if [ -f /etc/apache2/conf.d/nagvis.conf ] ; then + invoke-rc.d apache2 reload + fi + ;; + "other") + # nothing to be done for others + ;; + esac + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/nagvis.postrm b/debian/nagvis.postrm new file mode 100644 index 0000000..e25ef16 --- /dev/null +++ b/debian/nagvis.postrm @@ -0,0 +1,64 @@ +#!/bin/sh +# postrm script for nagvis +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + ## remove apache part of the configuration and nagvis' ini file + ## (both generetaded in postinst) + for conf_file in /etc/apache2/conf.d/nagvis.conf /etc/nagvis/nagvis.ini.php ; do + rm -f "$conf_file" + if which ucf >/dev/null; then + ucf --purge "$conf_file" + fi + if which ucfr >/dev/null; then + ucfr --purge nagvis "$conf_file" + fi + done + ## these files are generated by user interaction, ask if they should be removed + delete_on_purge="false" + if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_input high nagvis/delete_on_purge || true + db_go || true + db_get nagvis/delete_on_purge || true + delete_on_purge="$RET" + fi + if [ "$delete_on_purge" = "true" ]; then + rm -f /etc/nagvis/auth.db + rm -rf /etc/nagvis/magps/* + rm -rf /var/cache/nagvis/* + fi + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/nagvis.templates b/debian/nagvis.templates new file mode 100644 index 0000000..332f287 --- /dev/null +++ b/debian/nagvis.templates @@ -0,0 +1,22 @@ +Template: nagvis/monitoring_system +Type: select +Default: icinga +Choices: icinga, nagios, other +Description: For which monitoring suite should NagVis be configured? + This NagVis package supports the monitoring suites Icinga as well as + well as Nagios using the check-mk-live broker backend. please choose the, + respective entry. + . + If you would like to use NagVis with a different backend or a different + monitoring suite, please choose "other". You'll have to configure it + manually. + +Template: nagvis/delete_on_purge +Type: boolean +Default: false +Description: Should the user created NagVis data be removed? + During usage NagVis creates some file in /var/cache/nagvis and and + /etc/nagvis (e.g. background images and map files), including a small + database for authentification. If you don't need any of these files, + they can be removed now, or you may want to keep them and clean up by hand + later. diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 04204c7..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1 +0,0 @@ -config diff --git a/debian/patches/config.dpatch b/debian/patches/config.dpatch deleted file mode 100755 index 28f3886..0000000 --- a/debian/patches/config.dpatch +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## config.dpatch by Wolfgang Barth -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: changes default configs - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagvis-1.5.10~/etc/nagvis.ini.php-sample nagvis-1.5.10/etc/nagvis.ini.php-sample ---- nagvis-1.5.10~/etc/nagvis.ini.php-sample 2011-07-31 11:51:23.000000000 +0200 -+++ nagvis-1.5.10/etc/nagvis.ini.php-sample 2011-09-26 16:24:19.000000000 +0200 -@@ -108,7 +108,18 @@ - ; Path definitions - [paths] - ; absolute physical NagVis path --;base="/usr/local/nagvis/" -+base="/usr/share/nagvis/htdocs/" -+cfg="/etc/nagvis/" -+var="/var/cache/nagvis/" -+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/" -+gadget="/etc/nagvis/gadgets" -+ - ; absolute html NagVis path - ;htmlbase="/nagvis" - ; absolute html NagVis cgi path -@@ -280,7 +291,7 @@ - ; The statushost needs to be given in the following format: - ; ":" -> e.g. "live_2:nagios" - ;statushost="" --;socket="unix:/usr/local/nagios/var/rw/live" -+socket="unix:/var/lib/icinga/rw/live" - - ; Example definition for a MySQL backend - ; in this example the ID of the Backend is "ndomy_1" you can define another ID. -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagvis-1.5.10~/share/server/core/defines/global.php nagvis-1.5.10/share/server/core/defines/global.php ---- nagvis-1.5.10~/share/server/core/defines/global.php 2011-07-31 11:51:23.000000000 +0200 -+++ nagvis-1.5.10/share/server/core/defines/global.php 2011-09-26 16:27:28.000000000 +0200 -@@ -64,7 +64,7 @@ - define('DEBUGLEVEL', 6); - - // Path to the debug file --define('DEBUGFILE', '../../../var/nagvis-debug.log'); -+define('DEBUGFILE', '/var/log/nagvis-debug.log'); - - // It is possible to define a second main configuration file - // to pre-define some options in a file the user may not be -@@ -78,8 +78,8 @@ - // The last value wins. - // - // Path to the main configuration file --define('CONST_MAINCFG', '../../../etc/nagvis.ini.php'); --define('CONST_MAINCFG_CACHE', '../../../var/nagvis.ini.php'); -+define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php'); -+define('CONST_MAINCFG_CACHE', '/etc/nagvis/nagvis.ini.php'); - - // Path to "site" main configuration file - //define('CONST_MAINCFG_SITE', '../../../etc/nagvis-site.ini.php'); diff --git a/debian/patches/config.patch b/debian/patches/config.patch new file mode 100644 index 0000000..7daa96f --- /dev/null +++ b/debian/patches/config.patch @@ -0,0 +1,17 @@ +--- a/share/server/core/defines/global.php ++++ b/share/server/core/defines/global.php +@@ -78,11 +78,11 @@ define('DEBUGFILE', '../../../var/nagvis + // The last value wins. + // + // Path to the main configuration file +-define('CONST_MAINCFG', '../../../etc/nagvis.ini.php'); +-define('CONST_MAINCFG_CACHE', '../../../var/nagvis-conf'); ++define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php'); ++define('CONST_MAINCFG_CACHE', '/var/cache/nagvis/nagvis-conf'); + + // Path to the main configuration conf.d directory +-define('CONST_MAINCFG_DIR', '../../../etc/conf.d'); ++define('CONST_MAINCFG_DIR', '/etc/nagvis/conf.d'); + + // The directory below the NagVis root which is shared by the webserver + define('HTDOCS_DIR', 'share'); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4462183 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +config.patch diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index 0a2093c..0000000 --- a/debian/postinst +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -# postinst script for nagvis -# -# see: dh_installdeb(1) - -set -e - -. /usr/share/debconf/confmodule - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -setperm() { - local user="$1" - local group="$2" - local mode="$3" - local file="$4" - shift 4 - # only do something when no setting exists - if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then - chown "$user":"$group" "$file" - chmod "$mode" "$file" - fi - - -} - -case "$1" in - configure) - for f in `find /usr/share/nagvis/htdocs -type f -o -type d 2>/dev/null`; do - test -f $f && setperm www-data www-data 0644 $f - test -d $f && setperm www-data www-data 0755 $f - done - setperm www-data www-data 0775 /etc/nagvis/maps - setperm www-data www-data 0755 /var/lib/nagvis - setperm www-data www-data 0755 /var/lib/nagvis/images - setperm www-data www-data 0755 /var/lib/nagvis/images/maps - setperm www-data www-data 0755 /var/cache/nagvis - - ucf --debconf-ok /usr/share/nagvis/debian/apache.conf /etc/nagvis/apache.conf - #if [ ! -f /etc/apache2/conf.d/nagvis.conf ]; then - # ln -s /etc/nagvis/apache.conf /etc/apache2/conf.d/nagvis.conf - #fi - - monitoring=$(db_get nagvis/monitoring_system) - echo "Will configure nagvis to use $monitoring" - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -db_stop -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index f1a1079..0000000 --- a/debian/postrm +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# postrm script for nagvis -# -# see: dh_installdeb(1) - -set -e - -case "$1" in - purge) - for file in apache.conf nagvis.ini.php; do - rm -f /etc/nagvis/$file - if [ -x /usr/bin/ucf ] ; then - ucf --debconf-ok --purge /etc/nagvis/$file - fi - done - rm -rf /var/cache/nagvis - ;; - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/rules b/debian/rules index 7c78a12..4014b36 100755 --- a/debian/rules +++ b/debian/rules @@ -1,79 +1,57 @@ #!/usr/bin/make -f -# debian/rules makefile for nagvis -# Last modified: -# $Id$ +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 -include /usr/share/dpatch/dpatch.make -DEST = debian/nagvis -TMP = debian/tmp +%: + dh --with quilt $@ -configure: configure-stamp -configure-stamp: - dh_testdir - touch configure-stamp - - -build: build-arch build-indep -build-arch: build-stamp -build-indep: build-stamp -build-stamp: configure-stamp - dh_testdir - #$(MAKE) - #docbook-to-man debian/nagvis.sgml > nagvis.1 - touch $@ - -clean: unpatch - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - # Add here commands to clean up after the build process. - #-$(MAKE) clean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs +override_dh_install: dh_install - - # -- move user files - mv $(DEST)/usr/share/nagvis/htdocs/share/userfiles/ $(DEST)/etc/nagvis/. - - #[ -x /usr/bin/html2text ] && \ - # /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/ - - # demo site - install -d $(TMP)/demo/etc/nagvis/maps - mv $(DEST)/etc/nagvis/maps/demo*.cfg $(TMP)/demo/etc/nagvis/maps/ - - dh_link - dh_lintian - -# Build architecture-dependent files here. -binary-arch: build install -# We have nothing to do by default. - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_installdebconf - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure + # these files are shipped in the nagvis-demo package; but are installed in a more general rule for dh_install + # remove them from the nagvis package here + rm -f debian/nagvis/etc/nagvis/conf.d/demo.ini.php \ + debian/nagvis/etc/nagvis/automaps/demo-overview.cfg \ + debian/nagvis/etc/nagvis/maps/demo-ham-racks.cfg \ + debian/nagvis/etc/nagvis/maps/demo-overview.cfg \ + debian/nagvis/etc/nagvis/maps/demo-germany.cfg \ + debian/nagvis/etc/nagvis/maps/demo-load.cfg \ + debian/nagvis/etc/nagvis/maps/demo-muc-srv1.cfg \ + debian/nagvis/var/cache/nagvis/userfiles/images/maps/demo-germany.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/maps/demo-host.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/maps/demo-overview.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/maps/demo-ham-racks.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/maps/demo-load.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/shapes/demo_traffic_load_legend.png \ + debian/nagvis/var/cache/nagvis/userfiles/images/shapes/demo-wan-cloud.png + # these files are shiped in /var/cache/nagvis/userfiles + # they are installed by the more general copy of the content of + # /usr/share/nagvis/share + rm -rf debian/nagvis/usr/share/nagvis/share/userfiles/ + # We use the external php-gettext lib to avoid copy copies + rm -rf debian/nagvis/usr/share/nagvis/share/server/core/ext/php-gettext-1.0.9 + # correct directory permissions + chown www-data:www-data debian/nagvis/etc/nagvis + chown -R www-data:www-data debian/nagvis/etc/nagvis/maps + chown -R www-data:www-data debian/nagvis/etc/nagvis/automaps + chown -R www-data:www-data debian/nagvis/etc/nagvis/profiles + chown -R www-data:www-data debian/nagvis/var/cache/nagvis + # Fixing some lintian issues + rm -f debian/nagvis/usr/share/nagvis/share/frontend/nagvis-js/ext/dwoo-1.1.0/LICENSE \ + debian/nagvis/var/cache/nagvis/userfiles/images/gadgets/.gitignore \ + debian/nagvis/var/cache/nagvis/userfiles/styles/.gitignore + # remove example configuration files (they are already installed to + # /usr/share/doc/nagvis) + rm -f debian/nagvis/etc/nagvis/apache2-nagvis.conf-sample + rm -f debian/nagvis/etc/nagvis/nagvis.ini.php-sample + + + +override_dh_fixperms: + dh_fixperms -X /var/cache/nagvis -X /etc/nagvis -X /var/lib/nagvis/userfiles/images diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch index 6fb89cc..4a65137 100644 --- a/debian/watch +++ b/debian/watch @@ -1,22 +1,4 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file version=3 -# Uncomment to examine a Webpage -# -#http://www.example.com/downloads.php nagvis-(.*)\.tar\.gz - -# Uncomment to examine a Webserver directory -#http://www.example.com/pub/nagvis-(.*)\.tar\.gz - -# Uncommment to examine a FTP server -#ftp://ftp.example.com/pub/nagvis-(.*)\.tar\.gz debian uupdate - -# Uncomment to find new files on sourceforge, for debscripts >= 2.9 http://sf.net/nagvis/nagvis-([\w\.]*)\.tar\.gz -