From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/mk-livestatus/Manifest | 9 ++ .../1.2.8_p10-MEDIUM-Drop-default-strip.patch | 24 ++++ ...Remove-the-usage-of-Perl-Critic-Policy-Mo.patch | 34 +++++ net-analyzer/mk-livestatus/metadata.xml | 19 +++ .../mk-livestatus/mk-livestatus-1.2.8_p10.ebuild | 134 +++++++++++++++++ .../mk-livestatus/mk-livestatus-1.2.8_p16.ebuild | 158 +++++++++++++++++++++ 6 files changed, 378 insertions(+) create mode 100644 net-analyzer/mk-livestatus/Manifest create mode 100644 net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch create mode 100644 net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch create mode 100644 net-analyzer/mk-livestatus/metadata.xml create mode 100644 net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild create mode 100644 net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild (limited to 'net-analyzer/mk-livestatus') diff --git a/net-analyzer/mk-livestatus/Manifest b/net-analyzer/mk-livestatus/Manifest new file mode 100644 index 000000000000..1f375def467e --- /dev/null +++ b/net-analyzer/mk-livestatus/Manifest @@ -0,0 +1,9 @@ +AUX 1.2.8_p10-MEDIUM-Drop-default-strip.patch 812 SHA256 ca35f7cfb3f28a4d56de7896bfc5891c4ab87b9d8d183d65918c4d3a567f740c SHA512 6fc48bbda7b235e50fb7cfa1298b9c7a2c6730e14639371a811febf84c2f7ed30d43cef6e54c794c50dc2e78fba5ead8a3a5c852bc1d605d5d202c92527242cf WHIRLPOOL 451df1f776a764e576c7fd02974a3037fe59b495805f1e0991c0d5173477dcbbc35d81475973330a1b4918469685391ea04d2246cb281daf15bf711f9e3fd545 +AUX 1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch 1111 SHA256 fa51370936c5e7db75a63ffca9ec2a53fe1078abcd331def688f52526f64835f SHA512 162daa81e2122dfd806e3227b3d22775fa3c36d97e92ce638328e46b99d54d2ff9c1ee51b525677a48a40c180ee0cac2c5c8fbcf50bebdb2f6a18ff836310404 WHIRLPOOL 658b0d6f2b9a406ccbccf646632a9e01a9f6c44344989e43d51ff00f357c90dfcadf9c7415143a50171a02132e5652d6051c9048d6826b398fe6878aaa1356c0 +DIST mk-livestatus-1.2.8p10.tar.gz 453496 SHA256 af21c393a17b783f8ca83ffe6e5eea884c74557c4f2bd8899720ced0b443b35e SHA512 ff25c2a8d0105fdd156bc922b56df10e3497361620671dc73242db0a7b57fbd34955b5f4fbd9954602c8011b1f6a5ebd4e278df7c3e66639d74110fd0035682d WHIRLPOOL c3354b04eac1eb8907eb781cdc785136ea4aac0c9d9a2e66d89291d4eeb89f3cd6efcfb2e554295140157b0d7099f1621cd4258e3cd7fa9c0459cd8c7c373d7e +DIST mk-livestatus-1.2.8p16.tar.gz 453565 SHA256 db6ca46f9616d218103c441de8b72a7ae0a74836e65a85511bf60167625f8e95 SHA512 32d4bc014c008ac7afbdca53e6b3e0d71f8eee5f41f4a0299a8e14cee2a1ea93216fe04c4ff9aa7d7b927dde8e63d186f09a2847665851f1063e699cf73a8df4 WHIRLPOOL 1bb9fd21c78d8b9b1efa48204dbb9ed6676f7a43765e6e8c78cf62df182527b1d9ae589968b7d7c9075d30d6628e2c4eb95cfcaebbb0b6926821fc08510bfaec +EBUILD mk-livestatus-1.2.8_p10.ebuild 2656 SHA256 ce91d8dff5e17bc749d2f662a3f91de7077c5596219eb1fec6a767d0cd5e8bd5 SHA512 348b1a88b335865bf0867d3f61a4b4d5787942c50c9b6c5f5f9da85ec81c128a879dc634797823924c0b140d4364a154e4d750cea7f8d8ab1f3e59cf6fb68d9c WHIRLPOOL f7489395811ad12ec1cc90834d715c75ded85b53ff42d7e5734b1455ea5ba6d61cf16536ff397fa27910305ebe9e4dd4bda0492b793f332d36049c5b865aee79 +EBUILD mk-livestatus-1.2.8_p16.ebuild 3456 SHA256 beea065369230f5b3f4130cc5c9e8841faa9aa9e002ea0c6247813417b937fd8 SHA512 a2d86da6a554f9d918afc07d494730682ce17314eff7a206f469d6b268146cdd800fe56459815f2bea7283fa925976e3d184195f588cf620c485e9a75166f608 WHIRLPOOL e44edb0719cc065fdecbb63b10851ac27446cf7021b27b5339c0821b5317ed3a583f6877cbfa339ff470269efcc6595e750e6b0f8050bb92952af0722095240a +MISC ChangeLog 3967 SHA256 685d1264ed584a52a0416029aa1944ab6576ba7098753e2b141781560e546ebb SHA512 ca300050249fae628f1410a0c65ab25be7718f643da36d432f49c7b540f6461b1b328a454d6e4205dfd6ed09de971d5ec88685c9f48cf44a058d56c3446f8515 WHIRLPOOL bbe55658fe9071078f3e46c681d99f5eeaabff54468d353cbe1c4a1b77a2bc923e9a326b79df659024baef1a9a29b68d366e6da605e2fcccc50783b9ec0a8fcf +MISC ChangeLog-2015 2277 SHA256 4f191043ff6b5393672fcfd81a426c6355e6302ec6fdc8028af90749dc21345f SHA512 f549328aca37d7a6a07dfc6fb662703c2bfade981a25e6b75bb7f4c4858ac4cb96a14880bfc0dbce6847c5109c2bbf62a82335a0c415b883e305e0c19805fc46 WHIRLPOOL 601499571fea74b11f172831481f0d939978f942f2e129595ab58b6afd90e02ecff697fd9af0f258208fdacc481709cf0215324acf43e8f6777b5018bbf88d6f +MISC metadata.xml 617 SHA256 dfa52ef9d6f5b5fdac4646ccd400c11e153089589ec0c2b12ed6c52c9641b6a0 SHA512 227a4ec9dad38a0be74140697b5095c694ca6837d1bf6fc396f6de28781eba572164e9c8cf7273a8b7286f2d68e5b8efe2facde4b705901d4d675936ccd9d87e WHIRLPOOL ff2b20eaead62bfb10cae1d8a4981d9f61d9383d3643d2580659059fb34d6b5115e1a7bd7d8762a41bc4ac2ea40c85262f978176f87c350abdf3d062e3590309 diff --git a/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch b/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch new file mode 100644 index 000000000000..5b5009bfaa01 --- /dev/null +++ b/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch @@ -0,0 +1,24 @@ +From 1798492a27a1ac3819cb366e1a3e789d663f55a0 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Wed, 21 Aug 2013 23:00:21 +0200 +Subject: [PATCH 1/2] MEDIUM: Drop default strip + +See: https://bugs.gentoo.org/show_bug.cgi?id=482026 + +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index deab289..126b503 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -55,7 +55,7 @@ livestatus_so_CFLAGS = -fPIC + + livestatus.o: $(livestatus_so_OBJECTS) $(livestatus_so_DEPENDENCIES) + -rm -f plugin.so +- $(CXX) $(LDFLAGS) -s -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -static-libstdc++ ++ $(CXX) $(LDFLAGS) -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -static-libstdc++ + + all-local: livestatus.o + diff --git a/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch b/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch new file mode 100644 index 000000000000..264d9bb899b6 --- /dev/null +++ b/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch @@ -0,0 +1,34 @@ +From 39cc57667a93f1cf18f935fdfda4d602667c89c8 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Wed, 21 Aug 2013 23:00:21 +0200 +Subject: [PATCH 2/2] MINOR: test: Remove the usage of + Perl::Critic::Policy::Modules::ProhibitAutomaticExportation + +This does not exist since +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-perl/Perl-Critic/metadata.xml?r1=1.3&r2=1.4 + +See: https://bugs.gentoo.org/show_bug.cgi?id=482026 +--- + api/perl/t/perlcriticrc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/api/perl/t/perlcriticrc b/api/perl/t/perlcriticrc +index f7e4721..f686dca 100644 +--- a/api/perl/t/perlcriticrc ++++ b/api/perl/t/perlcriticrc +@@ -133,8 +133,6 @@ severity = 3 + [Perl::Critic::Policy::Miscellanea::ProhibitTies] + severity = 4 + +-[-Perl::Critic::Policy::Miscellanea::RequireRcsKeywords] +- + [Perl::Critic::Policy::Modules::ProhibitAutomaticExportation] + severity = 4 + +@@ -283,4 +281,4 @@ severity = 5 + severity = 5 + + [Perl::Critic::Policy::Variables::RequireNegativeIndices] +-severity = 4 +\ No newline at end of file ++severity = 4 diff --git a/net-analyzer/mk-livestatus/metadata.xml b/net-analyzer/mk-livestatus/metadata.xml new file mode 100644 index 000000000000..29e9ad4c81c5 --- /dev/null +++ b/net-analyzer/mk-livestatus/metadata.xml @@ -0,0 +1,19 @@ + + + + + bertrand@jacquin.bzh + Bertrand Jacquin + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Generate a net-analyzer/nagios-4 compatible plugin + + diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild new file mode 100644 index 000000000000..74f333413356 --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-r1 + +MY_PV="${PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html" +SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples nagios4 perl python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="!sys-apps/ucspi-unix:0 + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + )" + +# For perl test +SRC_TEST="parallel" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/${PV}-MEDIUM-Drop-default-strip.patch" + "${FILESDIR}/${PV}-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch" +) + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_with nagios4) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + emake + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + emake install DESTDIR="${ED}" + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_foreach_impl python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild new file mode 100644 index 000000000000..4d0653d1def5 --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-single-r1 + +MY_PV="${PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html" +SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples nagios4 perl python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="!sys-apps/ucspi-unix:0 + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + )" + +# For perl test +SRC_TEST="parallel" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/1.2.8_p10-MEDIUM-Drop-default-strip.patch" + "${FILESDIR}/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch" +) + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_with nagios4) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + emake + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + emake install DESTDIR="${ED}" + + # install a config file showing whats needed to enable livestatus for nagios + cat <"${T}"/nagios.cfg +# Ensure all data is set to event brokers +event_broker_options=-1 +broker_module=${EPREFIX%/}/usr/$(get_libdir)/mk-livestatus/livestatus.o +EOF + # same for icigna + cat <"${T}"/icigna.cfg + cat << EOF > "${T}"/livestatus.cfg || die +define module{ + module_name mk-livestatus + module_type neb + path /usr/$(get_libdir)/mk-livestatus/livestatus.o + args /var/lib/icigna/rw/live + } +EOF + insinto /usr/share/mk-livestatus + doins "${T}"/{nagios,icigna}.cfg + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_foreach_impl python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} + +pkg_postinst() { + elog "Sample configurations for icigna and nagios are available in" + elog "/usr/share/${PN}" +} -- cgit v1.2.3