Imported Debian patch 0.9.6-1~netways70+1~preview+1+0~20160520113129.3+wheezy~1.gbp4d7db0

This commit is contained in:
jenkins-debian-glue Autobuilder 2016-05-20 13:31:33 +02:00 committed by Mario Fetka
parent cf99ff9476
commit d94d5bd812
17 changed files with 388 additions and 0 deletions

19
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,19 @@
nagios-business-process-addon for Debian
----------------------------------------
This package currently does not handle any auto configuration or integration.
It is configured to use Icinga by default, use --no-install-recommends to use
it with another monitoring system.
See following files to change paths or permissions:
* /etc/nagios-plugins/bp-addon/settings.cfg
* /etc/apache2/conf(.d|-available)/bp-addon.conf
The check_bp_status plugin can be found here:
/usr/lib/nagios/plugins/check_bp_status.pl
You still need to configure the NDO adapter:
/etc/nagios-plugins/bp-addon/ndo.cfg
-- Markus Frosch <lazyfrosch@debian.org> Tue, 05 Aug 2014 13:58:04 +0200

8
debian/TODO vendored Normal file
View File

@ -0,0 +1,8 @@
TODOs for Debian packaging
--------------------------
* currently only Icinga is supported
(can be changed by the user manually)
* auto configure ndo.cfg ?
-- Markus Frosch <lazyfrosch@debian.org> Tue, 05 Aug 2014 13:45:55 +0200

16
debian/bp-addon.conf vendored Normal file
View File

@ -0,0 +1,16 @@
ScriptAlias /cgi-bin/bp-addon /usr/lib/cgi-bin/bp-addon
Alias /bp-addon/stylesheets /etc/nagios-plugins/bp-addon/stylesheets
Alias /bp-addon /usr/share/bp-addon/htdocs
RedirectMatch ^/bp-addon/?$ /cgi-bin/bp-addon/nagios-bp.cgi
<DirectoryMatch "^(?:/usr/share/bp-addon/htdocs|/usr/lib/cgi-bin/bp-addon|/etc/nagios-plugins/bp-addon/stylesheets)/">
AuthName "Icinga Access"
#AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/icinga/htpasswd.users
#AuthUserFile /etc/nagios3/htpasswd.users
Require valid-user
</DirectoryMatch>

13
debian/changelog vendored Normal file
View File

@ -0,0 +1,13 @@
nagios-business-process-addon (0.9.6-1~netways70+1~preview+1+0~20160520113129.3+wheezy~1.gbp4d7db0) netways-wheezy; urgency=medium
** SNAPSHOT build @4d7db033303d3c28aa534ea3b611dc2de553c95a **
* UNRELEASED
-- jenkins-debian-glue Autobuilder <jenkins@debbuild.disconnected-by-peer.at> Fri, 20 May 2016 13:31:33 +0200
nagios-business-process-addon (0.9.6-1~netways70+1~preview+1) netways-wheezy; urgency=low
* Initial release for NETWAYS Debian repository
-- Markus Frosch <lazyfrosch@debian.org> Tue, 05 Aug 2014 14:09:32 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

32
debian/control vendored Normal file
View File

@ -0,0 +1,32 @@
Source: nagios-business-process-addon
Section: net
Priority: extra
Maintainer: Markus Frosch <lazyfrosch@debian.org>
Build-Depends:
debhelper (>= 9),
dh-autoreconf,
autotools-dev
Standards-Version: 3.9.5
Homepage: http://bp-addon.monitoringexchange.org
Vcs-Git: git://git.netways.org/debian/nagios-business-process-addon.git
Vcs-Browser: https://git.netways.org/debian/nagios-business-process-addon
Package: monitoring-plugin-business-process
Architecture: all
Depends:
adduser,
libcgi-simple-perl,
libjson-xs-perl,
libwww-perl,
monitoring-plugins-common | nagios-plugins-common,
perl,
${misc:Depends},
${perl:Depends}
Recommends: icinga, apache2 | httpd
Description: Business Process monitoring for Icinga or Nagios
The Business Process AddOn takes results of individual Icinga or Nagios checks
and builds aggregated states from them.
.
How they are associated is described in one or more config files.
.
There is the possibility to make "and" conjuctions, "or" conjunction and more.

28
debian/copyright vendored Normal file
View File

@ -0,0 +1,28 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Nagios Business Process AddOn
Source: <http://bp-addon.monitoringexchange.org/>
Files: *
Copyright: 2007-2010 Bernd Stroessenreuther <berny1@users.sourceforge.net>
License: GPL-2+
Files: debian/*
Copyright: 2014 Markus Frosch <lazyfrosch@debian.org>
License: GPL-2+
License: GPL-2+
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.
.
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".

3
debian/docs vendored Normal file
View File

@ -0,0 +1,3 @@
AUTHORS
API-DOC
README

1
debian/install vendored Normal file
View File

@ -0,0 +1 @@
debian/bp-addon.conf etc/apache2/conf-available/

6
debian/lintian-overrides vendored Normal file
View File

@ -0,0 +1,6 @@
# 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-invoke-rc.d postinst
non-standard-apache2-configuration-name

87
debian/patches/00_destdir_fixes vendored Normal file
View File

@ -0,0 +1,87 @@
Description: Fix missing DESTDIR in Makefiles
Author: Markus Frosch <lazyfrosch@debian.org>
Last-Update: 2014-08-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/share/lang/Makefile.in
+++ b/share/lang/Makefile.in
@@ -22,6 +22,6 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DATADIR)/lang
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(DATADIR)/lang
for file in ./*.txt; \
- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DATADIR)/lang; done
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(DATADIR)/lang; done
--- a/libexec/Makefile.in
+++ b/libexec/Makefile.in
@@ -23,6 +23,6 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(LIBEXECDIR)
- $(INSTALL) -m 755 $(INSTALL_OPTS) check_bp_status.pl $(LIBEXECDIR)
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
+ $(INSTALL) -m 755 $(INSTALL_OPTS) check_bp_status.pl $(DESTDIR)$(LIBEXECDIR)
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -24,7 +24,7 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(BINDIR)
- $(INSTALL) -m 755 $(INSTALL_OPTS) *.pl $(BINDIR)
- $(INSTALL) -m 755 $(INSTALL_OPTS) nagios_bp_session_timeout $(BINDIR)
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(INSTALL_OPTS) *.pl $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(INSTALL_OPTS) nagios_bp_session_timeout $(DESTDIR)$(BINDIR)
--- a/share/Makefile.in
+++ b/share/Makefile.in
@@ -22,7 +22,7 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DATADIR)
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(DATADIR)
for file in ./*.gif; \
- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DATADIR); done
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(DATADIR); done
--- a/share/stylesheets/Makefile.in
+++ b/share/stylesheets/Makefile.in
@@ -23,7 +23,7 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DATADIR)/stylesheets
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(DATADIR)/stylesheets
for file in ./*.css; \
- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DATADIR)/stylesheets; done
- ${TOUCH} $(DATADIR)/stylesheets/user.css
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(DATADIR)/stylesheets; done
+ ${TOUCH} $(DESTDIR)$(DATADIR)/stylesheets/user.css
--- a/var/cache/Makefile.in
+++ b/var/cache/Makefile.in
@@ -22,6 +22,6 @@
devclean: distclean
install:
- $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(LOGDIR)/cache
- $(INSTALL) -m 666 $(INSTALL_OPTS) ndo_backend_cache $(LOGDIR)/cache/
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/cache
+ $(INSTALL) -m 666 $(INSTALL_OPTS) ndo_backend_cache $(DESTDIR)$(LOGDIR)/cache/
--- a/var/nagios_bp.sessions/Makefile.in
+++ b/var/nagios_bp.sessions/Makefile.in
@@ -22,6 +22,6 @@
devclean: distclean
install:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(LOGDIR)
- $(INSTALL) -m 1777 $(INSTALL_OPTS) -d $(LOGDIR)/nagios_bp.sessions
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
+ $(INSTALL) -m 1777 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/nagios_bp.sessions

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
00_destdir_fixes

72
debian/postinst vendored Normal file
View File

@ -0,0 +1,72 @@
#!/bin/sh
set -e
setperm() {
user="$1"
group="$2"
mode="$3"
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)
# Make sure user nagios exists
if ! getent passwd nagios > /dev/null ; then
echo 'Adding system-user for nagios' 1>&2
adduser --system --group --home /var/lib/nagios \
--disabled-login --force-badname nagios > /dev/null
fi
# Apache2 handling
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
# NEW method for Apache >= 2.4
if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enmod cgi
apache2_invoke enconf bp-addon
# remove OLD Apache 2.2 link
[ -L /etc/apache2/conf.d/bp-addon.conf ] && rm /etc/apache2/conf.d/bp-addon.conf
# OLD methods for Apache < 2.4
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
# create symlink if not existing
[ -f /etc/apache2/conf.d/bp-addon.conf ] || \
ln -vs /etc/apache2/conf-available/bp-addon.conf /etc/apache2/conf.d/bp-addon.conf
if [ -f /etc/init.d/apache2 ] ; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 reload 3>/dev/null || true
else
/etc/init.d/apache2 reload 3>/dev/null || true
fi
fi
fi
# setting cache permissions
setperm nagios nagios 0750 /var/cache/bp-addon
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

38
debian/postrm vendored Normal file
View File

@ -0,0 +1,38 @@
#!/bin/sh
set -e
case "$1" in
purge|remove)
# Apache2
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
echo "disabling Apache2 configuration ..."
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf bp-addon ||true
fi
if [ -L /etc/apache2/conf.d/bp-addon.conf ]; then
echo "removing link /etc/apache2/conf.d/bp-addon.conf ..."
# remove link to config
rm -f /etc/apache2/conf.d/bp-addon.conf
# reload webserver
[ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true
fi
;;
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

60
debian/rules vendored Executable file
View File

@ -0,0 +1,60 @@
#!/usr/bin/make -f
#DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
%:
dh $@ --with autotools-dev --with autoreconf
B = debian/monitoring-plugin-business-process
override_dh_auto_configure:
dh_auto_configure -- \
--sysconfdir='/etc/nagios-plugins/bp-addon' \
--bindir='/usr/lib/bp-addon/bin' \
--sbindir='/usr/lib/cgi-bin/bp-addon' \
--libdir='/usr/lib/bp-addon' \
--libexecdir='/usr/lib/nagios/plugins' \
--datadir='/usr/share/bp-addon/htdocs' \
--datarootdir='/usr/share/bp-addon' \
--localstatedir='/var/cache/bp-addon' \
--with-cron-d-dir=/etc/cron.d \
--with-cgiurl=/cgi-bin/bp-addon \
--with-htmurl=/bp-addon \
--with-apache-user=www-data \
--with-httpd-conf=/etc/apache2/conf-available \
--with-naghtmurl=/icinga \
--with-nagcgiurl=/cgi-bin/icinga \
--with-nagetc=/etc/icinga
override_dh_auto_install:
dh_auto_install
# clean weird files in PREFIX
rm $B/usr/[A-Z]*
# move stylesheets to etc
mv $B/usr/share/bp-addon/htdocs/stylesheets $B/etc/nagios-plugins/bp-addon/
# rename configs
mv $B/etc/nagios-plugins/bp-addon/nagios-bp.conf-sample \
$B/etc/nagios-plugins/bp-addon/nagios-bp.conf
mv $B/etc/nagios-plugins/bp-addon/ndo.cfg-sample \
$B/etc/nagios-plugins/bp-addon/ndo.cfg
# rename cron
mv $B/etc/cron.d/nagiosbp $B/etc/cron.d/bp-addon
# remove upstream apache config
rm $B/etc/apache2/conf-available/nagiosbp.conf
# clean trash in cache
rm -r $B/var/cache/bp-addon/*
override_dh_auto_clean:
dh_auto_clean
rm -f \
bin/nagios-bp-check-ndo-connection.pl \
bin/nagios_bp_session_timeout \
etc/apache-conf.d/nagiosbp.conf \
etc/cron.d/nagiosbp \
etc/ndo.cfg-sample \
etc/settings.cfg
# vi: noexpandtab :

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=3
http://bp-addon.monitoringexchange.org/download.shtml .*/nagios-business-process-addon-(.*)\.tar\.gz