[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2024-04-01 Thread Michael Orlitzky
commit: 9c5839b123bc6d8ddb7d5aea92c257449a63e54b
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Mon Apr  1 16:45:39 2024 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon Apr  1 16:45:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c5839b1

net-analyzer/nagios-core: fix build (testfail) on musl

Upstream patch replaces uint by unsigned int.

Closes: https://bugs.gentoo.org/928032
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../nagios-core/files/nagios-core-4.5.1-musl.patch | 98 ++
 net-analyzer/nagios-core/nagios-core-4.5.1.ebuild  |  2 +
 2 files changed, 100 insertions(+)

diff --git a/net-analyzer/nagios-core/files/nagios-core-4.5.1-musl.patch 
b/net-analyzer/nagios-core/files/nagios-core-4.5.1-musl.patch
new file mode 100644
index ..eda71db9bcd4
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-core-4.5.1-musl.patch
@@ -0,0 +1,98 @@
+From 19602faf7111203b748a4dc9ccaf3111586a8e96 Mon Sep 17 00:00:00 2001
+From: Sebastian Wolf 
+Date: Fri, 29 Mar 2024 17:01:52 -0400
+Subject: [PATCH 1/2] Fix #952 - s/uint/unsigned int/g
+
+---
+ Changelog |  4 
+ lib/t-utils.c | 10 +-
+ lib/test-dkhash.c |  2 +-
+ 3 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/Changelog b/Changelog
+index ec3cd64fc..fcf4742f2 100644
+--- a/Changelog
 b/Changelog
+@@ -2,6 +2,10 @@
+ Nagios Core 4 Change Log
+ 
+ 
++4.5.2 - 2024-04-30
++--
++* Fix build when compiling against musl libc (#952) (Sebastian Wolf)
++
+ 4.5.1 - 2024-02-28
+ ---
+ * Fix text rendering in Configuration -> Command Expansion when the command 
ends in whitespace (Thanks Joran LEREEC for reporting this issue) (Dylan 
Anderson)
+diff --git a/lib/t-utils.c b/lib/t-utils.c
+index badab7c03..123f114c8 100644
+--- a/lib/t-utils.c
 b/lib/t-utils.c
+@@ -1,8 +1,8 @@
+ #include "t-utils.h"
+ 
+ const char *cyan = "", *red = "", *green = "", *yellow = "", *reset = "";
+-uint passed, failed, t_verbose = 0;
+-static uint t_depth;
++unsigned int passed, failed, t_verbose = 0;
++static unsigned int t_depth;
+ static const char *indent_str = "  ";
+ 
+ /* can't be used when a or b has side-effects, but we don't care here */
+@@ -27,9 +27,9 @@ void t_set_colors(int force)
+   }
+ }
+ 
+-static void t_indent(uint depth)
++static void t_indent(unsigned int depth)
+ {
+-  uint i;
++  unsigned int i;
+   for (i = 0; i < depth; i++) {
+   printf("%s", indent_str);
+   }
+@@ -136,7 +136,7 @@ int ok_int(int a, int b, const char *name)
+   return TEST_FAIL;
+ }
+ 
+-int ok_uint(uint a, uint b, const char *name)
++int ok_unsigned int(unsigned int a, unsigned int b, const char *name)
+ {
+   if (a == b) {
+   t_pass("%s", name);
+diff --git a/lib/test-dkhash.c b/lib/test-dkhash.c
+index 6db1d7a92..15c2b676c 100644
+--- a/lib/test-dkhash.c
 b/lib/test-dkhash.c
+@@ -68,7 +68,7 @@ static struct test_data *ddup(int x, int i, int j)
+ }
+ 
+ struct dkhash_check {
+-  uint entries, count, max, added, removed;
++  unsigned int entries, count, max, added, removed;
+   int ent_delta, addrm_delta;
+ };
+ 
+
+From c4f56318e6ecfab85d592ea302d747c80be5f557 Mon Sep 17 00:00:00 2001
+From: Sebastian Wolf 
+Date: Fri, 29 Mar 2024 17:04:29 -0400
+Subject: [PATCH 2/2] derp
+
+---
+ lib/t-utils.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/t-utils.c b/lib/t-utils.c
+index 123f114c8..24098655f 100644
+--- a/lib/t-utils.c
 b/lib/t-utils.c
+@@ -136,7 +136,7 @@ int ok_int(int a, int b, const char *name)
+   return TEST_FAIL;
+ }
+ 
+-int ok_unsigned int(unsigned int a, unsigned int b, const char *name)
++int ok_uint(unsigned int a, unsigned int b, const char *name)
+ {
+   if (a == b) {
+   t_pass("%s", name);

diff --git a/net-analyzer/nagios-core/nagios-core-4.5.1.ebuild 
b/net-analyzer/nagios-core/nagios-core-4.5.1.ebuild
index 8e54a1b53013..968007cec951 100644
--- a/net-analyzer/nagios-core/nagios-core-4.5.1.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.5.1.ebuild
@@ -90,6 +90,8 @@ RDEPEND="${CONFIGURE_DEPEND}
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=( "${FILESDIR}/${P}-musl.patch" )
+
 src_configure() {
local myconf
 



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2022-11-08 Thread Michael Orlitzky
commit: 9b5f44ca83e451a48770f526097f201974db3c2c
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Tue Nov  8 06:23:01 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Nov  8 13:19:47 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b5f44ca

net-analyzer/nagios-core: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/28189
Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../files/nagios-core-4.4.7-upgrade-sslfix.patch   | 120 -
 1 file changed, 120 deletions(-)

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch 
b/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch
deleted file mode 100644
index c89f096caaa5..
--- a/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 5fd2e1541a873e87f689de601beb3bc35910740d Mon Sep 17 00:00:00 2001
-From: Doug Nazar 
-Date: Wed, 22 Jun 2022 15:07:03 -0400
-Subject: [PATCH 1/2] Fix SSL handling during upgrade check
-
-Only update counters if we've received data, not on error (-1) since
-we can then overwrite the stack, causing fault.
-
-my_ssl_connect() can return before initializing ssl & ctx. Ensure NULL
-initialization so *_free() are no-ops.
-
-Cleanly shutdown the channel after receiving all data.
-
-Use the client version of the TLS method to match the other options.

- base/netutils.c | 22 --
- base/utils.c|  4 ++--
- 2 files changed, 14 insertions(+), 12 deletions(-)
-
-diff --git a/base/netutils.c b/base/netutils.c
-index 08ee40dd7..689b56f9b 100644
 a/base/netutils.c
-+++ b/base/netutils.c
-@@ -154,7 +154,7 @@ int my_ssl_connect(const char *host_name, int port, int 
*sd, SSL **ssl, SSL_CTX
- 
- #if OPENSSL_VERSION_NUMBER >= 0x1010
- 
--  method = TLS_method();
-+  method = TLS_client_method();
- 
- #else /* OPENSSL_VERSION_NUMBER >= 0x1010 */
- 
-@@ -268,11 +268,11 @@ int my_ssl_sendall(int s, SSL *ssl, const char *buf, int 
*len, int timeout) {
-   /* If we hit one of these two errors, we just 
want to select() the socket again */
-   break;
-   }
-+  } else {
-+  total_sent += n;
-+  bytes_left -= n;
-   }
- 
--  total_sent += n;
--  bytes_left -= n;
--
-   /* make sure we haven't overrun the timeout */
-   time(_time);
-   if(current_time - start_time > timeout) {
-@@ -337,17 +337,19 @@ int my_ssl_recvall(int s, SSL *ssl, char *buf, int *len, 
int timeout) {
-   n = SSL_read(ssl, buf + total_received, bytes_left);
-   if(n <= 0) {
-   int error = SSL_get_error(ssl, n);
-+  /* If we hit one of these two errors, we just want to 
select() the socket again */
-   if (error != SSL_ERROR_WANT_READ && error != 
SSL_ERROR_WANT_WRITE) {
--  /* An actual error happened */
--  /* If we hit one of these two errors, we just 
want to select() the socket again */
-+  /* EOF or an actual error happened */
-+  if (error == SSL_ERROR_ZERO_RETURN)
-+  SSL_shutdown(ssl);
-   break;
-   }
-+  } else {
-+  /* apply bytes we received */
-+  total_received += n;
-+  bytes_left -= n;
-   }
- 
--  /* apply bytes we received */
--  total_received += n;
--  bytes_left -= n;
--
-   /* make sure we haven't overrun the timeout */
-   time(_time);
-   if(current_time - start_time > timeout) {
-diff --git a/base/utils.c b/base/utils.c
-index 79c6efba6..e83f7176a 100644
 a/base/utils.c
-+++ b/base/utils.c
-@@ -3379,8 +3379,8 @@ int query_update_api(void) {
-   }
- 
- #ifdef HAVE_SSL
--  SSL *ssl;
--  SSL_CTX *ctx;
-+  SSL *ssl = NULL;
-+  SSL_CTX *ctx = NULL;
- 
-   int result = my_ssl_connect(api_server, 443, , , , 2);
-   if(sd > 0 && result != ERROR) {
-
-From a2c1415f14db6bbce9ba3d1d5a0c8218dd8c4fb8 Mon Sep 17 00:00:00 2001
-From: Doug Nazar 
-Date: Wed, 22 Jun 2022 15:14:34 -0400
-Subject: [PATCH 2/2] Silence warning about port_str not large enough for port.
-

- base/netutils.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/base/netutils.c b/base/netutils.c
-index 689b56f9b..1fb1ec6a9 100644
 a/base/netutils.c
-+++ b/base/netutils.c
-@@ -46,7 +46,7 @@ int my_ssl_connect(const char *host_name, int port, int *sd, 
SSL **ssl, SSL_CTX
-   hints.ai_socktype = SOCK_STREAM;

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2022-09-20 Thread Michael Orlitzky
commit: f8955fe8fef3c48bed495ea27ff238febbb8dccb
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Sep 20 12:05:58 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Sep 20 12:16:20 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8955fe8

net-analyzer/nagios-core: new revision fixing some SSL issues.

This patch has been accepted upstream already and looks like it might
have some security implications (in addition to fixing an ugly crash),
so better safe than sorry. Thanks to Sylvain CANOINE for pointing it
out.

Closes: https://bugs.gentoo.org/871939
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../files/nagios-core-4.4.7-upgrade-sslfix.patch   | 120 +
 .../nagios-core/nagios-core-4.4.7-r1.ebuild| 268 +
 2 files changed, 388 insertions(+)

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch 
b/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch
new file mode 100644
index ..c89f096caaa5
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-core-4.4.7-upgrade-sslfix.patch
@@ -0,0 +1,120 @@
+From 5fd2e1541a873e87f689de601beb3bc35910740d Mon Sep 17 00:00:00 2001
+From: Doug Nazar 
+Date: Wed, 22 Jun 2022 15:07:03 -0400
+Subject: [PATCH 1/2] Fix SSL handling during upgrade check
+
+Only update counters if we've received data, not on error (-1) since
+we can then overwrite the stack, causing fault.
+
+my_ssl_connect() can return before initializing ssl & ctx. Ensure NULL
+initialization so *_free() are no-ops.
+
+Cleanly shutdown the channel after receiving all data.
+
+Use the client version of the TLS method to match the other options.
+---
+ base/netutils.c | 22 --
+ base/utils.c|  4 ++--
+ 2 files changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/base/netutils.c b/base/netutils.c
+index 08ee40dd7..689b56f9b 100644
+--- a/base/netutils.c
 b/base/netutils.c
+@@ -154,7 +154,7 @@ int my_ssl_connect(const char *host_name, int port, int 
*sd, SSL **ssl, SSL_CTX
+ 
+ #if OPENSSL_VERSION_NUMBER >= 0x1010
+ 
+-  method = TLS_method();
++  method = TLS_client_method();
+ 
+ #else /* OPENSSL_VERSION_NUMBER >= 0x1010 */
+ 
+@@ -268,11 +268,11 @@ int my_ssl_sendall(int s, SSL *ssl, const char *buf, int 
*len, int timeout) {
+   /* If we hit one of these two errors, we just 
want to select() the socket again */
+   break;
+   }
++  } else {
++  total_sent += n;
++  bytes_left -= n;
+   }
+ 
+-  total_sent += n;
+-  bytes_left -= n;
+-
+   /* make sure we haven't overrun the timeout */
+   time(_time);
+   if(current_time - start_time > timeout) {
+@@ -337,17 +337,19 @@ int my_ssl_recvall(int s, SSL *ssl, char *buf, int *len, 
int timeout) {
+   n = SSL_read(ssl, buf + total_received, bytes_left);
+   if(n <= 0) {
+   int error = SSL_get_error(ssl, n);
++  /* If we hit one of these two errors, we just want to 
select() the socket again */
+   if (error != SSL_ERROR_WANT_READ && error != 
SSL_ERROR_WANT_WRITE) {
+-  /* An actual error happened */
+-  /* If we hit one of these two errors, we just 
want to select() the socket again */
++  /* EOF or an actual error happened */
++  if (error == SSL_ERROR_ZERO_RETURN)
++  SSL_shutdown(ssl);
+   break;
+   }
++  } else {
++  /* apply bytes we received */
++  total_received += n;
++  bytes_left -= n;
+   }
+ 
+-  /* apply bytes we received */
+-  total_received += n;
+-  bytes_left -= n;
+-
+   /* make sure we haven't overrun the timeout */
+   time(_time);
+   if(current_time - start_time > timeout) {
+diff --git a/base/utils.c b/base/utils.c
+index 79c6efba6..e83f7176a 100644
+--- a/base/utils.c
 b/base/utils.c
+@@ -3379,8 +3379,8 @@ int query_update_api(void) {
+   }
+ 
+ #ifdef HAVE_SSL
+-  SSL *ssl;
+-  SSL_CTX *ctx;
++  SSL *ssl = NULL;
++  SSL_CTX *ctx = NULL;
+ 
+   int result = my_ssl_connect(api_server, 443, , , , 2);
+   if(sd > 0 && result != ERROR) {
+
+From a2c1415f14db6bbce9ba3d1d5a0c8218dd8c4fb8 Mon Sep 17 00:00:00 2001
+From: Doug Nazar 
+Date: Wed, 22 Jun 2022 15:14:34 -0400
+Subject: [PATCH 2/2] Silence warning about port_str not large enough for port.
+
+---
+ base/netutils.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/base/netutils.c b/base/netutils.c

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2020-06-09 Thread Michael Orlitzky
commit: abbb570371d5e4d3ef38daee46aff329cd863920
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Tue Jun  9 18:28:37 2020 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Jun  9 19:22:59 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abbb5703

net-analyzer/nagios-core: remove unused files

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Michael Mair-Keimberger  gmail.com>
Signed-off-by: Michael Orlitzky  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/16147

 net-analyzer/nagios-core/files/99_nagios4.conf   | 16 
 net-analyzer/nagios-core/files/lighttpd_nagios4.conf | 15 ---
 2 files changed, 31 deletions(-)

diff --git a/net-analyzer/nagios-core/files/99_nagios4.conf 
b/net-analyzer/nagios-core/files/99_nagios4.conf
deleted file mode 100644
index b04c2980eba..000
--- a/net-analyzer/nagios-core/files/99_nagios4.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-  ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
-  
-AllowOverride AuthConfig
-Options ExecCGI
-Require all granted
-  
-
-  Alias /nagios /usr/share/nagios/htdocs
-  
-AllowOverride AuthConfig
-Require all granted
-  
-
-

diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios4.conf 
b/net-analyzer/nagios-core/files/lighttpd_nagios4.conf
deleted file mode 100644
index a073f177f23..000
--- a/net-analyzer/nagios-core/files/lighttpd_nagios4.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-server.modules += ("mod_cgi")
-server.modules += ("mod_alias")
-
-$HTTP["url"] =~ "^/nagios/cgi-bin/" {
-  dir-listing.activate = "disable"
-  cgi.assign = (
-".pl"  => "/usr/bin/perl",
-".cgi" => ""
-  )
-}
-
-alias.url += (
-  "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
-  "/nagios" => "/usr/share/nagios/htdocs"
-)



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2019-11-14 Thread Michael Orlitzky
commit: 9211c22e7c5016ba72d98d115c2a8071e4a89534
Author: Tomas Mozes  gmail  com>
AuthorDate: Thu Nov 14 06:56:40 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Thu Nov 14 12:52:27 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9211c22e

net-analyzer/nagios-core: fix cgi-bin path for apache

Bug: https://bugs.gentoo.org/699002
Package-Manager: Portage-2.3.79, Repoman-2.3.17
Signed-off-by: Tomáš Mózes  gmail.com>
Signed-off-by: Michael Orlitzky  gentoo.org>

 net-analyzer/nagios-core/files/99_nagios4-r1.conf   | 2 +-
 .../{nagios-core-4.4.5-r4.ebuild => nagios-core-4.4.5-r5.ebuild}| 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net-analyzer/nagios-core/files/99_nagios4-r1.conf 
b/net-analyzer/nagios-core/files/99_nagios4-r1.conf
index 54531ed6275..8d080d5c17b 100644
--- a/net-analyzer/nagios-core/files/99_nagios4-r1.conf
+++ b/net-analyzer/nagios-core/files/99_nagios4-r1.conf
@@ -1,6 +1,6 @@
 
 
-  ScriptAlias /nagios/cgi-bin/ @CGIBINDIR@
+  ScriptAlias /nagios/cgi-bin @CGIBINDIR@
   
 AllowOverride AuthConfig
 Options ExecCGI

diff --git a/net-analyzer/nagios-core/nagios-core-4.4.5-r4.ebuild 
b/net-analyzer/nagios-core/nagios-core-4.4.5-r5.ebuild
similarity index 97%
rename from net-analyzer/nagios-core/nagios-core-4.4.5-r4.ebuild
rename to net-analyzer/nagios-core/nagios-core-4.4.5-r5.ebuild
index 4a5ffee95d4..a1922298fa0 100644
--- a/net-analyzer/nagios-core/nagios-core-4.4.5-r4.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.4.5-r5.ebuild
@@ -105,8 +105,8 @@ src_configure() {
# The paths in the web server configuration files need to match
# those passed to econf above.
cp "${FILESDIR}/99_nagios4-r1.conf" \
-  "${FILESDIR}/lighttpd_nagios4-r1.conf" \
-  "${T}/" || die "failed to create copies of web server conf files"
+   "${FILESDIR}/lighttpd_nagios4-r1.conf" \
+   "${T}/" || die "failed to create copies of web server conf 
files"
 
sed -e "s|@CGIBINDIR@|${EPREFIX}/usr/$(get_libdir)/nagios/cgi-bin|g" \
-e "s|@WEBDIR@|${EPREFIX}/usr/share/nagios/htdocs|" \
@@ -189,7 +189,7 @@ src_install() {
if use apache2 ; then
# Install the Nagios configuration file for Apache.
insinto "/etc/apache2/modules.d"
-   doins "${T}/99_nagios4-r1.conf"
+   newins "${T}/99_nagios4-r1.conf" "99_nagios4.conf"
elif use lighttpd ; then
# Install the Nagios configuration file for Lighttpd.
insinto /etc/lighttpd



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2019-08-31 Thread Michael Orlitzky
commit: 390a02aa9cab0a7bdf5a86b0abc48f842d5b5ed3
Author: Tomas Mozes  gmail  com>
AuthorDate: Fri Aug 30 07:19:45 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Aug 31 21:34:54 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=390a02aa

net-analyzer/nagios-core: drop old

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Tomáš Mózes  gmail.com>
Signed-off-by: Michael Orlitzky  gentoo.org>

 net-analyzer/nagios-core/Manifest  |   1 -
 .../nagios-core-4.4.4-no-zombie-processes.patch| 158 ---
 .../nagios-core/nagios-core-4.4.4-r1.ebuild| 215 -
 3 files changed, 374 deletions(-)

diff --git a/net-analyzer/nagios-core/Manifest 
b/net-analyzer/nagios-core/Manifest
index 87e9dd98c4f..c1cd0864f89 100644
--- a/net-analyzer/nagios-core/Manifest
+++ b/net-analyzer/nagios-core/Manifest
@@ -1,4 +1,3 @@
 DIST nagios-4.3.4.tar.gz 11101966 BLAKE2B 
6cb8182f40a4f83875c94df040bb1c62ce078d4130e10fa8595ea0b14cf715fc2a237ffb34199da9c1528e4789f3ce8deae3d993b5b795ad712d48b1e5fdb820
 SHA512 
f4e92aa98151739442a225a245871d93b5560d89510bdacb1a615959b9687f7a92675f10fcba71078b104ca8f237b0155a9261d67ec66f80aec7f033b4b3e316
-DIST nagios-4.4.4.tar.gz 11303598 BLAKE2B 
e4015ca5c0383b0540f2eaf3d608343df850c6045a4539c1f1ab8c19dc95e9223816efe71034b37f6995cb623dc6b83c92e22a677fe687a34d2215b1a2758c90
 SHA512 
c8f2b83bad744d67be4ba8356d9eea0be3efbf42d9a215d64815cdf7d944eba798348ce0faea6cebe64f1c99e0edbf12540d83ca42f8b4b563cbcc60139afdb0
 DIST nagios-4.4.5.tar.gz 11304463 BLAKE2B 
e1152c2cd14aa790fbdb84c0d7b3eb4691b05793640bf2871bc4ab1e2d645bb52bb2d1660b7389fb26d599d015f71820988ed1cd58003ed978dd9df38c357675
 SHA512 
14372e2e4470229bd000a8ad94def6ae504ce3f8e2cf94a9da73736560d1e3b2633302fe232ee7099d88ba00aecde5a9e352901828d6d9a9cd1fdce203deca30
 DIST nagios-core-gentoo-icons-20141125.tar 40960 BLAKE2B 
31c1953e1160c7c7b89606b72b1a80407e4c1b7a7938b40bd1c577cd0c309dd88ca6b775d692a9b846dbf67736537fa9c91e56aa15fdd447769608ca525bff09
 SHA512 
bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch 
b/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch
deleted file mode 100644
index 4592b1d27f4..000
--- a/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-This was an upstream bug that has been reverted for nagios-core-4.4.5:
-
-  https://github.com/NagiosEnterprises/nagioscore/issues/683
-
-Thanks to Tomáš Mózes (hydrapolic) for noticing and reporting the fix.
-
-diff --git a/base/events.c b/base/events.c
-index d601e970f..bb27b3240 100644
 a/base/events.c
-+++ b/base/events.c
-@@ -351,13 +351,12 @@ void init_timing_loop(void) {
-*/
-   check_delay =
-   mult_factor * 
scheduling_info.service_inter_check_delay;
--  time_t check_window = 
reschedule_within_timeperiod(next_valid_time, temp_service->check_period_ptr, 
check_window(temp_service)) - current_time;
--  if(check_delay > check_window) {
-+  if(check_delay > check_window(temp_service)) {
-   log_debug_info(DEBUGL_EVENTS, 0,
-   "  Fixing check time %lu secs 
too far away\n",
--  check_delay - check_window);
-+  check_delay - 
check_window(temp_service));
-   fixed_services++;
--  check_delay = check_window;
-+  check_delay = check_window(temp_service);
-   log_debug_info(DEBUGL_EVENTS, 0, "  New check 
offset: %d\n",
-   check_delay);
-   }
-@@ -370,7 +369,8 @@ void init_timing_loop(void) {
-   if(is_valid_time == ERROR) {
-   log_debug_info(DEBUGL_EVENTS, 2, "Preferred 
Time is Invalid In Timeperiod '%s': %lu --> %s\n", 
temp_service->check_period_ptr->name, (unsigned long)temp_service->next_check, 
ctime(_service->next_check));
-   get_next_valid_time(temp_service->next_check, 
_valid_time, temp_service->check_period_ptr);
--  temp_service->next_check = 
reschedule_within_timeperiod(next_valid_time, temp_service->check_period_ptr, 
check_window(temp_service));
-+  temp_service->next_check = 
-+  (time_t)(next_valid_time + check_delay);
-   }
- 
-   log_debug_info(DEBUGL_EVENTS, 2, "Actual Check Time: 
%lu --> %s\n", (unsigned 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2019-08-19 Thread Michael Orlitzky
commit: c4f4d3abf675460b53e5ebb9a0550a4c9a539771
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Mon Aug 19 23:30:32 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon Aug 19 23:30:56 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4f4d3ab

net-analyzer/nagios-core: new revision fixing zombie process bug.

Bug: https://bugs.gentoo.org/692092
Reported-by: Tomáš Mózes  gmail.com>
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../nagios-core-4.4.4-no-zombie-processes.patch| 158 +
 ...re-4.4.4.ebuild => nagios-core-4.4.4-r1.ebuild} |   2 +
 2 files changed, 160 insertions(+)

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch 
b/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch
new file mode 100644
index 000..4592b1d27f4
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-core-4.4.4-no-zombie-processes.patch
@@ -0,0 +1,158 @@
+This was an upstream bug that has been reverted for nagios-core-4.4.5:
+
+  https://github.com/NagiosEnterprises/nagioscore/issues/683
+
+Thanks to Tomáš Mózes (hydrapolic) for noticing and reporting the fix.
+
+diff --git a/base/events.c b/base/events.c
+index d601e970f..bb27b3240 100644
+--- a/base/events.c
 b/base/events.c
+@@ -351,13 +351,12 @@ void init_timing_loop(void) {
+*/
+   check_delay =
+   mult_factor * 
scheduling_info.service_inter_check_delay;
+-  time_t check_window = 
reschedule_within_timeperiod(next_valid_time, temp_service->check_period_ptr, 
check_window(temp_service)) - current_time;
+-  if(check_delay > check_window) {
++  if(check_delay > check_window(temp_service)) {
+   log_debug_info(DEBUGL_EVENTS, 0,
+   "  Fixing check time %lu secs 
too far away\n",
+-  check_delay - check_window);
++  check_delay - 
check_window(temp_service));
+   fixed_services++;
+-  check_delay = check_window;
++  check_delay = check_window(temp_service);
+   log_debug_info(DEBUGL_EVENTS, 0, "  New check 
offset: %d\n",
+   check_delay);
+   }
+@@ -370,7 +369,8 @@ void init_timing_loop(void) {
+   if(is_valid_time == ERROR) {
+   log_debug_info(DEBUGL_EVENTS, 2, "Preferred 
Time is Invalid In Timeperiod '%s': %lu --> %s\n", 
temp_service->check_period_ptr->name, (unsigned long)temp_service->next_check, 
ctime(_service->next_check));
+   get_next_valid_time(temp_service->next_check, 
_valid_time, temp_service->check_period_ptr);
+-  temp_service->next_check = 
reschedule_within_timeperiod(next_valid_time, temp_service->check_period_ptr, 
check_window(temp_service));
++  temp_service->next_check = 
++  (time_t)(next_valid_time + check_delay);
+   }
+ 
+   log_debug_info(DEBUGL_EVENTS, 2, "Actual Check Time: 
%lu --> %s\n", (unsigned long)temp_service->next_check, 
ctime(_service->next_check));
+@@ -508,7 +508,7 @@ void init_timing_loop(void) {
+   log_debug_info(DEBUGL_EVENTS, 1, "Fixing check time 
(off by %lu)\n",
+   check_delay - check_window(temp_host));
+   fixed_hosts++;
+-  check_delay = 
reschedule_within_timeperiod(next_valid_time, temp_host->check_period_ptr, 
check_window(temp_host));
++  check_delay = ranged_urand(0, check_window(temp_host));
+   }
+   temp_host->next_check = (time_t)(current_time + check_delay);
+ 
+diff --git a/cgi/status.c b/cgi/status.c
+index ae723c683..2f6a60fde 100644
+--- a/cgi/status.c
 b/cgi/status.c
+@@ -221,8 +221,26 @@ int main(void) {
+   document_header(TRUE);
+ 
+   /* if a navbar search was performed, find the host by name, address or 
partial name */
+-  if(navbar_search == TRUE) {
+-  if(host_name != NULL && NULL != strstr(host_name, "*")) {
++  if(navbar_search == TRUE && host_name != NULL) {
++
++  /* Remove trailing spaces from host_name */
++  len = strlen(host_name);
++  for (i = len - 1; i >= 0; i--) {
++  if (!isspace(host_name[i])) {
++  host_name[i+1] = '\0';
++  break;
++  }
++  }
++
++  /* Remove leading 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2019-03-01 Thread Michael Orlitzky
commit: 1f117f5e3fa59fa3bf1589ad23227e7c82d741b5
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat Mar  2 04:32:10 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Mar  2 04:32:10 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f117f5e

net-analyzer/nagios-core: remove a now-unused patch.

Signed-off-by: Michael Orlitzky  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../nagios-core/files/nagios-4.4.3-pre.patch   | 42 --
 1 file changed, 42 deletions(-)

diff --git a/net-analyzer/nagios-core/files/nagios-4.4.3-pre.patch 
b/net-analyzer/nagios-core/files/nagios-4.4.3-pre.patch
deleted file mode 100644
index 3c5eb030547..000
--- a/net-analyzer/nagios-core/files/nagios-4.4.3-pre.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/Changelog b/Changelog
-index c695bd54..4c348894 100644
 a/Changelog
-+++ b/Changelog
-@@ -2,6 +2,11 @@
- Nagios Core 4 Change Log
- 
- 
-+4.4.3 - 2018-XX-XX
-+--
-+FIXES
-+* Fixed services sending recovery emails when they recover if host in down 
state (#572) (Scott Wilkerson)
-+
- 4.4.2 - 2018-08-16
- --
- FIXES
-diff --git a/base/notifications.c b/base/notifications.c
-index d4574c41..58ad140f 100644
 a/base/notifications.c
-+++ b/base/notifications.c
-@@ -591,10 +591,6 @@ int check_service_notification_viability(service *svc, 
int type, int options) {
-   return ERROR;
-   }
- 
--  /* RECOVERY NOTIFICATIONS ARE GOOD TO GO AT THIS POINT */
--  if(svc->current_state == STATE_OK)
--  return OK;
--
-   /* don't notify contacts about this service problem again if the 
notification interval is set to 0 */
-   if(svc->no_more_notifications == TRUE) {
-   log_debug_info(DEBUGL_NOTIFICATIONS, 1, "We shouldn't re-notify 
contacts about this service problem.\n");
-@@ -1501,10 +1497,6 @@ int check_host_notification_viability(host *hst, int 
type, int options) {
-   return ERROR;
-   }
- 
--  /* RECOVERY NOTIFICATIONS ARE GOOD TO GO AT THIS POINT */
--  if(hst->current_state == HOST_UP)
--  return OK;
--
-   /* check if we shouldn't renotify contacts about the host problem */
-   if(hst->no_more_notifications == TRUE) {
-   log_debug_info(DEBUGL_NOTIFICATIONS, 1, "We shouldn't re-notify 
contacts about this host problem.\n");



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2019-03-01 Thread Michael Orlitzky
commit: deb9136abe10a0f6155720db4f4aabb5d1384e5b
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Fri Mar  1 17:55:59 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Mar  2 04:29:53 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=deb9136a

net-analyzer/nagios-core: remove unused patch

Signed-off-by: Michael Mair-Keimberger  gmail.com>
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../nagios-core/files/nagios-4.4.2-pre.patch   | 209 -
 1 file changed, 209 deletions(-)

diff --git a/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch 
b/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch
deleted file mode 100644
index 6483b9df9f2..000
--- a/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-diff --git a/Changelog b/Changelog
-index 1e1bd9e2..8dd26fec 100644
 a/Changelog
-+++ b/Changelog
-@@ -2,6 +2,18 @@
- Nagios Core 4 Change Log
- 
- 
-+4.4.2 - ??
-+--
-+FIXES
-+* Fix comment data being duplicated after a `service nagios reload` or 
similar (Bryan Heden)
-+* Fix check_interval and retry_interval not changing at the appropriate times 
(Scott Wilkerson)
-+* Fixed passive checks sending recovery email when host was previously UP 
(Scott Wilkerson)
-+* Fixed flapping comments duplication on nagios reload (Christian Jung)
-+* Fix for CVE-2018-13441, CVE-2018-13458, CVE-2018-13457 null pointer 
dereference (Trevor McDonald)
-+* Fixed syntax error in file: default-init.in (#558) (Christian Zettel)
-+* Reset current notification number and state flags when the host recovers, 
reset all service variables when they recover fixes (#557) (Scott Wilkerson)
-+* Fixed wrong counting of service status totals when showing servicegroup 
details (#548) (Christian Zettel, Bryan Heden)
-+
- 4.4.1 - 2018-06-25
- --
- FIXES
-diff --git a/base/checks.c b/base/checks.c
-index 725dec9d..d45b6ac4 100644
 a/base/checks.c
-+++ b/base/checks.c
-@@ -911,6 +911,11 @@ static inline void 
service_state_or_hard_state_type_change(service * svc, int st
- 
-   if (state_or_type_change) {
- 
-+  /* check if service should go into downtime from flexible 
downtime */
-+  if (svc->pending_flex_downtime > 0) {
-+  check_pending_flex_service_downtime(svc);
-+  }
-+
-   /* reset notification times and suppression option */
-   svc->last_notification = (time_t)0;
-   svc->next_notification = (time_t)0;
-@@ -941,7 +946,10 @@ static inline void 
host_state_or_hard_state_type_change(host * hst, int state_ch
- 
-   log_debug_info(DEBUGL_CHECKS, 2, "Check type passive and 
passive host checks aren't false\n");
-   
--  hst->current_attempt = 1;
-+  if (state_change == TRUE) {
-+hst->current_attempt = 1;
-+}
-+
-   hard_state_change = TRUE;
-   }
- 
-@@ -989,6 +997,9 @@ static inline void 
host_state_or_hard_state_type_change(host * hst, int state_ch
- 
-   if (state_or_type_change) {
- 
-+  /* check if host should go into downtime from flexible downtime 
*/
-+  check_pending_flex_host_downtime(hst);
-+
-   /* reset notification times and suppression option */
-   hst->last_notification = (time_t)0;
-   hst->next_notification = (time_t)0;
-@@ -1228,7 +1239,7 @@ int handle_async_service_check_result(service *svc, 
check_result *cr)
-   next_check = (time_t)(svc->last_check + (svc->check_interval * 
interval_length));
- 
-   /***/
--  /** SCHEDULE HOST CHECK LOGIC **/
-+  /** SCHEDULE SERVICE CHECK LOGIC **/
-   /***/
-   if (svc->current_state == STATE_OK) {
- 
-@@ -1269,6 +1280,7 @@ int handle_async_service_check_result(service *svc, 
check_result *cr)
- 
-   svc->host_problem_at_last_check = TRUE;
-   }
-+
-   }
-   else {
- 
-@@ -1368,6 +1380,9 @@ int handle_async_service_check_result(service *svc, 
check_result *cr)
-   else {
- 
-   log_debug_info(DEBUGL_CHECKS, 1, "Service is a non-OK 
state (%s)!", service_state_name(svc->current_state));
-+
-+svc->state_type = SOFT_STATE;
-+  svc->current_attempt = 1;
- 
-   handle_event = TRUE;
-   }
-@@ -1395,6 +1410,21 @@ int handle_async_service_check_result(service *svc, 
check_result *cr)
- 
-   log_debug_info(DEBUGL_CHECKS, 1, "Service 
experienced a SOFT recovery.\n"); 
-   }
-+
-+
-+/* reset all service variables because its okay now... */
-+   

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2018-08-08 Thread Michael Orlitzky
commit: 7a67d7c03c3a81ce80c3f5aaf4e931402a12
Author: Tomas Mozes  gmail  com>
AuthorDate: Wed Aug  8 06:21:04 2018 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Aug  8 21:08:26 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a67d7c0

net-analyzer/nagios-core: bump to 4.4.1

Closes: https://bugs.gentoo.org/662194
Package-Manager: Portage-2.3.44, Repoman-2.3.10
Signed-off-by: Michael Orlitzky  gentoo.org>

 net-analyzer/nagios-core/Manifest  |   1 +
 .../nagios-core/files/nagios-4.4.2-pre.patch   | 209 
 net-analyzer/nagios-core/nagios-core-4.4.1.ebuild  | 218 +
 3 files changed, 428 insertions(+)

diff --git a/net-analyzer/nagios-core/Manifest 
b/net-analyzer/nagios-core/Manifest
index f051a22305c..11a8055082a 100644
--- a/net-analyzer/nagios-core/Manifest
+++ b/net-analyzer/nagios-core/Manifest
@@ -1,4 +1,5 @@
 DIST nagios-4.3.3.tar.gz 11101531 BLAKE2B 
537d49ecf28b457fbc1e24eaaa9c5d9e8c4db59ed69c91a573c0cacb6cfb6fd2d52c31e87c0cef34b81a69247bb5b9513983d95e7eae3ea7f861742da485d2d4
 SHA512 
588292a95342cb2d95d7b58f70442b82b99a23dd9fdc1390e9ae0743626a047e5127d77b1d7e6a1d8edd6f34a425e581bcd42459b673a0ddea14125bde4b7d9e
 DIST nagios-4.3.4.tar.gz 11101966 BLAKE2B 
6cb8182f40a4f83875c94df040bb1c62ce078d4130e10fa8595ea0b14cf715fc2a237ffb34199da9c1528e4789f3ce8deae3d993b5b795ad712d48b1e5fdb820
 SHA512 
f4e92aa98151739442a225a245871d93b5560d89510bdacb1a615959b9687f7a92675f10fcba71078b104ca8f237b0155a9261d67ec66f80aec7f033b4b3e316
 DIST nagios-4.4.0.tar.gz 11295727 BLAKE2B 
f89e7934b13814ec8c0ae7a19f14eed8842c7b0044fb2812f1399f27a82e5a639b63cc53f04b58ae99aa87bf595b2e25642ad3eb134a041e39f744919bd46d2f
 SHA512 
8c136463133cf26c756ccd39b158ed417297e30f8a0b12d063a4dba6a43f126b27bb5f7ea962c8cde9fb9c1fd8d3439d7cfeaab833045315a9800c993fa0676f
+DIST nagios-4.4.1.tar.gz 11296403 BLAKE2B 
fdbaec5f913d18d5591f44cd1e0622b9741d7415b591f24f1521f2897b8a1bdbff00e9378ef6b3a6a99ab8d639960abd3d734fd66b665ea88ea1de169b552ace
 SHA512 
d84f22a8fd21a573b4162f232c3a6bb2ba0b7d3a470e5fd80183a1862d2ae666956cfc2dd4c7fe6319ee7ccedb9f8a6920ba39a6b499ed9ff5b8be60a9779fa9
 DIST nagios-core-gentoo-icons-20141125.tar 40960 BLAKE2B 
31c1953e1160c7c7b89606b72b1a80407e4c1b7a7938b40bd1c577cd0c309dd88ca6b775d692a9b846dbf67736537fa9c91e56aa15fdd447769608ca525bff09
 SHA512 
bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766

diff --git a/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch 
b/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch
new file mode 100644
index 000..6483b9df9f2
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-4.4.2-pre.patch
@@ -0,0 +1,209 @@
+diff --git a/Changelog b/Changelog
+index 1e1bd9e2..8dd26fec 100644
+--- a/Changelog
 b/Changelog
+@@ -2,6 +2,18 @@
+ Nagios Core 4 Change Log
+ 
+ 
++4.4.2 - ??
++--
++FIXES
++* Fix comment data being duplicated after a `service nagios reload` or 
similar (Bryan Heden)
++* Fix check_interval and retry_interval not changing at the appropriate times 
(Scott Wilkerson)
++* Fixed passive checks sending recovery email when host was previously UP 
(Scott Wilkerson)
++* Fixed flapping comments duplication on nagios reload (Christian Jung)
++* Fix for CVE-2018-13441, CVE-2018-13458, CVE-2018-13457 null pointer 
dereference (Trevor McDonald)
++* Fixed syntax error in file: default-init.in (#558) (Christian Zettel)
++* Reset current notification number and state flags when the host recovers, 
reset all service variables when they recover fixes (#557) (Scott Wilkerson)
++* Fixed wrong counting of service status totals when showing servicegroup 
details (#548) (Christian Zettel, Bryan Heden)
++
+ 4.4.1 - 2018-06-25
+ --
+ FIXES
+diff --git a/base/checks.c b/base/checks.c
+index 725dec9d..d45b6ac4 100644
+--- a/base/checks.c
 b/base/checks.c
+@@ -911,6 +911,11 @@ static inline void 
service_state_or_hard_state_type_change(service * svc, int st
+ 
+   if (state_or_type_change) {
+ 
++  /* check if service should go into downtime from flexible 
downtime */
++  if (svc->pending_flex_downtime > 0) {
++  check_pending_flex_service_downtime(svc);
++  }
++
+   /* reset notification times and suppression option */
+   svc->last_notification = (time_t)0;
+   svc->next_notification = (time_t)0;
+@@ -941,7 +946,10 @@ static inline void 
host_state_or_hard_state_type_change(host * hst, int state_ch
+ 
+   log_debug_info(DEBUGL_CHECKS, 2, "Check type passive and 
passive host checks aren't false\n");
+   
+-  hst->current_attempt = 1;
++  if (state_change == TRUE) {
++hst->current_attempt = 1;
++}
++
+   hard_state_change = TRUE;
+   }
+ 
+@@ 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2018-06-19 Thread Michael Orlitzky
commit: d8c9e8160e7575722e0226c045be15ac9d1f3523
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Jun 19 22:35:55 2018 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Jun 19 22:41:56 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8c9e816

net-analyzer/nagios-core: clean up unused files.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-analyzer/nagios-core/files/99_nagios3.conf |  15 --
 net-analyzer/nagios-core/files/conf.d  |   9 --
 .../nagios-core/files/lighttpd_nagios3-r1.conf |  24 ---
 .../files/nagios-core-3.5.1-process_cgivars.patch  | 175 -
 .../nagios-core-4.3.1-fix-upstream-issue-337.patch |  21 ---
 net-analyzer/nagios-core/files/nagios3 |  52 --
 net-analyzer/nagios-core/files/nagios4-r1  |  45 --
 7 files changed, 341 deletions(-)

diff --git a/net-analyzer/nagios-core/files/99_nagios3.conf 
b/net-analyzer/nagios-core/files/99_nagios3.conf
deleted file mode 100644
index 074f9ce5e4a..000
--- a/net-analyzer/nagios-core/files/99_nagios3.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-
-   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
-   
-   AllowOverride AuthConfig
-   Options ExecCGI
-   Order allow,deny
-   Allow from all
-   
-   Alias /nagios /usr/share/nagios/htdocs
-   
-   AllowOverride AuthConfig
-   Order allow,deny
-   Allow from all
-   
-

diff --git a/net-analyzer/nagios-core/files/conf.d 
b/net-analyzer/nagios-core/files/conf.d
deleted file mode 100644
index 68c7370c887..000
--- a/net-analyzer/nagios-core/files/conf.d
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2 
-
-# Distributed monitoring users will want to configure here the ip/hostname of 
the central server.
-# It will be used by submit_check_result_via_nsca.
-NAGIOS_NSCA_HOST="localhost"
-
-
-

diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf 
b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
deleted file mode 100644
index 6e2577029ac..000
--- a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-server.modules += ("mod_cgi")
-server.modules += ("mod_auth")
-server.modules += ("mod_alias")
-
-auth.require += ( "/nagios" =>
-  (
-"method"  => "digest",
-"realm"   => "nagios",
-"require" => "valid-user"
-  )
-)
-
-$HTTP["url"] =~ "^/nagios/cgi-bin/" {
-  dir-listing.activate = "disable"
-  cgi.assign = (
-".pl"  => "/usr/bin/perl",
-".cgi" => ""
-  )
-}
-
-alias.url += (
-  "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
-  "/nagios" => "/usr/share/nagios/htdocs"
-)

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch 
b/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
deleted file mode 100644
index 9d953674779..000
--- a/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-commit d97e03f32741a7d851826b03ed73ff4c9612a866
-Author: Eric Stanley 
-Date:   Fri Dec 20 13:14:30 2013 -0600
-
-CGIs: Fixed minor vulnerability where a custom query could crash the CGI.
-
-Most CGIs previously incremented the input variable counter twice when
-it encountered a long key value. This could cause the CGI to read past
-the end of the list of CGI variables. This commit removes the second
-increment, removing the possibility of reading past the end of the list
-of CGI variables.
-
-diff --git a/cgi/avail.c b/cgi/avail.c
-index 76afd86..64eaadc 100644
 a/cgi/avail.c
-+++ b/cgi/avail.c
-@@ -1096,7 +1096,6 @@ int process_cgivars(void) {
- 
-   /* do some basic length checking on the variable identifier to 
prevent buffer overflows */
-   if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
--  x++;
-   continue;
-   }
- 
-diff --git a/cgi/cmd.c b/cgi/cmd.c
-index fa6cf5a..50504eb 100644
 a/cgi/cmd.c
-+++ b/cgi/cmd.c
-@@ -311,7 +311,6 @@ int process_cgivars(void) {
- 
-   /* do some basic length checking on the variable identifier to 
prevent buffer overflows */
-   if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
--  x++;
-   continue;
-   }
- 
-diff --git a/cgi/config.c b/cgi/config.c
-index f061b0f..3360e70 100644
 a/cgi/config.c
-+++ b/cgi/config.c
-@@ -344,7 +344,6 @@ int process_cgivars(void) {
- 
-   /* do some basic length checking on the variable identifier to 
prevent buffer overflows */
-   if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
--  x++;
-   continue;
-   }
- 
-diff --git 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2017-01-14 Thread Michael Orlitzky
commit: 808f26f5899a40b08c1497b1ca97e08fa6add947
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat Jan 14 23:29:43 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Jan 14 23:30:04 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=808f26f5

net-analyzer/nagios-core: bring back the 3.x ebuild to save pnp4nagios.

I tried removing the old versions of nagios to address a CVE, but
net-analyzer/pnp4nagios on three arches requires nagios-3.x. I've
filed a keyword request for icinga (which can also satisfy the
dependency), and after those keywords are added and everything is
stabilized we can try this again.

Gentoo-Bug: 602216
Gentoo-Bug: 605724

Package-Manager: portage-2.3.0

 net-analyzer/nagios-core/Manifest  |   1 +
 net-analyzer/nagios-core/files/99_nagios3.conf |  15 ++
 .../nagios-core/files/lighttpd_nagios3-r1.conf |  24 +++
 .../files/nagios-core-3.5.1-process_cgivars.patch  | 175 +
 net-analyzer/nagios-core/files/nagios3 |  53 +
 net-analyzer/nagios-core/nagios-core-3.5.1.ebuild  | 217 +
 6 files changed, 485 insertions(+)

diff --git a/net-analyzer/nagios-core/Manifest 
b/net-analyzer/nagios-core/Manifest
index 203f0f3..60c9c97 100644
--- a/net-analyzer/nagios-core/Manifest
+++ b/net-analyzer/nagios-core/Manifest
@@ -1,2 +1,3 @@
+DIST nagios-3.5.1.tar.gz 1763584 SHA256 
ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 SHA512 
48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d
 WHIRLPOOL 
2c02584702c64dbb0e353e34b758fab079eee0dc7a401e7b5947a21733758d3596401e5519e2dd7f05c89ee4835c21965d2718157fd9d6d3d20af9c853d688ca
 DIST nagios-4.2.4.tar.gz 11088206 SHA256 
b0055c475683ce50d77b1536ff0cec9abf89139adecf771601fa021ef9a20b70 SHA512 
1f060f3139db6f77f7ca218bb4befb631c08b0ccb1b2b85e4c06cfc94328b5d09cef9b547eb54617089334a1e36b881347dfbb98bcc88b9b38e878214f97883a
 WHIRLPOOL 
a3d5454c72ab38388e8071dca8a319c717bb22915cfd06243727eb33f7b8a93cc323531be1535d14e283335b9964762a2729f4605f76d9a01ff78bbe924053a7
 DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 
68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 
bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766
 WHIRLPOOL 
7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d

diff --git a/net-analyzer/nagios-core/files/99_nagios3.conf 
b/net-analyzer/nagios-core/files/99_nagios3.conf
new file mode 100644
index ..074f9ce
--- /dev/null
+++ b/net-analyzer/nagios-core/files/99_nagios3.conf
@@ -0,0 +1,15 @@
+
+   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
+   
+   AllowOverride AuthConfig
+   Options ExecCGI
+   Order allow,deny
+   Allow from all
+   
+   Alias /nagios /usr/share/nagios/htdocs
+   
+   AllowOverride AuthConfig
+   Order allow,deny
+   Allow from all
+   
+

diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf 
b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
new file mode 100644
index ..6e25770
--- /dev/null
+++ b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
@@ -0,0 +1,24 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_auth")
+server.modules += ("mod_alias")
+
+auth.require += ( "/nagios" =>
+  (
+"method"  => "digest",
+"realm"   => "nagios",
+"require" => "valid-user"
+  )
+)
+
+$HTTP["url"] =~ "^/nagios/cgi-bin/" {
+  dir-listing.activate = "disable"
+  cgi.assign = (
+".pl"  => "/usr/bin/perl",
+".cgi" => ""
+  )
+}
+
+alias.url += (
+  "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
+  "/nagios" => "/usr/share/nagios/htdocs"
+)

diff --git 
a/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch 
b/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
new file mode 100644
index ..9d95367
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
@@ -0,0 +1,175 @@
+commit d97e03f32741a7d851826b03ed73ff4c9612a866
+Author: Eric Stanley 
+Date:   Fri Dec 20 13:14:30 2013 -0600
+
+CGIs: Fixed minor vulnerability where a custom query could crash the CGI.
+
+Most CGIs previously incremented the input variable counter twice when
+it encountered a long key value. This could cause the CGI to read past
+the end of the list of CGI variables. This commit removes the second
+increment, removing the possibility of reading past the end of the list
+of CGI variables.
+
+diff --git a/cgi/avail.c b/cgi/avail.c
+index 76afd86..64eaadc 100644
+--- a/cgi/avail.c
 b/cgi/avail.c
+@@ -1096,7 +1096,6 @@ int process_cgivars(void) {
+ 
+   

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2017-01-14 Thread Michael Orlitzky
commit: 3fe7eef56ef63155a5c79346bd3f8aa55fb4f179
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat Jan 14 20:48:12 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Jan 14 21:04:16 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fe7eef5

net-analyzer/nagios-core: remove the rest of the unused files.

With nagios-3.x (and older 4.x versions) removed from the tree, we now
have a bunch of unused files sitting in $FILESDIR. Get rid of them.

Gentoo-Bug: 602216
Package-Manager: portage-2.3.0

 net-analyzer/nagios-core/files/99_nagios3.conf |  15 --
 .../files/fix-bogus-perf-data-warnings.patch   |  32 
 .../nagios-core/files/lighttpd_nagios3-r1.conf |  24 ---
 net-analyzer/nagios-core/files/nagios  |  57 ---
 .../files/nagios-core-3.5.1-process_cgivars.patch  | 175 -
 net-analyzer/nagios-core/files/nagios3 |  53 ---
 net-analyzer/nagios-core/files/nagios4 |  52 --
 .../files/use-INSTALL-to-install-themes.patch  |  59 ---
 .../files/use-MAKE-instead-of-bare-make.patch  |  37 -
 9 files changed, 504 deletions(-)

diff --git a/net-analyzer/nagios-core/files/99_nagios3.conf 
b/net-analyzer/nagios-core/files/99_nagios3.conf
deleted file mode 100644
index 074f9ce..
--- a/net-analyzer/nagios-core/files/99_nagios3.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-
-   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
-   
-   AllowOverride AuthConfig
-   Options ExecCGI
-   Order allow,deny
-   Allow from all
-   
-   Alias /nagios /usr/share/nagios/htdocs
-   
-   AllowOverride AuthConfig
-   Order allow,deny
-   Allow from all
-   
-

diff --git a/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch 
b/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch
deleted file mode 100644
index 8f589e8..
--- a/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Patch submitted upstream at,
-
-  http://tracker.nagios.org/view.php?id=534
-
-by user ovidiu_stanila. Confirmed to work by at least one other user,
-travissidelinger. Applied to fix Gentoo bug #530640.
-
-diff --git a/base/workers.c b/base/workers.c
-index 881e434..d1e1f8d 100644
 a/base/workers.c
-+++ b/base/workers.c
-@@ -285,6 +285,8 @@ static void destroy_job(struct wproc_job *job)
-   case WPJOB_SVC_EVTHANDLER:
-   case WPJOB_GLOBAL_HOST_EVTHANDLER:
-   case WPJOB_HOST_EVTHANDLER:
-+  case WPJOB_HOST_PERFDATA:
-+  case WPJOB_SVC_PERFDATA:
-   /* these require nothing special */
-   break;
-   case WPJOB_CALLBACK:
-@@ -763,6 +765,11 @@ static int handle_worker_result(int sd, int events, void 
*arg)
-   run_job_callback(job, , 0);
-   break;
- 
-+  case WPJOB_HOST_PERFDATA:
-+  case WPJOB_SVC_PERFDATA:
-+  /* these require nothing special */
-+  break;
-+
-   default:
-   logit(NSLOG_RUNTIME_WARNING, TRUE, "Worker %d: Unknown 
jobtype: %d\n", wp->pid, job->type);
-   break;

diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf 
b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
deleted file mode 100644
index 6e25770..
--- a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-server.modules += ("mod_cgi")
-server.modules += ("mod_auth")
-server.modules += ("mod_alias")
-
-auth.require += ( "/nagios" =>
-  (
-"method"  => "digest",
-"realm"   => "nagios",
-"require" => "valid-user"
-  )
-)
-
-$HTTP["url"] =~ "^/nagios/cgi-bin/" {
-  dir-listing.activate = "disable"
-  cgi.assign = (
-".pl"  => "/usr/bin/perl",
-".cgi" => ""
-  )
-}
-
-alias.url += (
-  "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
-  "/nagios" => "/usr/share/nagios/htdocs"
-)

diff --git a/net-analyzer/nagios-core/files/nagios 
b/net-analyzer/nagios-core/files/nagios
deleted file mode 100644
index b8a642f..
--- a/net-analyzer/nagios-core/files/nagios
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-opts="${opts} reload checkconfig"
-
-depend() {
-   need net
-   use dns logger firewall
-   after mysql postgresql
-}
-
-reload()
-{
-   checkconfig || return 1
-   ebegin "Reloading configuration"
-   killall -HUP nagios &>/dev/null
-   eend $?
-}
-
-checkconfig() {
-   # Silent Check
-   /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0
-
-   # Now we know there's problem - run again and display errors
-   /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
-   eend 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/

2017-01-14 Thread Michael Orlitzky
commit: 85d8b5b7b78412408d6e77d6083b8790cb4d7e5f
Author: Michael Mair-Keimberger (asterix)  gmail 
 com>
AuthorDate: Sat Jan 14 09:35:23 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Jan 14 21:04:16 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85d8b5b7

net-analyzer/nagios-core: remove unused patches

Signed-off-by: Michael Orlitzky  gentoo.org>

 .../files/nagios-3.3.1-htmlmakefile.patch  | 14 -
 .../nagios-core/files/statuswml-bug275288.patch| 51 -
 .../files/use-INSTALL-to-install-themes-r1.patch   | 65 --
 3 files changed, 130 deletions(-)

diff --git a/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch 
b/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
deleted file mode 100644
index c033c98..
--- a/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
+++ /dev/null
@@ -1,14 +0,0 @@
 html/Makefile.in.orig  2011-07-27 16:06:58.0 +0200
-+++ html/Makefile.in   2011-07-27 16:07:10.0 +0200
-@@ -75,9 +75,9 @@
-   do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/images/logos; done
-   for file in includes/*.*; \
-   do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/includes; done
--  for file in includes/rss/*; \
-+  for file in includes/rss/*.*; \
-   do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/includes/rss; done
--  for file in includes/rss/extlib/*; \
-+  for file in includes/rss/extlib/*.*; \
-   do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/includes/rss/extlib; done
- 
- install-unstripped:

diff --git a/net-analyzer/nagios-core/files/statuswml-bug275288.patch 
b/net-analyzer/nagios-core/files/statuswml-bug275288.patch
deleted file mode 100644
index 8b9a020..
--- a/net-analyzer/nagios-core/files/statuswml-bug275288.patch
+++ /dev/null
@@ -1,51 +0,0 @@
 cgi/statuswml.c2008/11/30 18:13:11 1.27
-+++ cgi/statuswml.c2009/06/19 04:30:26 1.28
-@@ -67,6 +67,8 @@
- void document_header(void);
- void document_footer(void);
- int process_cgivars(void);
-+int validate_arguments(void);
-+int is_valid_hostip(char *hostip);
- 
- int display_type=DISPLAY_INDEX;
- int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY;
-@@ -108,6 +110,13 @@
- 
-   document_header();
- 
-+  /* validate arguments in URL */
-+  result=validate_arguments();
-+  if(result==ERROR){
-+  document_footer();
-+  return ERROR;
-+  }
-+  
-   /* read the CGI configuration file */
-   result=read_cgi_config_file(get_cgi_config_location());
-   if(result==ERROR){
-@@ -334,7 +343,25 @@
-   return error;
- }
- 
-+int validate_arguments(void){
-+  int result=OK;
-+  if((strcmp(ping_address,"")) && !is_valid_hostip(ping_address)) {
-+  printf("Invalid host name/ip\n");
-+  result=ERROR;
-+  }
-+  if(strcmp(traceroute_address,"") && 
!is_valid_hostip(traceroute_address)){
-+  printf("Invalid host name/ip\n");
-+  result=ERROR;
-+  }
-+  return result;
-+  }
- 
-+int is_valid_hostip(char *hostip) {
-+  char 
*valid_domain_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-";
-+  if(strcmp(hostip,"") && 
strlen(hostip)==strspn(hostip,valid_domain_chars) && hostip[0] != '-' && 
hostip[strlen(hostip)-1] != '-')
-+  return TRUE;
-+  return FALSE;
-+  }
- 
- /* main intro screen */
- void display_index(void){

diff --git 
a/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch 
b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch
deleted file mode 100644
index a14f5a3..
--- a/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From b6552e3b0b006fa28014150d199813de12d89ef4 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky 
-Date: Mon, 25 Apr 2016 20:06:18 -0400
-Subject: [PATCH 1/1] Use $(INSTALL) to install themes.
-
-Most of the images installed under the htdocs folder are installed
-mode 644 with owner:group nagios:nagios. This is due to the use of
-$(INSTALL) in html/Makefile. However, the theme images and stylesheets
-are currently installed with a simple "cp -r", which leads to
-inconsistencies like the following:
-
-  $ cd /usr/share/nagios/htdocs/images
-  $ ls action*.gif
-  -rw-rw-r-- 1 nagios nagios 1.3K 2014-11-12 08:22 action.gif
-  -rw-r--r-- 1 root   root   1.3K 2014-11-12 08:22 action-graph.gif
-  -rw-r--r-- 1 root   root171 2014-11-12 08:22 action-nagios.gif
-  -rw-r--r-- 1 root   root162 2014-11-12 08:22 action-orig.gif
-
-By using $(INSTALL) in the install-exfoliation and install-classicui
-targets, we enforce some consistency.

- Makefile.in | 20 
- 1 file changed, 16 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-core/files/, net-analyzer/nagios-core/

2016-04-25 Thread Michael Orlitzky
commit: a299e275255caae5bb040d250763c746340b8336
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Apr 26 00:23:28 2016 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Apr 26 00:29:05 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a299e275

net-analyzer/nagios-core: new patch and revision to fix logo installation.

The fix for bug 388321 required a patch, but that patch broke the
installation of the theme logos (which live in their own
directory). That patch has been updated as a new revision,
use-INSTALL-to-install-themes-r1.patch, to avoid impacting
nagios-core-4.0.8-r2.ebuild which is stable on amd64. The new revision
nagios-4.1.1-r1 should pick up the new patch.

Gentoo-Bug: 388321
Gentoo-Bug: 581148

Package-Manager: portage-2.2.26

 .../files/use-INSTALL-to-install-themes-r1.patch   | 65 ++
 ...re-4.1.1.ebuild => nagios-core-4.1.1-r1.ebuild} |  6 +-
 2 files changed, 68 insertions(+), 3 deletions(-)

diff --git 
a/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch 
b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch
new file mode 100644
index 000..a14f5a3
--- /dev/null
+++ b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes-r1.patch
@@ -0,0 +1,65 @@
+From b6552e3b0b006fa28014150d199813de12d89ef4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Mon, 25 Apr 2016 20:06:18 -0400
+Subject: [PATCH 1/1] Use $(INSTALL) to install themes.
+
+Most of the images installed under the htdocs folder are installed
+mode 644 with owner:group nagios:nagios. This is due to the use of
+$(INSTALL) in html/Makefile. However, the theme images and stylesheets
+are currently installed with a simple "cp -r", which leads to
+inconsistencies like the following:
+
+  $ cd /usr/share/nagios/htdocs/images
+  $ ls action*.gif
+  -rw-rw-r-- 1 nagios nagios 1.3K 2014-11-12 08:22 action.gif
+  -rw-r--r-- 1 root   root   1.3K 2014-11-12 08:22 action-graph.gif
+  -rw-r--r-- 1 root   root171 2014-11-12 08:22 action-nagios.gif
+  -rw-r--r-- 1 root   root162 2014-11-12 08:22 action-orig.gif
+
+By using $(INSTALL) in the install-exfoliation and install-classicui
+targets, we enforce some consistency.
+---
+ Makefile.in | 20 
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5b97513..0ec50b7 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -300,8 +300,14 @@ install-webconf:
+   @echo ""
+ 
+ install-exfoliation:
+-  cp -rf contrib/exfoliation/stylesheets/* 
$(DESTDIR)$(HTMLDIR)/stylesheets
+-  cp -rf contrib/exfoliation/images/* $(DESTDIR)$(HTMLDIR)/images
++  for file in contrib/exfoliation/stylesheets/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/stylesheets; done
++
++  for file in contrib/exfoliation/images/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/images; done
++
++  for file in contrib/exfoliation/images/logos/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/images/logos; done
+ 
+   @echo ""
+   @echo "*** Exfoliation theme installed ***"
+@@ -309,8 +315,14 @@ install-exfoliation:
+   @echo ""
+ 
+ install-classicui:
+-  cp -rf html/stylesheets/* $(DESTDIR)$(HTMLDIR)/stylesheets
+-  cp -rf html/images/* $(DESTDIR)$(HTMLDIR)/images
++  for file in html/stylesheets/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/stylesheets; done
++
++  for file in html/images/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/images; done
++
++  for file in html/images/logos/*.*; \
++  do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file 
$(DESTDIR)$(HTMLDIR)/images/logos; done
+ 
+   @echo ""
+   @echo "*** Classic theme installed ***"
+-- 
+2.7.3
+

diff --git a/net-analyzer/nagios-core/nagios-core-4.1.1.ebuild 
b/net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild
similarity index 98%
rename from net-analyzer/nagios-core/nagios-core-4.1.1.ebuild
rename to net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild
index 69a4faa..748ef0e 100644
--- a/net-analyzer/nagios-core/nagios-core-4.1.1.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -92,9 +92,9 @@ src_prepare(){
#
# http://tracker.nagios.org/view.php?id=651
#
-   # Gentoo bug #388321.
+   # Gentoo bugs #388321 and #581148.
#
-   epatch "${FILESDIR}"/use-INSTALL-to-install-themes.patch
+   epatch "${FILESDIR}"/use-INSTALL-to-install-themes-r1.patch
 }
 
 src_configure() {