From: Michael Orlitzky Date: Sat, 22 Nov 2014 21:29:52 +0000 (+0000) Subject: Version bump with permission from creffett, bug #485756. Thanks to Tomas Mozes and... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e5084081601a93e7d54173efa222f4633a5d29a;p=gentoo.git Version bump with permission from creffett, bug #485756. Thanks to Tomas Mozes and others for testing. Package-Manager: portage-2.2.8-r2/cvs/Linux x86_64 Manifest-Sign-Key: 0x6F48D3DA05C2DADB! --- diff --git a/net-analyzer/nagios-core/ChangeLog b/net-analyzer/nagios-core/ChangeLog index 6e2d4ccdb1b7..2dca36e9aa02 100644 --- a/net-analyzer/nagios-core/ChangeLog +++ b/net-analyzer/nagios-core/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-analyzer/nagios-core # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.199 2014/09/19 10:30:51 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.200 2014/11/22 21:29:34 mjo Exp $ + +*nagios-core-4.0.8 (22 Nov 2014) + + 22 Nov 2014; Michael Orlitzky +files/99_nagios4.conf, + +files/lighttpd_nagios4.conf, +files/nagios4, + +files/use-INSTALL-to-install-themes.patch, + +files/use-MAKE-instead-of-bare-make.patch, +nagios-core-4.0.8.ebuild, + metadata.xml: + Version bump with permission from creffett, bug #485756. Thanks to Tomas Mozes + and others for testing. 19 Sep 2014; Agostino Sarubbo nagios-core-3.5.1.ebuild: Stable for sparc, wrt bug #501200 diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest index 37e03dade2f6..a9f52dc80259 100644 --- a/net-analyzer/nagios-core/Manifest +++ b/net-analyzer/nagios-core/Manifest @@ -2,35 +2,44 @@ 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 AUX lighttpd_nagios3-r1.conf 482 SHA256 0cbe138afb954ee434dd3ea3146fc0677533085c2f2f8fa7faebe0bb3a64e172 SHA512 8a6811432034f97aa136b4d2c4cf1382c8cb13388eec67a2112034aa1331e08fa73e5822ef78634cf25581b068280736a9efd15848fecaa7215364104778194b WHIRLPOOL a9f53e9eada7efbd4f5f538597d9040fb68c65a3f6b5b728bfa1fa83cf16ab50d8893d80a7d5ebd74352108a56e6add4b39e0f1fe37f4fbc263ad9ec434a36e3 +AUX lighttpd_nagios4.conf 325 SHA256 0326b4d25315e3c446cb98f10e0cc47eadfacae2916c59d5aa2829643f3805ae SHA512 a2f854713512ee8ee5c451235beb6ffccf2e04617a98619c6de807a5abca0a424e0581c34b4d255dcbc108e677e18bed25dd33e3d38df8fe10d7d8d4fab015c9 WHIRLPOOL 3aff58f01e9ce76b471c757b983eb6c1f3bb1a9d870b5d7f32ba1419082c23403ad01f7ffe87e1bc8ea81eb392a88e37f7be0fd229333a535f062e321d3948b5 AUX nagios 1459 SHA256 3281e938efd5bb6967334bf99dd99ee726f1320c6048c5f335c94bda2992cc8d SHA512 dddbdb3cb2a594792298051adb79a548f9cb2cfe85ecb6c2443cfe401bd13cd013827dce2ed12dcce20502b29aa9b5126bf449f1236b74415b052a676f8616fe WHIRLPOOL 9aaa832f81bdc7f8a1d16277d7274622f39b03e669c64bb992ea725110c186835e9ef1528cf231757fb75b7f7c257c3f4c3c9bcb9df0eb4117597130bdfd0d61 AUX nagios-3.3.1-htmlmakefile.patch 683 SHA256 e17cba4707ad0864a9a78e4550d45b5aeaa2229d8336af980802f92d61616e67 SHA512 6bb0c4faaa6df795767dcbae277a7341f777e0746d9f42c9e6434de9680464339e4c756fa9ba22e832076f120b9f8315fed6506df847e14f3f5e0447a6e20db0 WHIRLPOOL 6f8768ceadf7509b68689b4d292e55ff7b3845dba3741099c96bbe88338d05d486624e073a494fc1b05f1e2fe6fc6dab2f613d6e2f9fa91116f52b7f1a24b6e2 AUX nagios-core-3.5.1-process_cgivars.patch 5282 SHA256 a11bdc0ac1324fb36393c4850b41b089a3be1dccafc1d707b935e08c73419406 SHA512 302d45f59f9165771ae766d1a3e085995056c515fc1ae8a61341b44afe7b903f85a2ac5a7dd68d3b9f1944a6d102d63d1fd9aded5d2c916e70affec5d43b766a WHIRLPOOL 661dcf6cea30d147033c5cd16301d43f03f411d05924ac82a8f88b0fe8477d028162d3346095744006db605bc36c27fc0669ac55924eb918a85ae1d772765648 AUX nagios3 1322 SHA256 b0d0f033f0f3b6dbc50f928cc1d06104aafe0dbffe350e89287f37c2433865f9 SHA512 0a93794377321996a99707753aa0f21adb1230c04c45eecec7a1102dfc9b6f9a5a2ad0e3f8717c4ecdbb34c831217400cc8ba8e0168e45860d5e12f1048516bc WHIRLPOOL 2b67ea02b5b54b6072b8fd89aff945a951a9aaee53ff945d1d93cc90e51f4e946af6e635093218d99a225cda902e1ccdd2bb80b1463abada10d79f7b0666ff15 +AUX nagios4 1321 SHA256 0a58a286659a2017552e0768fbdf1cf9a068e2f75a09bb467251f4c949e9418d SHA512 46f50544287695771a0fc420afd24d95a7dc4ce525549294dd7cef81120e68031ae1e95b862e07117a80d64c1a3df65a5ff67b19bae68407c8429f206bf4e562 WHIRLPOOL 3b8dbe086d0b1574b328bbbf69b3a4a2b175ca9d38cf31870890ae44644ff092a6bd7be37eeb6a4e3927d62ea190f0ef5bfbf9d472ee3a7c6866f0fee733a444 AUX statuswml-bug275288.patch 1401 SHA256 8cf1db6ab5b172280ae31e0966c4e9e65af1b944346ee4936273cdb0c3f35bbf SHA512 36a0552888b08f68bd8e92ee7ba8764529d6081f7e76d2dbe8fa48acdf2c2733da30e4fdc1b097d09146d7256e596da74e1d29c995bae7261ae44daeb03b6cd1 WHIRLPOOL 6bda7e1db8823e1348320acdb33f2c684d8074a7bfe00a687683694163b182d952d1c3fe6dc66259b5ab1be8c91a62dd0976eaa8f84c49402dfddd7a3f9750fe +AUX use-INSTALL-to-install-themes.patch 2175 SHA256 e464e941ccef4101a842b9b93184d9d8e2a7997f7b85395816d86d78f91491d9 SHA512 a2d0d67d9a72ebf6cc87bd961e0575f96f0c609dc2393255c832f8533764e89bc08f7c68c39c9be8b08d666992bc8c24c04e2f2ac5b23ef915292fdb9bb9949d WHIRLPOOL cb04dd5dbb5960b33b150874982d9203ffcd5f898ed4e1dcd73d097b39f8c55820918367524cbe8ea36477938530b32ece950c133aa9ebe69de5ea47fd766562 +AUX use-MAKE-instead-of-bare-make.patch 1039 SHA256 56ede3c0e01b5f99a475e1ff0ea31df44b38a3327a6a96777725ff1b05e7dd85 SHA512 f0d34fe0fc6c023742dd39d587bc98fd3802af5ed73e1a1573772eae69308f958c9027f46427643111b7fa8ce8b19a3af1020dd05eefe8c1f8facad99f9e4301 WHIRLPOOL a0d7aa268cf3327e194bc1e54e3cb1538c1c3a52adb16060880d77be4f902553a3ce06ce3bce3578f3e0cbe2892368daf4b52f105a9cc0b50610f9499a16e65f DIST nagios-3.2.3.tar.gz 3249447 SHA256 7ec850a4d1d8d8ee36b06419ac912695e29962641c757cf21301b1befcb23434 SHA512 a0f17dc0a8d5a938e39df25a9589ff99e629075e1fb1c7e95daa56da114f9a23cdd7ab87d96a4a997ff162268e42e70c2abd8fcbfc88732331fe0795e4b9d35d WHIRLPOOL c777aaf69eab7585fd11df9ad6d91798e0adb44decae95ac20e7ef8fc81a1831ea5dd3e047a9a6ffa89eae94083ae69ee4f25aec013068eb7f4d7ca968b6eb43 DIST nagios-3.3.1.tar.gz 1714630 SHA256 c4e39cd31a8a9ee814df848fd933b8611465f749b48432672aef4ae5849d9652 SHA512 e786b45ca926699843786db2662ceeeda30a5d127e9e04a579482ea78fba51bbc764f386d3e1b48f1c30b8871de1047adc9449c155215733cbbad83380c1ad7c WHIRLPOOL b0b9fe3b7defcdd3a5c5236a0aafafdee4f70c49f9f5265be8086be18ec6b53b718492db686617159d48556bb28f74e1d394145e783a5867c461999ef37340f7 DIST nagios-3.5.1.tar.gz 1763584 SHA256 ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 SHA512 48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d WHIRLPOOL 2c02584702c64dbb0e353e34b758fab079eee0dc7a401e7b5947a21733758d3596401e5519e2dd7f05c89ee4835c21965d2718157fd9d6d3d20af9c853d688ca +DIST nagios-4.0.8.tar.gz 1805059 SHA256 8b268d250c97851775abe162f46f64724f95f367d752ae4630280cc5d368ca4b SHA512 d72fdbcc0beb2de72e5aa788b4ccc83aa30c7f4a4460edaa831f012db04647e4836b876bb7dc235e2a1b525827e9a2a0f4d348919f69fbfbfdaa4d13e968e18c WHIRLPOOL bdd9c63e0e495073b7b046952baa50b9e448fa56cda167806546a3b58fdd8fad328c9285ebb6d07da81786676d805671cad7295be389c4b8a4f3971264c97f74 EBUILD nagios-core-3.2.3.ebuild 6016 SHA256 bd684c476d6692ec3b8defc590f123afb45d0a38ea8eb70c2a64b6a1379e77ba SHA512 a7e996ac8fcc9614f87e721a8ca63a12cd33d21b646b8d43f76d472b20d58afef312afff5e6ec068c18f2f4e016197e69507f6aaee3c7af7a5937173fc38b0dd WHIRLPOOL 6ab8d171818a30616ac00802d91e51cf7909879c6fc954f1234f2657669ec632f03e5997820fd55136bc40939afe403d028205705c051363243c5f631040d52f EBUILD nagios-core-3.3.1.ebuild 6169 SHA256 ba1d11d9e86d9bf8f504da22bd9f7125623897bb5ba447c1382729279db1ac9a SHA512 95a2e1be5118bce27b9ed81aa5d7441d9ca5362e4a947158bcdf114c015d0ae52d4a616decbd3dba845579c1747a9e1471f7a00647d31f8854d331aa2b2b1867 WHIRLPOOL 19b38fbdde2cb0fae7179bad4d8958fcf1057f6f5286bd75d0006cdceafb1752973c8d5c6ae513ba2b87e787ff60dc961bf3e065864e148be02a4ee0d9274676 EBUILD nagios-core-3.5.1.ebuild 6169 SHA256 afdba4cc8a5dd563d4c7f9f64a5c278a180e65de8b34489f1412d9bfa82c3c2e SHA512 dc96c0d4bdb074eea990b18473a231a65ed6b83f6215434b1dc3ea72f14d62b14c68dceb4eada8d967feb14d42b8f6cd3d8cef23ffdee7417302a5b3cb5206ae WHIRLPOOL e0fefb4f68a53f81d4db7f1c21f4da8223b55eb368423331d5a4982e2df6f7878e4a1a50b778b5a0c018f0a8fe5c7669d0687f0ec62c61cb515e4b34592bab0f -MISC ChangeLog 32372 SHA256 1a1daa3bc533a988022b6dbab1a84e0c6900ee57de7ccd059e2ca9bb0ab22674 SHA512 537bb923254dd23c44924f8e32c19dba6ab80308ce6ab8266011a9ea50a407c33e9f5b78db499ffc6d098bf7a7e362c6a22e57265ec2438b633b34cd59861e6d WHIRLPOOL 5ab97db742de8fd5183184bf574cbd0acf75d1fd5335531905a7d76454637e0515bfc6a423154d5c11f28d736fb24d82df24871886e275f600b0be954597b430 -MISC metadata.xml 1418 SHA256 d7c691874b8410214c978f77a0530e6ea45b93d61322a8694fe20b1d9cc1b19f SHA512 4ce130f3afeceec9fdf688106fc862d59e12ab869dcc5ac8fe404f93192c1fd0fac7a3086c518fea305e8035b46334160f307f36a23578613bbade61b6e2144c WHIRLPOOL f92a2fdb008e41c8a9a4eea28b4496d3377b6fcd1115db0819a7ac61e5e2bb16fb65448499259690029889da77ce9746b6e04220729347777cabc5202496b069 +EBUILD nagios-core-4.0.8.ebuild 7210 SHA256 3341e17f152ad1dad6d98402c842940e99f1851dde9c1e7fff2ad76211df0ca3 SHA512 d9c2882c26771682720dbcf06216e7cbb14206411527a3a5884564492116bc8fd5613901600ebe85626684341bfc99d27b1089bd2e4e88e6e4c1fa0b4101faaa WHIRLPOOL e26b51d0b9437f0de73f2a3a1de0f63f7e6c60f28e43afce0685815d46aaebc90c7b60da1ef94bdedbab8056d34069b67518c607f60d8cdcd3430115e89c12f0 +MISC ChangeLog 32770 SHA256 86353062eee79b25624c7989698d2a4f3ba8050697085d4d4d0ff1748d9ca1dc SHA512 01f89c57e2126edb139cf99a522107fb66237a16109d1cd7c4503ccff446ccb2ad91c8f183a1d4557c68e873906211d5fc8359d64e51a093633c985b3796df74 WHIRLPOOL 558305fbaf02869083b88a310bb6757f29f7df66f44c15887966d82472f12b1fb1ea530575cf40781353d18fe3bb996e84fb0c676ecf30af0dc4be5bdae13bb1 +MISC metadata.xml 1478 SHA256 9099b3eb50d6ab4894f46a32083c6defc29a5ce613123faf458c062e7c72c1b9 SHA512 fa58ee32c763c1569163dc44b9523cac9bcae87743ee254023c073b82c0eec82b9ba1994420e1df3ffbd3f09cd64a8a115f96c248d7aecef0df742ff3ac478a3 WHIRLPOOL daa602b1587bd1925c9b90fcaced294a3ae620dff3d11d037e20919fee079aec950aefc6188b2b9aca069dfdf820390f792e78081faf4442cedfb8d71ec896bc -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2 +Version: GnuPG v2.0 -iQIcBAEBCAAGBQJUHAXcAAoJELp701BxlEWfr6sQALPm+zC8ZKEH0rtF0jBT/pv/ -uhAawsTtJDufENiE1KSFH1Lm3wjWVgkAtyFhTNN1hpq9J2l20PS+/pEPkSj4zvHk -uCDNOB4ORGrqfp2pE2EAqdKgNHNAERXXn5MXlOR4fjZx3Y1VxYy4YBj0GIA0rPQa -ZvbN9xOAIlVzswAuGvjpTcjafuf44F+s6w9U7CgzNbiIQ/Vc2n4VUZ1UjyCVJy3a -dNF0lrRHs+h4AcSwVMcpoy97Mehs4uZkBbg3jnkepjo/uJwscZ1+0B9h+v85bngu -StnwHQartxSboPhGHFWk3YKEtuIUfE1/O1EmIRodocklSbKtIEZeodzLnmmu2GXR -PxVGi62qNKY+d64y5F66PerMTCOfTjVGHsahVs08zi+sZabNGwPk3siDtvzubzhq -KJiGR/f7bEHxl6da92WuMLphnvrRiWlWk5ICpdscQI0/9O8fpWCSPnkvK6UQkfv1 -HfIvRJfwTgYB1MX4fs/s430HEqk4YjoVnzLM40VAiIDtixwnHxWyT91ZIcC2ZQzK -Q4ucykzb7HG/+2paVy2LPwKEiWlgI+K6YjnkJfV1TSXh8eDhLrhHkU474ttNaa88 -kFbgGm5tWk4KkaRXsvYnmJuwj8iuB5rjTVNS5XnLROpPOiKYA1swrPBFYOobxXPu -OXEoUq/nSY1e27Kj5tNn -=5L0a +iQJ8BAEBCABmBQJUcQBDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxNEU5RDcyRDdCMUFGREVGQzBCNDFDMUY2 +RjQ4RDNEQTA1QzJEQURCAAoJEG9I09oFwtrb+xEP/37mTdBEHlPCuLD7X04I/GgJ +mUctLOdpBMnfkugSL6Ne5p6wbia/ztFr0H9Rlp4Zv4qyHF/2Byai6/sbjGcjxUaa +1RfJrg2QhpnBF7Wx5Q/v9k8Jx1Gw1WB/eil34N2Pnp+1/nURc9aGN2Sj9vuXAjke +GmfZ6WpGfBSuXcIvmZV4t2kVgR45QYxSqU7QtGcDrWLx69PFgFErGWtBBw2D39wA +FIzDycM3ztDzJnUD43nx89CAC8PjuWzvUfiw/NHe3Eu1NN9mGURDWtN3rP6eKIlG +Wg1F5nR3T2nMJWMtwEqZJY2zUOmc0LldcTFPQiL9UiF9c5xPuzftzqcxer7GSoeL +ibICvKD2k7DrJNzjzG99HHdXg4Q4T4LagTpTvbD/8x8exviPSgzFxyoUEDO9xNqa +odJoUFFuVkqEfsJ1iHUZj8yieDtJ9MvuWSvFqDjBtuXLzt09ZFXBSZqCjHQZZJUm +szqXHmHp/eMLmL9NDLebBVulhjxNJxFEefUyrUMV1xp4taQvCvsj6CGRKQ4ThVpk +XyaS+fg6q/IKDYA/3gmzijccvRcUws3SEWFYbtqqfsx6Ss8wnH1maRhqgX7ZET+G +kwbqoCPvCEe0URIqdGgUDL5WWU3Ptu1SoeFzfARAYmFDDKux6S0zKITZ1XLFX9dJ +do3AMc3+gELkfyneHftl +=ZSGR -----END PGP SIGNATURE----- diff --git a/net-analyzer/nagios-core/files/99_nagios4.conf b/net-analyzer/nagios-core/files/99_nagios4.conf new file mode 100644 index 000000000000..b04c2980ebab --- /dev/null +++ b/net-analyzer/nagios-core/files/99_nagios4.conf @@ -0,0 +1,16 @@ + + + ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/ + + AllowOverride AuthConfig + Options ExecCGI + Require all granted + + + Alias /nagios /usr/share/nagios/htdocs + + AllowOverride AuthConfig + Require all granted + + + diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios4.conf b/net-analyzer/nagios-core/files/lighttpd_nagios4.conf new file mode 100644 index 000000000000..a073f177f238 --- /dev/null +++ b/net-analyzer/nagios-core/files/lighttpd_nagios4.conf @@ -0,0 +1,15 @@ +server.modules += ("mod_cgi") +server.modules += ("mod_alias") + +$HTTP["url"] =~ "^/nagios/cgi-bin/" { + dir-listing.activate = "disable" + cgi.assign = ( + ".pl" => "/usr/bin/perl", + ".cgi" => "" + ) +} + +alias.url += ( + "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin", + "/nagios" => "/usr/share/nagios/htdocs" +) diff --git a/net-analyzer/nagios-core/files/nagios4 b/net-analyzer/nagios-core/files/nagios4 new file mode 100644 index 000000000000..417019ddd92c --- /dev/null +++ b/net-analyzer/nagios-core/files/nagios4 @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios4,v 1.1 2014/11/22 21:29:34 mjo Exp $ + +extra_commands="checkconfig" +extra_started_commands="reload" + +nagios_config="/etc/nagios/nagios.cfg" +nagios_cmdfile="/var/nagios/rw/nagios.cmd" + +command="/usr/sbin/nagios" +command_args="-d ${nagios_config}" +pidfile="/var/nagios/nagios.lock" +start_stop_daemon_args="-e HOME=/var/nagios/home" + +depend(){ + need net + use dns logger firewall + after mysql postgresql +} + +reload(){ + checkconfig || return 1 + ebegin "Reloading configuration" + start-stop-daemon --signal HUP --pidfile ${pidfile} + eend $? +} + +checkconfig(){ + ebegin "Verifying config files" + + # Silent Check + /usr/sbin/nagios -v ${nagios_config} > /dev/null 2>&1 && return 0 + + # Now we know there's problem - run again and display errors + /usr/sbin/nagios -v ${nagios_config} + eend $? "Configuration Error. Please fix your config file." +} + +start_pre() { + checkconfig || return 1 + + touch /var/nagios/nagios.log /var/nagios/status.sav + chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav + rm -f ${nagios_cmdfile} +} + +stop_post() { + rm -f /var/nagios/status.log /var/nagios/nagios.tmp ${pidfile} \ + ${nagios_cmdfile} +} diff --git a/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch new file mode 100644 index 000000000000..a852430e74b6 --- /dev/null +++ b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch @@ -0,0 +1,59 @@ +From 26bef86bad804836babd9d99accfc247eb744132 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Wed, 12 Nov 2014 08:35:28 -0500 +Subject: [PATCH 1/1] Use $(INSTALL) to install themes. + +Most of the images installed under the htdocs folder are installed +mode 644 with owner:group nagios:nagios. This is due to the use of +$(INSTALL) in html/Makefile. However, the theme images and stylesheets +are currently installed with a simple "cp -r", which leads to +inconsistencies like the following: + + $ cd /usr/share/nagios/htdocs/images + $ ls action*.gif + -rw-rw-r-- 1 nagios nagios 1.3K 2014-11-12 08:22 action.gif + -rw-r--r-- 1 root root 1.3K 2014-11-12 08:22 action-graph.gif + -rw-r--r-- 1 root root 171 2014-11-12 08:22 action-nagios.gif + -rw-r--r-- 1 root root 162 2014-11-12 08:22 action-orig.gif + +By using $(INSTALL) in the install-exfoliation and install-classicui +targets, we enforce some consistency. +--- + Makefile.in | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 1341160..67e1502 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -300,8 +300,11 @@ install-webconf: + @echo "" + + install-exfoliation: +- cp -rf contrib/exfoliation/stylesheets/* $(DESTDIR)$(HTMLDIR)/stylesheets +- cp -rf contrib/exfoliation/images/* $(DESTDIR)$(HTMLDIR)/images ++ for file in contrib/exfoliation/stylesheets/*.*; \ ++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done ++ ++ for file in contrib/exfoliation/images/*.*; \ ++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + + @echo "" + @echo "*** Exfoliation theme installed ***" +@@ -309,8 +312,11 @@ install-exfoliation: + @echo "" + + install-classicui: +- cp -rf html/stylesheets/* $(DESTDIR)$(HTMLDIR)/stylesheets +- cp -rf html/images/* $(DESTDIR)$(HTMLDIR)/images ++ for file in html/stylesheets/*.*; \ ++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done ++ ++ for file in html/images/*.*; \ ++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + + @echo "" + @echo "*** Classic theme installed ***" +-- +2.0.4 + diff --git a/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch b/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch new file mode 100644 index 000000000000..e53ba78b6e38 --- /dev/null +++ b/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch @@ -0,0 +1,37 @@ +From e043015081c9dc6869b282da76ae0de5ac9840a2 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Wed, 5 Nov 2014 13:46:04 -0500 +Subject: [PATCH 1/1] Use $(MAKE) instead of bare "make" in subtarget of + install-html. + +When running make as a subprocess of itself, it's best to invoke it as +$(MAKE). The rest of Makefile.in does this correctly, but there was +one instance where it was forgotten. For posterity, this can lead to +warnings like, + + make[1]: warning: jobserver unavailable: using -j1. + Add '+' to parent make rule. + +More info is available at, + + https://www.gnu.org/software/make/manual/html_node/Error-Messages.html +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index f487c47..1341160 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -222,7 +222,7 @@ test-perl: cgis + + install-html: + cd $(SRC_HTM) && $(MAKE) install +- make install-exfoliation ++ $(MAKE) install-exfoliation + + install-base: + cd $(SRC_BASE) && $(MAKE) install +-- +2.0.4 + diff --git a/net-analyzer/nagios-core/metadata.xml b/net-analyzer/nagios-core/metadata.xml index e637fef2b2b9..548986eb8426 100644 --- a/net-analyzer/nagios-core/metadata.xml +++ b/net-analyzer/nagios-core/metadata.xml @@ -27,6 +27,7 @@ browser. + use the classic web theme install www-servers/lighttpd config enable web interface diff --git a/net-analyzer/nagios-core/nagios-core-4.0.8.ebuild b/net-analyzer/nagios-core/nagios-core-4.0.8.ebuild new file mode 100644 index 000000000000..9ff70a438af0 --- /dev/null +++ b/net-analyzer/nagios-core/nagios-core-4.0.8.ebuild @@ -0,0 +1,249 @@ +# Copyright 1999-2014 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.ebuild,v 1.1 2014/11/22 21:29:34 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/" +SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" + +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 )" + +# 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.) +# +DEPEND="sys-devel/libtool + virtual/mailx + perl? ( dev-lang/perl ) + web? ( + media-libs/gd[jpeg,png] + lighttpd? ( www-servers/lighttpd[php] ) + apache2? ( + || ( + >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_cgi] + >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_cgid] + >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_fcgid] + ) + + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/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 +} + +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 + 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" + + # 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 +}