summaryrefslogtreecommitdiff
path: root/www-apps/icingaweb2-module-director
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-13 16:44:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-13 16:44:42 +0100
commit6d478a9cbbd774e9d2743701d0931416e3ab9371 (patch)
tree257176343b2e9bee3620362aec6d70e42bbd82e1 /www-apps/icingaweb2-module-director
parent57dbe782fa3930bfa59520388f90ca4c2f037785 (diff)
gentoo auto-resync : 13:09:2023 - 16:44:41
Diffstat (limited to 'www-apps/icingaweb2-module-director')
-rw-r--r--www-apps/icingaweb2-module-director/Manifest10
-rw-r--r--www-apps/icingaweb2-module-director/files/director23
-rw-r--r--www-apps/icingaweb2-module-director/files/icinga-director.sh2
-rw-r--r--www-apps/icingaweb2-module-director/icingaweb2-module-director-1.10.2.ebuild75
-rw-r--r--www-apps/icingaweb2-module-director/icingaweb2-module-director-1.9.1.ebuild47
-rw-r--r--www-apps/icingaweb2-module-director/icingaweb2-module-director-9999.ebuild75
-rw-r--r--www-apps/icingaweb2-module-director/metadata.xml11
7 files changed, 165 insertions, 78 deletions
diff --git a/www-apps/icingaweb2-module-director/Manifest b/www-apps/icingaweb2-module-director/Manifest
index 1211a0961422..58cac20a5025 100644
--- a/www-apps/icingaweb2-module-director/Manifest
+++ b/www-apps/icingaweb2-module-director/Manifest
@@ -1,4 +1,6 @@
-DIST icingaweb2-module-director-1.9.1.tar.gz 3095028 BLAKE2B 497dfc2f4a6f3f7f11c75dc4b934f54f4ff7e0644d97637bcd3a932e88e8bc719290b87be93ce15a6160966f8e1d959cfd6b150a9f630f13d6ea1e455753e776 SHA512 0fa0da31b1d8899ee127f6c2e6f4ee243dc21fc9516cec70a687a78188c84d0de4bddb1ad20e1b0c22200d4219407bc7d128be7063eeeb5e0eb48f0054846f79
-EBUILD icingaweb2-module-director-1.9.1.ebuild 1406 BLAKE2B e41b4a6c3f176dd525ef4d78a8fc9afd456490f4983bfb0a285d16a0c76fdde173744de17661f5312c7a53a588ea40aaee3da368d1f5bdcc897f67787163f4c5 SHA512 1461040178f48f435b6b696f5a2f60f544fc5bd5048ac1bac87629f8f6a7aecf32abb6a0a0742c522bdd74f4a88367ad0a48d31c7db781f50294de6023db1d23
-EBUILD icingaweb2-module-director-9999.ebuild 1612 BLAKE2B 6d6142623270679ab94332570d39fd33409a1770d94326108f93e2f17870aef7aea401b6d35a54583b4487fdd2e819947d716fd34eef7981620ab3c5be6f686e SHA512 9d717bc7601e5e4c43ca8f149b25d8ad3dfa04e6745178aab3feff87ef5d2a7b37ba8b0476a92d14b2ae2d05f28a9c54241e6609f3a8ed2932aaf2bbb65d73e6
-MISC metadata.xml 255 BLAKE2B 7788f736048880a23aeeb4baf5daf3bf65fd82dc4e6f56e63d2897a055acebf8ac480d249f297ec54cae1cc44031435effd37165455a16c62ca7acc6be63cf21 SHA512 6069c94a7b02290a08fe052105613139fccd952f5507bac994d2fd9aa4359e9b1b76e5fb0f1111474594d3d25ef6d5ac54b93d611f3512ef9bcbe5cf28f5f35e
+AUX director 513 BLAKE2B bca46ec58dd16706b1d1b405e7e9cfad2e6be7abf7209175defc6297822d5b3586082a063f8076d080dac9cfef3561e3a2f3abb1c48aad419ffd8abaeb41fcf6 SHA512 6ed9dac81ebedaf39c3875c1ba8afcce4d9563c4a521dd20cbc78ef4cfc96b7367510289dab643e6654b4875354c1532e142b4af8c67b7621c2d2149e241ff23
+AUX icinga-director.sh 74 BLAKE2B 57c530ad6d4e8e8b5ff676925092207be60fb1defa222bd841ec2c3fda505d9646ef6aa1778d11a5b9608260b90f1cafeb9692bc890db85a143385c460240648 SHA512 6a263470dc4d5df69e8ea38fc947e5aa55986ca96cb9ed3f0a4aed756a40832488cbc60358ca722af9c76a61b71f86a6ca14ff1a4f846ed22d032e2f7dd250a3
+DIST icingaweb2-module-director-1.10.2.tar.gz 3114956 BLAKE2B d050c501682ac3c1481d8710a3fc64642d0b18e92448bf05cd4a51e8a660c7a9abf571937a559a2dadd949535fca04feb1004a8613de7e4d0bbe54db5a377a25 SHA512 b301b71abada8c8722c03717a9def17c8ae53c951c83d5ef3a62f758fb93dd814d1b61d450987ddd0d8d3631145637dc6b26884134019e320cdd28cdedbc9794
+EBUILD icingaweb2-module-director-1.10.2.ebuild 2206 BLAKE2B c4cfc41284d6c19c73b59fb7f21c05c0cadd4171579a4e54fe77e230b76ae225b92629d0857f764dc69a46e0e96cfbfe849806e1cdd2329094aa4c80a033b9e7 SHA512 c11e6859ed7f7c343c3b60354f1911aa457eb39534e0998fcd56cf1f9ae2c41d6c5e60ad7d15a399978a763fc6b5919742519acbedf6ba97acdc98721bc77909
+EBUILD icingaweb2-module-director-9999.ebuild 2206 BLAKE2B c4cfc41284d6c19c73b59fb7f21c05c0cadd4171579a4e54fe77e230b76ae225b92629d0857f764dc69a46e0e96cfbfe849806e1cdd2329094aa4c80a033b9e7 SHA512 c11e6859ed7f7c343c3b60354f1911aa457eb39534e0998fcd56cf1f9ae2c41d6c5e60ad7d15a399978a763fc6b5919742519acbedf6ba97acdc98721bc77909
+MISC metadata.xml 483 BLAKE2B 1e888efd6ff4c17c17efc75063ef7f5b56e6dd1051843e940a6478bdb5ba4160b7b2a84f52ded1d5abb0e4adb840b17608a8a377f23d6466f6de91a5720f14ea SHA512 d9d15413719c2ffca266ca84d20e856172590ad513eb8eb9e3d084978da718f0177c6928f4c495e55a0552a0c07eb1c5898c2cdef7b28caa552614ff31f9b1fa
diff --git a/www-apps/icingaweb2-module-director/files/director b/www-apps/icingaweb2-module-director/files/director
new file mode 100644
index 000000000000..b2721d1e8dcd
--- /dev/null
+++ b/www-apps/icingaweb2-module-director/files/director
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+
+description="Icinga2 Director Daemon"
+supervisor=supervise-daemon
+respawn_period="${respawn_period:-30}"
+term_type="${term_type:-linux}"
+command=/usr/share/icingaweb2/bin/icinga-director.sh
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="nobody:icingaweb2"
+
+depend() {
+ need apache2 mysql php-fpm icinga2
+}
+
+start_pre() {
+ chgrp icingaweb2 /usr/share/icingaweb2/bin/icingacli
+ export EINFO_QUIET="${quiet:-yes}"
+}
+
+stop_pre()
+{
+ export EINFO_QUIET="${quiet:-yes}"
+}
diff --git a/www-apps/icingaweb2-module-director/files/icinga-director.sh b/www-apps/icingaweb2-module-director/files/icinga-director.sh
new file mode 100644
index 000000000000..f0a9db21a368
--- /dev/null
+++ b/www-apps/icingaweb2-module-director/files/icinga-director.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env sh
+/usr/share/icingaweb2/bin/icingacli director daemon run
diff --git a/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.10.2.ebuild b/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.10.2.ebuild
new file mode 100644
index 000000000000..370c6d78fa9b
--- /dev/null
+++ b/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.10.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="Icinga Web 2 plugin for configuration"
+HOMEPAGE="https://github.com/Icinga/icingaweb2-module-director/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Icinga/${PN}.git"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://codeload.github.com/Icinga/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+# Dependencies according to https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md
+IUSE="php_targets_php8-1"
+
+PHP_DEPEND="
+ php_targets_php8-1? ( dev-lang/php:8.1[curl,iconv,pcntl,posix,sockets] )
+"
+DEPEND="
+ acct-group/icingaweb2
+ acct-user/icingadirector
+"
+RDEPEND="
+ ${PHP_DEPEND}
+ ${DEPEND}
+ >=www-apps/icingaweb2-module-incubator-0.18.0
+ >=dev-libs/icinga-php-library-0.5.0
+ >=dev-libs/icinga-php-thirdparty-0.9.0
+ >=www-apps/icingaweb2-2.9.0
+"
+
+src_install() {
+ insinto /usr/share/icingaweb2/modules/${PN##*-}/
+ doins -r .
+
+ exeinto /usr/share/icingaweb2/bin/
+ doexe "${FILESDIR}"/icinga-director.sh
+
+ doinitd "${FILESDIR}"/director
+
+ keepdir /var/lib/${PN}
+ fowners icingadirector:icingaweb2 /var/lib/${PN}
+ fperms 0750 /var/lib/${PN}
+ sed -e "s|/usr/bin/icingacli|/usr/share/icingaweb2/bin/icingacli|g" \
+ contrib/systemd/icinga-director.service > "${T}"/icinga-director.service \
+ || die "failed to patch icinga-director.service"
+ systemd_dounit "${T}"/icinga-director.service
+}
+
+pkg_postinst() {
+ # According to PMS this can be a space-separated list of version
+ # numbers, even though in practice it is typically just one.
+ local oldver
+ for oldver in ${REPLACING_VERSIONS}; do
+ if ver_test "${oldver}" -lt "1.10.0"; then
+ ewarn "You are upgrading from ${oldver} to ${PVR}"
+ ewarn "please read https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/05-Upgrading.md#upgrade-to-1.10.x"
+ ewarn "for breaking changes"
+ ewarn
+ ewarn "Also, don't forget to upgrade database schema."
+ ewarn "Otherwise icingaweb2-module-director will not work!"
+ ewarn "(Web GUI => Configuration => Modules => director => Configuration)"
+ ewarn
+ break
+ fi
+ done
+}
diff --git a/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.9.1.ebuild b/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.9.1.ebuild
deleted file mode 100644
index 6309c4fc7e09..000000000000
--- a/www-apps/icingaweb2-module-director/icingaweb2-module-director-1.9.1.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Icinga Web 2 plugin for configuration"
-HOMEPAGE="https://dev.icinga.org/projects/icingaweb2-module-director/"
-inherit systemd
-if [[ "${PV}" == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/Icinga/icingaweb2-module-director.git"
-else
- KEYWORDS="amd64 x86"
- MY_PN="icingaweb2-module-director"
- SRC_URI="https://codeload.github.com/Icinga/${MY_PN}/tar.gz/v${PV} -> ${P}.tar.gz"
- S="${WORKDIR}/${MY_PN}-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-
-DEPEND=">=net-analyzer/icinga2-2.6.0
- >=www-apps/icingaweb2-2.6.0
- || (
- dev-lang/php:7.3[curl,iconv,pcntl,posix,sockets]
- dev-lang/php:7.4[curl,iconv,pcntl,posix,sockets]
- dev-lang/php:8.0[curl,iconv,pcntl,posix,sockets]
- )
- acct-group/icingaweb2
- acct-user/icingadirector"
-RDEPEND="${DEPEND}"
-
-src_install() {
- insinto "/usr/share/icingaweb2/modules/director/"
- doins -r "${S}"/*
- keepdir /var/lib/${PN}
- fowners icingadirector:icingaweb2 /var/lib/${PN}
- fperms 0750 /var/lib/${PN}
- sed -e "s|/usr/bin/icingacli|/usr/share/icingaweb2/bin/icingacli|g" \
- contrib/systemd/icinga-director.service > "${T}/icinga-director.service" \
- || die "failed to patch icinga-director.service"
- systemd_dounit "${T}/icinga-director.service"
-}
-
-pkg_postinst() {
- elog "Enable and start the icinga-director.service systemd service."
-}
diff --git a/www-apps/icingaweb2-module-director/icingaweb2-module-director-9999.ebuild b/www-apps/icingaweb2-module-director/icingaweb2-module-director-9999.ebuild
index c9a76d37b383..370c6d78fa9b 100644
--- a/www-apps/icingaweb2-module-director/icingaweb2-module-director-9999.ebuild
+++ b/www-apps/icingaweb2-module-director/icingaweb2-module-director-9999.ebuild
@@ -1,50 +1,75 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-DESCRIPTION="Icinga Web 2 plugin for configuration"
-HOMEPAGE="https://dev.icinga.org/projects/icingaweb2-module-director/"
inherit systemd
-if [[ "${PV}" == 9999 ]]; then
+
+DESCRIPTION="Icinga Web 2 plugin for configuration"
+HOMEPAGE="https://github.com/Icinga/icingaweb2-module-director/"
+
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/Icinga/icingaweb2-module-director.git"
+ EGIT_REPO_URI="https://github.com/Icinga/${PN}.git"
else
KEYWORDS="~amd64 ~x86"
- MY_PN="icingaweb2-module-director"
- SRC_URI="https://codeload.github.com/Icinga/${MY_PN}/tar.gz/v${PV} -> ${P}.tar.gz"
- S="${WORKDIR}/${MY_PN}-${PV}"
+ SRC_URI="https://codeload.github.com/Icinga/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
fi
LICENSE="GPL-2"
SLOT="0"
+# Dependencies according to https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md
+IUSE="php_targets_php8-1"
-DEPEND=">=net-analyzer/icinga2-2.6.0
- >=www-apps/icingaweb2-2.6.0
- || (
- dev-lang/php:7.3[curl,iconv,pcntl,posix,sockets]
- dev-lang/php:7.4[curl,iconv,pcntl,posix,sockets]
- dev-lang/php:8.0[curl,iconv,pcntl,posix,sockets]
- )
+PHP_DEPEND="
+ php_targets_php8-1? ( dev-lang/php:8.1[curl,iconv,pcntl,posix,sockets] )
+"
+DEPEND="
acct-group/icingaweb2
- acct-user/icingadirector"
-RDEPEND="${DEPEND}"
+ acct-user/icingadirector
+"
+RDEPEND="
+ ${PHP_DEPEND}
+ ${DEPEND}
+ >=www-apps/icingaweb2-module-incubator-0.18.0
+ >=dev-libs/icinga-php-library-0.5.0
+ >=dev-libs/icinga-php-thirdparty-0.9.0
+ >=www-apps/icingaweb2-2.9.0
+"
src_install() {
- insinto "/usr/share/icingaweb2/modules/director/"
- doins -r "${S}"/*
+ insinto /usr/share/icingaweb2/modules/${PN##*-}/
+ doins -r .
+
+ exeinto /usr/share/icingaweb2/bin/
+ doexe "${FILESDIR}"/icinga-director.sh
+
+ doinitd "${FILESDIR}"/director
+
keepdir /var/lib/${PN}
fowners icingadirector:icingaweb2 /var/lib/${PN}
fperms 0750 /var/lib/${PN}
sed -e "s|/usr/bin/icingacli|/usr/share/icingaweb2/bin/icingacli|g" \
- contrib/systemd/icinga-director.service > "${T}/icinga-director.service" \
+ contrib/systemd/icinga-director.service > "${T}"/icinga-director.service \
|| die "failed to patch icinga-director.service"
- systemd_dounit "${T}/icinga-director.service"
+ systemd_dounit "${T}"/icinga-director.service
}
pkg_postinst() {
- elog "Please see the following documentation for installation"
- elog "https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md"
- elog "or upgrading"
- elog "https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/05-Upgrading.md"
+ # According to PMS this can be a space-separated list of version
+ # numbers, even though in practice it is typically just one.
+ local oldver
+ for oldver in ${REPLACING_VERSIONS}; do
+ if ver_test "${oldver}" -lt "1.10.0"; then
+ ewarn "You are upgrading from ${oldver} to ${PVR}"
+ ewarn "please read https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/05-Upgrading.md#upgrade-to-1.10.x"
+ ewarn "for breaking changes"
+ ewarn
+ ewarn "Also, don't forget to upgrade database schema."
+ ewarn "Otherwise icingaweb2-module-director will not work!"
+ ewarn "(Web GUI => Configuration => Modules => director => Configuration)"
+ ewarn
+ break
+ fi
+ done
}
diff --git a/www-apps/icingaweb2-module-director/metadata.xml b/www-apps/icingaweb2-module-director/metadata.xml
index 5c76f7a3fc67..2f3d4eb71b7b 100644
--- a/www-apps/icingaweb2-module-director/metadata.xml
+++ b/www-apps/icingaweb2-module-director/metadata.xml
@@ -2,7 +2,14 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>prometheanfire@gentoo.org</email>
- <name>Matthew Thode</name>
+ <email>github@fischl-online.de</email>
+ <name>Anton Fischl</name>
</maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Icinga/icingaweb2-module-director</remote-id>
+ </upstream>
</pkgmetadata>