[Pkg-nagios-changes] [pkg-icinga2] 03/08: Imported most of the Debian packaging changes from the upstream project
Markus Frosch
lazyfrosch-guest at moszumanska.debian.org
Sun Dec 29 20:30:17 UTC 2013
This is an automated email from the git hooks/post-receive script.
lazyfrosch-guest pushed a commit to branch master
in repository pkg-icinga2.
commit 50d402ebc6707019b4d385d4f35bde6b6a5b4fc9
Author: Markus Frosch <markus at lazyfrosch.de>
Date: Sun Dec 29 18:37:56 2013 +0100
Imported most of the Debian packaging changes from the upstream project
Already removed some of the native build specific stuff.
---
debian/TODO | 5 +
debian/control | 39 ++++-
debian/etc/icinga2.conf | 83 ----------
debian/gbp.conf | 4 +
debian/icinga2-classicui.config | 4 +-
debian/icinga2-classicui.lintian-overrides | 5 +
debian/icinga2-classicui.postinst | 30 +++-
debian/icinga2-common.dirs | 1 +
debian/icinga2-common.icinga2.default | 6 +-
debian/icinga2-common.icinga2.init | 246 +++++++++++++++++++----------
debian/icinga2-common.postinst | 25 +++
debian/icinga2-common.postrm | 4 +-
debian/icinga2-ido-pgsql.install | 5 +
debian/patches/01_disable_git_version | 19 ---
debian/patches/series | 1 -
debian/po/POTFILES.in | 1 +
debian/rules | 56 ++-----
17 files changed, 289 insertions(+), 245 deletions(-)
diff --git a/debian/TODO b/debian/TODO
index 019b737..b3bfa98 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -7,3 +7,8 @@ icinga2 source TODOs
* Document embedded sources in tarball
- third-party/
+* init
+ - configtest
+ - multi instanz
+ - pid file handling testen
+
diff --git a/debian/control b/debian/control
index 2dd1a88..9bc8216 100644
--- a/debian/control
+++ b/debian/control
@@ -3,25 +3,22 @@ Section: admin
Priority: extra
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
Uploaders: Alexander Wirt <formorer at debian.org>, Markus Frosch <markus at lazyfrosch.de>
-Build-Depends: automake,
- autoconf,
- autotools-dev,
+Build-Depends: cmake (>= 2.8.7),
+ make (>= 3.81),
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,
+ libboost-regex-dev,
libmysqlclient-dev,
+ libpq-dev,
libssl-dev,
- libtool,
po-debconf,
python-dev
Standards-Version: 3.9.4
@@ -101,3 +98,31 @@ Description: host and network monitoring system - IDO for MySQL
.
This package provides the IDO module for the MySQL database.
+Package: icinga2-ido-pgsql
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: icinga2-common (= ${source:Version}),
+ icinga2-bin (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}
+Recommends: postgresql-client
+Suggests: postgresql
+Description: host and network monitoring system - IDO for PostgreSQL
+ Icinga 2 is still in development and not ready for production use!
+ .
+ Better description to come.
+ .
+ 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 still in development and not ready for production use!
+ .
+ Better description to come.
+ .
+ This package provides debug symbols for Icinga 2.
+
diff --git a/debian/etc/icinga2.conf b/debian/etc/icinga2.conf
deleted file mode 100644
index 835de77..0000000
--- a/debian/etc/icinga2.conf
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Icinga 2 configuration file
- * - this is where you define settings for the Icinga application including
- * which hosts/services to check.
- *
- * The /usr/share/doc/icinga2-config.txt file in the source tarball has a detailed
- * description of what configuration options are available.
- */
-
-/**
- * Global configuration settings
- */
-local object IcingaApplication "icinga" {
- macros = {
- plugindir = "/usr/lib/nagios/plugins"
- },
- pidpath = "/var/run/icinga2.pid",
- logpath = "/var/log/icinga2/icinga2.log",
- statepath = "/var/lib/icinga2/icinga2.state",
-}
-
-/**
- * The checker component takes care of executing service checks.
- */
-local object Component "checker" {
-
-}
-
-/**
- * The delegation component assigns services to checkers. You need to load
- * this component even if your Icinga setup only consists of a single instance.
- */
-local object Component "delegation" {
-
-}
-
-/**
- * The compat component periodically updates the status.dat and objects.cache
- * files. These are used by the Icinga 1.x CGIs to display the state of
- * hosts and services.
- */
-local object Component "compat" {
-
-}
-
-/**
- * This template defines some basic parameters for services that use
- * external plugins for their checks.
- */
-abstract object Service "icinga-service" {
- methods = {
- check = "native::PluginCheck"
- }
-}
-
-/**
- * The service template for ping checks. In an Icinga 1.x environment
- * this would be defined as a check command.
- */
-abstract object Service "ping" inherits "icinga-service" {
- check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
-
- macros += {
- wrta = 50,
- wpl = 5,
- crta = 100,
- cpl = 10
- }
-}
-
-/**
- * And finally we define some host that should be checked.
- */
-object Host "localhost" {
- services = { "ping" },
-
- macros = {
- address = "127.0.0.1"
- },
-
- check_interval = 1m
-}
-
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..d0905df
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+
+[git-import-orig]
+filter = debian
diff --git a/debian/icinga2-classicui.config b/debian/icinga2-classicui.config
index 1931e04..cc1f21d 100644
--- a/debian/icinga2-classicui.config
+++ b/debian/icinga2-classicui.config
@@ -1,4 +1,6 @@
-#!/bin/sh -e
+#!/bin/sh
+
+set -e
. /usr/share/debconf/confmodule
diff --git a/debian/icinga2-classicui.lintian-overrides b/debian/icinga2-classicui.lintian-overrides
new file mode 100644
index 0000000..a69ec21
--- /dev/null
+++ b/debian/icinga2-classicui.lintian-overrides
@@ -0,0 +1,5 @@
+# ignoring apache2 warning
+# this is actually not a problem, because the handling is backwards compatible
+apache2-reverse-dependency-calls-invoke-rc.d postrm
+apache2-reverse-dependency-calls-wrapper-script postinst a2enmod
+apache2-reverse-dependency-calls-invoke-rc.d postinst
diff --git a/debian/icinga2-classicui.postinst b/debian/icinga2-classicui.postinst
index 13309f5..d50780c 100644
--- a/debian/icinga2-classicui.postinst
+++ b/debian/icinga2-classicui.postinst
@@ -26,17 +26,31 @@ setperm() {
fi
}
+is_fresh_install()
+{
+ if [ -z "$2" ] ; then
+ return 0
+ fi
+ return 1
+}
+
+enable_features_for_classic() {
+ if is_fresh_install $@; then
+ echo "enabling icinga2 features for classicui"
+
+ for feature in compatlog statusdata command; do
+ icinga2-enable-feature $feature
+ done
+
+ echo "reloading icinga2"
+ [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
+ fi
+ # handle new default features here in the future
+}
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
+ enable_features_for_classic $@
echo "enabling Apache2 config..."
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
diff --git a/debian/icinga2-common.dirs b/debian/icinga2-common.dirs
index 083d2f1..60027ed 100644
--- a/debian/icinga2-common.dirs
+++ b/debian/icinga2-common.dirs
@@ -6,3 +6,4 @@ var/log/icinga2
var/log/icinga2/compat/archives
var/spool/icinga2
var/spool/icinga2/perfdata
+var/spool/icinga2/tmp
diff --git a/debian/icinga2-common.icinga2.default b/debian/icinga2-common.icinga2.default
index 76ff3f7..6df5df1 100644
--- a/debian/icinga2-common.icinga2.default
+++ b/debian/icinga2-common.icinga2.default
@@ -1,3 +1,7 @@
# default settings for icinga2's initscript
-#DAEMON_ARGS="-c /etc/icinga2/icinga2.conf -e /var/log/icinga2/icinga2.log -d -u nagios -g nagios"
+#DAEMON_CONFIG="/etc/icinga2/icinga2.conf"
+#DAEMON_USER=nagios
+#DAEMON_GROUP=nagios
+#DAEMON_CMDGROUP=www-data
+#DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
diff --git a/debian/icinga2-common.icinga2.init b/debian/icinga2-common.icinga2.init
index 2bb1f89..ef14d3b 100644
--- a/debian/icinga2-common.icinga2.init
+++ b/debian/icinga2-common.icinga2.init
@@ -17,7 +17,11 @@ 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.log -d -u nagios -g nagios"
+DAEMON_CONFIG="/etc/icinga2/icinga2.conf"
+DAEMON_USER=nagios
+DAEMON_GROUP=nagios
+DAEMON_CMDGROUP=www-data
+DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
PIDFILE=/var/run/icinga2/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
@@ -37,12 +41,18 @@ SCRIPTNAME=/etc/init.d/$NAME
# 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
+ test -d '/var/run/icinga2' || mkdir /var/run/icinga2
+ test -d '/var/run/icinga2/cmd' || mkdir /var/run/icinga2/cmd
+
+ chown "$DAEMON_USER":"$DAEMON_GROUP" /var/run/icinga2
+ chmod 0755 /var/run/icinga2
+
+ chown "$DAEMON_USER":"$DAEMON_CMDGROUP" /var/run/icinga2/cmd
+ chmod 2710 /var/run/icinga2/cmd
+}
+
+check_config () {
+ $DAEMON --validate -u "$DAEMON_USER" -g "$DAEMON_GROUP" -c "$DAEMON_CONFIG"
}
#
@@ -50,18 +60,30 @@ check_run () {
#
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.
+ # 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 -- \
+ -c "$DAEMON_CONFIG" -u "$DAEMON_USER" -g "$DAEMON_GROUP" -d $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 starts the daemon/service in foreground for debugging
+#
+do_foreground()
+{
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
+ || return 1
+ start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- \
+ -c "$DAEMON_CONFIG" -u "$DAEMON_USER" -g "$DAEMON_GROUP" $DAEMON_ARGS \
+ || return 2
}
#
@@ -69,89 +91,143 @@ do_start()
#
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"
+ # 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
+ #
+ # 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
+}
+
+do_check_config () {
+ DOEXITONOK="$1"
+ log_begin_msg "checking Icinga2 configuration"
+ if ! check_config >/dev/null 2>&1; then
+ echo
+ check_config
+ log_failure_msg "checking Icinga2 configuration"
+ exit 1
+ else
+ log_end_msg 0
+ [ -n "$DOEXITONOK" ] && exit 0
+ fi
}
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
- ;;
+ do_check_config
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+ ;;
+ foreground)
+ do_check_config
+ log_action_msg "Starting $DESC in foreground"
+ status=0
+ trap 'status=2;' INT # handle intr here
+ for i in 1 2; do
+ do_foreground || status="$?"
+ case "$status" in
+ 0)
+ log_success_msg "$NAME ended graceful"
+ break
+ ;;
+ 1)
+ if [ "$i" -eq 1 ]; then
+ log_warning_msg "$NAME already running!"
+ log_begin_msg "Do you want to stop $NAME before going foreground? [y/N] "
+ read -r question
+ if [ "$question" = "y" ] || [ "$question" = "yes" ]; then
+ do_stop
+ continue
+ fi
+ fi
+ log_failure_msg "$NAME already running! Please stop before starting in foreground!"
+ break
+ ;;
+ 2)
+ log_failure_msg "$NAME ended"
+ break
+ ;;
+ esac
+ done
+ exit $status
+ ;;
stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
+ 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 $?
- ;;
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
reload|force-reload)
- log_daemon_msg "Reloading $DESC" "$NAME"
- do_reload
- log_end_msg $?
- ;;
+ do_check_config
+ 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
- ;;
+ do_check_config
+ 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
+ ;;
+ checkconfig)
+ do_check_config 1
+ ;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|status|reload|force-reload|restart}" >&2
- exit 3
- ;;
+ echo "Usage: $SCRIPTNAME {start|stop|status|reload|force-reload|restart|checkconfig|foreground}" >&2
+ exit 3
+ ;;
esac
+# vi: ts=2 sw=2 expandtab :
:
diff --git a/debian/icinga2-common.postinst b/debian/icinga2-common.postinst
index b33c9d1..0be77b9 100644
--- a/debian/icinga2-common.postinst
+++ b/debian/icinga2-common.postinst
@@ -16,6 +16,26 @@ setperm() {
fi
}
+is_fresh_install()
+{
+ if [ -z "$2" ] ; then
+ return 0
+ fi
+ 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"
+ for feature in checker notification mainlog; do
+ icinga2-enable-feature $feature
+ done
+ fi
+ # handle new default features here in the future
+}
+
case "$1" in
configure)
if ! getent passwd nagios > /dev/null ; then
@@ -36,8 +56,13 @@ case "$1" in
setperm nagios nagios 0750 /var/lib/icinga2/cluster/log
setperm nagios www-data 0750 /var/cache/icinga2
+
setperm nagios nagios 0750 /var/spool/icinga2
+ 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 f6d0e94..473635d 100644
--- a/debian/icinga2-common.postrm
+++ b/debian/icinga2-common.postrm
@@ -5,7 +5,9 @@ set -e
case "$1" in
purge)
- rm -f /etc/icinga2/features-enabled/*
+ 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-pgsql.install b/debian/icinga2-ido-pgsql.install
new file mode 100644
index 0000000..e6c1a67
--- /dev/null
+++ b/debian/icinga2-ido-pgsql.install
@@ -0,0 +1,5 @@
+debian/tmp/etc/icinga2/features-available/ido-pgsql.conf
+usr/lib/*/icinga2/libdb_ido_pgsql*
+components/db_ido_pgsql/schema/*.sql usr/share/icinga2-ido-pgsql/schema
+# for later
+#components/db_ido_pgsql/schema/upgrades/*.sql usr/share/icinga2-ido-pgsql/schema/upgrades
diff --git a/debian/patches/01_disable_git_version b/debian/patches/01_disable_git_version
deleted file mode 100644
index db71458..0000000
--- a/debian/patches/01_disable_git_version
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Disabled reconf of version includes
- This helps avoiding the software to use the git-buildpackage for version info
-Author: Markus Frosch <markus at lazyfrosch.de>
-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
deleted file mode 100644
index da84c17..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-01_disable_git_version
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..9bcb832
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] icinga2-classicui.templates
diff --git a/debian/rules b/debian/rules
index a2ee157..1970e78 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,57 +1,35 @@
#!/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
+export DH_VERBOSE=1
%:
- 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
+ dh $@
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
+ dh_auto_configure -- \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DICINGA2_USER=nagios \
+ -DICINGA2_GROUP=nagios \
+ -DICINGA2_COMMAND_USER=nagios \
+ -DICINGA2_COMMAND_GROUP=www-data
override_dh_auto_install:
dh_auto_install
- # cleanup dependencies in .la files
- sed -i "/dependency_libs/ s/'.*'/''/" `find debian/tmp/ -name '*.la'`
+ # remove features-enabled - these will be activated by postinst later
+ rm -r debian/tmp/etc/icinga2/features-enabled/*
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*
+ 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_*
override_dh_installinit:
dh_installinit --name=icinga2
+.PHONY: override_dh_strip
+override_dh_strip:
+ dh_strip --dbg-package=icinga2-dbg
+
# vi: noexpandtab :
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git
More information about the Pkg-nagios-changes
mailing list