summaryrefslogtreecommitdiff
path: root/net-analyzer/icinga
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/icinga
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/icinga')
-rw-r--r--net-analyzer/icinga/Manifest15
-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.d61
-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.d39
-rw-r--r--net-analyzer/icinga/icinga-1.13.4.ebuild269
-rw-r--r--net-analyzer/icinga/icinga-1.14.0.ebuild268
-rw-r--r--net-analyzer/icinga/metadata.xml20
11 files changed, 740 insertions, 0 deletions
diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest
new file mode 100644
index 000000000000..b13d09575abd
--- /dev/null
+++ b/net-analyzer/icinga/Manifest
@@ -0,0 +1,15 @@
+AUX fix-prestripped-binaries-1.7.0.patch 857 SHA256 dba024fff1934a44e7f3e20e93c121aa251ef1286c8971247e45509c31aaf3ad SHA512 4a01ff3cf8569cfeadad283d1085b7af4f5703f6ad066aa5eb61f06f79ca54a4fd29375dd9a120a1a649c7e76019298e9e99ee1360717db227ff63c0a9cc021c WHIRLPOOL 5029ccefc5e66ca363dbed33ce8df99c6993a0f82942143e9c8ada45481f6bcaecfa62380bb69802fb0d0b3910e4501ec2378423d8b72b5cd93822e60a993e22
+AUX icinga-apache.conf 465 SHA256 aefcc8b674d2fdd0a721247d2a3156811af6b2fbe6a91642ff19eb13ee2f0a65 SHA512 8f08f6938f2c233e230b45afdc634653cd971bf26fab60252f8633f2b1609f724575f256b018b6016852279ff3ddd12341825f0489be3266c3c096fe983e5841 WHIRLPOOL a692969be97751fc7f1a98d786e7070b450b6f1d66b6947f7834763550519af72cc5a5ce6a614c556ae861625e80a886b2a4143df6f0a4bab74ed9c355fddb33
+AUX icinga-conf.d 178 SHA256 68dde656424fc57e66babceb3c6623a235fac8bf1f9cd885138e31878db740db SHA512 96411175c488423c61f45fc9c76131a9807a36f08c9f73c6a6fb50e432d951d3e4ab42b456732b48cb009944faff4af472eb76fbefd75fd61978dfc6d199e9cd WHIRLPOOL acf6b66165c227515099f25b6db38c5cce86a50844983123a136f6cf63ce744f49fde1d243c2dcadbceaf62154e3fbc8eadca8933c80fc0501aaaf52c5e0266a
+AUX icinga-init.d 1353 SHA256 168e65b609a192c48b0596b50ad259b8ee8dac5131fefe6fc20dc551ca73235f SHA512 f5afbbf6675bb2acb367a3c8c08492ce0ea4b2da7691d6a83833ba417922af7d0e7efff2d78688b270a461dae39f3e3514cd3218495e860ad2698c67baac4a6c WHIRLPOOL ed221e769fc1f9519d11be1ce2a332a5496df36ef60ff5539d1e8ba79ffb491748f49f16d80a3d6ba0b28c0b71c825df8592db736f5ee098ff97ee13a6cf4752
+AUX icinga-lighty.conf 465 SHA256 f4059bc54959fb2544f23c2fc6a86f0ab2467025ce1f468317a0079b55116b44 SHA512 2a8783945330c54eaa331587f2e7291bdddb8c6717c659ac8dfec7c14ab762a01a870f5fb35d91bb54f36c867eb56c13dce11b5ab13d6e5b6fc9049ce5f57372 WHIRLPOOL 3634d30b9e4841f4424ce36983a88e56ccf3385ab5c9f8e27f322a0ebc59985cb618dbe70d8f67ab641e8a6151721f70cc0f104c905b4da0c35af6ceb899eca1
+AUX ido2db-conf.d 35 SHA256 6cbdf0eb7070121bd466c221d73cf6ca05a4af5caa1d4abedf62828edd1b1372 SHA512 c2988f205ce29daaacd2daa20ceb285da2b76e2a68bb5dd695874e73b275714eaea5e0b6bb0afaf7e5d875a9e89ee35c7dfcdb5c77513b2f1a59fbbd28f49f4f WHIRLPOOL 7816a44592582b65bb05b7c568af29885ab547b0164582d939e37b937ddc0cfa3dfc503b8673042b5ce60e0b19ba96dcfe08e13882c8bbae80d9750411945966
+AUX ido2db-init.d 822 SHA256 c730fd6ff73f9877950be4c9b09eb6a531aafd57e18eac8d224b664eedb098fa SHA512 8593a676389aae540a4fa3e4c7c6f558254da018b13b8dda7a932307645029775659b1258c68fa2178086978c59250be4820b0cc1a3d3c7ded276aa17a3b9b6e WHIRLPOOL 80b1c5f1bc74f099183d1d7bb424751b75f419e49cb38e878d52a759031587c01ec32d13b58f5def034cbafe9b50d101cc5e82ac1d5b0b20e4eb0320a2abdccf
+DIST CVE-2015-8010_1.13.3.patch 177807 SHA256 8ccd8cdf221b8f2aa90ae1e4c76ccc61e7cf7519eadc9482c671502c2138c2a7 SHA512 bc82e588db33fbb955002cf51ae7b0e40109d4ec3fa6199b046ffbf23b649d74fbdd04c8fb4a5af4cd44301e26f30aa295a9574281c14bc45eec2b9149a6339a WHIRLPOOL 90f3eb3a6ad79337cf9d7fe63e201e313769fea6e3fdf2f2de0b2072b1b21e66d650b632794dcb39b458e7c17449f7fb2d45d678a3b628a467496284f238231d
+DIST icinga-1.13.4.tar.gz 18741576 SHA256 5690f6b3f3340d341a265fe61598ff3f64cb7d135a0059e791b51c77bcd4833b SHA512 245f94facfcbb125ed6be26a2544292b7ce6d59a6d38374b7ef1b24b2ca3deaaff56720542c3747d36ab4998b88b367ca40bbd061491e0770e21505bd7c0a1d6 WHIRLPOOL 92c444ae98139c570b420cef83182401ee7756328a4edd89b52187c1844526aea0e374839395df082fff4504e2ace14366488a2d1d0864998890add32cd08c40
+DIST icinga-1.14.0.tar.gz 20779347 SHA256 440d6b0596804cdfb21ed93b4f74592a144e7d9ee15cc88b3079276cb0370851 SHA512 f02c60c2bd1d3dff4a5a42f9d3c3362ada421f2cd83362b3cdd05f59b0aafe4f61255b621afed1fbf959415545a94ce6b3124bf2ffac22f0f2bdb8a67e75ad7a WHIRLPOOL 165c32d53d328de53822bae6cc0b68f4529c4a9ebb1aab5ccd97fa6e42256025f788dda6d09326578907c7b4a0ce2e72f50f95b923a378401fcc4dbd7f415522
+EBUILD icinga-1.13.4.ebuild 7956 SHA256 18fcbddbb8e7f641731fd686a33e524c28eafed83b288b6582a3c4f461fb9e1a SHA512 ec0b90e102cc5f0b282731f923c15b259c4581f35eaed8eafd13678f9455754f808004b38c0f03eb723ff61fcffb51750f90163e6c4b2b5c887a286e029c429f WHIRLPOOL 87e7a7a6f07e75f770eaf517a95ae6ca12e4b3038f928b776689b64b351c0a4d395c186aed8c54c9432467ae65c2b932af45e9d508e7ed513caf8192382bb75d
+EBUILD icinga-1.14.0.ebuild 7920 SHA256 7446e4d0f4fd5d9ebcd0675d75bd6ab3aa030a1480490da0cbaddf6a798563c0 SHA512 ef73833c299d5dba38c489e77a8faf22356949bc7599f5e6da2d3540921015507410062227d7330a42155b32e3d84cca252b4366fc43e735d39f3c6a3d1111cd WHIRLPOOL 59e2ab7f7505bb7d43fa04c9c8548022e2f9f88b76d53eef4244e616e093be0e0ecfe87ebd3685c689fd0cbd37b58cc28e48d6052478aba3836219aaec877c89
+MISC ChangeLog 5544 SHA256 873fb07b738a68ba5763775fa02f19e278367f44ae03d94f250234b123a1b39b SHA512 91ceef40cee6fee4e2162b290c3f325a4ce17379d95246010d2d04cc441ad4f966e9246174288186d52cd1fd3dcda3dcf10b8e7843423543eef1ad1b10d78f2a WHIRLPOOL 1559908f5ea50b8fcd7050673aabc21b0410ce809c9c7856d749951d217ca7593be9588dda444ffef237358987c927fa57fc6a474ab8203f7530f8702139a901
+MISC ChangeLog-2015 9282 SHA256 d7d9b1c7903a80d27804f409837d49ae86afb10a346dfb9eaf01a37520a7930e SHA512 6f1fcc57ccaa8517e21336250afc563b7e1423c0a4f886f26da20e6064c4cb33a6c427f2755475cc260c864c97fd5bb6f06b13e5850d2d95798039d1385fa1f5 WHIRLPOOL 3b8cf54bd8488d6de64bfc29d3dd79d7019efee0f9c22c83d1192754034b480d292794f98fc8c5a4fa77526e97a32b310ddd4ae549082f91f315ae23eab1d32e
+MISC metadata.xml 853 SHA256 b9dafc7f14e90242f3e416043178e3815b8413427904cc45a2a13adce95ba0d3 SHA512 1aad02d84c0e90f4f0f5ed54e326d9a14e77f5146b3ba9293279e009f45900a69e1b2fcc9f54cb02111f05bb2aef0370cda1b4bc4fffa4fc4dd0c2a073e0a92b WHIRLPOOL e35f38dab1d8b749d53d933ea2846d0d316a73f3af47e97723977ef559d20193562a8445b29c249c7af4fc0969cba03d1c90ea488a3d3cdb1dc19e5100dc3b23
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..af1f3c5d29e4
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-init.d
@@ -0,0 +1,61 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${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..2b827fa87535
--- /dev/null
+++ b/net-analyzer/icinga/files/ido2db-init.d
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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.13.4.ebuild b/net-analyzer/icinga/icinga-1.13.4.ebuild
new file mode 100644
index 000000000000..4f6eef1f43e4
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.13.4.ebuild
@@ -0,0 +1,269 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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/archive/v${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~prometheanfire/dist/patches/CVEs/CVE-2015-8010_1.13.3.patch"
+S="${WORKDIR}/${PN}-core-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~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"
+ epatch "${DISTDIR}/CVE-2015-8010_1.13.3.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.14.0.ebuild b/net-analyzer/icinga/icinga-1.14.0.ebuild
new file mode 100644
index 000000000000..f05bc0bec4ac
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.14.0.ebuild
@@ -0,0 +1,268 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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/archive/v${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~prometheanfire/dist/patches/CVEs/CVE-2015-8010_1.13.3.patch"
+S="${WORKDIR}/${PN}-core-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 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/metadata.xml b/net-analyzer/icinga/metadata.xml
new file mode 100644
index 000000000000..958f95e0f18f
--- /dev/null
+++ b/net-analyzer/icinga/metadata.xml
@@ -0,0 +1,20 @@
+<?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 type="person">
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">icinga/icinga-core</remote-id>
+ <remote-id type="sourceforge">icinga</remote-id>
+ </upstream>
+</pkgmetadata>