From 7675d9d3a65ccd567578df3e9755d0793e41886e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 3 Jan 2015 17:08:20 -0500 Subject: [PATCH] net-analyzer/pnp4nagios: Revbump for apache-2.4 support. * Use apache-2.4.x directives in the apache conf file * Append +Options instead of setting them wholesale in the conf file * Use less indentation in the apache conf file * Depend on >=apache-2.4 * Use better "die" messages * Fix death of find.. -exec commands. --- net-analyzer/pnp4nagios/Manifest | 27 ++-------------- .../pnp4nagios/files/98_pnp4nagios-2.4.conf | 29 +++++++++++++++++ .../pnp4nagios/files/98_pnp4nagios.conf | 22 ------------- ....24.ebuild => pnp4nagios-0.6.24-r1.ebuild} | 32 +++++++++++++------ 4 files changed, 53 insertions(+), 57 deletions(-) create mode 100644 net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf delete mode 100644 net-analyzer/pnp4nagios/files/98_pnp4nagios.conf rename net-analyzer/pnp4nagios/{pnp4nagios-0.6.24.ebuild => pnp4nagios-0.6.24-r1.ebuild} (60%) diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest index e620875..7845fa3 100644 --- a/net-analyzer/pnp4nagios/Manifest +++ b/net-analyzer/pnp4nagios/Manifest @@ -1,30 +1,7 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 - -AUX 98_pnp4nagios.conf 1025 SHA256 d4860e09c66e1d20e342a4ab997988ae825e6f4561a9631fd6c608f1c5420a5f SHA512 ac7f4cd92951e856c5af44eb8cfa0c75a867364b6d3d76ed5fb2479631f9ae20587f2d0a09ff4810602665558210232ab41ce6abf53859884a956826cbb5bfc2 WHIRLPOOL d28394eb0f63bd02f71c3ddd6c651f06c69354e2c9fd6fbd0bf65433d4721087078d06aa93df795c80f43a422b35f563b763ed7895891c603d6abbf359a197b1 +AUX 98_pnp4nagios-2.4.conf 725 SHA256 44436bf79e2b3624e3eb9eda86a083896b7057bb94dc04637ad2ad58e5e40f76 SHA512 9698529decd9587b4c48dfd5a92069645d4a8fb0796f05fea104459bc4a58aab081f10fc110d75e97331ec960e5fef71a85745c3ea58c6b9f6c37bcec4143000 WHIRLPOOL 0661a385e75d41b9a3e61cabf555ec0bbf6f59504867d7dee47936097dd491457d55d1507720af4152fcabb7ed90752def669270c5f31dcbc0d84f8db732f876 AUX npcd 759 SHA256 ea4c71df5c0a6bb410c44b08fc5c5428a3adf8c5daa7a12fe1068eaf71613be5 SHA512 54ccf3da9831b407d7a6b21d3409f7a8c854a32ec6eeda6036997059551bcec52e01b2b63a59e5269fef00c1c859dc856c4c6feb2323ff7fb328dd546c576a80 WHIRLPOOL 4e79bc6ee46a3aad0724488f4fa364b2e6916e30065ff8aed834c2e38929d6fd363210870fb3e4868ee65b0e7073b0d736c954f76415eec37aaa4efe62738454 AUX npcd.initd 477 SHA256 eb1d5bdf589867136aaefa2f47bd808ef41109860d07d3862fd308585b6d7cff SHA512 c7c0ad6a94820f7327561e779968dc73104bf104bfc3077e952866522e89e7db69c2e289c7e4d61fce978416ef1a8e6d10e3f997fb498ce2157a3c23a869da4d WHIRLPOOL 7ff2db763dc3ee6cf24b0d720e1dd58235681ee1580d44aebbac406631c7c22366d871937eda7d64b4f07448fc28737650e42904aa69a687b7dbf0ab7a0672ab AUX pnp4nagios-0.6.14-makefile.patch 1057 SHA256 71fac5f40ba133258754bdd42d503024a7a64da7ae37b96bf6ed20a3c367f2ef SHA512 a67e4b66b0f24db25f9b67d982d99a90c20ad229d404537c9963b2e9f1c5df39a46faa34ecdeb1a9e69b46efd96104d97a39a7e326a01d1c2d09dcc149171602 WHIRLPOOL 7e6725dfef952a97f5d682af955560c88895ae71e5aae9a3bb4842b3696d2f6009e6239c0860991d86fe68d64b4bf7c1e668a5059751cbba4b33850f2bc7584f DIST pnp4nagios-0.6.24.tar.gz 2919182 SHA256 87412ef01257c6096aa5c84fdb47db950b851c596e1306180be8ba45401793cf SHA512 7e8c32e0ac69ab747a57e8ab6cc59fddfb63e16598fda9c1e6270d6309ff0885cd1bd0876d05aa1d30bffa76b281d41dc8fbe59e430778bf4d3bdddc4a7bee9f WHIRLPOOL 4f48b406a7d82a4370701ede2625ed2c247bb933a9197d3417c4eb18f18b879465aeb4775e9a0f0300ac1140159df6c6130466b5434c0b33bccb7fff04de86f8 -EBUILD pnp4nagios-0.6.24.ebuild 2090 SHA256 9bbb4b82fee3508615da92f46381d24d759704c0146f787ebe32ee868516603a SHA512 1ba51aedc02b5103ec5ae4e5f42995a285182bd01508559072c4b6d201f4c03f861a11e4ceb7b3418d4be71732b7444823f97c72133d4fe109fa9b2c5c8cc8a2 WHIRLPOOL bb8686244a1a9517bb846c5971f1b4e688ee6ce92c78c3320d67e18151886badfcab5edc04a1ba5b5bb6ec9678f6e20eeac565790e45bf42e08002078890cfd8 -MISC ChangeLog 9540 SHA256 aacad009c732fc64069a73a79dd9af28300f44887342a2c684f0d3927864a3b5 SHA512 7da91e6a91dcec2f808d95def588e5d2e684c08651e81fde52e8b3413c95426f9c70e3b68d86a14ec3be361d12ae43c987b50bfdd014ad0d6be13781836d2e57 WHIRLPOOL 57861add7d44bed281b7d04f33bf75e0926e31a1aef053d5e2fc46cde991ea3ba2e736ee1c6c305dbf384928ef7d0589d79267c8031259ad9812a7da77ed0da4 +EBUILD pnp4nagios-0.6.24-r1.ebuild 2559 SHA256 897a231717c11747ec3783e4618a5134e70bd418025659780ab71d7039a7080b SHA512 d62a276741c98bf2afc99cef82e55783e60c05511965807c6c3e7cfc77769ea559eb7580d3a231080dbab9dd1210eb252dd1978009785eece6d89cab95e21a2a WHIRLPOOL 317fd213d0caec6a2b328bf8d107b130f88a59d911206a3c3ea4cd38714ad4d0145408aa024aca98755388908eeda9e3261b7c18e165488dc317e3b6947c4d4f MISC metadata.xml 163 SHA256 a8aa48f63dab89c2af1f961029dea0ebf68a618dba59ac4661ea915dc85e18f0 SHA512 1744b806c2ddddbeee4d2b1e23c7f1ccf0d9427f679a65bd22cde617399d3a5bb30aada17ba5b648a3a46d9e1169b9d30ede4551fb8756dffc4e3e9306b199cf WHIRLPOOL b5af95c50999aaf066e6466928866baa34c6425459a580ab0712ba3e3ea518dc37a4082007043307ff169b1f8efe4f6a632d27d016b6fd307bf463cb47b78d55 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0 - -iQJ8BAEBCgBmBQJUYMOhXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC -OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVirNzoP/ApkkSAlXXh28hGQLA1Nf7wv -WD+3uZ55qU82fHSpiNCuitYN/yUs8RWuH/PN3oOJmtuxPECNhyNQrtoAaQ1si674 -FIY+vOZrAOx2bd08FSqIEJxMDgmhr1GBmYXhUeVjztj+0skPv6SWbHMHPVDyd0yr -gYBf58aMCSvQl7cC+A3t/TmfuNrL/GlUVEA9QMl75VUmFNFMQ3fm+x0WsgcwJRCJ -eSCsBlQspPKydJztWGkysavEIzEdVGPmVEWMqGYlEu6OrC+tSBNAbYT06kd0tYU3 -ts3RqHIGgfuqpd/jeGUT91+loh1A/WVrAhf7OYSB2LsdMmAP0w3HAEr1pHbXR3BK -PekVwtT98EQN3T03Hb/4xLK3eErldve/iUdzIP3i8REbg+TZvcIZAumVGCHwuZJ5 -0y6p3n/YvhN2IglNkHEqjYqxWZcuuGMpa7Nm9qL6kbTy/4oeF7hpekgsPCd69yGx -JhyBXkqxlmhsBIOmQw4tAy3qhZNgNiloc4J+POrvZJ8ts+Pg+qcgzTGKRidhBxda -5yousoqaQxXlyxamEmlkEzYUTvrjPfv4i8ObDj6mQrCHi2XZ9A7ZBp3lcsPgRQec -FtvVAyZ/ewcsRjimQk77fcArAzPYM92Pn39lcrMg1MXXu8zWHkl585R/tZR9t5jM -WxN3FT+easVElvSRnk9G -=0tQf ------END PGP SIGNATURE----- diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf new file mode 100644 index 0000000..5944a2e --- /dev/null +++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf @@ -0,0 +1,29 @@ + + + Alias /pnp4nagios /usr/share/pnp/ + + + AllowOverride AuthConfig + Require all granted + + + # Turn on URL rewriting + RewriteEngine On + Options +FollowSymLinks + + # Installation directory + RewriteBase /pnp4nagios + + # Protect application and system files from being viewed + RewriteRule ^(application|modules|system) - [F,L] + + # Allow any files or directories that exist to be displayed directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + + # Rewrite all other URLs to index.php/URL + RewriteRule .* index.php/$0 [PT,L] + + + + diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf deleted file mode 100644 index 4879779..0000000 --- a/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf +++ /dev/null @@ -1,22 +0,0 @@ - - Alias /pnp4nagios /usr/share/pnp/ - - AllowOverride AuthConfig - Order allow,deny - Allow from all - - # Turn on URL rewriting - RewriteEngine On - Options FollowSymLinks - # Installation directory - RewriteBase /pnp4nagios - # Protect application and system files from being viewed - RewriteRule ^(application|modules|system) - [F,L] - # Allow any files or directories that exist to be displayed directly - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - # Rewrite all other URLs to index.php/URL - RewriteRule .* index.php/$0 [PT,L] - - - diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24-r1.ebuild similarity index 60% rename from net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild rename to net-analyzer/pnp4nagios/pnp4nagios-0.6.24-r1.ebuild index b94e1a1..93ae572 100644 --- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild +++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24-r1.ebuild @@ -1,31 +1,39 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild,v 1.5 2014/11/10 13:51:44 ago Exp $ +# $Header: $ EAPI=5 inherit depend.apache eutils DESCRIPTION="A performance data analyzer for nagios" -HOMEPAGE="http://www.pnp4nagios.org" +HOMEPAGE="http://www.pnp4nagios.org/" SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" IUSE="" -KEYWORDS="amd64 ppc ppc64 ~sparc x86" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" DEPEND=" dev-lang/php[json,simplexml,zlib,xml,filter] >=dev-lang/php-5.3 >=net-analyzer/rrdtool-1.2[graph,perl] || ( net-analyzer/nagios-core net-analyzer/icinga net-analyzer/icinga2 )" + +# 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 +APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends + RDEPEND="${DEPEND} virtual/perl-Getopt-Long virtual/perl-Time-HiRes media-fonts/dejavu - apache2? ( www-servers/apache[apache2_modules_rewrite] )" + apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )" +# There is no want_apache2_4, but we needed to specify that manually +# anyway to be able to include the list of modules. want_apache2 pkg_setup() { @@ -33,7 +41,7 @@ pkg_setup() { } src_prepare() { - epatch "${FILESDIR}"/${PN}-0.6.14-makefile.patch + epatch "${FILESDIR}/${PN}-0.6.14-makefile.patch" } src_configure() { @@ -67,16 +75,20 @@ src_compile() { src_install() { emake DESTDIR="${D}" install install-config newinitd "${FILESDIR}"/npcd.initd npcd - rm "${D}"/usr/share/pnp/install.php || die + rm "${D}/usr/share/pnp/install.php" || \ + die "unable to remove ${D}/usr/share/pnp/install.php" if use apache2 ; then insinto "${APACHE_MODULES_CONFDIR}" - doins "${FILESDIR}"/98_pnp4nagios.conf + newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf fi # Bug 430358 - CVE-2012-3457 - find "${D}/etc/pnp" -type f -exec chmod 0640 {} \; || die - find "${D}/etc/pnp" -type d -exec chmod 0750 {} \; || die + find "${D}/etc/pnp" -type f -exec chmod 0640 '{}' + || \ + die "unable to set file permissions under ${D}/etc/pnp" + + find "${D}/etc/pnp" -type d -exec chmod 0750 '{}' + || \ + die "unable to set directory permissions under ${D}/etc/pnp" } pkg_postinst() { -- 2.44.2