[Pkg-nagios-changes] [pkg-pnp4nagios] 04/06: Fill config packages

Markus Frosch (old DM Account) lazyfrosch-guest at moszumanska.debian.org
Sun Sep 7 09:50:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

lazyfrosch-guest pushed a commit to branch master
in repository pkg-pnp4nagios.

commit cb1832a06aee9034af08fe8a742290d479e6ae78
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Sep 2 18:31:18 2014 +0200

    Fill config packages
---
 debian/icinga/config.icinga.php                    |  2 ++
 debian/{ => icinga}/npcdmod.cfg                    |  0
 debian/icinga/pnp4nagios.conf                      | 24 +++++++++++++++++++
 debian/nagios3/config.nagios3.php                  |  2 ++
 debian/nagios3/pnp4nagios.conf                     | 24 +++++++++++++++++++
 debian/patches/config_instances                    | 28 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/pnp4nagios-bin.examples                     |  1 +
 debian/pnp4nagios-web-config-icinga.install        |  2 ++
 .../pnp4nagios-web-config-icinga.lintian-overrides |  7 ++++++
 debian/pnp4nagios-web-config-nagios3.install       |  2 ++
 ...pnp4nagios-web-config-nagios3.lintian-overrides |  7 ++++++
 debian/rules                                       |  4 +++-
 13 files changed, 103 insertions(+), 1 deletion(-)

diff --git a/debian/icinga/config.icinga.php b/debian/icinga/config.icinga.php
new file mode 100644
index 0000000..265f963
--- /dev/null
+++ b/debian/icinga/config.icinga.php
@@ -0,0 +1,2 @@
+<?php
+$conf['nagios_base'] = "/cgi-bin/icinga";
diff --git a/debian/npcdmod.cfg b/debian/icinga/npcdmod.cfg
similarity index 100%
rename from debian/npcdmod.cfg
rename to debian/icinga/npcdmod.cfg
diff --git a/debian/icinga/pnp4nagios.conf b/debian/icinga/pnp4nagios.conf
new file mode 100644
index 0000000..8d53a9e
--- /dev/null
+++ b/debian/icinga/pnp4nagios.conf
@@ -0,0 +1,24 @@
+Alias /pnp4nagios "/usr/share/pnp4nagios/html"
+
+<Directory "/usr/share/pnp4nagios/html">
+   	AllowOverride None
+
+   	AuthName "Icinga Access"
+   	AuthType Basic
+   	AuthUserFile /etc/icinga/htpasswd.users
+   	Require valid-user
+	<IfModule mod_rewrite.c>
+		# Turn on URL rewriting
+		RewriteEngine On
+		Options symLinksIfOwnerMatch
+		# Installation directory
+		RewriteBase /pnp4nagios/
+		# Protect application and system files from being viewed
+		RewriteRule "^(?:application|modules|system)/" - [F]
+		# Allow any files or directories that exist to be displayed directly
+		RewriteCond "%{REQUEST_FILENAME}" !-f
+		RewriteCond "%{REQUEST_FILENAME}" !-d
+		# Rewrite all other URLs to index.php/URL
+		RewriteRule "^.*$" "index.php/$0" [PT]
+	</IfModule>
+</Directory>
diff --git a/debian/nagios3/config.nagios3.php b/debian/nagios3/config.nagios3.php
new file mode 100644
index 0000000..d887841
--- /dev/null
+++ b/debian/nagios3/config.nagios3.php
@@ -0,0 +1,2 @@
+<?php
+$conf['nagios_base'] = "/cgi-bin/nagios3";
diff --git a/debian/nagios3/pnp4nagios.conf b/debian/nagios3/pnp4nagios.conf
new file mode 100644
index 0000000..902e7de
--- /dev/null
+++ b/debian/nagios3/pnp4nagios.conf
@@ -0,0 +1,24 @@
+Alias /pnp4nagios "/usr/share/pnp4nagios/html"
+
+<Directory "/usr/share/pnp4nagios/html">
+   	AllowOverride None
+
+   	AuthName "Nagios Access"
+   	AuthType Basic
+   	AuthUserFile /etc/nagios3/htpasswd.users
+   	Require valid-user
+	<IfModule mod_rewrite.c>
+		# Turn on URL rewriting
+		RewriteEngine On
+		Options symLinksIfOwnerMatch
+		# Installation directory
+		RewriteBase /pnp4nagios/
+		# Protect application and system files from being viewed
+		RewriteRule "^(?:application|modules|system)/" - [F]
+		# Allow any files or directories that exist to be displayed directly
+		RewriteCond "%{REQUEST_FILENAME}" !-f
+		RewriteCond "%{REQUEST_FILENAME}" !-d
+		# Rewrite all other URLs to index.php/URL
+		RewriteRule "^.*$" "index.php/$0" [PT]
+	</IfModule>
+</Directory>
diff --git a/debian/patches/config_instances b/debian/patches/config_instances
new file mode 100644
index 0000000..13b6600
--- /dev/null
+++ b/debian/patches/config_instances
@@ -0,0 +1,28 @@
+Description: Include a instance based config
+Author: Markus Frosch <lazyfrosch at debian.org>
+Last-Update: 2014-09-01
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sample-config/pnp/config.php.in
++++ b/sample-config/pnp/config.php.in
+@@ -89,7 +89,8 @@
+ #
+ # Link back to Nagios or Thruk ( www.thruk.org ) 
+ #
+-$conf['nagios_base'] = "/cgi-bin/nagios3";
++## Debian: please see /etc/pnp4nagios/config.<NAME>.php
++##$conf['nagios_base'] = "/cgi-bin/nagios3";
+ 
+ #
+ # Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
+@@ -278,4 +279,10 @@
+                              '#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
+ $scheme['mixed3']   = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
+                              '#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');
++
++if (file_exists('/etc/pnp4nagios/config.icinga.php')) {
++    include '/etc/pnp4nagios/config.icinga.php';
++} else if (file_exists('/etc/pnp4nagios/config.nagios3.php')) {
++    include '/etc/pnp4nagios/config.nagios3.php';
++}
+ ?>
diff --git a/debian/patches/series b/debian/patches/series
index c299757..3f92dfc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ fix-npcd-path
 fix-nagios-url
 adjust-template-path
 privacy-warning
+config_instances
diff --git a/debian/pnp4nagios-bin.examples b/debian/pnp4nagios-bin.examples
new file mode 100644
index 0000000..7bd7544
--- /dev/null
+++ b/debian/pnp4nagios-bin.examples
@@ -0,0 +1 @@
+debian/icinga/npcdmod.cfg
diff --git a/debian/pnp4nagios-web-config-icinga.install b/debian/pnp4nagios-web-config-icinga.install
new file mode 100644
index 0000000..c2911fa
--- /dev/null
+++ b/debian/pnp4nagios-web-config-icinga.install
@@ -0,0 +1,2 @@
+debian/icinga/config.icinga.php etc/pnp4nagios
+debian/icinga/pnp4nagios.conf   etc/apache2/conf-available
diff --git a/debian/pnp4nagios-web-config-icinga.lintian-overrides b/debian/pnp4nagios-web-config-icinga.lintian-overrides
new file mode 100644
index 0000000..b0459a6
--- /dev/null
+++ b/debian/pnp4nagios-web-config-icinga.lintian-overrides
@@ -0,0 +1,7 @@
+# ignoring apache2 warning
+# this is actually not a problem, because the handling is backwards compatible
+apache2-reverse-dependency-calls-invoke-rc.d postrm
+apache2-reverse-dependency-calls-wrapper-script postinst a2enmod
+apache2-reverse-dependency-calls-invoke-rc.d postinst
+# we actually want that
+non-standard-apache2-configuration-name pnp4nagios.conf != pnp4nagios-web-config-icinga.conf
diff --git a/debian/pnp4nagios-web-config-nagios3.install b/debian/pnp4nagios-web-config-nagios3.install
new file mode 100644
index 0000000..d767274
--- /dev/null
+++ b/debian/pnp4nagios-web-config-nagios3.install
@@ -0,0 +1,2 @@
+debian/nagios3/config.nagios3.php etc/pnp4nagios
+debian/nagios3/pnp4nagios.conf    etc/apache2/conf-available
diff --git a/debian/pnp4nagios-web-config-nagios3.lintian-overrides b/debian/pnp4nagios-web-config-nagios3.lintian-overrides
new file mode 100644
index 0000000..c317999
--- /dev/null
+++ b/debian/pnp4nagios-web-config-nagios3.lintian-overrides
@@ -0,0 +1,7 @@
+# ignoring apache2 warning
+# this is actually not a problem, because the handling is backwards compatible
+apache2-reverse-dependency-calls-invoke-rc.d postrm
+apache2-reverse-dependency-calls-wrapper-script postinst a2enmod
+apache2-reverse-dependency-calls-invoke-rc.d postinst
+# we actually want that
+non-standard-apache2-configuration-name pnp4nagios.conf != pnp4nagios-web-config-nagios3.conf
diff --git a/debian/rules b/debian/rules
index 24d1873..e7227d3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -163,7 +163,7 @@ install: build
 	mkdir debian/tmp/etc/pnp4nagios/templates.d
 	cp debian/README.templates.d debian/tmp/etc/pnp4nagios/templates.d/README
 
-	dh_install --sourcedir=debian/tmp --fail-missing
+	dh_install --fail-missing
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -176,6 +176,7 @@ binary-indep: build install
 	dh_installinit -i
 	dh_installman -i
 	dh_link -i
+	dh_lintian -i
 	dh_compress -i
 	dh_fixperms -i
 	dh_installdeb -i
@@ -195,6 +196,7 @@ binary-arch: build install
 	dh_installinit -ppnp4nagios-bin --name=pnp_gearman_worker
 	dh_installman -a
 	dh_link -a
+	dh_lintian -a
 	dh_strip -a
 	dh_compress -a
 	dh_fixperms -a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-pnp4nagios.git



More information about the Pkg-nagios-changes mailing list