Code

Completly redo packaging and prepare new upstream version
authortolimar <tolimar@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Mon, 5 Mar 2012 13:31:09 +0000 (13:31 +0000)
committertolimar <tolimar@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Mon, 5 Mar 2012 13:31:09 +0000 (13:31 +0000)
git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@2002 98d490a6-b407-0410-aaaa-fdee166ba3f5

35 files changed:
debian/README.Debian
debian/README.backends.Merlin [deleted file]
debian/README.source
debian/apache.conf [deleted file]
debian/changelog
debian/compat
debian/config [deleted file]
debian/control
debian/copyright
debian/demo_pool.ini.php [new file with mode: 0644]
debian/dirs [deleted file]
debian/docs
debian/examples [deleted file]
debian/install [deleted file]
debian/links [deleted file]
debian/nagvis-demos.install [new file with mode: 0644]
debian/nagvis-demos.lintian-overrides [new file with mode: 0644]
debian/nagvis.config [new file with mode: 0644]
debian/nagvis.dirs [new file with mode: 0644]
debian/nagvis.docs [new file with mode: 0644]
debian/nagvis.install [new file with mode: 0644]
debian/nagvis.links [new file with mode: 0644]
debian/nagvis.lintian-overrides [new file with mode: 0644]
debian/nagvis.postinst [new file with mode: 0644]
debian/nagvis.postrm [new file with mode: 0644]
debian/nagvis.templates [new file with mode: 0644]
debian/patches/00list [deleted file]
debian/patches/config.dpatch [deleted file]
debian/patches/config.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/postinst [deleted file]
debian/postrm [deleted file]
debian/rules
debian/source/format [new file with mode: 0644]
debian/watch

index 7baeb53d9daa935fa7a8538eaeaf784e88ff399a..d2cd024467725c14c15f5eaf090e755ab0bcba5e 100644 (file)
@@ -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 <tolimar@debian.org> 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 <wob@swobspace.net>  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 <prefix>_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 <hfrenzel@scunc.net>  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 <tolimar@debian.org>  Wed, 22 Feb 2012 15:22:51 +0100
diff --git a/debian/README.backends.Merlin b/debian/README.backends.Merlin
deleted file mode 100644 (file)
index c1a43ec..0000000
+++ /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"
-
index f0fe49a614fa39e13a5362951debf06725f39a37..607665087a9d16f7ee326dbee0e7595c38abfea2 100644 (file)
@@ -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 (file)
index 8c1b32c..0000000
+++ /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.
-<Directory /usr/share/nagvis/htdocs>
-    Options FollowSymLinks
-</Directory>
-
-# -- old style
-# Alias /nagios3/nagvis /usr/share/nagvis/htdocs
-
-# -- use basic authentification from nagios3 package
-#    please adapt to your needs
-<DirectoryMatch (/usr/share/nagvis/htdocs|etc/nagvis(templates|gadgets)|/var/lib/nagvis|/usr/share/doc/nagvis/docs)>
-       DirectoryIndex index.php
-
-        Order Allow,Deny
-        Allow From All
-
-        AuthName "NagVis Access"
-        AuthType Basic
-        AuthUserFile /etc/nagios3/htpasswd.users
-       require valid-user
-</DirectoryMatch>
index 0b8f008f314c929b04dac15bffbe99e044aa1ece..a3fb735c8b0c62054490b42582d873ff832e5cdc 100644 (file)
@@ -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 <tolimar@debian.org>  Mon, 26 Sep 2011 16:29:25 +0200
 
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..7f8f011eb73d6043d2e6db9d2c101195ae2801f2 100644 (file)
@@ -1 +1 @@
-5
+7
diff --git a/debian/config b/debian/config
deleted file mode 100644 (file)
index d3d7ea7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -e
-
-. /usr/share/debconf/confmodule
-
-db_input high nagvis/monitoring_system || true
-db_go || true
-
-
index 8a3f9a2c89024f097f02025de8f939d7b0cffe5e..aeba191ca9a5d502ad09170189becbc32ec4e209 100644 (file)
@@ -3,16 +3,16 @@ Section: net
 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>, Alexander Reichle-Schmehl <tolimar@debian.org>
-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.
+
index beb3ceffb2c6214ee7198c3aca6fddcff456f787..071bb1b51c2e340625e4cc5a3ff998eda97b9452 100644 (file)
@@ -1,33 +1,54 @@
-This package was debianized by Hendrik Frenzel <hfrenzel@scunc.net>
-and by Wolfgang Barth <wob@swobspace@net>. It is now maintained by
-Alexander Reichle-Schmehl <tolimar@debian.org>
+This work was packaged for Debian by:
+
+    Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org> on Wed, 22 Feb 2012 15:22:51 +0100
+
+It was downloaded from:
+
+    http://www.nagvis.org/downloads
+
+Upstream Authors:
+
+    NagVis Project
+    Lars Michelsen <lars@vertical-visions.de>
+    Michael Luebben <mickey2002@nagios-wiki.de>
 
-Files: *
 Copyright:
- © 2007 Lars Michelsen <lars@vertical-visions.de>
- © 2007 Michael Luebben <mickey2002@nagios-wiki.de>
+
+    2007 Lars Michelsen <lars@vertical-visions.de>
+    2007 Michael Luebben <mickey2002@nagios-wiki.de>
+
 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 <http://www.gnu.org/licenses/>
+
+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 <hfrenzel@scunc.net>
- © 2009 by Wolfgang Barth <wob@swobspce.net>
- © 2010, 2011 by Alexander Reichle-Schmehl <tolimar@debian.org>
-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 <sa at c-area dot ch>
+   2003, 2005, 2006, 2009 Danilo Segan <danilo@kvota.net>
+   2005 Nico Kaiser <nico@siriux.net>
+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 <tolimar@debian.org>
+
+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 (file)
index 0000000..dfb4e49
--- /dev/null
@@ -0,0 +1,17 @@
+; <?php return 1; ?>
+; 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 (file)
index 8b0050a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-etc/nagvis/maps
-var/lib/nagvis/images
-var/lib/nagvis/images/maps
-var/cache/nagvis
index e845566c06f9bf557d35e8292c37cf05d97a9769..724e0844955307c264b28a9319b65da3e99bb2c5 100644 (file)
@@ -1 +1,2 @@
 README
+TODO
diff --git a/debian/examples b/debian/examples
deleted file mode 100644 (file)
index 4115939..0000000
+++ /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 (file)
index 9d30939..0000000
+++ /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 (file)
index 54f1423..0000000
+++ /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 (file)
index 0000000..8fa7fa1
--- /dev/null
@@ -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 (file)
index 0000000..46aeafb
--- /dev/null
@@ -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 (file)
index 0000000..4f1952b
--- /dev/null
@@ -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 (file)
index 0000000..349018a
--- /dev/null
@@ -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 (file)
index 0000000..cd23f36
--- /dev/null
@@ -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 (file)
index 0000000..f6aade4
--- /dev/null
@@ -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 (file)
index 0000000..a2c763e
--- /dev/null
@@ -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 (file)
index 0000000..15ac89c
--- /dev/null
@@ -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 (file)
index 0000000..2d83af3
--- /dev/null
@@ -0,0 +1,120 @@
+#!/bin/sh
+# postinst script for nagvis
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# 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 (file)
index 0000000..e25ef16
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# postrm script for nagvis
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# 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 (file)
index 0000000..332f287
--- /dev/null
@@ -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 (file)
index 04204c7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config
diff --git a/debian/patches/config.dpatch b/debian/patches/config.dpatch
deleted file mode 100755 (executable)
index 28f3886..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## config.dpatch by Wolfgang Barth <wob@swobspace.net>
-##
-## 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:
- ;   "<backend_id>:<hostname>" -> 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 (file)
index 0000000..7daa96f
--- /dev/null
@@ -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 (file)
index 0000000..4462183
--- /dev/null
@@ -0,0 +1 @@
+config.patch
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644 (file)
index 0a2093c..0000000
+++ /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:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# 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 (file)
index f1a1079..0000000
+++ /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
-
-
index 7c78a1206300ed84334e8102206b97c6816b2587..4014b36ba90499469da1d5fb70bfb6552686e83c 100755 (executable)
@@ -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 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
index 6fb89cc9a7ec610db45f156122897d292277e55a..4a65137ade8d5d699b2e27707ceb8464666b4d96 100644 (file)
@@ -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 
-# <Webpage URL> <string match>
-#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
 
-