Source: check-mk Version: 1.2.6p12-1 Severity: normal Tags: patch Dear Maintainer,
Please update your package to deal with the nagios3 removal from Debian (#845765). Consider applying the attached patch. Kind Regards, Bas
>From 6a4eb878a7c58b971833e6f38fea528069a7facc Mon Sep 17 00:00:00 2001 From: Bas Couwenberg <[email protected]> Date: Sat, 3 Dec 2016 18:12:35 +0100 Subject: Drop binary package for nagios3 which is no longer in Debian. --- debian/README.Debian | 13 ++---- debian/apache.nagios3 | 76 ------------------------------ debian/changelog | 7 +++ debian/check-mk-config-nagios3.install | 2 - debian/check-mk-config-nagios3.links | 2 - debian/check-mk-config-nagios3.postinst | 83 --------------------------------- debian/check-mk-config-nagios3.postrm | 32 ------------- debian/check-mk-config-nagios3.preinst | 10 ---- debian/check-mk-config-nagios3.prerm | 0 debian/control | 19 +------- debian/defaults.nagios3 | 54 --------------------- debian/rules | 5 -- 12 files changed, 14 insertions(+), 289 deletions(-) delete mode 100644 debian/apache.nagios3 delete mode 100644 debian/check-mk-config-nagios3.install delete mode 100644 debian/check-mk-config-nagios3.links delete mode 100644 debian/check-mk-config-nagios3.postinst delete mode 100644 debian/check-mk-config-nagios3.postrm delete mode 100644 debian/check-mk-config-nagios3.preinst delete mode 100644 debian/check-mk-config-nagios3.prerm delete mode 100644 debian/defaults.nagios3 diff --git a/debian/README.Debian b/debian/README.Debian index 46f1a9b..d51b733 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,12 +1,9 @@ check-mk-livestatus =================== -To load the event broker add the following lines to your Nagios/Icinga +To load the event broker add the following lines to your Icinga configuration: -Nagios3: -broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/rw/live - Icinga: broker_module=/usr/lib/check_mk/livestatus.o /var/lib/icinga/rw/live @@ -25,10 +22,10 @@ On the server side you need multisite enabled to see the logs. If you also want to acknowledge the alarms (recommended) put www-data into the nagios group -check-mk-config-nagios3 and check-mk-config-icinga -================================================== +check-mk-config-icinga +====================== Check-MK's web frontend "Multisite" (package "check-mk-multisite") and the -server part of Check-MK ("check-mk-server") can only be used with either -Nagios3 or Icinga. Please install the adequate "check-mk-config-*" package. +server part of Check-MK ("check-mk-server") can only be used with Icinga. +Please install the "check-mk-config-icinga" package. diff --git a/debian/apache.nagios3 b/debian/apache.nagios3 deleted file mode 100644 index 1cc690e..0000000 --- a/debian/apache.nagios3 +++ /dev/null @@ -1,76 +0,0 @@ -# Created by setup of check_mk version 1.2.6p12 -# This file will *not* be overwritten at the next setup -# of check_mk. You may edit it as needed. In order to get -# a new version, please delete it and re-run setup.sh. - -# Note for RedHat 5.3 users (and probably other version: -# this file must be loaded *after* python.conf, otherwise -# <IfModule mod_python.c> does not trigger! For that -# reason, it is installed as zzz_.... Sorry for the -# inconveniance. - -<IfModule mod_python.c> - Alias /check_mk /usr/share/check_mk/web/htdocs - <Directory /usr/share/check_mk/web/htdocs> - AddHandler mod_python .py - PythonHandler index - PythonDebug On - DirectoryIndex index.py - - #Handle apache 2.2 and 2.4 - <IfVersion >= 2.3> - Require local - </IfVersion> - <IfVersion < 2.3> - Order deny,allow - allow from all - </IfVersion> - # Need Nagios authentification. Please edit the - # following: Set AuthName and AuthUserFile to the - # same value that you use for your Nagios configuration! - Order deny,allow - allow from all - AuthName "Nagios Access" - AuthType Basic - AuthUserFile /etc/nagios3/htpasswd.users - require valid-user - - ErrorDocument 403 "<h1>Authentication Problem</h1>Either you've entered an invalid password or the authentication<br>configuration of your check_mk web pages is incorrect.<br><br>Please make sure that you've edited the file<br><tt>/etc/apache2/conf.d/check_mk</tt> and made it use the same<br>authentication settings as your Nagios web pages.<br>Restart Apache afterwards." - ErrorDocument 500 "<h1>Server or Configuration Problem</h1>A Server problem occurred. You'll find details in the error log of Apache. One possible reason is, that the file <tt>/etc/nagios/htpasswd.users</tt> is missing. You can create that file with <tt>htpasswd</tt> or <tt>htpasswd2</tt>. A better solution might be to use your existing htpasswd file from your Nagios installation. Please edit <tt>/etc/apache2/conf.d/check_mk</tt> and change the path there. Restart Apache afterwards." - </Directory> - ## WARNING: automation is part of multisite, more information at - ## http://mathias-kettner.com/checkmk_multisite_automation.html - ## It uses a shared secret rather than HTTP Auth for authentication and - ## and is potentially exposed to public networks so is disabled on Debian - ## by default. If you need this feature, be sure you understand the - ## security implications and take necessary precautions before turning it on. - ## Automation is done without HTTP Auth - #<Location "/check_mk/automation.py"> - # Order allow,deny - # Allow from all - # Satisfy any - #</Location> - - ## WARNING: like automation above, run_cron is part of multisite. - ## It does not use HTTP Auth, but is only exposed to localhost. Having - ## it enabled has less risk, but since it's part of multisite it is - ## also disabled by default on Debian. - ## Trigger cron jobs. This is done without authentication - #<Location "/check_mk/run_cron.py"> - # Order deny,allow - # Deny from all - # Allow from 127.0.0.1 - # Satisfy any - #</Location> - -</IfModule> - - - -<IfModule !mod_python.c> - Alias /check_mk /usr/share/check_mk/web/htdocs - <Directory /usr/share/check_mk/web/htdocs> - Deny from all - ErrorDocument 403 "<h1>Check_mk: Incomplete Apache2 Installation</h1>You need mod_python in order to run the web interface of check_mk.<br> Please install mod_python and restart Apache." - </Directory> -</IfModule> diff --git a/debian/changelog b/debian/changelog index 58b7a35..75b268a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +check-mk (1.2.6p12-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Drop binary package for nagios3 which is no longer in Debian. + + -- Bas Couwenberg <[email protected]> Sat, 03 Dec 2016 18:11:37 +0100 + check-mk (1.2.6p12-1) unstable; urgency=medium [ Matt Taggart ] diff --git a/debian/check-mk-config-nagios3.install b/debian/check-mk-config-nagios3.install deleted file mode 100644 index b7510dd..0000000 --- a/debian/check-mk-config-nagios3.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/check_mk/check_mk_templates.cfg etc/nagios3/conf.d/check_mk -etc/check_mk/multisite.mk diff --git a/debian/check-mk-config-nagios3.links b/debian/check-mk-config-nagios3.links deleted file mode 100644 index 3bf633c..0000000 --- a/debian/check-mk-config-nagios3.links +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/check_mk/modules/defaults usr/share/check_mk/web/htdocs/defaults.py - diff --git a/debian/check-mk-config-nagios3.postinst b/debian/check-mk-config-nagios3.postinst deleted file mode 100644 index fdfa423..0000000 --- a/debian/check-mk-config-nagios3.postinst +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -set -e - -# a little helper for getting permissions right -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 -} - -dpkg-maintscript-helper mv_conffile \ - /etc/nagios3/conf.d/check_mk_templates.cfg \ - /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \ - 1.1.10-2 -- "$@" - -# older releases (1.1.12p7-1 at least) delivered the multisite conffile to -# /etc/apache2/conf.d. If it exists we need to move it to conf-available -# once it's moved then the code below will setup the conf.d symlink. -# This code wasn't in place until 1.2.6p4-2, so we need to check everything -# before that. -dpkg-maintscript-helper mv_conffile \ - /etc/apache2/conf.d/check_mk_multisite.cfg \ - /etc/apache2/conf-available/check_mk_multisite.cfg \ - 1.2.6p4-2 -- "$@" - -if [ -e '/etc/nagios3/conf.d/check_mk_objects.cfg' ]; -then - echo 'Migrate /etc/nagios3/conf.d/check_mk_objects.cfg to /etc/nagios3/conf.d/objects/check_mk/check_mk_objects.cfg' - mv /etc/nagios3/conf.d/check_mk_objects.cfg \ - /etc/nagios3/conf.d/check_mk/check_mk_objects.cfg -fi - -case "$1" in - configure) - #make sure our nagios user 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 - #fix permissions for some directorys - test -d /etc/nagios3/conf.d/check_mk || mkdir -p /etc/nagios3/conf.d/check_mk - setperm root nagios 0775 /etc/nagios3/conf.d/check_mk - - #handle the apache2.2 -> apache2.4 upgrade (see https://wiki.debian.org/Apache/PackagingFor24) - CONF="check-mk-multisite" - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke enconf $CONF || exit $? - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - if [ -d /etc/apache2/conf.d/ ]; then - if [ -L /etc/apache2/conf.d/$CONF.conf ]; then - # it's a symlink, all is well - true - elif [ -e /etc/apache2/conf.d/$CONF.conf ]; then - # it's not a symlink, but exists, error - echo "ERROR: /etc/apache2/conf.d/$CONF.conf is not a symlink, please investigate" 1>&2 - else - # we need to create the symlink - ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf - fi - fi - fi - ;; - abort-upgrade|abort-remove|abort-deconfigure) - ;; - *) - echo "postinst called with unknown argument \$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# diff --git a/debian/check-mk-config-nagios3.postrm b/debian/check-mk-config-nagios3.postrm deleted file mode 100644 index 1bfd02e..0000000 --- a/debian/check-mk-config-nagios3.postrm +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -dpkg-maintscript-helper mv_conffile \ - /etc/nagios3/conf.d/check_mk_templates.cfg \ - /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \ - 1.1.10-2 -- "$@" - -# older releases (1.1.12p7-1 at least) delivered the multisite conffile to -# /etc/apache2/conf.d. If it exists we need to move it to conf-available -# once it's moved then the code below will setup the conf.d symlink. -# This code wasn't in place until 1.2.6p4-2, so we need to check everything -# before that. -dpkg-maintscript-helper mv_conffile \ - /etc/apache2/conf.d/check_mk_multisite.cfg \ - /etc/apache2/conf-available/check_mk_multisite.cfg \ - 1.2.6p4-2 -- "$@" - -if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then - CONF="check-mk-multisite" - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke disconf $CONF || exit $? - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - [ -L /etc/apache2/conf.d/$CONF.conf ] && rm /etc/apache2/conf.d/$CONF.conf || true - fi -fi - -#DEBHELPER# diff --git a/debian/check-mk-config-nagios3.preinst b/debian/check-mk-config-nagios3.preinst deleted file mode 100644 index cdb5b1e..0000000 --- a/debian/check-mk-config-nagios3.preinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -dpkg-maintscript-helper mv_conffile \ - /etc/nagios3/conf.d/check_mk_templates.cfg \ - /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \ - 1.1.10-2 -- "$@" - -#DEBHELPER# diff --git a/debian/check-mk-config-nagios3.prerm b/debian/check-mk-config-nagios3.prerm deleted file mode 100644 index e69de29..0000000 diff --git a/debian/control b/debian/control index 82149b7..251baba 100644 --- a/debian/control +++ b/debian/control @@ -43,7 +43,7 @@ Description: general purpose nagios-plugin for retrieving data Package: check-mk-server Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, python, check-mk-config-nagios3 | check-mk-config-icinga, debconf +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, python, check-mk-config-icinga, debconf Recommends: check-mk-doc, snmp Description: general purpose nagios-plugin for retrieving data Check_mk adopts a new a approach for collecting data from operating systems @@ -70,21 +70,6 @@ Description: general purpose nagios-plugin for retrieving data . This package contains the icinga specific part of check_mk -Package: check-mk-config-nagios3 -Architecture: any -Pre-Depends: dpkg (>= 1.15.7.2~) -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser -Conflicts: check-mk-config-icinga -Description: general purpose nagios-plugin for retrieving data - Check_mk adopts a new a approach for collecting data from operating systems - and network components. It obsoletes NRPE, check_by_ssh, NSClient and - check_snmp. It has many benefits, the most important of which are: - . - * Significant reduction of CPU usage on the Nagios host. - * Automatic inventory of items to be checked on hosts. - . - This package contains the nagios 3 specific part of check_mk - Package: check-mk-livestatus Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -103,7 +88,7 @@ Description: general purpose nagios-plugin for retrieving data Package: check-mk-multisite Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-python, check-mk-config-nagios3 | check-mk-config-icinga +Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-python, check-mk-config-icinga Recommends: sudo, check-mk-doc Suggests: check-mk-livestatus Description: general purpose nagios-plugin for retrieving data diff --git a/debian/defaults.nagios3 b/debian/defaults.nagios3 deleted file mode 100644 index bdecf42..0000000 --- a/debian/defaults.nagios3 +++ /dev/null @@ -1,54 +0,0 @@ -# This file has been created during setup of check_mk at Thu Sep 24 12:57:08 PDT 2015. -# Do not edit this file. Also do not try to override these settings -# in main.mk since some of them are hardcoded into several files -# during setup. -# -# If you need to change these settings, you have to re-run setup.sh -# and enter new values when asked, or edit ~/.check_mk_setup.conf and -# run ./setup.sh --yes. - -check_mk_version = '1.2.6p12' -default_config_dir = '/etc/check_mk' -check_mk_configdir = '/etc/check_mk/conf.d' -share_dir = '/usr/share/check_mk' -checks_dir = '/usr/share/check_mk/checks' -notifications_dir = '/usr/share/check_mk/notifications' -inventory_dir = '/usr/share/check_mk/inventory' -check_manpages_dir = '/usr/share/check_mk/checks-man' -modules_dir = '/usr/share/check_mk/modules' -locale_dir = '/usr/share/check_mk/locale' -agents_dir = '/usr/share/check_mk/agents' -lib_dir = '/usr/lib/check_mk' -var_dir = '/var/lib/check_mk' -log_dir = '/var/lib/check_mk/log' -snmpwalks_dir = '/var/lib/check_mk/snmpwalks' -autochecksdir = '/var/lib/check_mk/autochecks' -precompiled_hostchecks_dir = '/var/lib/check_mk/precompiled' -counters_directory = '/var/lib/check_mk/counters' -tcp_cache_dir = '/var/lib/check_mk/cache' -tmp_dir = '/var/lib/check_mk/tmp' -logwatch_dir = '/var/lib/check_mk/logwatch' -nagios_objects_file = '/etc/nagios3/conf.d/check_mk/check_mk_objects.cfg' -rrd_path = '/var/lib/nagios/rrd' -rrddcached_socket = '/tmp/rrdcached.sock' -nagios_command_pipe_path = '/var/lib/nagios3/rw/nagios.cmd' -check_result_path = '/var/lib/nagios3/spool/checkresults' -nagios_status_file = '/var/cache/nagios3/status.dat' -nagios_conf_dir = '/etc/nagios3/conf.d' -nagios_user = 'nagios' -logwatch_notes_url = '/check_mk/logwatch.py?host=%s&file=%s' -www_group = 'nagios' -nagios_config_file = '/etc/nagios3/nagios.cfg' -nagios_startscript = '/etc/init.d/nagios3' -nagios_binary = '/usr/sbin/nagios3' -apache_config_dir = '/etc/apache2/conf.d' -htpasswd_file = '/etc/nagios3/htpasswd.users' -nagios_auth_name = 'Nagios Access' -web_dir = '/usr/share/check_mk/web' -livestatus_unix_socket = '/var/lib/nagios3/rw/live' -livebackendsdir = '/usr/share/check_mk/livestatus' -url_prefix = '/' -pnp_url = '/pnp4nagios/' -pnp_templates_dir = '/usr/share/check_mk/pnp-templates' -doc_dir = '/usr/share/doc/check-mk-doc' -check_mk_automation = 'sudo -u nagios /usr/bin/check_mk --automation' diff --git a/debian/rules b/debian/rules index 4fe9ed3..8392d07 100755 --- a/debian/rules +++ b/debian/rules @@ -85,16 +85,11 @@ install: build rm debian/tmp/usr/share/check_mk/web/htdocs/defaults.py mkdir -p debian/check-mk-config-icinga/usr/share/check_mk/modules/ cp debian/defaults.icinga debian/check-mk-config-icinga/usr/share/check_mk/modules/defaults - mkdir -p debian/check-mk-config-nagios3/usr/share/check_mk/modules/ - cp debian/defaults.nagios3 debian/check-mk-config-nagios3/usr/share/check_mk/modules/defaults # We need 2 different Apache configs mkdir -p debian/check-mk-config-icinga/etc/apache2/conf-available/ cp debian/apache.icinga debian/check-mk-config-icinga/etc/apache2/conf-available/check-mk-multisite.conf - mkdir -p debian/check-mk-config-nagios3/etc/apache2/conf-available/ - cp debian/apache.nagios3 debian/check-mk-config-nagios3/etc/apache2/conf-available/check-mk-multisite.conf # Adjust path names # sed -i 's#/nagios/cgi-bin/#/cgi-bin/icinga/#' debian/tmp/check-mk-config-icinga/etc/icinga/objects/check_mk_templates.cfg - # sed -i 's#/nagios/cgi-bin/#/cgi-bin/nagios3/#' debian/tmp/check-mk-config-nagios3/etc/nagios3/conf.d/check_mk_templates.cfg # Prepare agent files cp debian/tmp/usr/share/check_mk/agents/check_mk_agent.linux debian/check-mk-agent/usr/bin/check_mk_agent chmod +x debian/check-mk-agent/usr/bin/check_mk_agent -- 2.1.4

