diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-29 11:22:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-29 11:22:34 +0000 |
commit | bd7908c6630f38067350d396ac5d18c3cc2434a0 (patch) | |
tree | 3559b3e11424f5529527f2474d8a977a91ee3389 /net-analyzer/monitoring-plugins | |
parent | 8b2628ad8526c806375e7b157889e4274b70248b (diff) |
gentoo resync : 29.10.2017
Diffstat (limited to 'net-analyzer/monitoring-plugins')
3 files changed, 208 insertions, 0 deletions
diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest index a4bebc0963d7..c2d42024ff99 100644 --- a/net-analyzer/monitoring-plugins/Manifest +++ b/net-analyzer/monitoring-plugins/Manifest @@ -1,6 +1,8 @@ +AUX define-own-mysql-port-constant.patch 3296 SHA256 1fbc168247ccd2664063ecda4d57ce5fe5e21d027fefd4b95857aab945453abb SHA512 3ead6340800ac15fbe76e223599a5b3dbc6b6b13b72b684919aa43487838564ad7117b4e67fa7f36f0f58554fd8b8d6233efbcb82e6927a0c31f22c6a9ab5dbb WHIRLPOOL edf49532bbdd8583723721a1055d008f44102391f9bf5d653ce1b6efc6aec3fb807fc06cb5b87523709c2e20851e89ebad1d2b8080f74b11b7993af1fc3085a5 DIST monitoring-plugins-2.1.2.tar.gz 2613060 SHA256 76c6b58f0867ab7b6c8c86c7e94fcce7183618f6daab63488990d0355f5600aa SHA512 845eb7636691aa5402119384c3d4256969e959fbc29ef5257c24fc4c21536cad3dade30747f36c9ad998cb37df0f325df66ea679d3d5b96c2993b59a9a325fed WHIRLPOOL aea22e1a3d3c7622b4645118cf8b5d499882bd30b6af8bdd81287fb99fe42bff7f906b54fda411ac2c33ff6e42872a6ea6af4dcd7611bdc95d308c0fcd954e43 DIST monitoring-plugins-2.2.tar.gz 2461548 SHA256 296a538f00a9cbef7f528ff2d43af357a44b384dc98a32389a675b62a6dd3665 SHA512 5f8cfa132891d6d96e69bee3f2c26f7d4546f572be6a18f25ea5d9069f162cb2e424361289a5c26bec60d7b63d28a269437fd6f25645903a1c142fdcbbf77f27 WHIRLPOOL 5ca16cbc63cbbe3472f82b87b2c4111df4877bc33b0a9bf638507aaf8020194adc6e8244c5a002ae636121ae58d7a112cb2c5cba6e384c136e5636bbfc4a6141 EBUILD monitoring-plugins-2.1.2.ebuild 2858 SHA256 64a1c31aa98c89bce7e97adc9ebc4d1880caa4bf5ea4d4ba8718857ea71e3a05 SHA512 9426fdb164c60771cc3dddc6cff2e526ae7770400378b74dde706a2cfce7dba51aecddfb7c7a532e6bc07078d05cf28d64ddddc3e4eefeb4ec2bb70f44151f7a WHIRLPOOL 53739d5dc73981a520bae34597014c2bcd3fb916356ab11fdc57fa8618141ce34e2b9dfad64976f607b6a567729654f3c4d0897046e200643a0f6a65c1b2314e +EBUILD monitoring-plugins-2.2-r2.ebuild 3014 SHA256 5d78f8fdb076820d2334f7405cce0eb64b4a1486c6498b7102347abae61eec50 SHA512 116db40f08b66e142691fd1dafda2c53e5ff8d069617d6778f98ac0aa25b514f6a4a10da8a51a1241921ac7ca43a0c5c6e6df191771cf0a8250874228cd066da WHIRLPOOL 052a29348d950a537c9e370de12c5d6cbe8f14cec76388167b100ee78e713b2d3afdf1cb8c0759cef84a0da63ec33faf96e18314d536f4aa5f6778213fae92a2 EBUILD monitoring-plugins-2.2.ebuild 2875 SHA256 74d2d84ae9d9620a65801f706f7fe3e0d6846cdad46e381ea773107c3f43737d SHA512 67a2e298d56b06cfa7ef0f718889c4e300cccd668e7335f6574e36b929dbf349473ce4c4541a083a703440e8d61abea0551e2e245bfec4dbf95cd174e72114d5 WHIRLPOOL 30bcf8f9576d35670441d005ba6f5089600d7625010db48f2de26180155c72221783099320c225700242057ff145d4c504ca4e753bb7c549789cec53b75f8287 MISC ChangeLog 4406 SHA256 0763915a056d3bf9a24757a76b6a36ea9d7ad01e90363cd7129700006ff255cd SHA512 c66af4340242619c68762cd664eea7a81518bbd873747f0d22c5ff902be298e265ee468df03e58ebb7a0142fb2fee9306fc66906c38096845f11188e89ddc464 WHIRLPOOL 9731fa3642854f51a2ca6499a0bfb30e3fdb4574dd34677701a5cc0f2707a8b9836b23abb0d858f532373268c02921ab0cf422154a5571e19489a70d9e84f1a4 MISC ChangeLog-2015 589 SHA256 f642f2d89f87baaddd8fbdbb798a9e9603a81c39da412d4832668a25ce505ee4 SHA512 dff7df956fa977e38f4b7094d2edd78ca1aaa34b3c8a78620c7d265d8935cb3bf69a1f8446c391b6abb78ee2a82250e47278cc7b5b466c6485c07b8c2b403416 WHIRLPOOL f026417f1ee1dace25a47d2ff59c4dac96abb01ba506c38f69dfae001755589e0ce67fb44e994ac645081e8c12ae12d4efe6bd0b04f2411ad844d87e1bff2bcb diff --git a/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch new file mode 100644 index 000000000000..b7406bc9af80 --- /dev/null +++ b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch @@ -0,0 +1,102 @@ +From d6bd787123aa9ccd96edec8286ec22dd0442c620 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Fri, 27 Oct 2017 07:58:43 -0400 +Subject: [PATCH 1/3] plugins/check_mysql*.c: define our own default MySQL + port. + +The MYSQL_PORT constant used to be defined in mysql.h, and was used as +the default port in the two plugins check_mysql and check_mysql_query. +Now that mysql.h no longer defines that constant, our plugins fail to +build against newer versions of MySQL and MariaDB. + +Since MYSQL_PORT used the "default port" on the local system, it +actually was not the best choice as the default for the check plugins: +when monitoring remote MySQL servers, the usual default of 3306 is +more likely to be correct than whatever the local server happens to be +listening on. + +As a result, we fix the issue by defining our own constant, called +CHECK_PORT_DEFAULT, as "3306" at the top of both check_mysql.c and +check_mysql_query.c. The existing uses of MYSQL_PORT have been changed +to use the new CHECK_PORT_DEFAULT. + +This change is backwards-incompatible: any users who compiled in a +MYSQL_PORT other than 3306 and who were running their checks on the +same server as the database will now need to specify that port +explicitly. + +Closes: https://github.com/monitoring-plugins/monitoring-plugins/issues/1508 +--- + plugins/check_mysql.c | 8 ++++++-- + plugins/check_mysql_query.c | 8 ++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c +index 5773afd9..c44919d0 100644 +--- a/plugins/check_mysql.c ++++ b/plugins/check_mysql.c +@@ -36,6 +36,10 @@ const char *email = "devel@monitoring-plugins.org"; + + #define SLAVERESULTSIZE 70 + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -58,7 +62,7 @@ char *ciphers = NULL; + bool ssl = false; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + int check_slave = 0, warn_sec = 0, crit_sec = 0; + int ignore_auth = 0; + int verbose = 0; +@@ -505,7 +509,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c +index 49a14dd3..6f492442 100644 +--- a/plugins/check_mysql_query.c ++++ b/plugins/check_mysql_query.c +@@ -33,6 +33,10 @@ const char *progname = "check_mysql_query"; + const char *copyright = "1999-2007"; + const char *email = "devel@monitoring-plugins.org"; + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -48,7 +52,7 @@ char *db_pass = NULL; + char *db = NULL; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + + int process_arguments (int, char **); + int validate_arguments (void); +@@ -299,7 +303,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +-- +2.13.6 + diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild new file mode 100644 index 000000000000..76e7997e8b71 --- /dev/null +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic multilib user + +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu" +HOMEPAGE="https://www.monitoring-plugins.org/" +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86" +IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + gnutls? ( net-libs/gnutls ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + dns? ( net-dns/bind-tools ) + game? ( games-util/qstat ) + fping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/nagios-plugins" + +# At least one test is interactive. +RESTRICT="test" + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_configure() { + append-flags -fno-strict-aliasing + + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with !gnutls openssl /usr) + $(use_with gnutls gnutls /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \ + NEWS README REQUIREMENTS SUPPORT THANKS ) + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins" +} |