summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Thode <prometheanfire@gentoo.org>2012-07-16 15:27:26 +0000
committerMatt Thode <prometheanfire@gentoo.org>2012-07-16 15:27:26 +0000
commitdfba7efeed777c80d2a6363976c06b9121640383 (patch)
tree39084743a7957161acd4e0de7be3da49325641ab /net-analyzer/icinga-web
parentStable for x86, wrt bug #426826 (diff)
downloadhistorical-dfba7efeed777c80d2a6363976c06b9121640383.tar.gz
historical-dfba7efeed777c80d2a6363976c06b9121640383.tar.bz2
historical-dfba7efeed777c80d2a6363976c06b9121640383.zip
New ebuild for icinga-web. Ebuild written by Thomas Oettli, submitted by me. bug #332369
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/icinga-web')
-rw-r--r--net-analyzer/icinga-web/ChangeLog16
-rw-r--r--net-analyzer/icinga-web/Manifest25
-rw-r--r--net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch70
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.7.1.ebuild169
-rw-r--r--net-analyzer/icinga-web/metadata.xml15
5 files changed, 295 insertions, 0 deletions
diff --git a/net-analyzer/icinga-web/ChangeLog b/net-analyzer/icinga-web/ChangeLog
new file mode 100644
index 000000000000..fcf2aa879924
--- /dev/null
+++ b/net-analyzer/icinga-web/ChangeLog
@@ -0,0 +1,16 @@
+# ChangeLog for net-analyzer/icinga-web
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga-web/ChangeLog,v 1.1 2012/07/16 15:27:26 prometheanfire Exp $
+
+*icinga-web-1.7.1 (16 Jul 2012)
+
+ 16 Jul 2012; Matthew Thode <prometheanfire@gentoo.org>
+ +icinga-web-1.7.1.ebuild, +files/icinga-web-1.7.1-disable-compression.patch:
+ New ebuild for icinga-web. Ebuild written by Thomas Oettli, submitted by me.
+ bug #332369
+
+*icinga-web-1.6.1-r1 (27 Feb 2012)
+
+ 27 Feb 2012; mthode <mthode@gentoo.org> +icinga-web-1.6.1-r1.ebuild:
+ initial add and test of icinga-web
+
diff --git a/net-analyzer/icinga-web/Manifest b/net-analyzer/icinga-web/Manifest
new file mode 100644
index 000000000000..601881088d8a
--- /dev/null
+++ b/net-analyzer/icinga-web/Manifest
@@ -0,0 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX icinga-web-1.7.1-disable-compression.patch 3120 SHA256 5ac0b8cc757d474adc4e1bc8119facc0cda466f83a1e3ae88afb899de3bdea85 SHA512 09eccfe66bab2650e0146582511717ecd082139e0e29c95b9ebeccb37706a0a4c23f7c7a051561d65b77c749c7c6fbc3bf3ac0e1fcd405dff647400d23b44056 WHIRLPOOL 185e78e2b62c01d2867c476de329a077bbab77b29777acccd618016a3383a98879dd5b51c78bad47440f56b8497a2b1e10608a1a19466a0a80b6af5cf80f10de
+DIST icinga-web-1.7.1.tar.gz 14551987 SHA256 6b585f243ae247c6ca018d4a9dc3dc976209f5c489166643c0863fa9189d55ef SHA512 284d1bd7cc41dd6bc66afd5adc5ec48671c1db9e9f2cfb9458ef557f0d2da0506da617d914309e5052fb94afc85909dd0262837677204d22bd32fa7ac5adf9a5 WHIRLPOOL 809dbbe7169b39ccf373645a7e14d752e249c8741e29d42ea2ac0829bafd9503c3cc0c9944f3ba1805b20bf267a0e4b8c141cbee4a423362078d68bab029baaa
+EBUILD icinga-web-1.7.1.ebuild 5107 SHA256 0fbd7a0c5f8b0e493d83873625fd9d7f19129d7d3e0804fd9cd14cb7a1500694 SHA512 5c25e8cee3904e2142de3928af0de07d6cd159b1dac7da66da9cb8b1720e209b83de10ca978cc3483b1acfde29b391317c83393bbefd469dbff0d4b5c08d621e WHIRLPOOL 07709d0877356280e08bcc92859610b6f879399d23f484b3c30bdcd90377cbbcec4b2be555b8a22ba2a8aac4eea57e4234e38bdc73e7705e8dd0b9abedc64af6
+MISC ChangeLog 635 SHA256 77102ac09687e526152657e5d3ea3be31d5ff57621f3159e59d19a81a3a2df75 SHA512 6409179eb8eadd918f04386dd28fd7fef9f0e49bcf7faf2725ee1708628e164324c2cf73609e97336f6735a9e924f955b1941bdc5564105a4cf8bf270c2cf245 WHIRLPOOL d6a120b7748b6e2e329c265153432077937ee34b49dea3037589de438be86c18199e75fdda4449c7a5b67d6734ae307ced6d242278cca4e38b90a2b88ddaadd2
+MISC metadata.xml 419 SHA256 49679fa6aac480dadb07969911c1ea1fd09b7fd67b28be3ffc121333426dac61 SHA512 31f0c6fe93a928fee82cd8fb970dafdaf7b9f830c44ca33621fac89998ee0ab416ef851ac76a8019dc8fba93db331ba627e2ae42257d80a9615d12b03fbeffe1 WHIRLPOOL 8cbed9673cc9bb5797643e4cdbfc6adc378d5baa3e877614b7b0d55ad4d659e979283d9323c57938a301aa787edd7a66fb3e2882b0eba4ff90c638b0344801e9
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQIcBAEBAgAGBQJQBDLtAAoJECRx6z5ArFrDaToP/2oFVuJeS8y3ra34iqac6aQY
+uGpaDyVhectGlyFchBz32lNJ3WGl6j+HvBlXy4BMnZJnJXPeA2RUV0HlT0S06kLB
+M9I7xVCtXRRPw3GqozQFdEVFkbHNvDjQ7t3+LFXvchsy92aDuZz2cwmcnsDSgnPy
+OEekQLCPjez/OcskU6AojyAno072jA9JK90X9kNY+aMwWz0vKIRSO/mkDWsgZnbK
+wfepxCaNXkc9BI+6sdkIsIV5n3jkfqfI+z6V90ria5uq6ltSlmlql7KFNJyCouUN
+V1PX1xuOcad/hAUzFKFHHvGKgrmfsgKYGzn99iYMNk88P2AfpLPEOEUByl04Y1AP
+YkUAXhMAhGYjb48F40hKs01sFhyQaJTSOss4HgmkxnbagGqguIyTCBnauTd5iiCx
+wTtIVFkBzJKqoTxOcbA91o6yeXu1oQYJEVgLtOUe2ccoLknVHNFu8vF1sCba7uOO
+G1vOCv1UnQp6H15AkLhtq9U36WhGScC9L+U8kLFOj5cxZtFOtm/V7Q5gcHSPqo9s
+aWWpVfNQDUSawCP6GoIzJiDyzoykvTHxBNvCk9E+pjZhb5gcinwJGstQnsRvw25U
+cvZ+1BQQVNIskC6vyPgoY6SkFu3+yQrTthXac4cGfvIWJKgkw0xfCvvdChW5RHjO
+5DMNoMV1dU3hdJIF6fhN
+=4WCP
+-----END PGP SIGNATURE-----
diff --git a/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch b/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch
new file mode 100644
index 000000000000..d79a07c74bea
--- /dev/null
+++ b/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch
@@ -0,0 +1,70 @@
+--- app/modules/AppKit/config/module.xml.in
++++ app/modules/AppKit/config/module.xml.in
+@@ -29,6 +29,8 @@
+ <setting name="squishloader">
+ <ae:parameter name="cache_dir">%core.cache_dir%/Squished</ae:parameter>
+ <ae:parameter name="use_caching">@flag_caching@</ae:parameter>
++ <ae:parameter name="use_gzcompress">false</ae:parameter>
++ <ae:parameter name="gzcompress_level">2</ae:parameter>
+ </setting>
+
+ <setting name="user_preferences_default">
+--- app/modules/AppKit/validate/Widgets/SquishLoader.xml
++++ app/modules/AppKit/validate/Widgets/SquishLoader.xml
+@@ -5,12 +5,18 @@
+ parent="%core.module_dir%/AppKit/config/validators.xml"
+ >
+ <ae:configuration>
+-
+ <validators>
+ <validator class="string" name="IfNoneMatch" source="headers" required="false">
+ <argument>IF_NONE_MATCH</argument>
+ </validator>
+-
++
++ <validator class="string" name="accept_encoding" source="headers" required="true">
++ <argument>ACCEPT_ENCODING</argument>
++
++ <errors>
++ <error>Could not validate HTTP_REFERER</error>
++ </errors>
++ </validator>
+ </validators>
+ </ae:configuration>
+ </ae:configurations>
+--- app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
++++ app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
+@@ -45,8 +45,31 @@ class AppKit_Widgets_SquishLoaderSuccessView extends AppKitBaseView {
+ return "";
+ }
+
+- ob_start("ob_gzhandler");
+-
++ $options = AgaviConfig::get('modules.appkit.squishloader', array());
++ $gz_level = isset($options['gzcompress_level']) ?
++ (integer)$options['gzcompress_level'] : 3;
++ $gz_use = isset($options['use_gzcompress']) ?
++ (boolean)$options['use_gzcompress'] : false;
++
++ if ($gz_use === true) {
++
++ $encoding = $rd->getHeader('ACCEPT_ENCODING', false);
++
++ if (strpos($encoding, 'gzip') !== false) {
++ $encoding = 'gzip';
++ } elseif(strpos($encoding, 'x-gzip') !== false) {
++ $encoding = 'x-gzip';
++ }
++
++ if ($encoding !== false) {
++ header('Content-Encoding: '. $encoding);
++ $l = strlen($content);
++ $content = gzcompress($content, 4);
++ $content = substr($content, 0, $l);
++ return "\x1f\x8b\x08\x00\x00\x00\x00\x00". $content;
++ }
++ }
++
+ return $content;
+ }
+ }
diff --git a/net-analyzer/icinga-web/icinga-web-1.7.1.ebuild b/net-analyzer/icinga-web/icinga-web-1.7.1.ebuild
new file mode 100644
index 000000000000..acba70d16ba3
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.7.1.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga-web/icinga-web-1.7.1.ebuild,v 1.1 2012/07/16 15:27:26 prometheanfire Exp $
+
+EAPI="2"
+
+inherit depend.apache eutils
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="mirror://sourceforge/icinga/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-lang/php[apache2?,cli,mysql?,pdo,postgres?,json]
+ 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() {
+ epatch "${FILESDIR}/${P}-disable-compression.patch"
+}
+
+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 DESTDIR="${D}" install || die "make failed"
+
+ emake DESTDIR="${D}" install-javascript || die "make failed"
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config || die "make failed"
+ mv "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/* || die
+
+ 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
+
+ insinto /etc/cron.d/
+ doins etc/scheduler/icingaCron || die
+
+ 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_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_<oldversion>_to_<newversion>.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..a52074c64438
--- /dev/null
+++ b/net-analyzer/icinga-web/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription lang="en">
+ Icinga-web is a database backed web frontend to icinga.
+ </longdescription>
+ <use>
+ <flag name="pnp">Enables pnp4nagios integration</flag>
+ </use>
+</pkgmetadata>
+