From a3a6c4d02b418f3ba59db1c8b1dbc5a618b2a1de Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 18 Dec 2014 06:12:26 +0100 Subject: [PATCH] Forward-port packaging changes from Debian's pkg-icinga2 repository refs #8103 --- debian/classicui/apache2.conf | 15 +- debian/control | 242 +++++++++++++-------------- debian/copyright | 39 ++--- debian/icinga2-bin.lintian-overrides | 2 +- debian/icinga2-classicui.dirs | 1 + debian/icinga2-classicui.install | 4 +- debian/icinga2-classicui.links | 4 +- debian/icinga2-classicui.postinst | 24 ++- debian/icinga2-classicui.postrm | 8 +- debian/icinga2-common.install | 4 +- debian/icinga2-common.postinst | 14 +- debian/icinga2-common.postrm | 3 - debian/icinga2-ido-mysql.templates | 18 +- debian/icinga2-ido-pgsql.postinst | 2 +- debian/icinga2-ido-pgsql.templates | 18 +- debian/po/POTFILES.in | 2 + debian/po/templates.pot | 42 ++++- debian/rules | 17 +- 18 files changed, 271 insertions(+), 188 deletions(-) diff --git a/debian/classicui/apache2.conf b/debian/classicui/apache2.conf index cbc76619d..9b81bef60 100644 --- a/debian/classicui/apache2.conf +++ b/debian/classicui/apache2.conf @@ -3,26 +3,29 @@ ScriptAlias /cgi-bin/icinga2-classicui /usr/lib/cgi-bin/icinga2-classicui # Where the stylesheets (config files) reside -Alias /icinga2-classicui/stylesheets /etc/icinga2/classicui/stylesheets +Alias /icinga2-classicui/stylesheets /etc/icinga2-classicui/stylesheets # Where the HTML pages live Alias /icinga2-classicui /usr/share/icinga2/classicui - SetEnv ICINGA_CGI_CONFIG /etc/icinga2/classicui/cgi.cfg + SetEnv ICINGA_CGI_CONFIG /etc/icinga2-classicui/cgi.cfg - + Options FollowSymLinks DirectoryIndex index.html AllowOverride AuthConfig - Order Allow,Deny - Allow From All + + + Order Allow,Deny + Allow From All + AuthName "Icinga Access" AuthType Basic - AuthUserFile /etc/icinga2/classicui/htpasswd.users + AuthUserFile /etc/icinga2-classicui/htpasswd.users Require valid-user diff --git a/debian/control b/debian/control index 3d31cad94..4b4b0186f 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,13 @@ Source: icinga2 Section: admin Priority: extra Maintainer: Debian Nagios Maintainer Group -Uploaders: Markus Frosch , +Uploaders: Markus Frosch , Jan Wagner , Alexander Wirt Build-Depends: bison, cmake (>= 2.8.7), debhelper (>= 9), + dh-systemd (>= 1.5), flex, g++ (>= 1.96), libboost-dev, @@ -23,8 +24,10 @@ Build-Depends: bison, libreadline-dev, make (>= 3.81), po-debconf -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: http://www.icinga.org +Vcs-Browser: http://anonscm.debian.org/cgit/pkg-nagios/pkg-icinga2.git +Vcs-Git: git://anonscm.debian.org/pkg-nagios/pkg-icinga2.git Package: icinga2 Architecture: any @@ -33,45 +36,49 @@ Depends: icinga2-bin (= ${binary:Version}), ${misc:Depends} Recommends: icinga2-doc, monitoring-plugins-basic | nagios-plugins-basic Description: host and network monitoring system - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This is the metapackage to install all Icinga 2 features. Package: icinga2-common Architecture: all -Depends: adduser, lsb-release, ${misc:Depends} +Replaces: python-icinga2 +Conflicts: python-icinga2 +Provides: python-icinga2 +Depends: + adduser, + lsb-release, + ${misc:Depends} Description: host and network monitoring system - common files - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides configuration and some basic helper scripts. @@ -82,22 +89,21 @@ Depends: icinga2-common (= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} Description: host and network monitoring system - daemon - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides the Icinga 2 daemon. @@ -106,51 +112,50 @@ Architecture: all Section: doc Depends: ${misc:Depends} Description: host and network monitoring system - documentation - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides the Icinga 2 documentation. Package: icinga2-classicui Architecture: all +Pre-Depends: dpkg (>= 1.15.7.2) Depends: apache2-utils, icinga-cgi-bin (>= 1.11.5~), icinga2-common (= ${source:Version}), ${misc:Depends} Recommends: apache2 | httpd -Description: host and network monitoring system - classic ui integration - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. +Description: host and network monitoring system - classic UI + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see monitoring-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . - This package provides the integration into Icinga Classic UI. + This package provides support for the Icinga Classic User Interface. Package: icinga2-ido-mysql Architecture: any @@ -164,23 +169,22 @@ Depends: dbconfig-common, ${shlibs:Depends} Recommends: mysql-client Suggests: mysql-server -Description: host and network monitoring system - IDO for MySQL - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. +Description: host and network monitoring system - MySQL support + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides the IDO module for the MySQL database. @@ -196,48 +200,44 @@ Depends: dbconfig-common, ${shlibs:Depends} Recommends: postgresql-client Suggests: postgresql -Description: host and network monitoring system - IDO for PostgreSQL - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. +Description: host and network monitoring system - PostgreSQL support + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides the IDO module for the PostgreSQL database. Package: icinga2-dbg Architecture: any Section: debug -Priority: extra Depends: icinga2-bin (= ${binary:Version}), ${misc:Depends} Description: host and network monitoring system - debug symbols - Icinga 2 is a general-purpose monitoring application and the next generation - after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small - environment as well as big installations. - . - Rewritten from scratch in C++, with multi-threading and cluster support. + Icinga 2 is a general-purpose monitoring application to fit the needs of + any size of network. Icinga 1.x was a Nagios fork; this new generation + has been rewritten from scratch in C++, with multi-threading and cluster + support. . Features: - * All common features of Icinga and Nagios - * Much faster and more scalable than Icinga 1 and Nagios - * New configuration format, more intuitive and template based - * Monitoring several services by executing checks (see nagios-plugins*) - for example ICMP/ping, SMTP, POP3, HTTP, NNTP, or other TCP port - * Any small script can be used as a check plugin, when following the Nagios - plugin API - * Notifications about alerts with any custom script, or shipped examples - * Native support for Livestatus and Graphite + * all standard features of Icinga and Nagios; + * much faster and more scalable than Icinga 1 and Nagios; + * new, more intuitive, template-based configuration format; + * monitoring services on ICMP (ping) or TCP ports (HTTP, NNTP, POP3, + SMTP, etc.) by executing checks (see monitoring-plugins*); + * any small script following the Nagios plugin API can be used as a + check plugin; + * notifications about alerts for any custom script (with examples); + * native support for Livestatus and Graphite. . This package provides debug symbols for Icinga 2. - diff --git a/debian/copyright b/debian/copyright index 3222914a1..7a4dd034f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -33,8 +33,8 @@ License: GPL-2+-with-exception also delete it here. Files: debian/* -Copyright: 2012 Alexander Wirt - 2013-2014 Markus Frosch +Copyright: 2012-2014 Alexander Wirt + 2013-2014 Markus Frosch 2014 Icinga Development Team (http://www.icinga.org) License: GPL-2+ This package is free software; you can redistribute it and/or modify @@ -50,21 +50,6 @@ License: GPL-2+ 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: third-party/yajl/* -Copyright: 2007-2014 Lloyd Hilaiel -License: ISC - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - . - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Files: third-party/execvpe/* Copyright: 1991,92, 1995-99, 2002, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. License: LGPL-2.1+ @@ -96,7 +81,7 @@ License: GPL-1+ GNU General Public License for more details. . On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-1". + Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". Files: third-party/cmake/BoostTestTargets.* third-party/cmake/CopyResourcesToBuildTree.cmake @@ -104,7 +89,7 @@ Files: third-party/cmake/BoostTestTargets.* third-party/cmake/GetGitRevisionDescription.cmake.in Copyright: 2009-2010 Ryan Pavlik 2009-2010 Iowa State University -License: Boost Software License 1.0 +License: Boost-Software-License-1.0 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, @@ -234,3 +219,19 @@ License: BSD-3-clause This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. + +Files: third-party/yajl/* +Copyright: 2007-2014 Lloyd Hilaiel +License: ISC + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/debian/icinga2-bin.lintian-overrides b/debian/icinga2-bin.lintian-overrides index 7b2c79cea..173142457 100644 --- a/debian/icinga2-bin.lintian-overrides +++ b/debian/icinga2-bin.lintian-overrides @@ -1,2 +1,2 @@ # this is actually a defined word in the livestatus protocol... -spelling-error-in-binary usr/lib/x86_64-linux-gnu/icinga2/liblivestatus-0.so.0.0.3 childs children +spelling-error-in-binary usr/lib/*/icinga2/liblivestatus.so childs children diff --git a/debian/icinga2-classicui.dirs b/debian/icinga2-classicui.dirs index 557d253cb..49362347e 100644 --- a/debian/icinga2-classicui.dirs +++ b/debian/icinga2-classicui.dirs @@ -1 +1,2 @@ usr/share/icinga2/classicui +etc/icinga2-classicui diff --git a/debian/icinga2-classicui.install b/debian/icinga2-classicui.install index 06fde5e78..b2f8ee49e 100644 --- a/debian/icinga2-classicui.install +++ b/debian/icinga2-classicui.install @@ -1,4 +1,4 @@ debian/classicui/*.html usr/share/icinga2/classicui debian/classicui/*.js usr/share/icinga2/classicui -debian/classicui/apache2.conf etc/icinga2/classicui -debian/classicui/cgi.cfg etc/icinga2/classicui +debian/classicui/apache2.conf etc/icinga2-classicui +debian/classicui/cgi.cfg etc/icinga2-classicui diff --git a/debian/icinga2-classicui.links b/debian/icinga2-classicui.links index d211d0b97..17d32c623 100644 --- a/debian/icinga2-classicui.links +++ b/debian/icinga2-classicui.links @@ -1,5 +1,5 @@ -etc/icinga/stylesheets etc/icinga2/classicui/stylesheets -etc/icinga2/classicui/apache2.conf etc/apache2/conf-available/icinga2-classicui.conf +etc/icinga/stylesheets etc/icinga2-classicui/stylesheets +etc/icinga2-classicui/apache2.conf etc/apache2/conf-available/icinga2-classicui.conf usr/lib/cgi-bin/icinga usr/lib/cgi-bin/icinga2-classicui #usr/share/icinga/htdocs/docs usr/share/icinga2/classicui/docs usr/share/icinga/htdocs/images usr/share/icinga2/classicui/images diff --git a/debian/icinga2-classicui.postinst b/debian/icinga2-classicui.postinst index e01f1dc55..2bc740b5d 100644 --- a/debian/icinga2-classicui.postinst +++ b/debian/icinga2-classicui.postinst @@ -6,7 +6,7 @@ set -e . /usr/share/debconf/confmodule # shorthand -en="/etc/icinga2/classicui" +en="/etc/icinga2-classicui" # location of the default apache configuration for icinga apacheconf=$en/apache2.conf @@ -49,6 +49,21 @@ case "$1" in configure) enable_features_for_classic $@ + dpkg-maintscript-helper mv_conffile \ + /etc/icinga2/classicui/apache2.conf \ + /etc/icinga2-classicui/apache2.conf 2.2.0-1~ icinga2-classicui -- "$@" + + dpkg-maintscript-helper mv_conffile /etc/icinga2/classicui/cgi.cfg \ + /etc/icinga2-classicui/cgi.cfg 2.2.0-1~ icinga2-classicui -- "$@" + + if [ -f '/etc/icinga2/classicui/htpasswd.users' ] && [ ! -f '/etc/icinga2-classicui/htpasswd.users' ]; + then + echo "Move classicui password file to new location" + mv -f /etc/icinga2/classicui/htpasswd.users \ + /etc/icinga2-classicui/htpasswd.users + rmdir /etc/icinga2/classicui || true + fi + echo "enabling Apache2 config..." COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) @@ -63,12 +78,15 @@ case "$1" in elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then a2enmod cgi # create symlink if not existing - [ -f /etc/apache2/conf.d/icinga2-classicui.conf ] || ln -vs ../../icinga2/classicui/apache2.conf /etc/apache2/conf.d/icinga2-classicui.conf + [ -e /etc/apache2/conf.d/icinga2-classicui.conf ] || ln -vs $en/apache2.conf /etc/apache2/conf.d/icinga2-classicui.conf # reload webserver [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload fi + # check for an old symlink to the stylesheets + test -L /etc/icinga2/classicui/stylesheets && rm \ + /etc/icinga2/classicui/stylesheets && rmdir /etc/icinga2/classicui || true ### # Admin password ### @@ -84,8 +102,10 @@ case "$1" in if [ -n "$admpass" ]; then #unfortunatly that method only works with 2.4 if htpasswd 2>&1 | grep -q ' -i'; then + echo "$admpass to $htpw" echo "$admpass" | htpasswd -i "$htpw" icingaadmin else + echo "$admpass to $htpw" htpasswd -b "$htpw" icingaadmin "$admpass" fi fi diff --git a/debian/icinga2-classicui.postrm b/debian/icinga2-classicui.postrm index b3a2558df..84ad27a83 100644 --- a/debian/icinga2-classicui.postrm +++ b/debian/icinga2-classicui.postrm @@ -4,7 +4,7 @@ set -e # shorthand -en="/etc/icinga2/classicui" +en="/etc/icinga2-classicui" . /usr/share/debconf/confmodule @@ -31,6 +31,12 @@ case "$1" in remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) disable_apache2 "$@" + dpkg-maintscript-helper mv_conffile \ + /etc/icinga2/classicui/apache2.conf \ + /etc/icinga2-classicui/apache2.conf 2.2.0-1~ icinga2-classicui -- "$@" + + dpkg-maintscript-helper mv_conffile /etc/icinga2/classicui/cgi.cfg \ + /etc/icinga2-classicui/cgi.cfg 2.2.0-1~ icinga2-classicui -- "$@" ;; diff --git a/debian/icinga2-common.install b/debian/icinga2-common.install index 219a0d5f6..be8e5ea58 100644 --- a/debian/icinga2-common.install +++ b/debian/icinga2-common.install @@ -1,6 +1,8 @@ debian/config/apt.conf etc/icinga2/conf.d debian/tmp/etc/icinga2 debian/tmp/etc/logrotate.d -debian/tmp/etc/bash_completion.d tools/syntax/* usr/share/icinga2-common/syntax usr/share/icinga2 +debian/tmp/etc/bash_completion.d +etc/sysconfig/icinga2 usr/lib/icinga2 +usr/lib/icinga2/prepare-dirs diff --git a/debian/icinga2-common.postinst b/debian/icinga2-common.postinst index e1c6b49fd..d77ff1400 100644 --- a/debian/icinga2-common.postinst +++ b/debian/icinga2-common.postinst @@ -24,16 +24,6 @@ is_fresh_install() return 1 } -enable_default_features() { - FIX_VERSION="0.0.5+icingasnap201312070000" - if is_fresh_install $@ \ - || dpkg --compare-versions "$2" lt "$FIX_VERSION"; then - echo "enabling default icinga2 features" - icinga2 feature enable checker notification mainlog - fi - # handle new default features here in the future -} - case "$1" in configure) if ! getent passwd nagios > /dev/null ; then @@ -44,7 +34,7 @@ case "$1" in # explicitly set permissions on some files that are dependent # on the uid/gid of the nagios user, which is dynamically created. - setperm nagios nagios 0750 /etc/icinga2 + setperm nagios nagios 0750 /etc/icinga2 setperm nagios adm 2751 /var/log/icinga2 setperm nagios adm 2751 /var/log/icinga2/compat @@ -62,8 +52,6 @@ case "$1" in setperm nagios nagios 0750 /var/spool/icinga2/perfdata setperm nagios nagios 0750 /var/spool/icinga2/tmp - # enable default features - enable_default_features $@ ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/icinga2-common.postrm b/debian/icinga2-common.postrm index 473635daa..aa697bd79 100644 --- a/debian/icinga2-common.postrm +++ b/debian/icinga2-common.postrm @@ -5,9 +5,6 @@ set -e case "$1" in purge) - for f in /etc/icinga2/features-enabled/*; do - [ -L "$f" ] && rm -f "$f" - done rm -rf /var/lib/icinga2/ rm -rf /var/log/icinga2/ rm -rf /var/cache/icinga2/ diff --git a/debian/icinga2-ido-mysql.templates b/debian/icinga2-ido-mysql.templates index 4abc59912..746f54bf7 100644 --- a/debian/icinga2-ido-mysql.templates +++ b/debian/icinga2-ido-mysql.templates @@ -1,9 +1,17 @@ +# These templates have been reviewed by the debian-l10n-english +# team +# +# If modifications/additions/rewording are needed, please ask +# debian-l10n-english@lists.debian.org for advice. +# +# Even minor modifications require translation updates and such +# changes should be coordinated with translators and reviewers. + Template: icinga2-ido-mysql/enable Type: boolean Default: true -_Description: Enable icinga 2 mysql idoutils? - If you acknowledge this question the ido mysql - feature gets enabled for icinga 2. +_Description: Enable Icinga 2's ido-mysql feature? + Please specify whether Icinga 2 should use MySQL. . - If you want to disable the feature call - icinga2 feature disable ido-mysql + You may later disable the feature by using the + "icinga2 feature disable ido-mysql" command. diff --git a/debian/icinga2-ido-pgsql.postinst b/debian/icinga2-ido-pgsql.postinst index a8fe5074e..c9002326d 100644 --- a/debian/icinga2-ido-pgsql.postinst +++ b/debian/icinga2-ido-pgsql.postinst @@ -29,7 +29,7 @@ if [ "$1" = configure ]; then if [ ! -L /etc/icinga2/features-enabled/ido-pgsql.conf ] then echo "enable ido pgsql feature" - icinga2 feature enable ido-pgsql + icinga2 feature disable ido-pgsql echo "reloading icinga2" [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload diff --git a/debian/icinga2-ido-pgsql.templates b/debian/icinga2-ido-pgsql.templates index 0c46c1d94..0056f57c2 100644 --- a/debian/icinga2-ido-pgsql.templates +++ b/debian/icinga2-ido-pgsql.templates @@ -1,9 +1,17 @@ +# These templates have been reviewed by the debian-l10n-english +# team +# +# If modifications/additions/rewording are needed, please ask +# debian-l10n-english@lists.debian.org for advice. +# +# Even minor modifications require translation updates and such +# changes should be coordinated with translators and reviewers. + Template: icinga2-ido-pgsql/enable Type: boolean Default: true -_Description: Enable icinga 2 pgsql idoutils? - If you acknowledge this question the ido pgsql - feature gets enabled for icinga 2. +_Description: Enable Icinga 2's ido-pgsql feature? + Please specify whether Icinga 2 should use PostgreSQL. . - If you want to disable the feature call - icinga2 feature disable ido-pgsql + You may later disable the feature by using the + "icinga2 feature disable ido-pgsql" command. diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index 9bcb83291..50e9a1fdd 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1,3 @@ [type: gettext/rfc822deb] icinga2-classicui.templates +[type: gettext/rfc822deb] icinga2-ido-mysql.templates +[type: gettext/rfc822deb] icinga2-ido-pgsql.templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot index d9f1a4f84..7547ba022 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: icinga2\n" "Report-Msgid-Bugs-To: icinga2@packages.debian.org\n" -"POT-Creation-Date: 2013-10-22 14:29+0200\n" +"POT-Creation-Date: 2014-08-18 15:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -64,3 +64,43 @@ msgstr "" #: ../icinga2-classicui.templates:4001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-mysql.templates:2001 +msgid "Enable Icinga 2's ido-mysql feature?" +msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-mysql.templates:2001 +msgid "Please specify whether Icinga 2 should use MySQL." +msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-mysql.templates:2001 +msgid "" +"You may later disable the feature by using the \"icinga2 feature disable ido-" +"mysql\" command." +msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-pgsql.templates:2001 +msgid "Enable Icinga 2's ido-pgsql feature?" +msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-pgsql.templates:2001 +msgid "Please specify whether Icinga 2 should use PostgreSQL." +msgstr "" + +#. Type: boolean +#. Description +#: ../icinga2-ido-pgsql.templates:2001 +msgid "" +"You may later disable the feature by using the \"icinga2 feature disable ido-" +"pgsql\" command." +msgstr "" diff --git a/debian/rules b/debian/rules index d62cb9541..69941a952 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,10 @@ #export DH_VERBOSE=1 %: - dh $@ + dh $@ --with systemd + +override_dh_systemd_enable: + dh_systemd_enable --name=icinga2 override_dh_auto_build: dh_auto_build --parallel @@ -20,8 +23,12 @@ ifeq ($(shell test -d .git && echo "git"),git) # verify we are in a GIT repo endif # now clean build dir dh_auto_clean + test ! -f third-party/cmake/GNUInstallDirs.cmake.disabled || \ + mv third-party/cmake/GNUInstallDirs.cmake.disabled third-party/cmake/GNUInstallDirs.cmake override_dh_auto_configure: + test -f third-party/cmake/GNUInstallDirs.cmake.disabled || \ + mv third-party/cmake/GNUInstallDirs.cmake third-party/cmake/GNUInstallDirs.cmake.disabled dh_auto_configure -- \ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ @@ -29,8 +36,8 @@ override_dh_auto_configure: -DICINGA2_USER=nagios \ -DICINGA2_GROUP=nagios \ -DICINGA2_COMMAND_GROUP=www-data \ - -DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \ - -DICINGA2_UNITY_BUILD=TRUE + -DICINGA2_UNITY_BUILD=TRUE \ + -DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins override_dh_auto_install: dh_auto_install @@ -39,6 +46,7 @@ override_dh_auto_install: override_dh_install: dh_install + chmod +x debian/icinga2-common/usr/lib/icinga2/prepare-dirs # remove ido files from other packages if [ -d debian/icinga2-common/ ]; then rm debian/icinga2-common/etc/icinga2/features-available/ido-*; fi rm debian/icinga2-bin/usr/lib/*/icinga2/libdb_ido_* @@ -51,7 +59,6 @@ override_dh_install: done; \ done - override_dh_installinit: dh_installinit --name=icinga2 @@ -59,4 +66,4 @@ override_dh_installinit: override_dh_strip: dh_strip --dbg-package=icinga2-dbg -# vi: noexpandtab : +# vi: noexpandtab ts=4 sw=4 :