From de2db3c9de7013c66f458f9c9a98a337afeadb54 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 22 Feb 2015 00:44:13 +0000 Subject: [PATCH] Add myself as a maintainer, fix apache module dep, and fix libltdl/libtool dep. Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0x6F48D3DA05C2DADB! --- net-analyzer/nagios-core/ChangeLog | 9 +- net-analyzer/nagios-core/Manifest | 27 +- net-analyzer/nagios-core/metadata.xml | 4 + .../nagios-core/nagios-core-4.0.8-r2.ebuild | 282 ++++++++++++++++++ 4 files changed, 319 insertions(+), 3 deletions(-) create mode 100644 net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild diff --git a/net-analyzer/nagios-core/ChangeLog b/net-analyzer/nagios-core/ChangeLog index b4559288359b..4f5b36ac9741 100644 --- a/net-analyzer/nagios-core/ChangeLog +++ b/net-analyzer/nagios-core/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/nagios-core # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.203 2015/01/27 14:58:15 pchrist Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.204 2015/02/22 00:44:02 mjo Exp $ + +*nagios-core-4.0.8-r2 (22 Feb 2015) + + 22 Feb 2015; Michael Orlitzky +nagios-core-4.0.8-r2.ebuild, + metadata.xml: + Add myself as a maintainer, fix apache module dep, and fix libltdl/libtool + dep. 27 Jan 2015; Panagiotis Christopoulos nagios-core-3.5.1.ebuild: diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest index feee102d44f0..38e09f6351cb 100644 --- a/net-analyzer/nagios-core/Manifest +++ b/net-analyzer/nagios-core/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX 99_nagios3.conf 377 SHA256 0bfa88db78ab036d177c68da20a8fd2f567ba8c9f54c14cfb8e1fc121641051b SHA512 53ceae12cf19d2dda1298e9faaa3ddab9b4d95163df87ccfaa0a58e54d60cf8e005ea32ed827348f1b43aee53258896972b72727145f9a20f6a4e1ce1e56ea3f WHIRLPOOL 63d6c403ff09a5365a42bd3d59e37f67a8af7fef41cb52cfb5facf1a2ff48e53c5c82096a5e3df0f5f58b5e2aac55ee7efbf6de9da2ff475c80285d9b61ea3c1 AUX 99_nagios4.conf 368 SHA256 cae38c4b5f298c72807e14b66e8cb69bbcbca56edb127c37acf719d26f016fe8 SHA512 f0b239f23d74afa89483806f27fb9259054e46bc5742de8a414c9a9a9852a4fbdc14db45aeb148a15288196c8f7d51bdd485b005e20d012892e9e7321b50e161 WHIRLPOOL 62994852b142363847273b3d101d36929df5727f8d65ac4984a712ffbf5698e4dfc8806a170c832249cf4e9374c85c424e4cd9eb327866011e874cac52dec744 AUX conf.d 409 SHA256 a5122b19248c375b7b7c80bb5568fcaf334de316c611a85795960c2b9f6a6d5a SHA512 29b8ea1ce1a293591d49a6f25a31263b476e06b6e2e8ff06f64299f9c8ddc8cce96bd09d16b8abcd71c933f1a2d51e1fae1876db2042b0ce863279be0466b7bd WHIRLPOOL 8f4a092e9b04c493cef164e792ae2b2c1e08c3b7a5c2195b0155bd59b41d07e0f718dbd97fae3f40698e7655e737fc17ee83a0386638a28bd773ae39a9bfbacd @@ -17,5 +20,25 @@ DIST nagios-4.0.8.tar.gz 1805059 SHA256 8b268d250c97851775abe162f46f64724f95f367 DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 WHIRLPOOL 7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d EBUILD nagios-core-3.5.1.ebuild 6277 SHA256 f8e1b98d6921d4fab184828d7e98d544170f74f27e31135c4ad98e96c8cd601b SHA512 a3cc987042e0d52c9a675c18ba111ce6447d3d359a510d1ff7836520dcfb0dfc9d507d95f8cf270d63bdbdf623d27354b9555c40dbce6ae278e30a5812d27a1e WHIRLPOOL fd08ddf08247bb0776cad9d75ef172713e1e08a1d0e949a2d6f66a2ab6c106ed442d4bea3140d320cd24e77ee72291ef46c41a2e49c85347d1aa043cd2078bda EBUILD nagios-core-4.0.8-r1.ebuild 7987 SHA256 a5f83ba59d0951db06a7aeb1e394fb921c54cfec9663fa2260d935dc36c2d41d SHA512 3d3272f4adab2ec75a09599fb004f520eda0c13c8985f5ce0a9d5a166175c9d268fd79db5b90b6c8a3f60f32a6a1022fb2922c9e0e3ffb58fc7fbfe035f5acf8 WHIRLPOOL bf66c2fce26634c2a7c4fe4938ed400429ac4e5d815504ebf312dfe4047287f7bf4ef92dd8f6f40a1307823cd9f7bc3ed0aac7f4e1a55775c5bfe1834102925b -MISC ChangeLog 33326 SHA256 930c87a0a0c271a83c046fede7c11bdf7189a7b754cb1146cc316895df52a420 SHA512 985684f9d83d5de538055ddc5168d0dc41afe589bd720b5ff3be55bae5b8479d20598bd8f3f4d1e10aec5ec9aa21b8f21cbe948566c55ab0ee6a5565183ac3b5 WHIRLPOOL 4e42b0b32eb625dbd3f6e30d850303ac934e21da7972e8c7f5caba0be5bbe3f7dd82281c2f70239206ff5e7711f6d77eaa5c25ea142718bbd235e9079d560590 -MISC metadata.xml 1478 SHA256 9099b3eb50d6ab4894f46a32083c6defc29a5ce613123faf458c062e7c72c1b9 SHA512 fa58ee32c763c1569163dc44b9523cac9bcae87743ee254023c073b82c0eec82b9ba1994420e1df3ffbd3f09cd64a8a115f96c248d7aecef0df742ff3ac478a3 WHIRLPOOL daa602b1587bd1925c9b90fcaced294a3ae620dff3d11d037e20919fee079aec950aefc6188b2b9aca069dfdf820390f792e78081faf4442cedfb8d71ec896bc +EBUILD nagios-core-4.0.8-r2.ebuild 8527 SHA256 3ecddb5b20b066184ac6e8ef5c0aa9dab1deb67295b8c2ccc553b539cd70561d SHA512 e081cfc4eddf8bd22ad51a479a30ecf76eaeb1f1974ef4afbf33e2403e526db587efde14142b3a5609a359e88b896f74a0b76c2d8c80594f32a091cc7d30bf8a WHIRLPOOL d510e3c8bdebc4bd932a0376724c67e62bff64c095fedd2fdc9af56cc4a93b92a4d3c76e17740a10fb6fdd995fc71602a8f1578bb391d62983bf7eff12ddb8e5 +MISC ChangeLog 33539 SHA256 28d8b03589fb01e259aac550508273f287ead57f10f905a9b3c26ac0a6e1232e SHA512 32de57ce104d88c4b92cf54b47cfddd3abfb5a31ab7d3ff9371b1c2b3522ccb2a97331f66284b48cf04438a6453a9b54c5f8e1b1749fd506807691f31f5ba661 WHIRLPOOL 406df23c9449f282a40f3ed16ffea06635ad3d523d1f33423305803fbb2f484997a80ba422e736b6c2bfe59ab0f2238eeb94307ba22702a28ef75b99d2050ac2 +MISC metadata.xml 1581 SHA256 deb27c4dc1bc7652b11b7dbb191ff940131c30cac145d5f64e921f4746f1389a SHA512 456bb21019a952113ed359878553ba25d2ba15d86ab80e6c35cb39d6a36dea04d20eef6b643378339394b5c2fbfc85fc05980ae372571f8a74debf73b28fcf9e WHIRLPOOL 6776913d9f5bf2aa9aba2e956d2bbe3cf803c18112729f8172695a71dfc76629e22d80c1bd03f71ae5783a3686987a25f53d3a5bce359d2a2a81a43450bf1615 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0 + +iQJ8BAEBCABmBQJU6SZWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxNEU5RDcyRDdCMUFGREVGQzBCNDFDMUY2 +RjQ4RDNEQTA1QzJEQURCAAoJEG9I09oFwtrbax4QAI1yM2RF6jv94EQdFD3fOYYg +M/q0LAUn+RX2Y67RYg4hLX7zl3p7nn6X55v/U6vvsCqDhCjFj6Au0WqzDkpm+NSi +dMZAuzT3xMQSS4sA6J2RsnvlbMaKBqi8swIyEp0cf1Ccn97uI5cWxTjHJueeYtNX +y+T7ihJFCZ3ktiFxLLZA+wizE8l5bgIc9VmSNhcqKK5DIlxaXH2xmS7euCp608iZ +YTcAn/PfvTqnEshxgcRv28o/pZH8oVKK1JRZgZG5XXjAeznIzPVXsakkVTnJE2u0 +3ChGDlx18McISV7bw90hjuRNvBCE5GzBnZcCxx36Ct4ANPG3SxR1a7p5w7HxW7kc +1g1CzZo091P+j7EaG5lB16SPtbngkYxiF1zz+gQnfdP1dbzV6WDcsrDFx4JWpLtt +W2fmGe6qaxdnALgLdcKsB8y9RjeGu239ylOnGnBds+zDOVNDQaegRskXVZi9WpbW +IDc285sUIffMQb5fjDuR+iAoQVNCxfHs0WE4aLaCgp9qj9E6uVPbO+VLAS8z/btK +a33N0bYDLZPXweq0oenUKbzp04F3s9imxNFpIJqRLTYDOMhBsFf72ffGz7AZCBM0 +l7atP4uX2uhggoPUaeqf9Ag9Ksg21ZLxRmKi8a0YABrAB02EuqjD7I8wMp+FAiJH +gBjIffBzpH0Z8GZsymW1 +=97jT +-----END PGP SIGNATURE----- diff --git a/net-analyzer/nagios-core/metadata.xml b/net-analyzer/nagios-core/metadata.xml index 548986eb8426..3d4468faf954 100644 --- a/net-analyzer/nagios-core/metadata.xml +++ b/net-analyzer/nagios-core/metadata.xml @@ -11,6 +11,10 @@ Chris Reffett Proxy maintainer. CC him on bugs. + + mjo@gentoo.org + Michael Orlitzky + proxy-maintainers sysadmin diff --git a/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild b/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild new file mode 100644 index 000000000000..8f33e8fc9ed1 --- /dev/null +++ b/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild @@ -0,0 +1,282 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild,v 1.1 2015/02/22 00:44:02 mjo Exp $ + +EAPI=5 + +inherit depend.apache eutils multilib toolchain-funcs user + +MY_P=${PN/-core}-${PV} +DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" +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? ( http://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="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 )" + +# A list of modules used in our Apache config file. +APACHE_MODS="apache2_modules_alias," # "Alias" directive +APACHE_MODS+="apache2_modules_authz_core" # "Require" directive + +# Note, we require one of the apache2 CGI modules: +# +# * mod_cgi +# * mod_cgid +# * mod_fcgid +# * mod_proxy_fcgi +# +# We just don't care /which/ one. And of course PHP supports both CGI +# (USE=cgi) and FastCGI (USE=fpm) as well as mod_php (USE=apache2). +# +# Note: trying to move the base apache dep into DEPEND and build upon it +# caused problems. +# +# The first group corresponds to PHP running under Apache's mod_php. +PHP_MOD="( >=www-servers/apache-2.4[${APACHE_MODS}] + dev-lang/php[apache2] )" + +# The second is for PHP running through CGI with mod_cgi or mod_cgid. +PHP_CGI="( || ( >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_cgi] + >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_cgid] ) + dev-lang/php[cgi] )" + +# This one's for running PHP through CGI with mod_fcgid. +PHP_FCGID="( >=www-servers/apache-2.4[${APACHE_MODS}] + www-apache/mod_fcgid + dev-lang/php[cgi] )" + +# And the last one is for running PHP through mod_proxy_fcgi. +PHP_FPM="( >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_proxy_fcgi] + dev-lang/php[fpm] )" + +DEPEND="dev-libs/libltdl + virtual/mailx + perl? ( dev-lang/perl ) + web? ( media-libs/gd[jpeg,png] + lighttpd? ( www-servers/lighttpd[php] ) + apache2? ( || ( ${PHP_MOD} ${PHP_CGI} ${PHP_FCGID} ${PHP_FPM} ) ) )" + +RDEPEND="${DEPEND} + !net-analyzer/nagios-imagepack + vim-syntax? ( app-vim/nagios-syntax )" + +want_apache2 + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + depend.apache_pkg_setup + + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +src_prepare(){ + # Upstream bug, fixes a QA warning: + # + # http://tracker.nagios.org/view.php?id=650 + # + epatch "${FILESDIR}"/use-MAKE-instead-of-bare-make.patch + + # Upstream bug: + # + # http://tracker.nagios.org/view.php?id=651 + # + # Gentoo bug #388321. + # + epatch "${FILESDIR}"/use-INSTALL-to-install-themes.patch + + # Upstream bug: + # + # http://tracker.nagios.org/view.php?id=534 + # + # Gentoo bug #530640. + epatch "${FILESDIR}"/fix-bogus-perf-data-warnings.patch +} + +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/nagios \ + --sysconfdir=/etc/nagios \ + --libexecdir=/usr/$(get_libdir)/nagios/plugins +} + +src_compile() { + emake CC=$(tc-getCC) nagios + + if use web; then + # Only compile the CGIs when USE=web is set. + emake CC=$(tc-getCC) DESTDIR="${D}" cgis + fi +} + +src_install() { + dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING + + emake DESTDIR="${D}" install-base + emake DESTDIR="${D}" install-basic + emake DESTDIR="${D}" install-config + emake DESTDIR="${D}" install-commandmode + + if use web; then + emake DESTDIR="${D}" install-cgis + + # install-html installs the new exfoliation theme + emake DESTDIR="${D}" install-html + + if use classicui; then + # This overwrites the already-installed exfoliation theme + emake 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. + insopts --group=nagios --owner=nagios --mode=0664 + insinto /usr/share/nagios/htdocs/images/logos + doins "${WORKDIR}/${GENTOO_ICONS}"/*.* + insopts --mode=0644 # Back to the default... + fi + + newinitd "${FILESDIR}"/nagios4 nagios + newconfd "${FILESDIR}"/conf.d nagios + + if use web ; then + if use apache2 ; then + # Install the Nagios configuration file for Apache. + insinto "${APACHE_MODULES_CONFDIR}" + 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 + + for dir in etc/nagios var/nagios ; do + chown -R nagios:nagios "${D}/${dir}" \ + || die "failed chown of ${D}/${dir}" + done + + chown -R root:root "${D}/usr/$(get_libdir)/nagios" \ + || die "failed chown of ${D}/usr/$(get_libdir)/nagios" + + # The following two find...exec statements will die properly as long + # as chmod is only called once (that is, as long as the argument + # list is small enough). + find "${D}/usr/$(get_libdir)/nagios" -type d \ + -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable' + + if use web; then + find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \ + -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable' + fi + + keepdir /etc/nagios + keepdir /var/nagios + keepdir /var/nagios/archives + keepdir /var/nagios/rw + keepdir /var/nagios/spool/checkresults + + if use !apache2 && use !lighttpd; then + chown -R nagios:nagios "${D}"/var/nagios/rw \ + || die "failed chown of ${D}/var/nagios/rw" + else + if use apache2 ; then + chown -R nagios:apache "${D}"/var/nagios/rw \ + || die "failed chown of ${D}/var/nagios/rw" + elif use lighttpd ; then + chown -R nagios:lighttpd "${D}"/var/nagios/rw \ + || die "failed chown of ${D}/var/nagios/rw" + fi + fi + + chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw" + chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios" +} + +pkg_postinst() { + + if use web; then + elog "Note that your web server user requires read-only access to" + elog "${ROOT}etc/nagios." + + if use apache2 || use lighttpd ; then + elog + elog "To that end, we have changed the group of ${ROOT}etc/nagios" + elog "to that of your web server user." + elog + if use apache2; then + chown nagios:apache "${ROOT}etc/nagios" \ + || die "failed to change group of ${ROOT}etc/nagios" + + elog "To enable the Nagios web front-end, please edit" + elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\"" + elog "to APACHE2_OPTS. Then Nagios will be available at," + elog + elif use lighttpd; then + chown nagios:lighttpd "${ROOT}etc/nagios" \ + || die "failed to change group of ${ROOT}etc/nagios" + 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/" + else + elog "Since you're not using either Apache or Lighttpd, you" + elog "will have to grant the necessary permissions yourself." + 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 +} -- 2.26.2