public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Thode" <prometheanfire@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/prometheanfire:master commit in: net-analyzer/icinga/files/, net-analyzer/icinga/
Date: Mon, 14 May 2012 18:01:47 +0000 (UTC)	[thread overview]
Message-ID: <1337017993.ae514a9a283fef959688aef5266cb6572e73f469.prometheanfire@gentoo> (raw)

commit:     ae514a9a283fef959688aef5266cb6572e73f469
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 17:53:13 2012 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Mon May 14 17:53:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/prometheanfire.git;a=commit;h=ae514a9a

first test commit of icinga 1.7.0_beta1

---
 net-analyzer/icinga/Manifest                  |   16 +--
 net-analyzer/icinga/files/icinga-init.d-2     |    4 +-
 net-analyzer/icinga/icinga-1.7.0_beta1.ebuild |  252 +++++++++++++++++++++++++
 net-analyzer/icinga/metadata.xml              |    1 +
 4 files changed, 259 insertions(+), 14 deletions(-)

diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest
index 2cb7446..a847ed8 100644
--- a/net-analyzer/icinga/Manifest
+++ b/net-analyzer/icinga/Manifest
@@ -1,23 +1,15 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
-
 AUX fix-prestripped-binaries.patch 775 RMD160 45828e00c34df96bd808d211e26ccecbb7ef7923 SHA1 3664f9443b5f261d45a3420809f6d688b1a5df03 SHA256 0e436d2db97e5f0c1985e2ab3c7e8518196468b99e43ac4e7c2a73f1fcb08957
 AUX icinga-apache.conf 591 RMD160 e2286c2a17869c1dc7e5229ad46ae20e8f9d65a1 SHA1 a52d44d21ea28488838de50a2151b29a341203dd SHA256 a5e7b64baa21f04d5ce6540571260f5de45382e3af93dca99ae8f57b5fb299df
 AUX icinga-conf.d 178 RMD160 3e8a497619b16ce9e33a8d6ff824b5e5cc8f9c63 SHA1 7824227018db79beb7984cdedda7345fe54f70aa SHA256 68dde656424fc57e66babceb3c6623a235fac8bf1f9cd885138e31878db740db
 AUX icinga-init.d 1207 RMD160 fe0f17d9247da24208281077b6cb46089dc9f22f SHA1 58c8fc60da8f4fb5a7d29a8be83948e11a8719e4 SHA256 d9014a1ce527282e5a404e602b3f08e0a4b842e02bd2fcdd8fffb8e67922557d
-AUX icinga-init.d-2 1267 RMD160 843973fac0562c75c92362aa6f313ba617abe2fd SHA1 af23cfd4f3a911c648aa125bafb873707d4b34b8 SHA256 cfef566114fcfbd53dc3f43f7352b934d33c7a0d62f554dfb0eae352f6e09d01
+AUX icinga-init.d-2 1265 RMD160 7c3716d06b4b0e781d59ae07a8117b14def94b21 SHA1 467a5f683eaa545cd0979fbf4cbafcc3890bcba4 SHA256 febeb6ef97d8f0aa5de24f8152939a3003d1f5f8933b5bf96b048d02c216db95
 AUX icinga-lighty.conf 465 RMD160 34de76ad07f95e2282ae3e192b35cd9310ef2b4e SHA1 0d74cc2936327121f07b61fb1a348ce66035bfbb SHA256 f4059bc54959fb2544f23c2fc6a86f0ab2467025ce1f468317a0079b55116b44
 AUX ido2db-conf.d 35 RMD160 a2bb1738720a56285da529fb18eeb60739ac817b SHA1 57ba29aec3f80db9577da4aca34d228487dd12c1 SHA256 6cbdf0eb7070121bd466c221d73cf6ca05a4af5caa1d4abedf62828edd1b1372
 AUX ido2db-init.d 990 RMD160 4eef38e9266754653a7cc5c2f00e294a060941bd SHA1 fc444a4845bf8c6a5c0378f397583b11ce4bd5f1 SHA256 b59b82578929c54ecf8555ffd28c1a13f4b7e856240f8b1c77c9ceca06839252
 DIST icinga-1.6.1.tar.gz 12880538 RMD160 f755d1499c9794fb9a60e0e35dbc091758e72dc1 SHA1 b14cc8be0a8b49ccd41018223d34600db7bc4f3d SHA256 80b980272dd45bcd14b79d98b1125d6aa4184c20644863f71d9f3e00fbced89b
+DIST icinga-1.7.0beta1.tar.gz 12938996 RMD160 18d5b9c107a98400e9a564b34013b0159f987a9c SHA1 a468866974c86b2b04e3409961f58c7f20d2421d SHA256 5b218fdf83ce3f024def7d57413d0e2e597d82838d46d07ec811733088f185df
 EBUILD icinga-1.6.1-r1.ebuild 6966 RMD160 dc74f5db5ba287a878c89bdd409ffbce7bd10bf5 SHA1 4e0d1d97832e554d8db12fbd9d72996947fd3db1 SHA256 f73436e501d4984d61fe3e2f1ab0f338ab914baa91377f766b313806ab2de6b5
 EBUILD icinga-1.6.1-r2.ebuild 6961 RMD160 d75ffeb9562007091ac342e106e45154e10527b1 SHA1 2198bc9c8e17b3ff35a0503ecee059c13dec1b12 SHA256 097a3a082bdbb8f0264131445608130465ed7d2ecad1e35d4433022d12c22683
+EBUILD icinga-1.7.0_beta1.ebuild 7603 RMD160 9392855250076bf86b97db7d0e12059e119bec07 SHA1 b5b8079a650781a50be47921885f4e3a5347187f SHA256 52dbc68d937221093b0c9bd346f94748c8aab2128295b1a1b6e4212804ba1f93
 MISC ChangeLog 2671 RMD160 5b3d16a808c690a9de9fb3986e9da4d33087fc09 SHA1 c8a95d3a02d5e9519a65b5c9883610e203bf43cb SHA256 6ab976e5775c734aa8d619c29bbb3320e07774e893107512c5c7f8438ca0a4cb
-MISC metadata.xml 534 RMD160 238ecadc3b6e49610eae7971ad163051640fe964 SHA1 47d5abf8e73c8bfefd7c5436237a488b1156414d SHA256 243fb55b366f5eac56dd56e4f6efa5b22cec0bd9644669b5e10b5b71ca92ef07
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iEYEAREKAAYFAk9Z1N0ACgkQuUQtlDBCeQJowQCffi5itsEDdx+A/EVnm/jusT2Q
-fHoAn0ISQBZ10UFGcL/o+FqgnEPx62/5
-=XE/6
------END PGP SIGNATURE-----
+MISC metadata.xml 656 RMD160 d127ece7480eec27f50e853ff0192e5854819ae5 SHA1 03e185a7f1bd4ed5b1356e9ddaa7b73038b7fa27 SHA256 d3a2a2616d4a81e0443c3c093d696c9c16497d3f403a7c891ca1a618248cb1e6

diff --git a/net-analyzer/icinga/files/icinga-init.d-2 b/net-analyzer/icinga/files/icinga-init.d-2
index 683e52c..5ed3fb0 100755
--- a/net-analyzer/icinga/files/icinga-init.d-2
+++ b/net-analyzer/icinga/files/icinga-init.d-2
@@ -29,13 +29,13 @@ start() {
 	checkpath -d -o icinga:icinga /tmp/icinga /var/run/icinga /var/log/icinga /var/lib/icinga
 	checkpath -f -o icinga:icinga /var/log/icinga/icinga.log
 	rm -f /var/lib/icinga/rw/icinga.cmd
-	start-stop-daemon --start --exec /usr/sbin/icinga -e HOME="/var/lib/icinga/home" --pidfile /var/run/icinga/icinga.lock -- -d /etc/icinga/icinga.cfg
+	start-stop-daemon --start --exec /usr/sbin/icinga -e HOME="/var/lib/icinga/home" --pidfile /var/run/icinga/icinga.pid -- -d /etc/icinga/icinga.cfg
 	eend $?
 }
 
 stop() {
 	ebegin "Stopping icinga"
-	start-stop-daemon --stop --pidfile /var/run/icinga/icinga.lock
+	start-stop-daemon --stop --pidfile /var/run/icinga/icinga.pid
 	rm -f /var/lib/icinga/status.log /var/run/icinga/icinga.lock /var/lib/icinga/rw/icinga.cmd
 	rm -r /tmp/icinga
 	eend $?

diff --git a/net-analyzer/icinga/icinga-1.7.0_beta1.ebuild b/net-analyzer/icinga/icinga-1.7.0_beta1.ebuild
new file mode 100644
index 0000000..360d4fa
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.7.0_beta1.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/icinga-1.6.1-r2.ebuild,v 1.3 2012/03/09 10:00:55 phajdan.jr Exp $
+
+EAPI=2
+
+inherit depend.apache eutils multilib toolchain-funcs
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="http://superb-dca2.dl.sourceforge.net/project/icinga/icinga/1.7.0beta/icinga-1.7.0beta1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+apache2 debug 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 dev-lang/php[cgi] )
+		apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) )
+	)
+	!net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+	plugins? ( net-analyzer/nagios-plugins )"
+
+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.patch"
+}
+
+src_configure() {
+	local myconf
+
+	myconf="$(use_enable perl embedded-perl)
+	$(use_with perl perlcache)
+	$(use_enable idoutils)
+	$(use_enable ssl)
+	$(use_enable debug DEBUG0)
+	$(use_enable debug DEBUG1)
+	$(use_enable debug DEBUG2)
+	$(use_enable debug DEBUG3)
+	$(use_enable debug DEBUG4)
+	$(use_enable debug DEBUG5)
+	--disable-statuswrl
+	--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 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 eventhandler ; then
+		emake DESTDIR="${D}" install-eventhandlers || die
+	fi
+
+	newinitd "${FILESDIR}"/icinga-init.d-2 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
+	fi
+
+	if use eventhandler ; then
+		dodir /etc/icinga/eventhandlers || die
+		fowners icinga:icinga /etc/icinga/eventhandlers || die
+	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 {} +
+	dodir /var/run/icinga || die
+	fowners icinga:icinga /var/run/icinga || die
+
+	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"
+			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"
+		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
index 65a79e7..476a6f0 100644
--- a/net-analyzer/icinga/metadata.xml
+++ b/net-analyzer/icinga/metadata.xml
@@ -7,6 +7,7 @@
 		<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>



             reply	other threads:[~2012-05-14 18:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 18:01 Matt Thode [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-14 19:02 [gentoo-commits] dev/prometheanfire:master commit in: net-analyzer/icinga/files/, net-analyzer/icinga/ Matt Thode
2012-05-14 18:34 Matt Thode
2012-05-14 18:27 Matt Thode
2012-05-14 18:19 Matt Thode
2012-01-12 17:11 Matt Thode
2011-12-04 19:20 Matt Thode
2011-11-25 17:59 Matt Thode
2011-11-22 22:45 Matt Thode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337017993.ae514a9a283fef959688aef5266cb6572e73f469.prometheanfire@gentoo \
    --to=prometheanfire@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox