1 |
commit: 5d5d6a9ef625bf9aeda0d8d7cc1d37c379269334 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 2 13:41:04 2022 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 2 17:06:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d5d6a9e |
7 |
|
8 |
net-analyzer/nagios-plugins: new upstream v2.4.0. |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/nagios-plugins/Manifest | 1 + |
14 |
.../nagios-plugins/nagios-plugins-2.4.0.ebuild | 114 +++++++++++++++++++++ |
15 |
2 files changed, 115 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/nagios-plugins/Manifest b/net-analyzer/nagios-plugins/Manifest |
18 |
index bea1ea58975f..5a0fd0a3b9c2 100644 |
19 |
--- a/net-analyzer/nagios-plugins/Manifest |
20 |
+++ b/net-analyzer/nagios-plugins/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST nagios-plugins-2.3.1.tar.gz 2833267 BLAKE2B f89eda7a29558dd33dedbf0de150b6a13ba66d213d74041d9eb8c680880b3825bcc9312d251d22f3b483a14c0de7c59d7801954e7563c16352bfc38236676863 SHA512 89208f211e51db4e0d56725a6ff6d2fcf4eb2207f877a2b8f130cda8480a70f318eceb94140eb4f2a17fe3dd967bb3615ccc366c1a531ebd4ff0a04b60c61b8a |
23 |
DIST nagios-plugins-2.3.3.tar.gz 2782610 BLAKE2B f02ded0ed6d5c649a82fe7fe06e393b404fc6e9a260365b128c114381d411d93c8980fee6da73c4d03ab73669d5b8754225ff5aa14ef4430ee0c91d8c56cb131 SHA512 2128601b1098eb82f4e7d720b96a5f92d6ad75dc181a94b25c38172767de8b72f9fece3eddb74933b1cd520928ae9416a7dc665e2f059bfe362dd74041d28cd7 |
24 |
+DIST nagios-plugins-2.4.0.tar.gz 2738643 BLAKE2B 695c3804aec592dad0ae1f2f19222a5ae066944de4169beba08dd1e7beee51c5082679dfc1cf5adc052758e3142f33187ebde9636af19ae313f1448867764878 SHA512 f6f4cd604d28161f36c1429dbfa8f07e9fa468d8d8c21925d53d7049f0765504cb785e1f1189a0c93aa1f0cd1fe3985409c420b7724aa39790836af5c3f725ff |
25 |
|
26 |
diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.4.0.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.4.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..a21696d1d329 |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/nagios-plugins/nagios-plugins-2.4.0.ebuild |
31 |
@@ -0,0 +1,114 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+DESCRIPTION="Official plugins for Nagios" |
38 |
+HOMEPAGE="https://nagios-plugins.org/" |
39 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/release-${PV}/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
44 |
+IUSE="ipv6 ldap mysql nagios-dns nagios-ping nagios-game postgres radius samba selinux snmp ssh +ssl" |
45 |
+ |
46 |
+# Most of the plugins use automagic dependencies, i.e. the plugin will |
47 |
+# get built if the binary it uses is installed. For example, check_snmp |
48 |
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is |
49 |
+# installed. End result: most of our runtime dependencies are required |
50 |
+# at build time as well. |
51 |
+AUTOMAGIC_DEPEND=" |
52 |
+ nagios-dns? ( net-dns/bind-tools ) |
53 |
+ nagios-game? ( games-util/qstat ) |
54 |
+ nagios-ping? ( net-analyzer/fping ) |
55 |
+ samba? ( net-fs/samba ) |
56 |
+ ssh? ( net-misc/openssh ) |
57 |
+ snmp? ( dev-perl/Net-SNMP |
58 |
+ net-analyzer/net-snmp[-minimal] )" |
59 |
+ |
60 |
+# Perl really needs to run during the build... |
61 |
+BDEPEND="${AUTOMAGIC_DEPEND} |
62 |
+ dev-lang/perl" |
63 |
+ |
64 |
+DEPEND=" |
65 |
+ ldap? ( net-nds/openldap:= ) |
66 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
67 |
+ postgres? ( dev-db/postgresql:* ) |
68 |
+ ssl? ( |
69 |
+ dev-libs/openssl:0= |
70 |
+ ) |
71 |
+ radius? ( net-dialup/freeradius-client )" |
72 |
+ |
73 |
+# Basically everything in net-analyzer/monitoring-plugins collides with |
74 |
+# nagios-plugins. Perl (from BDEPEND) is needed at runtime, too. |
75 |
+RDEPEND="${BDEPEND} |
76 |
+ ${DEPEND} |
77 |
+ !net-analyzer/monitoring-plugins |
78 |
+ selinux? ( sec-policy/selinux-nagios )" |
79 |
+ |
80 |
+# At least one test is interactive. |
81 |
+RESTRICT="test" |
82 |
+ |
83 |
+DOCS=( |
84 |
+ ACKNOWLEDGEMENTS |
85 |
+ AUTHORS |
86 |
+ CODING |
87 |
+ ChangeLog |
88 |
+ FAQ |
89 |
+ NEWS |
90 |
+ README |
91 |
+ REQUIREMENTS |
92 |
+ SUPPORT |
93 |
+ THANKS |
94 |
+) |
95 |
+ |
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}/define-own-mysql-port-constant.patch" |
98 |
+) |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ default |
102 |
+ |
103 |
+ # Fix the path to our perl interpreter |
104 |
+ sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \ |
105 |
+ "${S}"/plugins-scripts/*.pl \ |
106 |
+ || die 'failed to fix perl interpreter path' |
107 |
+} |
108 |
+ |
109 |
+src_configure() { |
110 |
+ # Use an array to prevent econf from mangling the ping args. |
111 |
+ local myconf=() |
112 |
+ |
113 |
+ if use ssl; then |
114 |
+ myconf+=( $(use_with ssl openssl /usr) ) |
115 |
+ else |
116 |
+ myconf+=( --without-openssl ) |
117 |
+ myconf+=( --without-gnutls ) |
118 |
+ fi |
119 |
+ |
120 |
+ # The autodetection for these two commands can hang if localhost is |
121 |
+ # down or ICMP traffic is filtered. Bug #468296. |
122 |
+ myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) |
123 |
+ |
124 |
+ if use ipv6; then |
125 |
+ myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) |
126 |
+ fi |
127 |
+ |
128 |
+ econf \ |
129 |
+ $(use_with mysql) \ |
130 |
+ $(use_with ipv6) \ |
131 |
+ $(use_with ldap) \ |
132 |
+ $(use_with postgres pgsql /usr) \ |
133 |
+ $(use_with radius) \ |
134 |
+ "${myconf[@]}" \ |
135 |
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ |
136 |
+ --sysconfdir="/etc/nagios" |
137 |
+} |
138 |
+ |
139 |
+pkg_postinst() { |
140 |
+ elog "This ebuild has a number of USE flags that determine what you" |
141 |
+ elog "are able to monitor. Depending on what you want to monitor, some" |
142 |
+ elog "or all of these USE flags need to be set." |
143 |
+ elog |
144 |
+ elog "The plugins are installed in ${ROOT}/usr/$(get_libdir)/nagios/plugins" |
145 |
+} |