Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/
Date: Sun, 06 Nov 2022 13:56:29
Message-Id: 1667742975.c4246dc349dd70b6573c5ecb8874c7e1a7681c31.mjo@gentoo
1 commit: c4246dc349dd70b6573c5ecb8874c7e1a7681c31
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Nov 1 08:39:13 2022 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 6 13:56:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4246dc3
7
8 net-analyzer/monitoring-plugins: add 2.3.2
9
10 Closes: https://github.com/gentoo/gentoo/pull/28067
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
13
14 net-analyzer/monitoring-plugins/Manifest | 1 +
15 .../monitoring-plugins-2.3.2.ebuild | 104 +++++++++++++++++++++
16 2 files changed, 105 insertions(+)
17
18 diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest
19 index 5d730fce5753..e19b4b8e6a60 100644
20 --- a/net-analyzer/monitoring-plugins/Manifest
21 +++ b/net-analyzer/monitoring-plugins/Manifest
22 @@ -1 +1,2 @@
23 DIST monitoring-plugins-2.3.1.tar.gz 2529669 BLAKE2B 8dbbab78c1e57e249024fe57439acb41960585f2cccba20d03ca75a04b87e84752665f49cfe545c6a409d29094077dac0485aef872586f853e2f0f2187bf5070 SHA512 0ae76bc776997ed23d142ad9a688edc4df9b8ec0f9539b446e4fb4849a165cc88e97cbfb3a7a9a450de452e021d38f2e4ada7e8a22d78cf58e17e266472d01d7
24 +DIST monitoring-plugins-2.3.2.tar.gz 2766966 BLAKE2B 1a9c35e8df22d5666005b4b79f5a7ee878c0d4be1e98039f341b198a658747010e8c9d1c0a1818d67a402e5c302ec5eb5073628d52c29caf41dbc2ce57c18f6c SHA512 d155f09ddd99f4e0d065627d3bf8768e13ae3f58ed25912f33b070cd24d6f3f43243616ec3e2d496dec633feee6b1f14950035a928034a1413f725814e850765
25
26 diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild
27 new file mode 100644
28 index 000000000000..68ba0969bbbc
29 --- /dev/null
30 +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild
31 @@ -0,0 +1,104 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="8"
36 +
37 +inherit flag-o-matic
38 +
39 +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
40 +HOMEPAGE="https://www.monitoring-plugins.org/"
41 +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
42 +
43 +LICENSE="GPL-3"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86"
46 +IUSE="curl gnutls ipv6 ldap mysql dns fping game postgres radius samba snmp ssh +ssl"
47 +
48 +# Most of the plugins use automagic dependencies, i.e. the plugin will
49 +# get built if the binary it uses is installed. For example, check_snmp
50 +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
51 +# installed. End result: most of our runtime dependencies are required
52 +# at build time as well.
53 +#
54 +# REAL_DEPEND contains the dependencies that are actually needed to
55 +# build. DEPEND contains those plus the automagic dependencies.
56 +#
57 +REAL_DEPEND="dev-lang/perl
58 + curl? (
59 + dev-libs/uriparser
60 + net-misc/curl
61 + )
62 + ldap? ( net-nds/openldap:= )
63 + mysql? ( || ( dev-db/mysql-connector-c dev-db/mariadb-connector-c ) )
64 + postgres? ( dev-db/postgresql:= )
65 + ssl? (
66 + !gnutls? (
67 + dev-libs/openssl:0=
68 + )
69 + gnutls? ( net-libs/gnutls )
70 + )
71 + radius? ( net-dialup/freeradius-client )"
72 +
73 +DEPEND="${REAL_DEPEND}
74 + dns? ( net-dns/bind-tools )
75 + game? ( games-util/qstat )
76 + fping? ( net-analyzer/fping )
77 + samba? ( net-fs/samba )
78 + ssh? ( net-misc/openssh )
79 + snmp? ( dev-perl/Net-SNMP
80 + net-analyzer/net-snmp[-minimal] )"
81 +
82 +# Basically everything collides with nagios-plugins.
83 +RDEPEND="${DEPEND}
84 + acct-group/nagios
85 + acct-user/nagios
86 + !net-analyzer/nagios-plugins"
87 +
88 +# At least one test is interactive.
89 +RESTRICT="test"
90 +
91 +src_configure() {
92 + append-flags -fno-strict-aliasing
93 +
94 + # Use an array to prevent econf from mangling the ping args.
95 + local myconf=()
96 +
97 + if use ssl; then
98 + myconf+=( $(use_with !gnutls openssl /usr)
99 + $(use_with gnutls gnutls /usr) )
100 + else
101 + myconf+=( --without-openssl )
102 + myconf+=( --without-gnutls )
103 + fi
104 +
105 + # The autodetection for these two commands can hang if localhost is
106 + # down or ICMP traffic is filtered. Bug #468296.
107 + myconf+=( --with-ping-command="/bin/ping -4 -n -U -w %d -c %d %s" )
108 +
109 + if use ipv6; then
110 + myconf+=( --with-ping6-command="/bin/ping -6 -n -U -w %d -c %d %s" )
111 + fi
112 +
113 + econf \
114 + $(use_with curl libcurl) \
115 + $(use_with curl uriparser) \
116 + $(use_with mysql) \
117 + $(use_with ipv6) \
118 + $(use_with ldap) \
119 + $(use_with postgres pgsql /usr) \
120 + $(use_with radius) \
121 + "${myconf[@]}" \
122 + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
123 + --sysconfdir="/etc/nagios"
124 +}
125 +
126 +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
127 + NEWS README REQUIREMENTS SUPPORT THANKS )
128 +
129 +pkg_postinst() {
130 + elog "This ebuild has a number of USE flags that determine what you"
131 + elog "are able to monitor. Depending on what you want to monitor, some"
132 + elog "or all of these USE flags need to be set."
133 + elog
134 + elog "The plugins are installed in ${EROOT}/usr/$(get_libdir)/nagios/plugins"
135 +}