set sane format for archived logs, so the files would be sortable
ideally this should came from config (date_format=iso8601)
---- nagios-3.2.3/base/logging.c~ 2009-05-22 03:55:21.000000000 +0300
-+++ nagios-3.2.3/base/logging.c 2010-12-04 23:33:52.112688537 +0200
-@@ -397,8 +397,7 @@
+--- nagios-3.4.1/base/logging.c~ 2012-05-24 17:09:34.000000000 +0300
++++ nagios-3.4.1/base/logging.c 2012-05-24 17:10:09.466859755 +0300
+@@ -424,7 +424,7 @@
stat_result = stat(log_file, &log_file_stat);
/* get the archived filename to use */
-- asprintf(&log_archive, "%s%snagios-%02d-%02d-%d-%02d.log", log_archive_path, (log_archive_path[strlen(log_archive_path)-1] == '/') ? "" : "/", t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour);
--
-+ asprintf(&log_archive," %s%snagios-%04d-%02d-%02d-%02d.log", log_archive_path, (log_archive_path[strlen(log_archive_path)-1] == '/') ? "" : "/", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour);
+- asprintf(&log_archive, "%s%snagios-%02d-%02d-%d-%02d.log", log_archive_path, (log_archive_path[strlen(log_archive_path) - 1] == '/') ? "" : "/", t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour);
++ asprintf(&log_archive," %s%snagios-%04d-%02d-%02d-%02d.log", log_archive_path, (log_archive_path[strlen(log_archive_path) - 1] == '/') ? "" : "/", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour);
+
/* rotate the log file */
rename_result = my_rename(log_file, log_archive);
-
---- nagios-3.2.3/cgi/cgiutils.c~ 2010-12-04 21:34:34.000000000 +0200
-+++ nagios-3.2.3/cgi/cgiutils.c 2010-12-04 23:34:28.915968009 +0200
-@@ -1604,7 +1604,7 @@
+--- nagios-3.4.1/cgi/cgiutils.c~ 2012-05-24 17:09:34.000000000 +0300
++++ nagios-3.4.1/cgi/cgiutils.c 2012-05-24 17:11:08.629380008 +0300
+@@ -1143,7 +1143,7 @@
t = localtime(&this_scheduled_log_rotation);
/* use the time that the log rotation occurred to figure out the name of the log file */
- snprintf(buffer, buffer_length, "%snagios-%02d-%02d-%d-%02d.log", log_archive_path, t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour);
+ snprintf(buffer, buffer_length, "%snagios-%04d-%02d-%02d-%02d.log", log_archive_path, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour);
- buffer[buffer_length-1] = '\x0';
+ buffer[buffer_length - 1] = '\x0';
return;
---- nagios-3.0.3/cgi/avail.c 2008-06-23 23:47:42.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/avail.c 2008-10-11 12:34:44.496658785 +0300
+--- nagios-3.4.1/cgi/avail.c~ 2012-05-24 17:08:24.000000000 +0300
++++ nagios-3.4.1/cgi/avail.c 2012-05-24 17:09:10.130997383 +0300
@@ -37,6 +37,8 @@
extern char url_images_path[MAX_FILENAME_LENGTH];
extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
extern host *host_list;
extern hostgroup *hostgroup_list;
extern servicegroup *servicegroup_list;
-@@ -1079,9 +1081,9 @@
+@@ -1080,9 +1080,9 @@
printf("Expires: %s\r\n", date_time);
if(output_format == HTML_OUTPUT)
- printf("Content-type: text/html\r\n\r\n");
+ printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
else {
-- printf("Content-type: text/plain\r\n\r\n");
-+ printf("Content-type: text/plain; charset=\"%s\"\r\n\r\n", http_charset);
+- printf("Content-type: text/csv\r\n\r\n");
++ printf("Content-type: text/csv; charset=\"%s\"\r\n\r\n", http_charset);
return;
- }
+ }
--- nagios-3.2.0/cgi/cgiutils.c 2009-09-11 16:14:43.130251761 +0300
+++ nagios-3.2.0/cgi/cgiutils.c 2009-09-15 14:46:13.332409409 +0300
+++ /dev/null
---- nagios/html/Makefile.in.org 2011-07-24 19:53:52.000000000 +0200
-+++ nagios/html/Makefile.in 2011-09-21 13:57:18.000000000 +0200
-@@ -44,6 +44,9 @@
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes/rss
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes/rss/extlib
-+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes/rss/htdocs
-+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes/rss/scripts/smarty_plugin
-+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes/rss/scripts/templates
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi
- $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR)
- # $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
-@@ -75,10 +78,18 @@
- 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/*; \
-- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss; done
- for file in includes/rss/extlib/*; \
- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/extlib; done
-+ for file in includes/rss/htdocs/*; \
-+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/htdocs; done
-+ for file in includes/rss/scripts/smarty_plugin/*; \
-+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/scripts/smarty_plugin; done
-+ for file in includes/rss/scripts/templates/*; \
-+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/scripts/templates; done
-+ for file in includes/rss/*.inc; \
-+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss; done
-+ for file in includes/rss/scripts/*.php; \
-+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/scripts/; done
-
- install-unstripped:
- $(MAKE) install
# TODO
# - /var/log/nagios/archives -> /var/log/archive/nagios
+# - system php-magpierss
+# - system jquery
+# - don't fetch rss if update fetching is disabled (privacy!)
#
# Conditional build:
%bcond_without gd # without statusmap and trends, which require gd library
Summary(pl.UTF-8): Program do monitorowania serwerów/usług/sieci
Summary(pt_BR.UTF-8): Programa para monitoração de máquinas e serviços
Name: nagios
-Version: 3.3.1
-Release: 5
+Version: 3.4.1
+Release: 0.8
License: GPL v2+
Group: Networking
Source0: http://downloads.sourceforge.net/nagios/%{name}-%{version}.tar.gz
-# Source0-md5: c935354ce0d78a63bfabc3055fa77ad5
+# Source0-md5: 2fa8acfb2a92b1bf8d173a855832de1f
Source1: %{name}-apache.conf
Source2: %{name}.init
Source3: %{name}.sysconfig
Patch6: %{name}-googlemap.patch
Patch7: %{name}-doc-usermacros.patch
Patch8: archivelog-timeformat.patch
-Patch9: %{name}-html-Makefile.in.patch
URL: http://www.nagios.org/
BuildRequires: autoconf
BuildRequires: automake
%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
find -name .cvsignore -o -name .gitignore | xargs rm