diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..a6cf5dd3d --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,9 @@ +files +*.debhelper +*.debhelper.log +*.substvars + +icinga2/ +icinga2-*/ +tmp/ + diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 000000000..994899492 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +icinga2 for Debian +------------------ + + + + + + diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 000000000..b3bfa9820 --- /dev/null +++ b/debian/TODO @@ -0,0 +1,14 @@ +icinga2 source TODOs +==================== + +* Replace embedded tools + - doc/ strapdownjs and jquery + +* Document embedded sources in tarball + - third-party/ + +* init + - configtest + - multi instanz + - pid file handling testen + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..727a9a050 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,11 @@ +icinga2 (0.0.3-1~icingaorg+0) UNRELEASED; urgency=low + + * Initial Debian packaging for the Icinga 2 alphas and betas + * [dac8fa6] Imported Upstream version 0.0.3 + + *** Please note that at this point Icinga 2 is highly experimental software + *** and is missing a significant portion of the planned features. This + *** is merely a technology preview and if you're planning to set up + *** a production environment for Icinga you should use Icinga 1.x instead. + + -- Markus Frosch Wed, 23 Oct 2013 17:41:03 +0200 diff --git a/debian/classicui/README b/debian/classicui/README new file mode 100644 index 000000000..d34b3141d --- /dev/null +++ b/debian/classicui/README @@ -0,0 +1,6 @@ +These webpages are copied from the icinga classic interface, for being able +to provide this interface for Icinga 2. + +Unfortunatly some modifications have to be made... + +-- Markus Frosch diff --git a/debian/classicui/apache2.conf b/debian/classicui/apache2.conf new file mode 100644 index 000000000..cbc76619d --- /dev/null +++ b/debian/classicui/apache2.conf @@ -0,0 +1,28 @@ +# apache configuration for icinga + +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 + +# Where the HTML pages live +Alias /icinga2-classicui /usr/share/icinga2/classicui + + + SetEnv ICINGA_CGI_CONFIG /etc/icinga2/classicui/cgi.cfg + + + + Options FollowSymLinks + + DirectoryIndex index.html + + AllowOverride AuthConfig + Order Allow,Deny + Allow From All + + AuthName "Icinga Access" + AuthType Basic + AuthUserFile /etc/icinga2/classicui/htpasswd.users + Require valid-user + diff --git a/debian/classicui/cgi.cfg b/debian/classicui/cgi.cfg new file mode 100644 index 000000000..eb7316a2f --- /dev/null +++ b/debian/classicui/cgi.cfg @@ -0,0 +1,73 @@ +# Icinga 2 Classic UI configuration +# +# requires icinga-gui package +# check http://docs.icinga.org for option details +standalone_installation=1 +physical_html_path=/usr/share/icinga +url_html_path=/icinga2-classicui +url_stylesheets_path=/icinga2-classicui/stylesheets +http_charset=utf-8 +refresh_rate=30 +refresh_type=1 +escape_html_tags=1 +result_limit=50 +show_tac_header=1 +use_pending_states=1 +first_day_of_week=0 +suppress_maintenance_downtime=0 +action_url_target=main +notes_url_target=main +use_authentication=1 +use_ssl_authentication=0 +lowercase_user_name=0 +authorized_for_system_information=icingaadmin +authorized_for_configuration_information=icingaadmin +authorized_for_full_command_resolution=icingaadmin +authorized_for_system_commands=icingaadmin +authorized_for_all_services=icingaadmin +authorized_for_all_hosts=icingaadmin +authorized_for_all_service_commands=icingaadmin +authorized_for_all_host_commands=icingaadmin +show_all_services_host_is_authorized_for=1 +show_partial_hostgroups=0 +show_partial_servicegroups=0 +default_statusmap_layout=5 +status_show_long_plugin_output=0 +display_status_totals=0 +highlight_table_rows=1 +add_notif_num_hard=28 +add_notif_num_soft=0 +use_logging=0 +cgi_log_file=/var/log/icinga/gui/icinga-cgi.log +cgi_log_rotation_method=d +cgi_log_archive_path=/var/log/icinga/gui +enforce_comments_on_actions=0 +send_ack_notifications=1 +persistent_ack_comments=0 +lock_author_names=1 +default_downtime_duration=7200 +set_expire_ack_by_default=0 +default_expiring_acknowledgement_duration=86400 +default_expiring_disabled_notifications_duration=86400 +tac_show_only_hard_state=0 +show_tac_header_pending=1 +exclude_customvar_name=PASSWORD,COMMUNITY +exclude_customvar_value=secret +extinfo_show_child_hosts=0 +tab_friendly_titles=1 +###################################### +# STANDALONE (ICINGA 2) OPTIONS +# requires standalone_installation=1 +###################################### +object_cache_file=/var/cache/icinga2/objects.cache +status_file=/var/cache/icinga2/status.dat +resource_file=/etc/icinga/resource.cfg +command_file=/var/run/icinga2/cmd/icinga2.cmd +check_external_commands=1 +interval_length=60 +status_update_interval=10 +log_file=/var/log/icinga2/compat/icinga.log +log_rotation_method=h +log_archive_path=/var/log/icinga2/compat/archives +date_format=us +# EOF diff --git a/debian/classicui/index.html b/debian/classicui/index.html new file mode 100644 index 000000000..156564619 --- /dev/null +++ b/debian/classicui/index.html @@ -0,0 +1,21 @@ + + + + + Icinga2 Classic + + + + + + + + + + + + <body> + <p>These pages require a browser which supports frames.</p> + </body> + + diff --git a/debian/classicui/menu.html b/debian/classicui/menu.html new file mode 100644 index 000000000..b578352ef --- /dev/null +++ b/debian/classicui/menu.html @@ -0,0 +1,81 @@ + + + + Web Interface Monitoring + + + + + + + + + + + + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..2dd1a88e8 --- /dev/null +++ b/debian/control @@ -0,0 +1,103 @@ +Source: icinga2 +Section: admin +Priority: extra +Maintainer: Debian Nagios Maintainer Group +Uploaders: Alexander Wirt , Markus Frosch +Build-Depends: automake, + autoconf, + autotools-dev, + bison, + debhelper (>= 9), + dh-autoreconf, + doxygen, + flex, + g++ (>= 1.96), + libboost-dev, + libboost-program-options-dev, + libboost-signals-dev, + libboost-system-dev, + libboost-test-dev, + libboost-thread-dev, + libltdl-dev, + libmysqlclient-dev, + libssl-dev, + libtool, + po-debconf, + python-dev +Standards-Version: 3.9.4 +Homepage: http://www.icinga.org + +Package: icinga2 +Architecture: any +Depends: icinga2-bin (= ${binary:Version}), + icinga2-common (= ${source:Version}), + ${misc:Depends} +Recommends: icinga2-doc +Description: host and network monitoring system + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This is the metapackage to install all Icinga 2 features. + +Package: icinga2-common +Architecture: all +Depends: adduser, ${misc:Depends}, ${perl:Depends} +Description: host and network monitoring system - common files + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This package provides configuration and some basic helper scripts. + +Package: icinga2-bin +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: icinga2-common (= ${source:Version}), + ${misc:Depends}, ${shlibs:Depends} +Description: host and network monitoring system - daemon + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This package provides the Icinga 2 daemon. + +Package: icinga2-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Description: host and network monitoring system - documentation + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This package provides the Icinga 2 documentation. + +Package: icinga2-classicui +Architecture: all +Depends: icinga2-common (= ${source:Version}), + icinga-cgi (>= 1.9.0~), + ${misc:Depends} +Recommends: apache2 | httpd +Description: host and network monitoring system - classic ui integration + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This package provides the integration into Icinga Classic UI. + +Package: icinga2-ido-mysql +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: icinga2-common (= ${source:Version}), + icinga2-bin (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Recommends: mysql-client +Suggests: mysql-server +Description: host and network monitoring system - IDO for MySQL + Icinga 2 is still in development and not ready for production use! + . + Better description to come. + . + This package provides the IDO module for the MySQL database. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..359aaf558 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,51 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Icinga 2 +Source: http://www.icinga.org + +Files: * +Copyright: 2012-2013 Icinga Development Team (http://www.icinga.org/) +License: GPL-2+-with-exeception + 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. + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + . + In addition, as a special exception, the copyright holders give + permission to link the code of portions of this program with the + OpenSSL library under certain conditions as described in each + individual source file, and distribute linked combinations including + the two. + . + You must obey the GNU General Public License in all respects for all + of the code used other than OpenSSL. If you modify file(s) with this + exception, you may extend this exception to your version of the + file(s), but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. If you delete + this exception statement from all source files in the program, then + also delete it here. + +Files: debian/* +Copyright: 2012 Alexander Wirt + 2013 Markus Frosch /dev/null 2>&1; then + chown "$user":"$group" "$file" + chmod "$mode" "$file" + fi +} + + +case "$1" in + configure) + if [ -x "`which icinga2-enable-feature`" ]; then + echo "enabling icinga2 feature compatlog and statusdata" + icinga2-enable-feature compatlog + icinga2-enable-feature statusdata + + echo "reloading icinga2" + [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload + fi + + echo "enabling Apache2 config..." + 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 enconf icinga2-classicui + + # OLD methods for Apache < 2.4 + elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then + # 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 + + # reload webserver + [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload + fi + + ### + # Admin password + ### + db_get icinga2-classicui/adminpassword + admpass="$RET" + + test -f "$htpw" || touch "$htpw" + setperm root www-data 0640 "$htpw" + + # we reset the password every run, so if it exists we're running + # after being specifically given a password and can unconditionally set it. + # XXX there's no way of setting the pw w/out giving it on the cmdline? wtf? + if [ -n "$admpass" ]; then + #unfortunatly that method only works with 2.4 + if htpasswd 2>&1 | grep -q ' -i'; then + echo "$admpass" | htpasswd -i "$htpw" icingaadmin + else + htpasswd -b "$htpw" icingaadmin "$admpass" + fi + fi + + # everything went well, so now let's reset the password + db_set icinga2-classicui/adminpassword "" + db_set icinga2-classicui/adminpassword-repeat "" + # ... done with debconf here + db_stop + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +init_failed () +{ + echo "Icinga 2 was unable to start due to configuration errors."; + echo "Please fix them and manually restart the icinga2 daemon using"; + echo " ´service icinga2 start´"; +} + +#DEBHELPER# + +exit 0 diff --git a/debian/icinga2-classicui.postrm b/debian/icinga2-classicui.postrm new file mode 100644 index 000000000..b3a2558df --- /dev/null +++ b/debian/icinga2-classicui.postrm @@ -0,0 +1,45 @@ +#!/bin/sh +# postrm script for icinga2-common + +set -e + +# shorthand +en="/etc/icinga2/classicui" + +. /usr/share/debconf/confmodule + +# Apache2 +disable_apache2() { + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + echo "disabling Apache2 configuration ..." + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf icinga2-classicui + fi + if [ -L /etc/apache2/conf.d/icinga-web.conf ]; then + echo "removing link /etc/apache2/conf.d/icinga2-classicui.conf ..." + # remove link to config + rm -f /etc/apache2/conf.d/icinga2-classicui.conf + # reload webserver + [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true + fi +} +case "$1" in + purge) + disable_apache2 "$@" + rm -f "$en/htpasswd.users" + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + disable_apache2 "$@" + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/icinga2-classicui.templates b/debian/icinga2-classicui.templates new file mode 100644 index 000000000..dbcf1d791 --- /dev/null +++ b/debian/icinga2-classicui.templates @@ -0,0 +1,34 @@ +# These templates have been copied from the icinga-cgi package +# +# Only slight modifications have been made. +# ------------------------------------------------------------ +# +# 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-classicui/adminpassword +Type: password +_Description: Icinga 2 ClassicUI administration password: + Please provide the password to be created with the "icingaadmin" user. + . + This is the username and password to use when connecting to the Icinga + server after completing the configuration. If you do not provide + a password, you will have to configure access to Icinga manually + later on. + +Template: icinga2-classicui/adminpassword-repeat +Type: password +_Description: Re-enter password to verify: + Please enter the same user password again to verify you have typed it + correctly. + +Template: icinga2-classicui/adminpassword-mismatch +Type: error +_Description: Password input error + The two passwords you entered were not the same. Please try again. diff --git a/debian/icinga2-common.dirs b/debian/icinga2-common.dirs new file mode 100644 index 000000000..083d2f18b --- /dev/null +++ b/debian/icinga2-common.dirs @@ -0,0 +1,8 @@ +var/cache/icinga2 +var/lib/icinga2 +var/lib/icinga2/cluster/config +var/lib/icinga2/cluster/log +var/log/icinga2 +var/log/icinga2/compat/archives +var/spool/icinga2 +var/spool/icinga2/perfdata diff --git a/debian/icinga2-common.icinga2.default b/debian/icinga2-common.icinga2.default new file mode 100644 index 000000000..afb0e75bc --- /dev/null +++ b/debian/icinga2-common.icinga2.default @@ -0,0 +1,3 @@ +# default settings for icinga2's initscript + +#DAEMON_ARGS="-c /etc/icinga2/icinga2.conf -e /var/log/icinga2/icinga2.err -d -u nagios -g nagios" diff --git a/debian/icinga2-common.icinga2.init b/debian/icinga2-common.icinga2.init new file mode 100644 index 000000000..eca2ff278 --- /dev/null +++ b/debian/icinga2-common.icinga2.init @@ -0,0 +1,157 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: icinga2 +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: icinga2 host/service/network monitoring and management system +# Description: icinga2 is a monitoring and management system for hosts, services and networks. +### END INIT INFO + +# Author: Alexander Wirt +# Markus Frosch + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="icinga2 monitoring daemon" +NAME=icinga2 +DAEMON=/usr/sbin/icinga2 +DAEMON_ARGS="-c /etc/icinga2/icinga2.conf -e /var/log/icinga2/icinga2.err -d -u nagios -g nagios" +PIDFILE=/var/run/icinga2/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# check run directory +check_run () { + if [ ! -d '/var/run/icinga2' ]; + then + mkdir /var/run/icinga2 + chown nagios:nagios /var/run/icinga2 + chmod 0750 /var/run/icinga2 + fi +} + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +check_run + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + reload|force-reload) + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + ;; + restart) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|reload|force-reload|restart}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/icinga2-common.install b/debian/icinga2-common.install new file mode 100644 index 000000000..77c692702 --- /dev/null +++ b/debian/icinga2-common.install @@ -0,0 +1,5 @@ +debian/tmp/etc/icinga2 +usr/bin/icinga2-build* +usr/bin/icinga2-migrate-config +usr/sbin/icinga2-*-feature +usr/share/icinga2 diff --git a/debian/icinga2-common.postinst b/debian/icinga2-common.postinst new file mode 100644 index 000000000..b33c9d1e9 --- /dev/null +++ b/debian/icinga2-common.postinst @@ -0,0 +1,61 @@ +#!/bin/sh +# postinst script for icinga2-common + +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) + 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 + + # explicitly set permissions on some files that are dependent + # on the uid/gid of the nagios user, which is dynamically created. + setperm nagios adm 2751 /var/log/icinga2 + setperm nagios adm 2751 /var/log/icinga2/compat + setperm nagios adm 2755 /var/log/icinga2/compat/archives + + setperm nagios nagios 0750 /var/lib/icinga2 + setperm nagios nagios 0750 /var/lib/icinga2/cluster + setperm nagios nagios 0750 /var/lib/icinga2/cluster/config + setperm nagios nagios 0750 /var/lib/icinga2/cluster/log + + setperm nagios www-data 0750 /var/cache/icinga2 + setperm nagios nagios 0750 /var/spool/icinga2 + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +init_failed () +{ + echo "Icinga 2 was unable to start due to configuration errors."; + echo "Please fix them and manually restart the icinga2 daemon using"; + echo " ´service icinga2 start´"; +} + +#DEBHELPER# + +exit 0 diff --git a/debian/icinga2-common.postrm b/debian/icinga2-common.postrm new file mode 100644 index 000000000..f6d0e94b9 --- /dev/null +++ b/debian/icinga2-common.postrm @@ -0,0 +1,29 @@ +#!/bin/sh +# postrm script for icinga2-common + +set -e + +case "$1" in + purge) + rm -f /etc/icinga2/features-enabled/* + rm -rf /var/lib/icinga2/ + rm -rf /var/log/icinga2/ + rm -rf /var/cache/icinga2/ + rm -rf /var/spool/icinga2/ + ;; + + 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/icinga2-doc.doc-base b/debian/icinga2-doc.doc-base new file mode 100644 index 000000000..170ab7e54 --- /dev/null +++ b/debian/icinga2-doc.doc-base @@ -0,0 +1,10 @@ +Document: icinga2 +Title: Icinga 2 Documentation +Author: Icinga Developement Team +Abstract: Icinga 2 user and administrator's documentation +Section: Network/Monitoring + +Format: HTML +Index: /usr/share/doc/icinga2/htdocs/index.html +Files: /usr/share/doc/icinga2/htdocs/*.html + diff --git a/debian/icinga2-doc.install b/debian/icinga2-doc.install new file mode 100644 index 000000000..519ebc026 --- /dev/null +++ b/debian/icinga2-doc.install @@ -0,0 +1 @@ +usr/share/doc/icinga2/htdocs diff --git a/debian/icinga2-ido-mysql.install b/debian/icinga2-ido-mysql.install new file mode 100644 index 000000000..96633eb7f --- /dev/null +++ b/debian/icinga2-ido-mysql.install @@ -0,0 +1,5 @@ +debian/tmp/etc/icinga2/features-available/ido-mysql.conf +usr/lib/*/icinga2/libdb_ido_mysql* +components/db_ido_mysql/schema/*.sql usr/share/icinga2-ido-mysql/schema +# for later +#components/db_ido_mysql/schema/upgrades/*.sql usr/share/icinga2-ido-mysql/schema/upgrades diff --git a/debian/patches/01_disable_git_version b/debian/patches/01_disable_git_version new file mode 100644 index 000000000..db71458bf --- /dev/null +++ b/debian/patches/01_disable_git_version @@ -0,0 +1,19 @@ +Description: Disabled reconf of version includes + This helps avoiding the software to use the git-buildpackage for version info +Author: Markus Frosch +Last-Update: 2013-10-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,8 +54,8 @@ + uninstall-local: + -rm -r $(icinga2docdir) + +-BUILT_SOURCES = icinga-version.stamp +-CLEANFILES = icinga-version.h ++#BUILT_SOURCES = icinga-version.stamp ++#CLEANFILES = icinga-version.h + GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh + icinga-version.stamp: + @if test -f "$(srcdir)/icinga-version.h"; then \ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..da84c1779 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +01_disable_git_version diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 000000000..d9f1a4f84 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +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" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: password +#. Description +#: ../icinga2-classicui.templates:2001 +msgid "Icinga 2 ClassicUI administration password:" +msgstr "" + +#. Type: password +#. Description +#: ../icinga2-classicui.templates:2001 +msgid "" +"Please provide the password to be created with the \"icingaadmin\" user." +msgstr "" + +#. Type: password +#. Description +#: ../icinga2-classicui.templates:2001 +msgid "" +"This is the username and password to use when connecting to the Icinga " +"server after completing the configuration. If you do not provide a password, " +"you will have to configure access to Icinga manually later on." +msgstr "" + +#. Type: password +#. Description +#: ../icinga2-classicui.templates:3001 +msgid "Re-enter password to verify:" +msgstr "" + +#. Type: password +#. Description +#: ../icinga2-classicui.templates:3001 +msgid "" +"Please enter the same user password again to verify you have typed it " +"correctly." +msgstr "" + +#. Type: error +#. Description +#: ../icinga2-classicui.templates:4001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../icinga2-classicui.templates:4001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..a2ee1573f --- /dev/null +++ b/debian/rules @@ -0,0 +1,57 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +define SAVEFILE + test -f $1.dh-orig || cp $1 $1.dh-orig +endef +define RESTOREFILE + test -f $1.dh-orig && mv $1.dh-orig $1; : +endef + +%: + dh $@ --with autotools-dev --with autoreconf + +override_dh_autoreconf: + $(call SAVEFILE,Makefile.in) + $(call SAVEFILE,icinga2.spec) + $(call SAVEFILE,third-party/ltdl/Makefile.in) + $(call SAVEFILE,third-party/ltdl/aclocal.m4) + $(call SAVEFILE,third-party/ltdl/configure) + dh_autoreconf autoreconf -- -f -i third-party/ltdl/ + +override_dh_autoreconf_clean: + dh_autoreconf_clean + $(call RESTOREFILE,Makefile.in) + $(call RESTOREFILE,icinga2.spec) + $(call RESTOREFILE,third-party/ltdl/Makefile.in) + $(call RESTOREFILE,third-party/ltdl/aclocal.m4) + $(call RESTOREFILE,third-party/ltdl/configure) + +override_dh_auto_clean: + dh_auto_clean + rm -f config.log + rm -f config.status + +override_dh_auto_configure: + dh_auto_configure -- --enable-python \ + --with-icinga-user=root \ + --with-icinga-group=bin \ + --with-icingacmd-user=root \ + --with-icingacmd-group=bin + +override_dh_auto_install: + dh_auto_install + # cleanup dependencies in .la files + sed -i "/dependency_libs/ s/'.*'/''/" `find debian/tmp/ -name '*.la'` + +override_dh_install: + dh_install + # remove ido files from other packages + if [ -d debian/icinga2-common/ ]; then rm debian/icinga2-common/etc/icinga2/features-available/ido-mysql*; fi + rm debian/icinga2-bin/usr/lib/*/icinga2/libdb_ido_mysql* + +override_dh_installinit: + dh_installinit --name=icinga2 + +# vi: noexpandtab : diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)