Skip to content

Commit

Permalink
split thruk packages into multiple smaller packages
Browse files Browse the repository at this point in the history
and separate the reporting plugin, since it has additional dependencies.
  • Loading branch information
sni committed Jun 16, 2015
1 parent a8d9244 commit 5079dc8
Show file tree
Hide file tree
Showing 16 changed files with 301 additions and 46 deletions.
16 changes: 10 additions & 6 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ debian/changelog
debian/compat
debian/control
debian/copyright
debian/postinst
debian/postrm
debian/preinst
debian/prerm
debian/rules
debian/thruk-base.install
debian/thruk-base.logrotate
debian/thruk-base.manpages
debian/thruk-base.postinst
debian/thruk-base.postrm
debian/thruk-base.preinst
debian/thruk-base.prerm
debian/thruk-plugin-reporting.install
debian/thruk-plugin-reporting.postinst
debian/thruk-plugin-reporting.prerm
debian/thruk.lintian-overrides
debian/thruk.logrotate
debian/thruk.manpages
dist.ini
docs/documentation/configuration.asciidoc
docs/manpages/nagexp.3
Expand Down
8 changes: 4 additions & 4 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ plugins/plugins-available/conf/tmon.out
thruk_.*.changes
thruk_.*.deb
thruk_.*.dsc
debian/thruk/.*
debian/thruk.substvars
debian/thruk.*/.*
debian/thruk.*.substvars
debian/files
debian/thruk.*.debhelper.log
build-stamp
configure-stamp
debian/files
debian/thruk.debhelper.log
my_templates/
panorama_default_view
themes/themes-available/.*/images/logos/.*server.png
Expand Down
33 changes: 31 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,39 @@ Vcs-Git: git://github.com/sni/Thruk.git

Package: thruk
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, ${extra:Depends}, libthruk, apache2 | nginx-full, libapache2-mod-fcgid | nginx-full, cron, logrotate, xvfb, libxrender1
Depends: ${shlibs:Depends}, ${perl:Depends}, ${extra:Depends}, thruk-base (= ${source:Version})
Recommends: thruk-plugin-reporting (= ${source:Version})
Description: Monitoring Webinterface for Nagios/Icinga and Shinken
Thruk is a multibackend monitoring webinterface which currently
supports Nagios, Icinga and Shinken as backend using the Livestatus
API. It is designed to be a 'dropin' replacement and covers almost
all of the original features plus adds additional enhancements for
large installations.
large installations. This is the metapackage for complete Thruk setup.

Package: thruk-base
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, ${extra:Depends},
libthruk,
apache2 | nginx-full,
libapache2-mod-fcgid | nginx-full,
cron, logrotate
Provides: thruk
Replaces: thruk (<< 1.99~2015-06-12)
Breaks: thruk (<< 1.99~2015-06-12)
Description: Monitoring Webinterface for Nagios/Icinga and Shinken
Thruk is a multibackend monitoring webinterface which currently
supports Nagios, Icinga and Shinken as backend using the Livestatus
API. It is designed to be a 'dropin' replacement and covers almost
all of the original features plus adds additional enhancements for
large installations. This package contains the Thruk gui base files.



Package: thruk-plugin-reporting
Architecture: any
Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends},
xvfb, libxrender1,
thruk-base (= ${source:Version})
Description: This package contains the reporting addon for thruk useful for sla
and event reporting.

4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

export DH_VERBOSE=1
DESTDIR=$(CURDIR)/debian/tmp/
PERLARCH=$(shell perl -e 'use Config; print $$Config{archname}')
PERLVER=$(shell perl -e 'use Config; print $$Config{version}')

HTTPDCONF=$(shell if [ -d "/etc/apache2/conf-available" ]; then echo "/etc/apache2/conf-available"; else echo "/etc/apache2/conf.d"; fi )

override_dh_auto_configure:
Expand All @@ -25,6 +23,8 @@ override_dh_auto_configure:
--with-thruk-libs="/usr/lib/thruk/perl5" \
--with-httpd-conf="$(HTTPDCONF)" \
--with-htmlurl="/thruk"
echo $(HTTPDCONF)/thruk.conf >> debian/thruk-base.install
echo $(HTTPDCONF)/thruk_cookie_auth_vhost.conf >> debian/thruk-base.install

override_dh_gencontrol:
dh_gencontrol -- -Vextra:Depends=perlapi-$(PERLVER)
Expand Down
55 changes: 55 additions & 0 deletions debian/thruk-base.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/etc/init.d/thruk
/etc/logrotate.d/thruk
/etc/thruk/cgi.cfg
/etc/thruk/htpasswd
/etc/thruk/log4perl.conf
/etc/thruk/menu_local.conf
/etc/thruk/naglint.conf
/etc/thruk/usercontent
/etc/thruk/bp/bp_functions.pm
/usr/share/thruk/plugins/plugins-available/business_process
/etc/thruk/plugins/plugins-available/business_process
/etc/thruk/plugins/plugins-enabled/business_process
/usr/share/thruk/plugins/plugins-available/conf
/etc/thruk/plugins/plugins-available/conf
/etc/thruk/plugins/plugins-enabled/conf
/usr/share/thruk/plugins/plugins-available/dashboard
/etc/thruk/plugins/plugins-available/dashboard
/usr/share/thruk/plugins/plugins-available/minemap
/etc/thruk/plugins/plugins-available/minemap
/etc/thruk/plugins/plugins-enabled/minemap
/usr/share/thruk/plugins/plugins-available/mobile
/etc/thruk/plugins/plugins-available/mobile
/etc/thruk/plugins/plugins-enabled/mobile
/usr/share/thruk/plugins/plugins-available/panorama
/etc/thruk/plugins/plugins-available/panorama
/etc/thruk/plugins/plugins-enabled/panorama
/usr/share/thruk/plugins/plugins-available/shinken_features
/etc/thruk/plugins/plugins-available/shinken_features
/usr/share/thruk/plugins/plugins-available/statusmap
/etc/thruk/plugins/plugins-available/statusmap
/etc/thruk/plugins/plugins-enabled/statusmap
/usr/share/thruk/plugins/plugins-available/wml
/etc/thruk/plugins/plugins-available/wml
/etc/thruk/ssi
/etc/thruk/themes
/etc/thruk/thruk.conf
/etc/thruk/thruk_local.conf
/usr/bin/nagexp
/usr/bin/naglint
/usr/bin/thruk
/usr/share/thruk/Changes
/usr/share/thruk/LICENSE
/usr/share/thruk/dist.ini
/usr/share/thruk/thruk_cookie_auth.include
/usr/share/thruk/fcgid_env.sh
/usr/share/thruk/lib
/usr/share/thruk/menu.conf
/usr/share/thruk/root
/usr/share/thruk/thruk_auth
/usr/share/thruk/script/thruk_fastcgi.pl
/usr/share/thruk/script/thruk.psgi
/usr/share/thruk/templates
/usr/share/thruk/themes
/var/cache/thruk
/var/log/thruk
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions debian/thruk-plugin-reporting.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/usr/share/thruk/plugins/plugins-available/reports2
/etc/thruk/plugins/plugins-available/reports2
/usr/share/thruk/script/wkhtmltopdf
24 changes: 24 additions & 0 deletions debian/thruk-plugin-reporting.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

set -e

case "$1" in
configure)
rm -f /etc/thruk/plugins/plugins-enabled/reports2
ln -s ../plugins-available/reports2 /etc/thruk/plugins/plugins-enabled/reports2
service thruk condrestart >/dev/null || :
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac


#DEBHELPER#

exit 0
30 changes: 30 additions & 0 deletions debian/thruk-plugin-reporting.prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
# prerm script for thruk
#
# see: dh_installdeb(1)

set -e

case "$1" in
remove|deconfigure)
if [ -e /etc/thruk/plugins/plugins-enabled/reports2 ]; then
rm /etc/thruk/plugins/plugins-enabled/reports2
! test -f /etc/init.d/thruk || service thruk condrestart >/dev/null || :
fi
;;

upgrade|failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
Loading

0 comments on commit 5079dc8

Please sign in to comment.