[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-plugins/files/, net-analyzer/nagios-plugins/
commit: 8c3cd19023d036f0a77c98de68304071e035 Author: Michael Orlitzky gentoo org> AuthorDate: Sun Feb 18 22:46:43 2024 + Commit: Michael Orlitzky gentoo org> CommitDate: Sun Feb 18 22:49:46 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c3cd190 net-analyzer/nagios-plugins: drop 2.4.0-r3, 2.4.2-r3 Signed-off-by: Michael Orlitzky gentoo.org> net-analyzer/nagios-plugins/Manifest | 2 - .../files/define-own-mysql-port-constant.patch | 100 -- .../nagios-plugins/nagios-plugins-2.4.0-r3.ebuild | 115 - .../nagios-plugins/nagios-plugins-2.4.2-r3.ebuild | 111 4 files changed, 328 deletions(-) diff --git a/net-analyzer/nagios-plugins/Manifest b/net-analyzer/nagios-plugins/Manifest index 0bcd88f5261f..1b065025a063 100644 --- a/net-analyzer/nagios-plugins/Manifest +++ b/net-analyzer/nagios-plugins/Manifest @@ -1,3 +1 @@ -DIST nagios-plugins-2.4.0.tar.gz 2738643 BLAKE2B 695c3804aec592dad0ae1f2f19222a5ae066944de4169beba08dd1e7beee51c5082679dfc1cf5adc052758e3142f33187ebde9636af19ae313f1448867764878 SHA512 f6f4cd604d28161f36c1429dbfa8f07e9fa468d8d8c21925d53d7049f0765504cb785e1f1189a0c93aa1f0cd1fe3985409c420b7724aa39790836af5c3f725ff -DIST nagios-plugins-2.4.2.tar.gz 2740092 BLAKE2B 73101f0d439a10bbc0e5d576fe1cf60f115eead00e4611e2f820ebde86390daf1904a45603389a6ad0a9fdb0f14fb49b429ad571159f605df5490f9798fc18d1 SHA512 43448483301c8f5fb9be9b496514a9e15199c320b2a320bb93c4fc6f6fcd35f2a469f980916b37b2b7e565edcb14eea1692f290b0a7bca9364e298eb42af63ce DIST nagios-plugins-2.4.6.tar.gz 2751770 BLAKE2B a85da8eaa8d926e2ccae3451d9faa680b75ebd736ba1306c69e7d3b2b8749787743dd6e26013d3a72fba12ef49fdf635c60052791fab558eb49c379bdbb6bac7 SHA512 f2a12a5b6a70849d7233debd1ca95667df981d3627287e3b8813d8fd709c4f4a26cf2128851837f33e0df3132132a4f891edef90e220bc16b1a6351d514faa43 diff --git a/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch deleted file mode 100644 index 67bc65cad880.. --- a/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 43ff2e8607c0b7095c2a4dcab6e466bc67e2e2ff Mon Sep 17 00:00:00 2001 -From: Michael Orlitzky -Date: Thu, 26 Oct 2017 15:01:17 -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/nagios-plugins/nagios-plugins/issues/288 - plugins/check_mysql.c | 7 +-- - plugins/check_mysql_query.c | 7 +-- - 2 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c -index 83f89c85..c0b61292 100644 a/plugins/check_mysql.c -+++ b/plugins/check_mysql.c -@@ -36,6 +36,9 @@ const char *email = "de...@nagios-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 +61,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 +508,7 @@ void - print_help (void) - { - char *myport; -- xasprintf (, "%d", MYSQL_PORT); -+ xasprintf (, "%d", CHECK_PORT_DEFAULT); - - print_revision (progname, NP_VERSION); - -diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c -index 436e0685..e9c3acfb 100644 a/plugins/check_mysql_query.c -+++ b/plugins/check_mysql_query.c -@@ -33,6 +33,9 @@ const char *progname = "check_mysql_query"; - const char *copyright = "1999-2014"; - const char *email = "de...@nagios-plugins.org"; - -+/* The default port that MySQL servers listen on.
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-plugins/files/
commit: 119aa04460479ae3acfedc593fd7e4e06115ddf0 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Thu Sep 1 15:56:02 2022 + Commit: Michael Orlitzky gentoo org> CommitDate: Fri Sep 2 11:30:49 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=119aa044 net-analyzer/nagios-plugins: remove unused patch Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Michael Orlitzky gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/27105 .../files/check_smtp-implicit-tls.patch| 145 - 1 file changed, 145 deletions(-) diff --git a/net-analyzer/nagios-plugins/files/check_smtp-implicit-tls.patch b/net-analyzer/nagios-plugins/files/check_smtp-implicit-tls.patch deleted file mode 100644 index a0f30d2efdbf.. --- a/net-analyzer/nagios-plugins/files/check_smtp-implicit-tls.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 0a8cf08ebb0740aa55d6c60d3b79fcab282604fb Mon Sep 17 00:00:00 2001 -From: Franz Schwartau -Date: Tue, 1 Sep 2020 12:48:51 +0200 -Subject: [PATCH 1/3] Add support for SMTP over TLS - -This is commonly used on smtps (465) port. - -PROXY protocol is not implemented with TLS in check_smtp.c, yet. - plugins/check_smtp.c | 45 - 1 file changed, 37 insertions(+), 8 deletions(-) - -diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c -index 0b1c54d4..d5923a6a 100644 a/plugins/check_smtp.c -+++ b/plugins/check_smtp.c -@@ -42,8 +42,8 @@ const char *email = "de...@nagios-plugins.org"; - #ifdef HAVE_SSL - int check_cert = FALSE; - int days_till_exp_warn, days_till_exp_crit; --# define my_recv(buf, len) ((use_ssl && ssl_established) ? np_net_ssl_read(buf, len) : read(sd, buf, len)) --# define my_send(buf, len) ((use_ssl && ssl_established) ? np_net_ssl_write(buf, len) : send(sd, buf, len, 0)) -+# define my_recv(buf, len) (((use_starttls || use_ssl) && ssl_established) ? np_net_ssl_read(buf, len) : read(sd, buf, len)) -+# define my_send(buf, len) (((use_starttls || use_ssl) && ssl_established) ? np_net_ssl_write(buf, len) : send(sd, buf, len, 0)) - #else /* ifndef HAVE_SSL */ - # define my_recv(buf, len) read(sd, buf, len) - # define my_send(buf, len) send(sd, buf, len, 0) -@@ -107,6 +107,7 @@ double critical_time = 0; - int check_critical_time = FALSE; - int verbose = 0; - int use_ssl = FALSE; -+int use_starttls = FALSE; - int use_sni = FALSE; - short use_proxy_prefix = FALSE; - short use_ehlo = FALSE; -@@ -199,12 +200,25 @@ main (int argc, char **argv) - result = my_tcp_connect (server_address, server_port, ); - - if (result == STATE_OK) { /* we connected */ -+#ifdef HAVE_SSL -+ if (use_ssl) { -+ result = np_net_ssl_init_with_hostname(sd, (use_sni ? server_address : NULL)); -+ if (result != STATE_OK) { -+ printf (_("CRITICAL - Cannot create SSL context.\n")); -+ close(sd); -+ np_net_ssl_cleanup(); -+ return STATE_CRITICAL; -+ } else { -+ ssl_established = 1; -+ } -+ } -+#endif - - /* If requested, send PROXY header */ - if (use_proxy_prefix) { - if (verbose) - printf ("Sending header %s\n", PROXY_PREFIX); -- send(sd, PROXY_PREFIX, strlen(PROXY_PREFIX), 0); -+ my_send(PROXY_PREFIX, strlen(PROXY_PREFIX)); - } - - /* watch for the SMTP connection string and */ -@@ -230,7 +244,7 @@ main (int argc, char **argv) - } - - /* send the HELO/EHLO command */ -- send(sd, helocmd, strlen(helocmd), 0); -+ my_send(helocmd, strlen(helocmd)); - - /* allow for response to helo command to reach us */ - if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { -@@ -243,14 +257,14 @@ main (int argc, char **argv) - } - } - -- if(use_ssl && ! supports_tls){ -+ if(use_starttls && ! supports_tls){ - printf(_("WARNING - TLS not supported by server\n")); - smtp_quit(); - return STATE_WARNING; - } - - #ifdef HAVE_SSL -- if(use_ssl) { -+ if(use_starttls) { - /* send the STARTTLS command */ - send(sd, SMTP_STARTTLS, strlen(SMTP_STARTTLS), 0); - -@@ -495,6 +509,7 @@ process_arguments (int argc, char **argv) - {"use-ipv6", no_argument, 0, '6'}, - {"help", no_argument, 0, 'h'}, - {"lmtp", no_argument, 0, 'L'}, -+ {"ssl", no_argument, 0, 's'}, - {"starttls",no_argument,0,'S'}, - {"sni", no_argument,
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-plugins/files/, net-analyzer/nagios-plugins/
commit: 20d288e5098552ca42a508f998eed6f2e5229e87 Author: Michael Orlitzky gentoo org> AuthorDate: Fri Oct 27 12:37:56 2017 + Commit: Michael Orlitzky gentoo org> CommitDate: Fri Oct 27 12:37:56 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20d288e5 net-analyzer/nagios-plugins: new revision to fix build failure with MariaDB. The latest -r2 adds a patch (which I've sent upstream) to fix a build failure against newer versions of MariaDB. Bug: https://bugs.gentoo.org/633548 Bug: https://bugs.gentoo.org/635106 Package-Manager: Portage-2.3.8, Repoman-2.3.3 .../files/define-own-mysql-port-constant.patch | 100 + 1-r1.ebuild => nagios-plugins-2.2.1-r2.ebuild} | 2 + 2 files changed, 102 insertions(+) diff --git a/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch new file mode 100644 index 000..67bc65cad88 --- /dev/null +++ b/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch @@ -0,0 +1,100 @@ +From 43ff2e8607c0b7095c2a4dcab6e466bc67e2e2ff Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky+Date: Thu, 26 Oct 2017 15:01:17 -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/nagios-plugins/nagios-plugins/issues/288 +--- + plugins/check_mysql.c | 7 +-- + plugins/check_mysql_query.c | 7 +-- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c +index 83f89c85..c0b61292 100644 +--- a/plugins/check_mysql.c b/plugins/check_mysql.c +@@ -36,6 +36,9 @@ const char *email = "de...@nagios-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 +61,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 +508,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (, "%d", MYSQL_PORT); ++ xasprintf (, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c +index 436e0685..e9c3acfb 100644 +--- a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c +@@ -33,6 +33,9 @@ const char *progname = "check_mysql_query"; + const char *copyright = "1999-2014"; + const char *email = "de...@nagios-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 +51,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); +@@ -300,7 +303,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (, "%d", MYSQL_PORT); ++ xasprintf (, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +-- +2.13.6 + diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r1.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r2.ebuild similarity index 97% rename from net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r1.ebuild rename to net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r2.ebuild index c86bad6d681..7cdc0f87996 100644 --- a/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r1.ebuild +++ b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r2.ebuild @@ -63,6 +63,8 @@ DOCS=( THANKS )