diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-01-22 06:41:42 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-01-22 06:41:42 +0100 |
commit | 11af0bdb5827abac120ed0900ff6c485ed51b1af (patch) | |
tree | e226f78e274e79b96389a2cb115451fbf470febd /pcr/icinga2 | |
parent | e3d2043bcaaff828b1cd7e4707110d2e2bd213ed (diff) | |
download | abslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.tar.gz abslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.tar.bz2 abslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.zip |
pcr/icinga2: updated to 2.8.1
Diffstat (limited to 'pcr/icinga2')
-rw-r--r-- | pcr/icinga2/PKGBUILD | 93 | ||||
-rw-r--r-- | pcr/icinga2/icinga2.install | 30 |
2 files changed, 74 insertions, 49 deletions
diff --git a/pcr/icinga2/PKGBUILD b/pcr/icinga2/PKGBUILD index d2c966c3e..8ccb63719 100644 --- a/pcr/icinga2/PKGBUILD +++ b/pcr/icinga2/PKGBUILD @@ -1,34 +1,28 @@ -# Maintainer (Arch): Malte Rabenseifner <mail@malte-rabenseifner.de> -# Contributor (Arch): bebehei <bebe@bebehei.de> +# Maintainer (AUR): Malte Rabenseifner <mail@malte-rabenseifner.de> +# Maintainer (AUR): Julian Brost <julian@0x4a42.net> +# Contributor (AUR): bebehei <bebe@bebehei.de> -pkgname=icinga2 -pkgver=2.3.4 -pkgrel=3 -pkgdesc="A libre host, service and network monitoring program." +# parabola changes and rationale: +# - removed "open source" term from pkgdesc + +pkgname=('icinga2-common' 'icinga2' 'icinga-studio') +pkgbase=icinga2 +pkgver=2.8.1 +pkgrel=1 +pkgdesc="A libre host, service and network monitoring program" license=('GPL') -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'armv7h') url="http://www.icinga.org" -depends=('boost-libs' 'yajl') -makedepends=('boost' 'cmake' 'libmariadbclient' 'postgresql-libs' 'yajl') -optdepends=('monitoring-plugins: plugins needed for icinga checks' - 'libmariadbclient: for MySQL support' - 'postgresql-libs: for PostgreSQL support') -backup=(etc/default/icinga2 - etc/icinga2/features-available/{api,checker,command,compatlog}.conf - etc/icinga2/features-available/{debuglog,gelf,graphite,icingastatus}.conf - etc/icinga2/features-available/{ido-mysql,ido-pgsql,livestatus,mainlog}.conf - etc/icinga2/features-available/{notification,perfdata,statusdata,syslog}.conf - etc/icinga2/{constants,icinga2,init,zones}.conf - etc/logrotate.d/icinga2) -install='icinga2.install' -source=("https://github.com/Icinga/$pkgname/archive/v$pkgver.tar.gz") -sha256sums=('3a6d23214c90c1e308df784254659c51962f4c49b13093aff2095e1dfa06cdaa') +depends=('boost-libs' 'libedit' 'openssl' 'yajl') +makedepends=('boost' 'cmake' 'libmariadbclient' 'postgresql-libs' 'wxgtk') +source=("https://github.com/Icinga/$pkgbase/archive/v$pkgver.tar.gz") +sha256sums=('83930bf95a5c6562cc31c37ddb01b361665497ef7001e9cc8763fd499a4d709d') build() { - mkdir -p "$srcdir/$pkgname-$pkgver/build" - cd "$srcdir/$pkgname-$pkgver/build" + mkdir -p "$srcdir/$pkgbase-$pkgver/build" + cd "$srcdir/$pkgbase-$pkgver/build" - cmake "$srcdir/$pkgname-$pkgver" \ + cmake "$srcdir/$pkgbase-$pkgver" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -DICINGA2_RUNDIR=/run \ @@ -37,13 +31,40 @@ build() { -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ -DICINGA2_SYSCONFIGFILE=/etc/default/icinga2 \ -DICINGA2_PLUGINDIR=/usr/lib/monitoring-plugins \ - -DUSE_SYSTEMD=ON + -DUSE_SYSTEMD=ON \ + -DICINGA2_WITH_STUDIO=ON \ + -DLOGROTATE_HAS_SU=OFF \ make } -package() { - cd "$srcdir/$pkgname-$pkgver/build" +package_icinga2-common() { + pkgdesc="Common files for Icinga2" + + cd "$srcdir/$pkgbase-$pkgver/build" + make DESTDIR="$pkgdir" install + rm -r $pkgdir/{etc,run,var} + rm -r $pkgdir/usr/{bin,share} + rm -r $pkgdir/usr/lib/monitoring-plugins + rm -r $pkgdir/usr/lib/systemd + rm -r $pkgdir/usr/lib/icinga2/{prepare-dirs,safe-reload,sbin} +} + +package_icinga2() { + depends=('icinga2-common') + optdepends=('monitoring-plugins: plugins needed for icinga checks' + 'libmariadbclient: for MySQL support' + 'postgresql-libs: for PostgreSQL support') + backup=(etc/default/icinga2 + etc/icinga2/features-available/{api,checker,command,compatlog}.conf + etc/icinga2/features-available/{debuglog,gelf,graphite}.conf + etc/icinga2/features-available/{ido-mysql,ido-pgsql,influxdb,livestatus,mainlog}.conf + etc/icinga2/features-available/{notification,opentsdb,perfdata,statusdata,syslog}.conf + etc/icinga2/{constants,icinga2,init,zones}.conf + etc/logrotate.d/icinga2) + install='icinga2.install' + + cd "$srcdir/$pkgbase-$pkgver/build" make DESTDIR="$pkgdir" install @@ -60,7 +81,7 @@ package() { d /run/icinga2/cmd 2750 icinga icingacmd - EOF - cd "$srcdir/$pkgname-$pkgver" + cd "$srcdir/$pkgbase-$pkgver" install -Dm644 tools/syntax/vim/ftdetect/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/ftdetect/icinga2.vim" install -Dm644 tools/syntax/vim/syntax/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/syntax/icinga2.vim" @@ -71,4 +92,18 @@ package() { "$pkgdir/var/spool/icinga2" \ "$pkgdir/var/cache/icinga2" \ "$pkgdir/var/log/icinga2" + + rm -r $pkgdir/usr/lib/icinga2/lib* + rm $pkgdir/usr/bin/icinga-studio +} + +package_icinga-studio() { + pkgdesc="Graphical tool for debugging and testing the Icinga2 API" + depends=('icinga2-common' 'wxgtk') + + cd "$srcdir/$pkgbase-$pkgver/build" + make DESTDIR="$pkgdir" install + rm -r $pkgdir/{etc,run,var} + rm -r $pkgdir/usr/{lib,share} + rm $pkgdir/usr/bin/icinga2 } diff --git a/pcr/icinga2/icinga2.install b/pcr/icinga2/icinga2.install index 86ea3d4bc..14ec50e3d 100644 --- a/pcr/icinga2/icinga2.install +++ b/pcr/icinga2/icinga2.install @@ -19,26 +19,6 @@ post_install() { /usr/bin/icinga2 feature enable notification &> /dev/null } -pre_upgrade() { - /usr/bin/chown -R root:root \ - /etc/icinga2 \ - /var/lib/icinga2 \ - /var/spool/icinga2 \ - /var/cache/icinga2 \ - /var/log/icinga2 -} - -post_upgrade() { - /usr/bin/chown -R icinga:icinga \ - /etc/icinga2 \ - /var/lib/icinga2 \ - /var/spool/icinga2 - - /usr/bin/chown -R icinga:icingacmd \ - /var/cache/icinga2 \ - /var/log/icinga2 -} - pre_remove() { [ -f "/etc/icinga2/features-enabled/checker.conf" ] && /usr/bin/icinga2 feature disable checker &> /dev/null [ -f "/etc/icinga2/features-enabled/mainlog.conf" ] && /usr/bin/icinga2 feature disable mainlog &> /dev/null @@ -50,3 +30,13 @@ post_remove() { /usr/bin/getent group icinga &> /dev/null && /usr/bin/groupdel icinga &> /dev/null /usr/bin/getent group icingacmd &> /dev/null && /usr/bin/groupdel icingacmd &> /dev/null } + +post_upgrade() { + if [[ "$(vercmp "$2" '2.8.0')" -lt 0 ]]; then + cat << EOF +==> Icinga version 2.8.0 requires an DB IDO schema upgrade and uses new paths +==> for certificates. Check the upgrading instructions for details: +==> https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/#upgrading-to-v28 +EOF + fi +} |