aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-09-14 00:04:32 +0100
committerStuart Shelton <stuart@shelton.me>2017-09-14 00:04:32 +0100
commit15421004204e4cce8244d73a4b562d85645e92dd (patch)
treed16c719c5b702fc3cc1726f8f24682aaee4bcf52 /net-analyzer
parentUpdate dev-libs/openssl-1.0.2l (diff)
downloadsrcshelton-15421004204e4cce8244d73a4b562d85645e92dd.tar.gz
srcshelton-15421004204e4cce8244d73a4b562d85645e92dd.tar.bz2
srcshelton-15421004204e4cce8244d73a4b562d85645e92dd.zip
Add net-analyzer/nagios-core-4.3.4, update net-analyzer/nagios-core-4.3.3
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/nagios-core/Manifest4
-rw-r--r--net-analyzer/nagios-core/nagios-core-4.3.3.ebuild2
-rw-r--r--net-analyzer/nagios-core/nagios-core-4.3.4.ebuild215
3 files changed, 219 insertions, 2 deletions
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest
index 46e1eef4..c88c5bee 100644
--- a/net-analyzer/nagios-core/Manifest
+++ b/net-analyzer/nagios-core/Manifest
@@ -1,5 +1,7 @@
AUX 99_nagios4.conf 368 SHA256 cae38c4b5f298c72807e14b66e8cb69bbcbca56edb127c37acf719d26f016fe8 SHA512 f0b239f23d74afa89483806f27fb9259054e46bc5742de8a414c9a9a9852a4fbdc14db45aeb148a15288196c8f7d51bdd485b005e20d012892e9e7321b50e161 WHIRLPOOL 62994852b142363847273b3d101d36929df5727f8d65ac4984a712ffbf5698e4dfc8806a170c832249cf4e9374c85c424e4cd9eb327866011e874cac52dec744
AUX lighttpd_nagios4.conf 325 SHA256 0326b4d25315e3c446cb98f10e0cc47eadfacae2916c59d5aa2829643f3805ae SHA512 a2f854713512ee8ee5c451235beb6ffccf2e04617a98619c6de807a5abca0a424e0581c34b4d255dcbc108e677e18bed25dd33e3d38df8fe10d7d8d4fab015c9 WHIRLPOOL 3aff58f01e9ce76b471c757b983eb6c1f3bb1a9d870b5d7f32ba1419082c23403ad01f7ffe87e1bc8ea81eb392a88e37f7be0fd229333a535f062e321d3948b5
DIST nagios-4.3.3.tar.gz 11101531 SHA256 1fc4c72f76c720884dd3b538dc423b44f3bdde24e014f4212e58046a1fc114b6 SHA512 588292a95342cb2d95d7b58f70442b82b99a23dd9fdc1390e9ae0743626a047e5127d77b1d7e6a1d8edd6f34a425e581bcd42459b673a0ddea14125bde4b7d9e WHIRLPOOL 1452256a79190eae90076a9b50fdac3876557a6382d15d38a0c7930ec6d286c58e44220fee3243c9bcb1ae0ef337ddadd19e3552f02049959e69eaffd9fcd4a8
+DIST nagios-4.3.4.tar.gz 11101966 SHA256 c90b7812d9e343db12be19a572e15c415c5d6353a91c5e226e432c2d4aaa44f1 SHA512 f4e92aa98151739442a225a245871d93b5560d89510bdacb1a615959b9687f7a92675f10fcba71078b104ca8f237b0155a9261d67ec66f80aec7f033b4b3e316 WHIRLPOOL dae991fe44f2d8c5457cffec6647d2b8a7ace60450e0ec2409838aaf1a6f35af1f6c56d260a36cceeede21cfd4521e695146a8c18b38d4e6689d0801d3471157
DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 WHIRLPOOL 7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d
-EBUILD nagios-core-4.3.3.ebuild 7572 SHA256 418e43a71c996e70af446efdcc2c1f87a8ff17db1b421b800ceab2f2c6bca44d SHA512 5f83c67030cbfbe5b4efd842f4a1f83509d6cdc5643459638bdd03b97f4812c84a6c36a4bc7befe05a6af00c17541fb55ee9e3a4b9f1a17d8af84446f7cc4c43 WHIRLPOOL f057bdf137d048f620336ca6f576d9ec2e2fdc303864e80843a03589f5eafca5c60309289099e63254ce8e7727f393fe96aa409a6f8f8d5b78b480793bd85515
+EBUILD nagios-core-4.3.3.ebuild 7573 SHA256 7d1ea13bf2eb9dd5d72edc99e5e2bb95262c64373016162dac539c78e4a4b794 SHA512 e9c52fcac085456ef6f9cf387d7a80afd04a4c382e92a986f5533d32b483acb8f05c4125d114f82e439bcb36f169b8edfbe5af3f52e8cc85495bf631c03b9874 WHIRLPOOL 16aed3029c410cbfe0b1d6a5e5b476e725ab9d07b1bf3c57bd0da0b6334829a293894cbd4f8546522e9a9905ed6138483379a64b0da695346c26a8a289649d16
+EBUILD nagios-core-4.3.4.ebuild 6697 SHA256 1e09e906f78662e11d85598ad6d106983e568b6444511252f64175a3bf7314b7 SHA512 2ed78c9947dd3ac94109f7d998302408bffa375b1199965fb96745d4cfb04da0a7710027b34518b196413e8c2c1a1903addd7a032c9dd702d2c00ae9f627fe57 WHIRLPOOL fdfccaf9d03ca725322c8f5cb5052f019427f151ec45f2cd0a3a8dca29f25a3d2d85060165436f1702727f74c6a6875910c7df2f0158641f416f19a86791556a
diff --git a/net-analyzer/nagios-core/nagios-core-4.3.3.ebuild b/net-analyzer/nagios-core/nagios-core-4.3.3.ebuild
index a1fedf6a..b09a8d12 100644
--- a/net-analyzer/nagios-core/nagios-core-4.3.3.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.3.3.ebuild
@@ -100,7 +100,7 @@ src_configure() {
--sbindir=/usr/$(get_libdir)/nagios/cgi-bin \
--datadir=/usr/share/nagios/htdocs \
--localstatedir=/var/lib/nagios \
- --with-lockfile=/var/run/nagios.lock \
+ --with-lockfile=/var/lock/nagios.lock \
--sysconfdir=/etc/nagios \
--libexecdir=/usr/$(get_libdir)/nagios/plugins
}
diff --git a/net-analyzer/nagios-core/nagios-core-4.3.4.ebuild b/net-analyzer/nagios-core/nagios-core-4.3.4.ebuild
new file mode 100644
index 00000000..365f6353
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-4.3.4.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs user
+
+MY_P=${PN/-core}-${PV}
+DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation"
+HOMEPAGE="http://www.nagios.org/"
+
+# The name of the directory into which our Gentoo icons will be
+# extracted, and also the basename of the archive containing it.
+GENTOO_ICONS="${PN}-gentoo-icons-20141125"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="apache2 classicui lighttpd perl +web vim-syntax"
+
+# In pkg_postinst(), we change the group of the Nagios configuration
+# directory to that of the web server user. It can't belong to both
+# apache/lighttpd groups at the same time, so we block this combination
+# for our own sanity.
+#
+# This could be made to work, but we would need a better way to allow
+# the web user read-only access to Nagios's configuration directory.
+#
+REQUIRED_USE="apache2? ( !lighttpd )"
+
+# sys-devel/libtool dependency is bug #401237.
+#
+# Note, we require one of the apache2 CGI modules:
+#
+# * mod_cgi
+# * mod_cgid
+# * mod_fcgid
+#
+# We just don't care /which/ one. And of course PHP supports both CGI
+# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the
+# dependencies, and expect the user not to do anything /too/
+# stupid. (For example, installing Apache with only FastCGI support, and
+# PHP with only CGI support.)
+#
+# Another annoyance is that the upstream Makefile uses app-arch/unzip to
+# extract a snapshot of AngularJS, but that's only needed when USE=web.
+#
+MOD_ALIAS=apache2_modules_alias
+DEPEND="sys-devel/libtool
+ virtual/mailx
+ perl? ( dev-lang/perl:= )
+ web? (
+ app-arch/unzip
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd[php] )
+ apache2? (
+ || (
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgi]
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgid]
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_fcgid] )
+ || (
+ dev-lang/php:*[apache2]
+ dev-lang/php:*[cgi]
+ dev-lang/php:*[fpm] )
+ )
+ )"
+RDEPEND="${DEPEND}
+ vim-syntax? ( app-vim/nagios-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/lib/nagios/home nagios
+}
+
+src_configure() {
+ local myconf
+
+ if use perl; then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf="${myconf} --with-command-group=nagios"
+ else
+ if use apache2 ; then
+ myconf="${myconf} --with-command-group=apache"
+ myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d"
+ elif use lighttpd ; then
+ myconf="${myconf} --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \
+ --datadir=/usr/share/nagios/htdocs \
+ --localstatedir=/var/lib/nagios \
+ --with-lockfile=/var/lock/nagios.lock \
+ --sysconfdir=/etc/nagios \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) nagios
+
+ if use web; then
+ # Only compile the CGIs/HTML when USE=web is set.
+ emake CC=$(tc-getCC) DESTDIR="${D}" cgis html
+ fi
+}
+
+src_install() {
+ dodoc Changelog CONTRIBUTING.md README.asciidoc THANKS UPGRADING
+
+ # There is no way to install the CGIs unstripped from the top-level
+ # makefile, so descend into base/ here. The empty INSTALL_OPTS
+ # ensures that root:root: owns the nagios executables.
+ cd "${S}/base" || die
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped
+ cd "${S}" || die
+
+ # Otherwise this gets installed as 770 and you get "access denied"
+ # for some reason or other when starting nagios. The permissions
+ # on nagiostats are just for consistency (these should both get
+ # fixed upstream).
+ fperms 775 /usr/sbin/nagios /usr/sbin/nagiostats
+
+ # INSTALL_OPTS are needed for most of install-basic, but we don't
+ # want them on the LIBEXECDIR, argh.
+ emake DESTDIR="${D}" install-basic
+ fowners root:root /usr/$(get_libdir)/nagios/plugins
+
+ # Don't make the configuration owned by the nagios user, because
+ # then he can edit nagios.cfg and trick nagios into running as root
+ # and doing his bidding.
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-config
+
+ # No INSTALL_OPTS used in install-commandmode, thankfully.
+ emake DESTDIR="${D}" install-commandmode
+
+ if use web; then
+ # There is no way to install the CGIs unstripped from the
+ # top-level makefile, so descend into cgi/ here. The empty
+ # INSTALL_OPTS ensures that root:root: owns the CGI executables.
+ cd "${S}/cgi" || die
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped
+ cd "${S}" || die
+
+ # install-html installs the new exfoliation theme
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-html
+
+ if use classicui; then
+ # This overwrites the already-installed exfoliation theme
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-classicui
+ fi
+
+ # Install cute Gentoo icons (bug #388323), setting their
+ # owner, group, and mode to match those of the rest of Nagios's
+ # images.
+ insinto /usr/share/nagios/htdocs/images/logos
+ doins "${WORKDIR}/${GENTOO_ICONS}"/*.*
+ fi
+
+ newinitd openrc-init nagios
+
+ if use web ; then
+ if use apache2 ; then
+ # Install the Nagios configuration file for Apache.
+ insinto "/etc/apache2/modules.d"
+ doins "${FILESDIR}"/99_nagios4.conf
+ elif use lighttpd ; then
+ # Install the Nagios configuration file for Lighttpd.
+ insinto /etc/lighttpd
+ newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf
+ else
+ ewarn "${CATEGORY}/${PF} only supports apache or lighttpd"
+ ewarn "out of the box. Since you are not using one of them, you"
+ ewarn "will have to configure your webserver yourself."
+ fi
+ fi
+}
+
+pkg_postinst() {
+
+ if use web; then
+ if use apache2 || use lighttpd ; then
+ if use apache2; then
+ elog "To enable the Nagios web front-end, please edit"
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP\""
+ elog "to APACHE2_OPTS. Then Nagios will be available at,"
+ elog
+ elif use lighttpd; then
+ elog "To enable the Nagios web front-end, please add"
+ elog "'include \"nagios.conf\"' to the lighttpd configuration"
+ elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios"
+ elog "will be available at,"
+ elog
+ fi
+
+ elog " http://localhost/nagios/"
+ fi
+ fi
+
+ elog
+ elog "If your kernel has /proc protection, nagios"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding nagios into"
+ elog "the group wheel, but this is not recomended."
+ elog
+}