From ff7e1f53da616ceeea388a3c8ab26dcc97eba515 Mon Sep 17 00:00:00 2001 From: Matt Thode Date: Tue, 15 May 2012 22:09:09 +0000 Subject: adding 1.7.0 and removing 1.6.1-r1 Package-Manager: portage-2.1.10.49/cvs/Linux x86_64 --- net-analyzer/icinga/ChangeLog | 10 +- net-analyzer/icinga/Manifest | 31 ++- .../files/fix-prestripped-binaries-1.7.0.patch | 23 ++ net-analyzer/icinga/files/icinga-init.d | 34 +-- net-analyzer/icinga/files/icinga-init.d-2 | 50 ---- net-analyzer/icinga/icinga-1.6.1-r1.ebuild | 231 ------------------- net-analyzer/icinga/icinga-1.6.1-r2.ebuild | 4 +- net-analyzer/icinga/icinga-1.7.0.ebuild | 254 +++++++++++++++++++++ net-analyzer/icinga/metadata.xml | 1 + 9 files changed, 327 insertions(+), 311 deletions(-) create mode 100644 net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch delete mode 100755 net-analyzer/icinga/files/icinga-init.d-2 delete mode 100644 net-analyzer/icinga/icinga-1.6.1-r1.ebuild create mode 100644 net-analyzer/icinga/icinga-1.7.0.ebuild (limited to 'net-analyzer/icinga') diff --git a/net-analyzer/icinga/ChangeLog b/net-analyzer/icinga/ChangeLog index 2bed39f06b94..46dbe4097b44 100644 --- a/net-analyzer/icinga/ChangeLog +++ b/net-analyzer/icinga/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/icinga # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.14 2012/03/09 10:00:55 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.15 2012/05/15 22:09:09 prometheanfire Exp $ + +*icinga-1.7.0 (15 May 2012) + + 15 May 2012; Matthew Thode + +files/fix-prestripped-binaries-1.7.0.patch, +icinga-1.7.0.ebuild, + -files/icinga-init.d, -icinga-1.6.1-r1.ebuild, files/icinga-init.d, + icinga-1.6.1-r2.ebuild, metadata.xml: + adding 1.7.0 and removing 1.6.1-r1 09 Mar 2012; Pawel Hajdan jr icinga-1.6.1-r2.ebuild: x86 stable wrt bug #403949 diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest index 2cb744671d5e..c99c0268974a 100644 --- a/net-analyzer/icinga/Manifest +++ b/net-analyzer/icinga/Manifest @@ -1,23 +1,34 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 +Hash: SHA1 +AUX fix-prestripped-binaries-1.7.0.patch 857 RMD160 c704cb3cd5fdcd1c04d9a39706d0e74ebcb4f560 SHA1 38516871288f77104c7057925f65ccd2414e2ed8 SHA256 dba024fff1934a44e7f3e20e93c121aa251ef1286c8971247e45509c31aaf3ad 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 1267 RMD160 843973fac0562c75c92362aa6f313ba617abe2fd SHA1 af23cfd4f3a911c648aa125bafb873707d4b34b8 SHA256 cfef566114fcfbd53dc3f43f7352b934d33c7a0d62f554dfb0eae352f6e09d01 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 -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 -MISC ChangeLog 2671 RMD160 5b3d16a808c690a9de9fb3986e9da4d33087fc09 SHA1 c8a95d3a02d5e9519a65b5c9883610e203bf43cb SHA256 6ab976e5775c734aa8d619c29bbb3320e07774e893107512c5c7f8438ca0a4cb -MISC metadata.xml 534 RMD160 238ecadc3b6e49610eae7971ad163051640fe964 SHA1 47d5abf8e73c8bfefd7c5436237a488b1156414d SHA256 243fb55b366f5eac56dd56e4f6efa5b22cec0bd9644669b5e10b5b71ca92ef07 +DIST icinga-1.7.0.tar.gz 12939198 RMD160 465edafc080c1674e17daf24a2ce8dabc203dae7 SHA1 3cf1bd7957166a44b1fc106082d1a04bbfa1799e SHA256 e0d033e37bd3c4fb6a35151cc94aae4ca8e730510d9156ea755245728f8acb8b +EBUILD icinga-1.6.1-r2.ebuild 6963 RMD160 036d422c9757e1a959710b2751e36f14144a500f SHA1 0e12f7768dd364454e6df377bdf2b9d7d012d400 SHA256 66f361a96eb1749f838df061cbcff181ea3e8e3698f13c43504895bb0fa1ad59 +EBUILD icinga-1.7.0.ebuild 7642 RMD160 71fda4612f2874d07007fda3171a5f8bca1a2402 SHA1 2b446038ba3306623b586e34d6a7a3173e4bb2b6 SHA256 0ccaa2fb248643d72a3ab1434ba94684db1ff363d5158d64393644ccbbf8de31 +MISC ChangeLog 2978 RMD160 1fcb6b6ed13ed3dc964940c615eacd6fdb3783fc SHA1 cfef59b45f2a37972e0682813e1bebef37e6cba0 SHA256 423d96b049e307f0a336fc045f122c970c3e87d8ed9a65c5314194acb48b8390 +MISC metadata.xml 656 RMD160 d127ece7480eec27f50e853ff0192e5854819ae5 SHA1 03e185a7f1bd4ed5b1356e9ddaa7b73038b7fa27 SHA256 d3a2a2616d4a81e0443c3c093d696c9c16497d3f403a7c891ca1a618248cb1e6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEAREKAAYFAk9Z1N0ACgkQuUQtlDBCeQJowQCffi5itsEDdx+A/EVnm/jusT2Q -fHoAn0ISQBZ10UFGcL/o+FqgnEPx62/5 -=XE/6 +iQIcBAEBAgAGBQJPstQTAAoJECRx6z5ArFrDQ6UP/3+w5gzDajbjeRRjMEZBZkty +QLnQxyEmWyH0aW/etQUssEcafzEixYnnGLV4rulcA3f1DjYtCybTVMlt+CyfUkQj +cr5jHOw/s5nRhFprmTJmHBfyhP+ySn8kuV/ycwScUTweULr/UOzj3sKBeJPJ8GDZ +20gkXsq1lF7qi+XuDRK//PTvfw6E0XBnnMXwXLhj21leMGdgDql5HCsdyZ2UA7Ci +CIGZjoEL5bgpgoa3jnYl+VJgprS9hqFjBIujCIp5Wd2fSHa/UQ+Oi6+QnNlLYPBa +sF3Iol+oTw9k6nXbjyesuH+yUce5hpgh4ycwaTwsZIEIz41Cl1Wt6JRy0BvV5Xsg +NR5q6c0c0SmuuliIJgL8shtv7eOlQZpeUtCDs9MWxjOwCQWS1jmXX1MTWN8JKeJu +hJAwf4hZ5h5/PJrVDXbWlg+vytkaOg61jSr9DM33wGMCnSYkK9qOuOpbt1rTlWPp +G0aXUfKjfeAXQS/xnYQTf9UQl86tPczMIX+WVmHd52Q8FDb63V6/UHO/rRbm2b52 +n39rzV2FZhtFd8izB2PkVYtw/EvR3v7TfgNmuLCdPdPfMUIvmbbY98RHvjsi/vmZ +r6a27cqW0NaOUM2w7HkXUnKs49nXet5Fjv24vLuxDEYbiip/p31v9RUbbs47RqOj +Yp8Z71C9KjEJgnzYNu+w +=G/g2 -----END PGP SIGNATURE----- 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-init.d b/net-analyzer/icinga/files/icinga-init.d index f734f714b338..683e52c4c4e5 100644 --- a/net-analyzer/icinga/files/icinga-init.d +++ b/net-analyzer/icinga/files/icinga-init.d @@ -1,19 +1,11 @@ #!/sbin/runscript -opts="${opts} reload checkconfig" +extra_commands="${extra_commands} reload checkconfig" depend() { need net use dns logger firewall - after mysql postgresql -} - -reload() -{ - checkconfig || return 1 - ebegin "Reloading configuration" - killall -HUP icinga &>/dev/null - eend $? + after mysql postgresql ido2db } checkconfig() { @@ -24,20 +16,28 @@ checkconfig() { eend $? "Configuration Error. Please fix your configfile" } -start() { +reload() +{ checkconfig || return 1 + ebegin "Reloading configuration" + kill -HUP `cat /var/run/icinga/icinga.lock` &>/dev/null + eend $? +} + +start() { ebegin "Starting icinga" - touch /var/icinga/icinga.log /var/icinga/status.sav - chown icinga:icinga /var/icinga/icinga.log /var/icinga/status.sav - rm -f /var/icinga/rw/icinga.cmd - start-stop-daemon --quiet --start --startas /usr/sbin/icinga -e HOME="/var/icinga/home" --pidfile /var/icinga/icinga.lock -- -d /etc/icinga/icinga.cfg + 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 eend $? } stop() { ebegin "Stopping icinga" - start-stop-daemon --quiet --stop --pidfile /var/icinga/icinga.lock - rm -f /var/icinga/status.log /var/icinga/icinga.tmp /var/icinga/icinga.lock /var/icinga/rw/icinga.cmd + start-stop-daemon --stop --pidfile /var/run/icinga/icinga.lock + 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/files/icinga-init.d-2 b/net-analyzer/icinga/files/icinga-init.d-2 deleted file mode 100755 index 683e52c4c4e5..000000000000 --- a/net-analyzer/icinga/files/icinga-init.d-2 +++ /dev/null @@ -1,50 +0,0 @@ -#!/sbin/runscript - -extra_commands="${extra_commands} reload checkconfig" - -depend() { - need net - use dns logger firewall - after mysql postgresql ido2db -} - -checkconfig() { - # Silent Check - /usr/sbin/icinga -v /etc/icinga/icinga.cfg &>/dev/null && return 0 - # Now we know there's problem - run again and display errors - /usr/sbin/icinga -v /etc/icinga/icinga.cfg - eend $? "Configuration Error. Please fix your configfile" -} - -reload() -{ - checkconfig || return 1 - ebegin "Reloading configuration" - kill -HUP `cat /var/run/icinga/icinga.lock` &>/dev/null - eend $? -} - -start() { - ebegin "Starting icinga" - 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 - eend $? -} - -stop() { - ebegin "Stopping icinga" - start-stop-daemon --stop --pidfile /var/run/icinga/icinga.lock - rm -f /var/lib/icinga/status.log /var/run/icinga/icinga.lock /var/lib/icinga/rw/icinga.cmd - rm -r /tmp/icinga - eend $? -} - -svc_restart() { - checkconfig || return 1 - ebegin "Restarting icinga" - svc_stop - svc_start - eend $? -} diff --git a/net-analyzer/icinga/icinga-1.6.1-r1.ebuild b/net-analyzer/icinga/icinga-1.6.1-r1.ebuild deleted file mode 100644 index a8fced06fc3a..000000000000 --- a/net-analyzer/icinga/icinga-1.6.1-r1.ebuild +++ /dev/null @@ -1,231 +0,0 @@ -# Copyright 1999-2011 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-r1.ebuild,v 1.3 2011/12/29 15:59:11 prometheanfire 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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+apache2 debug +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/spool/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 - --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" - - if use plugins ; then - myconf+=" --libexecdir=/usr/$(get_libdir)/nagios/plugins" - else - myconf+=" --libexecdir=/usr/$(get_libdir)/icinga/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 - - sed -i -e 's/var\/lib\/icinga\/icinga.tmp/tmp\/icinga\/icinga.tmp/g' "${D}"/etc/icinga/icinga.cfg || die - - if use idoutils ; then - emake DESTDIR="${D}" install-idoutils || 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 - - 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/icinga-1.6.1-r2.ebuild b/net-analyzer/icinga/icinga-1.6.1-r2.ebuild index 0029df7e8abd..e3b3c71af769 100644 --- a/net-analyzer/icinga/icinga-1.6.1-r2.ebuild +++ b/net-analyzer/icinga/icinga-1.6.1-r2.ebuild @@ -1,6 +1,6 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/icinga-1.6.1-r2.ebuild,v 1.4 2012/05/15 22:09:09 prometheanfire Exp $ EAPI=2 @@ -112,7 +112,7 @@ src_install() { emake DESTDIR="${D}" install-idoutils || die fi - newinitd "${FILESDIR}"/icinga-init.d-2 icinga || die + 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 diff --git a/net-analyzer/icinga/icinga-1.7.0.ebuild b/net-analyzer/icinga/icinga-1.7.0.ebuild new file mode 100644 index 000000000000..5a4237647693 --- /dev/null +++ b/net-analyzer/icinga/icinga-1.7.0.ebuild @@ -0,0 +1,254 @@ +# 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.7.0.ebuild,v 1.1 2012/05/15 22:09:09 prometheanfire Exp $ + +EAPI=2 + +inherit depend.apache eutils multilib toolchain-funcs 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" + +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-1.7.0.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 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 65a79e7a3190..476a6f0d37ed 100644 --- a/net-analyzer/icinga/metadata.xml +++ b/net-analyzer/icinga/metadata.xml @@ -7,6 +7,7 @@ Adds Lighttpd support Adds support for nagios plugins Adds generic web interface support + Adds support for running custom scripts whenever a host or service state change occurs prometheanfire@gentoo.org -- cgit v1.2.3-65-gdbad