summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/icinga
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/icinga')
-rw-r--r--net-analyzer/icinga/Manifest7
-rw-r--r--net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch23
-rw-r--r--net-analyzer/icinga/files/icinga-apache.conf17
-rw-r--r--net-analyzer/icinga/files/icinga-conf.d3
-rw-r--r--net-analyzer/icinga/files/icinga-init.d62
-rw-r--r--net-analyzer/icinga/files/icinga-lighty.conf24
-rw-r--r--net-analyzer/icinga/files/ido2db-conf.d1
-rw-r--r--net-analyzer/icinga/files/ido2db-init.d40
-rw-r--r--net-analyzer/icinga/icinga-1.10.4.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.1.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.4.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.7.ebuild264
-rw-r--r--net-analyzer/icinga/icinga-1.12.0.ebuild264
-rw-r--r--net-analyzer/icinga/icinga-1.12.2.ebuild267
-rw-r--r--net-analyzer/icinga/icinga-1.9.6.ebuild259
-rw-r--r--net-analyzer/icinga/metadata.xml19
16 files changed, 2027 insertions, 0 deletions
diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest
new file mode 100644
index 000000000000..05af21b1e6cf
--- /dev/null
+++ b/net-analyzer/icinga/Manifest
@@ -0,0 +1,7 @@
+DIST icinga-1.10.4.tar.gz 15391948 SHA256 fecaeca3f4f059fe506681e99a5e15fd4bef16ad1003b12e519ec91ce0b3bcfd SHA512 d3f5e69089c01429cf99d53e5eff30a890899bb7509ae1c5251021a4ad1abdfafdbccc55b9719c117740227ba9dad3af392a26f6c1117f2aaf3029f8ce6fc09b WHIRLPOOL 907dd0af89ab6f09dc47829e85c44b82f9dc83b3d2b073de567e0e011fa6ca734f3c0e61b582ccdb5992fae53ef1a182f9bc440af086fe900cb1d375a501535a
+DIST icinga-1.11.1.tar.gz 18699628 SHA256 7dca7d6193fe9de1d5d044e3eefd9dfca5a24485a60d332edac68c5cc4838c95 SHA512 878d75ef669c9110c42275ab36781fc440d42e98821a0da400d2ed174b61e9571fbf35bd847afdfcf67039b4814b34f13b892ddca738d207fd2abf26715c803d WHIRLPOOL 26561d572c9bb38df2ab0656fac69168b327e4e8c00d1e756aae4c8dbae10b74fd10313f74fb80f08bc9de713a402801d649abcbaa8adc6d3386f48f54cdf9dd
+DIST icinga-1.11.4.tar.gz 18657247 SHA256 34e923d8daac0235513ece5f54a2065b9166cce3ef3c9f8794e635c93ae0d541 SHA512 0cc2cd8561affbbb400f59d02023bc35de3f6f39c120fcb9d293d7ce343c88061b7a7ef557c22ed79881e499c967223616cf2a4a0746b480ee8a36b3e9a23e27 WHIRLPOOL 55277fee87e552ad94c069c252a68d3fe1fedef435e5fd0e00768a1e62887de6980913f3b4c096c62a6bf2cf1abca5dd2c68934e9f3603f965555349572edf9e
+DIST icinga-1.11.7.tar.gz 18657763 SHA256 b6526dd44d42c70e50ebfb58608f1fec8ba6d805fda4fde57f1078c248e25045 SHA512 3c06771f83257afc9096078ba5304ad9a3fbd8d75f22ca62113c45b06f1a015ef3758936dcb3376b3a18584a360ca4a629e5b071570b7215f7b199e414946af1 WHIRLPOOL 4f66389b467f77e5544239c9c1553e185e37f115f057df83330118e2e8883efa5d73b05bc1c9b3801ff522947e098f3169185b71a172bf9ac26173a033ce30d6
+DIST icinga-1.12.0.tar.gz 18670338 SHA256 6bcee5605d66a00444454514baeffd8084df6097cf8ebead2b8114387d5def14 SHA512 214eece3d5545f9157c25d83f1ed65eab82ae4508e713efa2aec83d69e0621ff53618a33c266e88f67b13e4734bd62d7e55cb2cbc547946d13e691f9b24c726b WHIRLPOOL 94fd7435f113e839e1d6a71a466060ab3e2f161a64643e011acb01f1a34bfe00a7313ea47434db6f74405b1b3fe7581c39bb39fd04887e4985fcd16f0cc0c827
+DIST icinga-1.12.2.tar.gz 18745366 SHA256 3eb3e623070996fffe8ba1d5c0fe8081d3074bca5109de4ee597a9515507a4cc SHA512 eac3d354fa555d8374757a07cc84f028dcead71eb611245e16597b050f8f050d4b955cf7bc70ff0230a7fa8eb004541827c2686b60ccd683a0646c1d7707b264 WHIRLPOOL fc1251966dfce7377e6f4017281b3f35cca2241ee1fb31b654126d8f045a957a6835cdb45d622efaaf0cf0cd89d45969f6a4c81dd628174dc7a9c29cef137b51
+DIST icinga-1.9.6.tar.gz 17082621 SHA256 a70a54d49813f8ea1b58688d5d2b3ecd00a0470a900c84943c044669f582274c SHA512 f2489d6c898e754ca162304651e71e071e5f1d0ce396ecd87ba9e6fd0a14343cca24fd860e661250b2723a696045d45602ebf2fc9aa16dbaf126415ba109b3ff WHIRLPOOL 599b3a257e1ef9b9d713cfbde0233ab171f46ee5f2fffaa2e5a3ab95daaad2c9ee88e61def2420d60e9262fb57dc4a18ea168c0d9b1da52dc85792d2d1389cbf
diff --git a/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch b/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch
new file mode 100644
index 000000000000..256cfc83232f
--- /dev/null
+++ b/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch
@@ -0,0 +1,23 @@
+diff -rupN icinga-1.7.0beta1-orig//base/Makefile.in icinga-1.7.0beta1//base/Makefile.in
+--- icinga-1.7.0beta1-orig//base/Makefile.in 2012-05-09 07:10:21.000000000 -0500
++++ icinga-1.7.0beta1//base/Makefile.in 2012-05-14 14:00:29.666346315 -0500
+@@ -41,7 +41,7 @@ HTMLDIR=@datarootdir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
++STRIP=/bin/true
+
+ CGIURL=@cgiurl@
+ HTMURL=@htmurl@
+diff -rupN icinga-1.7.0beta1-orig//cgi/Makefile.in icinga-1.7.0beta1//cgi/Makefile.in
+--- icinga-1.7.0beta1-orig//cgi/Makefile.in 2012-05-09 07:10:21.000000000 -0500
++++ icinga-1.7.0beta1//cgi/Makefile.in 2012-05-14 14:00:43.285346614 -0500
+@@ -21,7 +21,7 @@ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
++STRIP=/bin/true
+
+ CGIEXTRAS=@CGIEXTRAS@
diff --git a/net-analyzer/icinga/files/icinga-apache.conf b/net-analyzer/icinga/files/icinga-apache.conf
new file mode 100644
index 000000000000..7c768b4eb317
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-apache.conf
@@ -0,0 +1,17 @@
+<IfDefine ICINGA>
+ ScriptAlias /icinga/cgi-bin/ /usr/lib/icinga/cgi-bin/
+ <Directory "/usr/lib/icinga/cgi-bin/">
+ Options ExecCGI
+ AuthName "Icinga Access"
+ AuthType Basic
+ AuthUserFile /etc/icinga/htpasswd.users
+ Require valid-user
+ </Directory>
+ Alias /icinga /usr/share/icinga/htdocs
+ <Directory "/usr/share/icinga/htdocs">
+ AuthName "Icinga Access"
+ AuthType Basic
+ AuthUserFile /etc/icinga/htpasswd.users
+ Require valid-user
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/icinga/files/icinga-conf.d b/net-analyzer/icinga/files/icinga-conf.d
new file mode 100644
index 000000000000..da5b324b31b7
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-conf.d
@@ -0,0 +1,3 @@
+# Distributed monitoring users will want to configure here the ip/hostname of the central server.
+# It will be used by submit_check_result_via_nsca.
+NAGIOS_NSCA_HOST="localhost"
diff --git a/net-analyzer/icinga/files/icinga-init.d b/net-analyzer/icinga/files/icinga-init.d
new file mode 100644
index 000000000000..6bf9695fc8cc
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-init.d
@@ -0,0 +1,62 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${ICINGACFG:=/etc/icinga/icinga.cfg}
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command=/usr/sbin/icinga
+command_args="-d ${ICINGACFG}"
+
+get_config() {
+ if [ -e "${ICINGACFG}" ]; then
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${ICINGACFG}"
+ fi
+}
+
+pidfile=$(get_config lock_file)
+start_stop_daemon_args="-e HOME=/var/lib/icinga"
+
+depend() {
+ need net
+ use dns logger firewall mysql postgresql
+}
+
+checkconfig() {
+ # Silent Check
+ ${command} -v ${ICINGACFG} &>/dev/null && return 0
+ # Now we know there's problem - run again and display errors
+ ${command} -v ${ICINGACFG}
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ kill -HUP $(cat ${pidfile}) &>/dev/null
+ eend $?
+}
+
+start_pre() {
+ checkpath -d -o icinga:icinga $(get_config temp_path) $(dirname $(get_config lock_file)) $(dirname $(get_config log_file)) $(dirname $(get_config status_file))
+ checkpath -f -o icinga:icinga $(get_config log_file)
+ rm -f $(get_config command_file)
+}
+
+stop_post() {
+ rm -f $(get_config command_file)
+ rm -r /tmp/icinga
+}
+
+svc_restart() {
+ checkconfig || return 1
+ ebegin "Restarting icinga"
+ svc_stop
+ svc_start
+ eend $?
+}
+
diff --git a/net-analyzer/icinga/files/icinga-lighty.conf b/net-analyzer/icinga/files/icinga-lighty.conf
new file mode 100644
index 000000000000..678f2331e4ed
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-lighty.conf
@@ -0,0 +1,24 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_auth")
+server.modules += ("mod_alias")
+
+auth.require += ( "/icinga" =>
+ (
+ "method" => "digest",
+ "realm" => "icinga",
+ "require" => "valid-user"
+ )
+)
+
+$HTTP["url"] =~ "^/icinga/cgi-bin/" {
+ dir-listing.activate = "disable"
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => ""
+ )
+}
+
+alias.url += (
+ "/icinga/cgi-bin" => "/usr/lib/icinga/cgi-bin",
+ "/icinga" => "/usr/share/icinga/htdocs"
+)
diff --git a/net-analyzer/icinga/files/ido2db-conf.d b/net-analyzer/icinga/files/ido2db-conf.d
new file mode 100644
index 000000000000..5429fa9a5268
--- /dev/null
+++ b/net-analyzer/icinga/files/ido2db-conf.d
@@ -0,0 +1 @@
+IDO2DBCFG="/etc/icinga/ido2db.cfg"
diff --git a/net-analyzer/icinga/files/ido2db-init.d b/net-analyzer/icinga/files/ido2db-init.d
new file mode 100644
index 000000000000..7db7194102d2
--- /dev/null
+++ b/net-analyzer/icinga/files/ido2db-init.d
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+get_config() {
+ if [ -e "${IDO2DBCFG}" ]; then
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${IDO2DBCFG}"
+ fi
+}
+
+command=/usr/sbin/ido2db
+command_args="-c ${IDO2DBCFG}"
+pidfile="$(get_config lock_file)"
+
+depend() {
+ config "${IDO2DBCFG}"
+
+ need net icinga
+ use dns logger firewall
+
+ case $(get_config db_servertype) in
+ mysql)
+ use mysql ;;
+ pgsql)
+ use postgresql ;;
+ esac
+}
+
+IDO2DBSOCKET="$(get_config socket_name)"
+
+
+start_pre() {
+ if [ -S "${IDO2DBSOCKET}" ] ; then
+ ewarn "Strange, the socket file already exist in \"${IDO2DBSOCKET}\""
+ ewarn "it will be removed now and re-created by ido2db"
+ ewarn "BUT please make your checks."
+ rm -f "${IDO2DBSOCKET}"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.10.4.ebuild b/net-analyzer/icinga/icinga-1.10.4.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.10.4.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.1.ebuild b/net-analyzer/icinga/icinga-1.11.1.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.1.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.4.ebuild b/net-analyzer/icinga/icinga-1.11.4.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.4.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.7.ebuild b/net-analyzer/icinga/icinga-1.11.7.ebuild
new file mode 100644
index 000000000000..f8de77a722f1
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.7.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.12.0.ebuild b/net-analyzer/icinga/icinga-1.12.0.ebuild
new file mode 100644
index 000000000000..f8de77a722f1
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.12.0.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.12.2.ebuild b/net-analyzer/icinga/icinga-1.12.2.ebuild
new file mode 100644
index 000000000000..cb9a0d99dc93
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.12.2.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.9.6.ebuild b/net-analyzer/icinga/icinga-1.9.6.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.9.6.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/metadata.xml b/net-analyzer/icinga/metadata.xml
new file mode 100644
index 000000000000..6bb89af4a7a4
--- /dev/null
+++ b/net-analyzer/icinga/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">A rebuild of nagios from the ground up</longdescription>
+ <use>
+ <flag name="contrib">additional scripts</flag>
+ <flag name="idoutils">Adds DB support</flag>
+ <flag name="lighttpd">Adds Lighttpd support</flag>
+ <flag name="plugins">Adds support for nagios plugins</flag>
+ <flag name="web">Adds generic web interface support</flag>
+ <flag name="eventhandler">Adds support for running custom scripts whenever a host or service state change occurs</flag>
+ </use>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">icinga/icinga-core</remote-id>
+ </upstream>
+</pkgmetadata>