From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/icinga-web/Manifest | 5 + net-analyzer/icinga-web/icinga-web-1.14.0.ebuild | 205 +++++++++++++++++++++++ net-analyzer/icinga-web/metadata.xml | 18 ++ 3 files changed, 228 insertions(+) create mode 100644 net-analyzer/icinga-web/Manifest create mode 100644 net-analyzer/icinga-web/icinga-web-1.14.0.ebuild create mode 100644 net-analyzer/icinga-web/metadata.xml (limited to 'net-analyzer/icinga-web') diff --git a/net-analyzer/icinga-web/Manifest b/net-analyzer/icinga-web/Manifest new file mode 100644 index 000000000000..9bd3c86ea8f1 --- /dev/null +++ b/net-analyzer/icinga-web/Manifest @@ -0,0 +1,5 @@ +DIST icinga-web-1.14.0.tar.gz 14523746 SHA256 ee57e53417d54ee65b4cabe6c18f15c57cf49750f9fb73691deb9f28b11a740e SHA512 9e429ffaf84efb08e0ad009af2dd90179366d4de5720bc09574228d3a6dec967eddc04402f5fac220e7af14761afec4b9021f70255102829e21880591d702d3b WHIRLPOOL 628a606e9c9e927258875dc3529e575ccd9c1da7e358bc5cf96b55068741380a36c89935217dc8b3319942c396f26f50dedb428226f9f99dfa003c7ad3809631 +EBUILD icinga-web-1.14.0.ebuild 6360 SHA256 1fc3ce905f811f6b7b708c16afdc6075bc6315df422c151ae3fe480105413b4f SHA512 2f0e86345412a2af5541fe9dfb949abef6f7fd53018c65b876ef9d1a64b3c7cac015f49f8f4f8716f28fe2a6d4136dff3da448ce8f92e7816d86ce2c80e1fc2b WHIRLPOOL fbc99a81538743ed979f46ee132bb12d1665fd18d8d4e23bde56bbcce65a941e50aa0a54b35ca570f3f7f2bd1caecb8dbdc612cb5a7adaca902c4df0b9d6518c +MISC ChangeLog 3350 SHA256 7be61e490ab18b9bc5f7c5b461775f1f8a755820251976c57b753ed70c7bcd00 SHA512 dc28b84430551868618acf72ef266ce0635c81a96a2006a5702f0e235c46dba946b7ac586b9f1f69a8527e3f2df552403ef53c90b2803adf953f381ef7c0172e WHIRLPOOL 4ebe1b95f5b98d2b61fcb3840c4685444c3dec22faddbca7d43d7aa680a88364136c736f0766e4336d3956b7d77f2a2dc149213317954816eceef7e1a4b83313 +MISC ChangeLog-2015 3720 SHA256 feee007ad00caaa97b20ca3ab52e4bacc9d2aee9785ef95c858bc17e05620ac8 SHA512 135974c33d8d0269a09eea005e64eda5bc2a2201ab2a01ba669351fd631a3d02f52bfc41920fd60207b3fc6c8b087358aa816fbd589cff3e608b3e7450fd75f7 WHIRLPOOL 80b65f29e84a17d0fb0980d866311a108c8464a28280bea0a647daeec1560684b939a19a4b295a94a1c85599cfe8e9be05a7091621fd06b3d6beedce519fb50c +MISC metadata.xml 565 SHA256 53a0d14ba773a981b4be3b7ce20c864afb9f21e190c7186b0a737c93aac95a85 SHA512 534f181a73fff13650cd97081c748cf0d75424bab7826ac83eda2a09e6cd3737fd447db3ad9a0207b2cdb24cc84f0515ad5282de2024ec6eddae2a85be41a084 WHIRLPOOL 308eaadc02f27235de1662809ba64f34792f78f492ac35857a6091d7eea0ef9ac26a136e4323b798b07f75bd875ef1ff741cd63223dac6e266d090234994bafb diff --git a/net-analyzer/icinga-web/icinga-web-1.14.0.ebuild b/net-analyzer/icinga-web/icinga-web-1.14.0.ebuild new file mode 100644 index 000000000000..215958015581 --- /dev/null +++ b/net-analyzer/icinga-web/icinga-web-1.14.0.ebuild @@ -0,0 +1,205 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit depend.apache eutils user multilib + +DESCRIPTION="Icinga Web - new Web Interface" +HOMEPAGE="http://www.icinga.org/" +SRC_URI="https://github.com/icinga/${PN}/archive/v${PV}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="apache2 mysql pnp postgres" +DEPEND="dev-php/phing + dev-db/libdbi-drivers[mysql?,postgres?] + || ( >=net-analyzer/icinga-1.10.0 >=net-analyzer/icinga2-2.1.1 ) + dev-lang/php:=[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml] + pnp? ( net-analyzer/pnp4nagios )" +RDEPEND="${DEPEND}" + +want_apache2 + +pkg_setup() { + if use apache2 ; then + depend.apache_pkg_setup + fi + enewgroup icinga + enewgroup nagios + enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" +} + +src_prepare() { + #removed checks for some php stuff since we have these things called use flags + sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac + sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in + autoreconf +} + +src_configure() { + local myconf + + myconf="--prefix=/usr/share/icinga/icinga-web + --bindir=/usr/sbin + --sbindir=/usr/$(get_libdir)/icinga/cgi-bin + --datarootdir=/usr/share/icinga/htdocs + --localstatedir=/var/lib/icinga + --sysconfdir=/etc/icinga + --libexecdir=/usr/$(get_libdir)/icinga/plugins + --with-bin-user=icinga + --with-bin-group=nagios + --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd + --with-conf-dir=/etc/icinga-web + --with-log-dir=/var/log/icinga-web + --with-icinga-objects-dir=/etc/icinga/objects + --with-icinga-bin=/usr/sbin/icinga + --with-icinga-cfg=/etc/icinga/icinga.cfg" + + if use apache2 ; then + myconf+=" --with-web-user=apache + --with-web-group=apache + --with-web-apache-path=${APACHE_MODULES_CONFDIR}" + else + myconf+=" --with-web-user=root + --with-web-group=root" + fi + + if use postgres ; then + myconf+=" --with-db-type=pgsql + --with-db-port=5432 + --with-api-subtype=pgsql + --with-api-port=5432" + fi + + econf ${myconf} +} + +src_install() { + dodoc README + rm -f README + + emake -j1 DESTDIR="${D}" install + + emake DESTDIR="${D}" install-javascript + + if use apache2 ; then + dodir ${APACHE_MODULES_CONFDIR} + emake DESTDIR="${D}" install-apache-config + echo '' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf" + cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf" + rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed" + echo '' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf" + fi + + insinto /usr/share/icinga/icinga-web/contrib + doins -r etc/schema/* + + if use apache2 ; then + sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron + else + sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron + fi + sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron + + dodir /usr/share/icinga/icinga-web/cron/ + cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <> /var/log/icinga-web/cron_error.log +EOF + + cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <> /var/log/icinga-web/cron_error.log +EOF + + if use apache2 ; then + diropts -o apache -g apache + else + diropts -o root -g root + fi + dodir /var/log/icinga-web + + if use apache2 ; then + fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat + else + fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat + fi + + if use pnp ; then + insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/ + doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml + doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml + fi +} + +pkg_config() { + einfo "press enter to install the icinga-web crontab" + einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron" + einfo + read + + if has_version sys-process/fcron; then + fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab + else + crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab + fi +} + +pkg_postinst() { + einfo + einfo "If this is a new install, you must create a new database for it, e.g. icinga_web." + einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/." + einfo + einfo "Additionally, you need to setup a database user." + einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE." + einfo + einfo "Example for a MySQL database:" + einfo " echo \"CREATE DATABASE icinga_web;\" | mysql" + einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql" + einfo " echo \"FLUSH PRIVILEGES;\" | mysql" + einfo + einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web" + einfo + + ewarn + ewarn "If you're upgrading from a previous release, you must upgrade your database schema." + ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/." + ewarn + ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between," + ewarn " be advised that you need to apply those upgrade files with incremental steps!" + ewarn + ewarn "Example to upgrade a MySQL database:" + ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql__to_.sql | mysql icinga_web" + ewarn + ewarn "Don't forget to clear the config cache." + ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh" + ewarn + + einfo + einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)." + einfo + + if use apache2 ; then + einfo + einfo "apache config was installed into" + einfo "/etc/apache2/modules.d/99_icinga-web.conf" + einfo + einfo "The apache config value for \'ServerTokens\' must be set to at" + einfo "least \'Min\'." + einfo + else + einfo + einfo "If you are not using apache you may need to change some" + einfo "permissions, so that your web server can access files and logs" + einfo + fi +} diff --git a/net-analyzer/icinga-web/metadata.xml b/net-analyzer/icinga-web/metadata.xml new file mode 100644 index 000000000000..224b578f16c1 --- /dev/null +++ b/net-analyzer/icinga-web/metadata.xml @@ -0,0 +1,18 @@ + + + + + prometheanfire@gentoo.org + Matthew Thode + + + Icinga-web is a database backed web frontend to icinga. + + + Enables pnp4nagios integration + + + icinga + icinga/icinga-web + + -- cgit v1.2.3