commit e277f689d2f6f9ba0c1788a2a2b8004d9a6a26dd
Author: Arkadiusz Miśkiewicz <[email protected]>
Date:   Tue Oct 1 22:04:47 2013 +0200

    - up to 4.0.0

 config.patch                  | 160 ++++++++-----------
 nagios-cgi-http_charset.patch | 349 ++++++++++++++++++------------------------
 nagios-googlemap.patch        |  28 ++--
 nagios.spec                   |  12 +-
 system-jquery.patch           |  10 +-
 5 files changed, 238 insertions(+), 321 deletions(-)
---
diff --git a/nagios.spec b/nagios.spec
index 03d5b45..2363cd1 100644
--- a/nagios.spec
+++ b/nagios.spec
@@ -11,12 +11,12 @@ Summary:    Host/service/network monitoring program
 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.5.1
+Version:       4.0.0
 Release:       1
 License:       GPL v2+
 Group:         Networking
-Source0:       
http://downloads.sourceforge.net/nagios/nagios-3.x/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 9947ed3d220b4da86710884260d42856
+Source0:       
http://downloads.sourceforge.net/nagios/nagios-4.x/%{name}-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: bfe64774766e32b6f6130493c52ed7f6
 Source1:       %{name}-apache.conf
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
@@ -258,10 +258,6 @@ sed -i -e '
        s,".*/libexec/eventhandlers,"%{_libdir}/%{name}/eventhandlers,
 ' $(find contrib/eventhandlers -type f)
 
-%{__sed} -i -e '
-       s,/usr/local/nagios/var/,/var/log/%{name}/,g
-' p1.pl
-
 sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf
 sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE10} > httpd.conf
 sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf
@@ -339,7 +335,6 @@ cp -p include/*.h   $RPM_BUILD_ROOT%{_includedir}/%{name}
        COMMAND_OPTS=""
 
 %if %{with epn}
-mv $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/%{name}}/p1.pl
 install -d $RPM_BUILD_ROOT%{_bindir}
 install -p contrib/mini_epn $RPM_BUILD_ROOT%{_bindir}
 %endif
@@ -508,7 +503,6 @@ done
 
 # epn
 %if %{with epn}
-%attr(755,root,root) %{_libdir}/%{name}/p1.pl
 %attr(755,root,root) %{_bindir}/mini_epn
 %endif
 
diff --git a/config.patch b/config.patch
index a2dc0f0..779cac3 100644
--- a/config.patch
+++ b/config.patch
@@ -1,18 +1,39 @@
---- nagios-3.1.2/sample-config/cgi.cfg.in      2009-08-03 18:30:03.896753761 
+0300
-+++ svn/nagios-config/trunk/cgi.cfg    2009-08-03 18:25:38.142614386 +0300
-@@ -1,8 +1,6 @@
+diff -ur nagios.org/html/config.inc.php.in nagios/html/config.inc.php.in
+--- nagios.org/html/config.inc.php.in  2013-09-20 21:01:20.000000000 +0200
++++ nagios/html/config.inc.php.in      2013-10-01 21:51:45.176497587 +0200
+@@ -2,7 +2,7 @@
+ //
+ 
+ 
+-$cfg['cgi_config_file']='@sysconfdir@/cgi.cfg';  // location of the CGI 
config file
++$cfg['cgi_config_file']='/etc/webapps/nagios/cgi.cfg';  // location of the 
CGI config file
+ 
+ $cfg['cgi_base_url']='@cgiurl@';
+ 
+diff -ur nagios.org/Makefile.in nagios/Makefile.in
+--- nagios.org/Makefile.in     2013-09-20 21:01:20.000000000 +0200
++++ nagios/Makefile.in 2013-10-01 21:51:45.176497587 +0200
+@@ -241,7 +241,7 @@
+       cd $(SRC_BASE) && $(MAKE) $@
+       cd $(SRC_CGI) && $(MAKE) $@
+       cd $(SRC_HTM) && $(MAKE) $@
+-      $(MAKE) install-exfoliation     
++      $(MAKE) install-classicui
+       $(MAKE) install-basic
+ 
+ install-basic:
+diff -ur nagios.org/sample-config/cgi.cfg.in nagios/sample-config/cgi.cfg.in
+--- nagios.org/sample-config/cgi.cfg.in        2013-09-20 21:01:20.000000000 
+0200
++++ nagios/sample-config/cgi.cfg.in    2013-10-01 21:52:32.937634398 +0200
+@@ -1,6 +1,6 @@
  #################################################################
  #
 -# CGI.CFG - Sample CGI Configuration File for Nagios @VERSION@
--#
--# Last Modified: 06-17-2009
-+# CGI.CFG - CGI Configuration File for Nagios
++# CGI.CFG - Sample CGI Configuration File for Nagios
+ #
  #
  #################################################################
- 
-@@ -46,9 +45,9 @@
- # This option determines whether or not a context-sensitive
- # help icon will be displayed for most of the CGIs.
+@@ -42,7 +42,7 @@
  # Values: 0 = disables context-sensitive help
  #         1 = enables context-sensitive help
  
@@ -21,7 +42,7 @@
  
  
  
-@@ -269,7 +233,7 @@
+@@ -263,7 +263,7 @@
  # OS and distribution, so you may have to tweak this to
  # work on your system.
  
@@ -30,43 +51,25 @@
  
  
  
-@@ -359,4 +323,4 @@
- #splunk_url=http://127.0.0.1:8000/
- 
+@@ -370,3 +370,5 @@
  
--
+ navbar_search_for_addresses=1
+ navbar_search_for_aliases=1
++
 +# vim:ts=8:sw=8:ft=cfg
---- nagios-3.1.2/sample-config/resource.cfg.in 2009-08-03 18:41:56.770015075 
+0300
-+++ svn/nagios-config/trunk/resource.cfg       2009-08-03 18:42:15.413396493 
+0300
-@@ -1,8 +1,6 @@
- ###########################################################################
- #
--# RESOURCE.CFG - Sample Resource File for Nagios @VERSION@
--#
--# Last Modified: 09-10-2003
-+# RESOURCE.CFG - Resource File for Nagios
- #
- # You can define $USERx$ macros in this file, which can in turn be used
- # in command definitions in your host config file(s).  $USERx$ macros are
---- nagios-3.1.2/sample-config/nagios.cfg.in   2009-08-05 00:11:30.769380130 
+0300
-+++ nagios-3.3.1/sample-config/nagios.cfg.in   2012-01-08 02:18:19.519567499 
+0200
-@@ -1,13 +1,11 @@
+diff -ur nagios.org/sample-config/nagios.cfg.in 
nagios/sample-config/nagios.cfg.in
+--- nagios.org/sample-config/nagios.cfg.in     2013-09-20 21:01:20.000000000 
+0200
++++ nagios/sample-config/nagios.cfg.in 2013-10-01 21:53:09.708504449 +0200
+@@ -1,6 +1,6 @@
  ##############################################################################
  #
 -# NAGIOS.CFG - Sample Main Config File for Nagios @VERSION@
-+# NAGIOS.CFG - Main Config File for Nagios
++# NAGIOS.CFG - Sample Main Config File for Nagios
  #
  # Read the documentation for more information on this configuration
  # file.  I've provided some comments here, but things may not be so
- # clear without further explanation.
- #
--# Last Modified: 12-14-2008
--#
- ##############################################################################
- 
- 
-@@ -16,7 +14,7 @@
- # for historical purposes.  This should be the first option specified
+@@ -15,7 +15,7 @@
+ # for historical purposes.  This should be the first option specified 
  # in the config file!!!
  
 -log_file=@localstatedir@/nagios.log
@@ -74,7 +77,7 @@
  
  
  
-@@ -27,13 +25,13 @@
+@@ -26,13 +26,13 @@
  # if you wish (as shown below), or keep them all in a single config file.
  
  # You can specify individual object config files as shown below:
@@ -93,7 +96,7 @@
  
  # Definitions for monitoring a Windows machine
  #cfg_file=@sysconfdir@/objects/windows.cfg
-@@ -48,13 +46,8 @@
+@@ -47,13 +47,8 @@
  # You can also tell Nagios to process all config files (with a .cfg
  # extension) in a particular directory by using the cfg_dir
  # directive as shown below:
@@ -109,8 +112,8 @@
  
  
  # OBJECT CACHE FILE
-@@ -264,7 +257,7 @@
- # This is the directory where archived (rotated) log files should be
+@@ -242,7 +237,7 @@
+ # This is the directory where archived (rotated) log files should be 
  # placed (assuming you've chosen to do log rotation).
  
 -log_archive_path=@localstatedir@/archives
@@ -118,7 +121,7 @@
  
  
  
-@@ -272,7 +265,7 @@
+@@ -250,7 +245,7 @@
  # If you want messages logged to the syslog facility, as well as the
  # Nagios log file set this option to 1.  If not, set it to 0.
  
@@ -127,8 +130,8 @@
  
  
  
-@@ -728,7 +721,7 @@
- # by Nagios Enterprises from the update check is processed in accordance
+@@ -707,7 +702,7 @@
+ # by Nagios Enterprises from the update check is processed in accordance 
  # with our privacy policy - see http://api.nagios.org for details.
  
 -check_for_updates=1
@@ -136,8 +139,8 @@
  
  
  
-@@ -740,7 +733,7 @@
- # this data to determine the number of users running specific version of
+@@ -719,7 +714,7 @@
+ # this data to determine the number of users running specific version of 
  # Nagios.  Enable this option if you do not want this information to be sent.
  
 -bare_update_check=0
@@ -145,18 +148,7 @@
  
  
  
-@@ -850,8 +843,8 @@
- # Performance data is only written to these files if the
- # enable_performance_data option (above) is set to 1.
- 
--#host_perfdata_file=/tmp/host-perfdata
--#service_perfdata_file=/tmp/service-perfdata
-+#host_perfdata_file=@localstatedir@/host-perfdata
-+#service_perfdata_file=@localstatedir@/service-perfdata
- 
- 
- 
-@@ -875,8 +868,8 @@
+@@ -854,8 +849,8 @@
  # pipe ("p") mode which avoid blocking at startup, otherwise you will
  # likely want the defult append ("a") mode.
  
@@ -167,7 +159,7 @@
  
  
  
-@@ -1065,7 +1058,7 @@
+@@ -1091,7 +1086,7 @@
  #     strict-iso8601  (YYYY-MM-DDTHH:MM:SS)
  #
  
@@ -176,16 +168,7 @@
  
  
  
-@@ -1114,7 +1107,7 @@
- # embedded Perl interpreter) is located.  If you didn't compile
- # Nagios with embedded Perl support, this option has no effect.
- 
--p1_file=@bindir@/p1.pl
-+p1_file=@libexecdir@/nagios/p1.pl
- 
- 
- 
-@@ -1306,7 +1299,7 @@
+@@ -1285,7 +1280,7 @@
  # DEBUG FILE
  # This option determines where Nagios should write debugging information.
  
@@ -194,25 +177,14 @@
  
  
  
---- nagios-3.3.1/Makefile.in~  2011-07-26 05:02:18.000000000 +0300
-+++ nagios-3.3.1/Makefile.in   2012-01-06 17:31:31.482147956 +0200
-@@ -226,7 +226,7 @@
-       cd $(SRC_BASE) && $(MAKE) $@
-       cd $(SRC_CGI) && $(MAKE) $@
-       cd $(SRC_HTM) && $(MAKE) $@
--      $(MAKE) install-exfoliation     
-+      $(MAKE) install-classicui
-       $(MAKE) install-basic
- 
- install-basic:
---- nagios-3.3.1/html/config.inc.php.in~       2008-12-14 20:00:46.000000000 
+0200
-+++ nagios-3.3.1/html/config.inc.php.in        2012-01-06 17:33:57.734940302 
+0200
-@@ -2,7 +2,7 @@
- //
- 
- 
--$cfg['cgi_config_file']='@sysconfdir@/cgi.cfg';  // location of the CGI 
config file
-+$cfg['cgi_config_file']='/etc/webapps/nagios/cgi.cfg';  // location of the 
CGI config file
- 
- $cfg['cgi_base_url']='@cgiurl@';
- 
+diff -ur nagios.org/sample-config/resource.cfg.in 
nagios/sample-config/resource.cfg.in
+--- nagios.org/sample-config/resource.cfg.in   2013-09-20 21:01:20.000000000 
+0200
++++ nagios/sample-config/resource.cfg.in       2013-10-01 21:52:53.371451113 
+0200
+@@ -1,6 +1,6 @@
+ ###########################################################################
+ #
+-# RESOURCE.CFG - Sample Resource File for Nagios @VERSION@
++# RESOURCE.CFG - Sample Resource File for Nagios
+ #
+ #
+ # You can define $USERx$ macros in this file, which can in turn be used
diff --git a/nagios-cgi-http_charset.patch b/nagios-cgi-http_charset.patch
index e2ef5e5..3817877 100644
--- a/nagios-cgi-http_charset.patch
+++ b/nagios-cgi-http_charset.patch
@@ -5,18 +5,20 @@ https://dev.icinga.org/issues/1002
 but not in nagios :(
 http://tracker.nagios.org/view.php?id=182
 
---- 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 char *http_charset;
-+
- extern host      *host_list;
- extern hostgroup *hostgroup_list;
- extern servicegroup *servicegroup_list;
-@@ -1080,9 +1080,9 @@
+--- nagios/common/shared.c~    2013-09-20 21:01:20.000000000 +0200
++++ nagios/common/shared.c     2013-10-01 22:02:51.624429871 +0200
+@@ -9,6 +9,7 @@
+  */
+ int date_format = DATE_FORMAT_US;
+ int interval_length = DEFAULT_INTERVAL_LENGTH;
++char *http_charset = NULL;
+ char *illegal_output_chars = NULL;
+ char illegal_output_char_map[] = CHAR_MAP_INIT(0);
+ time_t program_start = 0L;
+diff -ur nagios.org/cgi/avail.c nagios/cgi/avail.c
+--- nagios.org/cgi/avail.c     2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/avail.c 2013-10-01 21:49:29.426623753 +0200
+@@ -1033,9 +1033,9 @@
        printf("Expires: %s\r\n", date_time);
  
        if(output_format == HTML_OUTPUT)
@@ -28,17 +30,10 @@ http://tracker.nagios.org/view.php?id=182
                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
-@@ -55,6 +55,7 @@
- char            *statuswrl_include = NULL;
- 
- char            *illegal_output_chars = NULL;
-+char            *http_charset = NULL;
- 
- char            *notes_url_target = NULL;
- char            *action_url_target = NULL;
-@@ -188,6 +189,9 @@
+diff -ur nagios.org/cgi/cgiutils.c nagios/cgi/cgiutils.c
+--- nagios.org/cgi/cgiutils.c  2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/cgiutils.c      2013-10-01 21:49:29.429957215 +0200
+@@ -169,6 +169,9 @@
        host_unreachable_sound = NULL;
        normal_sound = NULL;
  
@@ -46,9 +41,9 @@ http://tracker.nagios.org/view.php?id=182
 +      http_charset = strdup(DEFAULT_HTTP_CHARSET);
 +
        statusmap_background_image = NULL;
-       color_transparency_index_r = 255;;
- 
-@@ -391,6 +395,9 @@
+       color_transparency_index_r = 255;
+       color_transparency_index_g = 255;
+@@ -391,6 +394,9 @@
                else if(!strcmp(var, "illegal_macro_output_chars"))
                        illegal_output_chars = strdup(val);
  
@@ -58,9 +53,10 @@ http://tracker.nagios.org/view.php?id=182
                else if(!strcmp(var, "notes_url_target"))
                        notes_url_target = strdup(val);
  
---- nagios-3.0.3/cgi/cmd.c     2008-05-19 21:42:26.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/cmd.c 2008-10-11 12:34:44.496658785 +0300
-@@ -39,6 +39,8 @@
+diff -ur nagios.org/cgi/cmd.c nagios/cgi/cmd.c
+--- nagios.org/cgi/cmd.c       2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/cmd.c   2013-10-01 21:49:29.429957215 +0200
+@@ -38,6 +38,8 @@
  
  extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
  
@@ -68,37 +64,29 @@ http://tracker.nagios.org/view.php?id=182
 +
  extern int  nagios_process_state;
  
- extern int  check_external_commands;
-@@ -235,7 +237,7 @@
+ extern int  use_authentication;
+@@ -242,7 +244,7 @@
  
-       if(content_type==WML_CONTENT){
+       if(content_type == WML_CONTENT) {
  
 -              printf("Content-type: text/vnd.wap.wml\r\n\r\n");
 +              printf("Content-type: text/vnd.wap.wml; 
charset=\"%s\"\r\n\r\n", http_charset);
  
                printf("<?xml version=\"1.0\"?>\n");
                printf("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" 
\"http://www.wapforum.org/DTD/wml_1.1.xml\";>\n");
-@@ -247,7 +249,7 @@
+@@ -254,7 +256,7 @@
  
-       else{
+       else {
  
 -              printf("Content-type: text/html\r\n\r\n");
 +              printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", 
http_charset);
  
                printf("<html>\n");
                printf("<head>\n");
---- nagios-3.0.3/cgi/config.c  2008-04-13 21:34:27.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/config.c      2008-10-11 12:34:44.496658785 +0300
-@@ -37,6 +37,8 @@
- extern char   url_logo_images_path[MAX_FILENAME_LENGTH];
- extern char   url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern host *host_list;
- extern service *service_list;
- extern hostgroup *hostgroup_list;
-@@ -293,7 +295,7 @@
+diff -ur nagios.org/cgi/config.c nagios/cgi/config.c
+--- nagios.org/cgi/config.c    2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/config.c        2013-10-01 21:49:29.433290641 +0200
+@@ -291,7 +291,7 @@
        printf("Pragma: no-cache\r\n");
        printf("Last-Modified: %s\r\n", date_time);
        printf("Expires: %s\r\n", date_time);
@@ -107,89 +95,58 @@ http://tracker.nagios.org/view.php?id=182
  
        printf("<html>\n");
        printf("<head>\n");
---- nagios-3.0.3/cgi/extinfo.c 2008-01-24 04:51:30.000000000 +0200
-+++ nagios-3.0.3-cgi/cgi/extinfo.c     2008-10-11 12:34:44.500659016 +0300
-@@ -38,6 +38,8 @@
- extern int              nagios_process_state;
- extern int              refresh_rate;
- 
-+extern char *http_charset;
-+
- extern time_t         program_start;
- extern int              nagios_pid;
- extern int              daemon_mode;
-@@ -584,7 +586,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/extinfo.c nagios/cgi/extinfo.c
+--- nagios.org/cgi/extinfo.c   2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/extinfo.c       2013-10-01 21:49:29.433290641 +0200
+@@ -537,7 +537,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/histogram.c       2008-05-19 21:42:26.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/histogram.c   2008-10-11 12:34:44.512659708 +0300
-@@ -130,6 +130,8 @@
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
- extern char physical_images_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern int     log_rotation_method;
- 
- extern host *host_list;
-@@ -994,7 +996,7 @@
-               
get_time_string(&expire_time,date_time,sizeof(date_time),HTTP_DATE_TIME);
-               printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/histogram.c nagios/cgi/histogram.c
+--- nagios.org/cgi/histogram.c 2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/histogram.c     2013-10-01 21:49:29.436624049 +0200
+@@ -983,7 +983,7 @@
+               get_time_string(&expire_time, date_time, sizeof(date_time), 
HTTP_DATE_TIME);
+               printf("Expires: %s\r\n", date_time);
  
 -              printf("Content-type: text/html\r\n\r\n");
 +              printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", 
http_charset);
  
-               if(embedded==TRUE)
+               if(embedded == TRUE)
                        return;
---- nagios-3.0.3-cgi/cgi/history.c     2008-10-11 12:34:44.480657862 +0300
-+++ nagios-3.0.3/cgi/history.c 2008-10-11 12:38:12.164637148 +0300
-@@ -57,6 +57,8 @@
- extern char url_images_path[MAX_FILENAME_LENGTH];
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern int log_rotation_method;
- 
- extern int enable_splunk_integration;
-@@ -315,7 +317,7 @@
-       
get_time_string(&expire_time,date_time,sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/history.c nagios/cgi/history.c
+--- nagios.org/cgi/history.c   2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/history.c       2013-10-01 21:49:29.436624049 +0200
+@@ -285,7 +285,7 @@
+       get_time_string(&expire_time, date_time, sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/notifications.c   2008-05-19 21:42:27.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/notifications.c       2008-10-11 12:34:44.500659016 
+0300
-@@ -37,6 +37,8 @@
- extern char url_docs_path[MAX_FILENAME_LENGTH];
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern int    log_rotation_method;
- 
- 
-@@ -303,7 +305,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/notifications.c nagios/cgi/notifications.c
+--- nagios.org/cgi/notifications.c     2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/notifications.c 2013-10-01 21:49:29.436624049 +0200
+@@ -272,7 +272,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/outages.c 2008-01-09 19:51:23.000000000 +0200
-+++ nagios-3.0.3-cgi/cgi/outages.c     2008-10-11 12:34:44.500659016 +0300
-@@ -39,6 +39,8 @@
+diff -ur nagios.org/cgi/outages.c nagios/cgi/outages.c
+--- nagios.org/cgi/outages.c   2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/outages.c       2013-10-01 21:49:29.436624049 +0200
+@@ -34,6 +34,8 @@
  extern hoststatus *hoststatus_list;
  extern servicestatus *servicestatus_list;
  
@@ -198,78 +155,64 @@ http://tracker.nagios.org/view.php?id=182
  extern char main_config_file[MAX_FILENAME_LENGTH];
  extern char url_html_path[MAX_FILENAME_LENGTH];
  extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
-@@ -215,7 +217,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+@@ -171,7 +173,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/showlog.c 2008-01-09 19:51:23.000000000 +0200
-+++ nagios-3.0.3-cgi/cgi/showlog.c     2008-10-11 12:34:44.500659016 +0300
-@@ -37,6 +37,8 @@
- extern char   url_images_path[MAX_FILENAME_LENGTH];
- extern char   url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern int    log_rotation_method;
- 
- extern int    enable_splunk_integration;
-@@ -188,7 +190,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/showlog.c nagios/cgi/showlog.c
+--- nagios.org/cgi/showlog.c   2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/showlog.c       2013-10-01 21:49:29.436624049 +0200
+@@ -157,7 +157,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/status.c  2008-06-23 23:47:46.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/status.c      2008-10-11 12:34:44.504659246 +0300
-@@ -44,6 +44,8 @@
+diff -ur nagios.org/cgi/status.c nagios/cgi/status.c
+--- nagios.org/cgi/status.c    2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/status.c        2013-10-01 21:49:29.439957458 +0200
+@@ -42,6 +42,8 @@
  extern char url_media_path[MAX_FILENAME_LENGTH];
- extern char log_file[MAX_FILENAME_LENGTH];
+ extern char url_js_path[MAX_FILENAME_LENGTH];
  
 +extern char *http_charset;
 +
  extern char *service_critical_sound;
  extern char *service_warning_sound;
  extern char *service_unknown_sound;
-@@ -503,7 +505,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+@@ -505,7 +507,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/statusmap.c       2008-05-19 21:42:28.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/statusmap.c   2008-10-11 12:34:44.508659477 +0300
-@@ -54,6 +54,8 @@
- extern char url_logo_images_path[MAX_FILENAME_LENGTH];
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern host *host_list;
- extern hostgroup *hostgroup_list;
- extern service *service_list;
-@@ -320,7 +322,7 @@
-               
get_time_string(&expire_time,date_time,sizeof(date_time),HTTP_DATE_TIME);
-               printf("Expires: %s\r\n",date_time);
+diff -ur nagios.org/cgi/statusmap.c nagios/cgi/statusmap.c
+--- nagios.org/cgi/statusmap.c 2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/statusmap.c     2013-10-01 21:49:29.439957458 +0200
+@@ -321,7 +321,7 @@
+               get_time_string(&expire_time, date_time, sizeof(date_time), 
HTTP_DATE_TIME);
+               printf("Expires: %s\r\n", date_time);
  
 -              printf("Content-Type: text/html\r\n\r\n");
 +              printf("Content-Type: text/html; charset=\"%s\"\r\n\r\n", 
http_charset);
  
-               if(embedded==TRUE)
+               if(embedded == TRUE)
                        return;
---- nagios-3.0.3/cgi/statuswml.c       2008-05-19 21:42:28.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/statuswml.c   2008-10-11 12:34:44.504659246 +0300
-@@ -47,6 +47,8 @@
+diff -ur nagios.org/cgi/statuswml.c nagios/cgi/statuswml.c
+--- nagios.org/cgi/statuswml.c 2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/statuswml.c     2013-10-01 21:49:29.443290866 +0200
+@@ -38,6 +38,8 @@
  
  extern char     *ping_syntax;
  
@@ -278,18 +221,19 @@ http://tracker.nagios.org/view.php?id=182
  #define DISPLAY_HOST                  0
  #define DISPLAY_SERVICE                 1
  #define DISPLAY_HOSTGROUP               2
-@@ -193,7 +195,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+@@ -194,7 +196,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/vnd.wap.wml\r\n\r\n");
 +      printf("Content-type: text/vnd.wap.wml; charset=\"%s\"\r\n\r\n", 
http_charset);
  
        printf("<?xml version=\"1.0\"?>\n");
        printf("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" 
\"http://www.wapforum.org/DTD/wml_1.1.xml\";>\n");
---- nagios-3.0.3/cgi/statuswrl.c       2007-07-16 19:41:46.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/statuswrl.c   2008-10-11 12:34:44.508659477 +0300
-@@ -41,6 +41,8 @@
+diff -ur nagios.org/cgi/statuswrl.c nagios/cgi/statuswrl.c
+--- nagios.org/cgi/statuswrl.c 2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/statuswrl.c     2013-10-01 21:49:29.443290866 +0200
+@@ -39,6 +39,8 @@
  extern char url_images_path[MAX_FILENAME_LENGTH];
  extern char url_logo_images_path[MAX_FILENAME_LENGTH];
  
@@ -297,28 +241,20 @@ http://tracker.nagios.org/view.php?id=182
 +
  extern char *statuswrl_include;
  
- extern host *host_list;
-@@ -202,7 +204,7 @@
-       
get_time_string(&expire_time,date_time,sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+ extern int default_statuswrl_layout_method;
+@@ -197,7 +199,7 @@
+       get_time_string(&expire_time, date_time, sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-Type: x-world/x-vrml\r\n\r\n");
 +      printf("Content-Type: x-world/x-vrml; charset=\"%s\"\r\n\r\n", 
http_charset);
  
        return;
-         }
---- nagios-3.0.3/cgi/summary.c 2008-01-24 04:51:30.000000000 +0200
-+++ nagios-3.0.3-cgi/cgi/summary.c     2008-10-11 12:34:44.504659246 +0300
-@@ -37,6 +37,8 @@
- extern char url_images_path[MAX_FILENAME_LENGTH];
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
- 
-+extern char *http_charset;
-+
- extern host *host_list;
- extern hostgroup *hostgroup_list;
- extern service *service_list;
-@@ -698,9 +700,9 @@
+       }
+diff -ur nagios.org/cgi/summary.c nagios/cgi/summary.c
+--- nagios.org/cgi/summary.c   2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/summary.c       2013-10-01 21:49:29.443290866 +0200
+@@ -662,9 +662,9 @@
        printf("Expires: %s\r\n", date_time);
  
        if(output_format == HTML_OUTPUT)
@@ -328,11 +264,12 @@ http://tracker.nagios.org/view.php?id=182
 -              printf("Content-type: text/plain\r\n\r\n");
 +              printf("Content-type: text/plain; charset=\"%s\"\r\n\r\n", 
http_charset);
                return;
-               }
+               }
  
---- nagios-3.0.3/cgi/tac.c     2008-02-21 08:17:37.000000000 +0200
-+++ nagios-3.0.3-cgi/cgi/tac.c 2008-10-11 12:34:44.508659477 +0300
-@@ -52,6 +52,8 @@
+diff -ur nagios.org/cgi/tac.c nagios/cgi/tac.c
+--- nagios.org/cgi/tac.c       2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/tac.c   2013-10-01 21:49:29.443290866 +0200
+@@ -50,6 +50,8 @@
  extern char   url_stylesheets_path[MAX_FILENAME_LENGTH];
  extern char   url_media_path[MAX_FILENAME_LENGTH];
  
@@ -341,18 +278,19 @@ http://tracker.nagios.org/view.php?id=182
  extern int    refresh_rate;
  
  extern char *service_critical_sound;
-@@ -381,7 +383,7 @@
-       
get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);
-       printf("Expires: %s\r\n",date_time);
+@@ -281,7 +283,7 @@
+       get_time_string(&expire_time, date_time, (int)sizeof(date_time), 
HTTP_DATE_TIME);
+       printf("Expires: %s\r\n", date_time);
  
 -      printf("Content-type: text/html\r\n\r\n");
 +      printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", http_charset);
  
-       if(embedded==TRUE)
+       if(embedded == TRUE)
                return;
---- nagios-3.0.3/cgi/trends.c  2008-06-23 23:47:46.000000000 +0300
-+++ nagios-3.0.3-cgi/cgi/trends.c      2008-10-11 12:34:44.512659708 +0300
-@@ -44,6 +44,8 @@
+diff -ur nagios.org/cgi/trends.c nagios/cgi/trends.c
+--- nagios.org/cgi/trends.c    2013-09-20 21:01:20.000000000 +0200
++++ nagios/cgi/trends.c        2013-10-01 21:49:29.446624276 +0200
+@@ -42,6 +42,8 @@
  extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
  extern char physical_images_path[MAX_FILENAME_LENGTH];
  
@@ -360,19 +298,20 @@ http://tracker.nagios.org/view.php?id=182
 +
  extern int     log_rotation_method;
  
- extern host *host_list;
-@@ -1114,7 +1116,7 @@
-               
get_time_string(&expire_time,date_time,sizeof(date_time),HTTP_DATE_TIME);
-               printf("Expires: %s\r\n",date_time);
+ /* archived state types */
+@@ -1182,7 +1184,7 @@
+               get_time_string(&expire_time, date_time, sizeof(date_time), 
HTTP_DATE_TIME);
+               printf("Expires: %s\r\n", date_time);
  
 -              printf("Content-type: text/html\r\n\r\n");
 +              printf("Content-type: text/html; charset=\"%s\"\r\n\r\n", 
http_charset);
  
-               if(embedded==TRUE)
+               if(embedded == TRUE)
                        return;
---- nagios-3.0.3/include/cgiutils.h    2007-11-11 01:34:26.000000000 +0200
-+++ nagios-3.0.3-cgi/include/cgiutils.h        2008-10-11 12:34:44.468657170 
+0300
-@@ -422,6 +422,9 @@
+diff -ur nagios.org/include/cgiutils.h nagios/include/cgiutils.h
+--- nagios.org/include/cgiutils.h      2013-09-20 21:01:20.000000000 +0200
++++ nagios/include/cgiutils.h  2013-10-01 21:49:29.446624276 +0200
+@@ -408,6 +408,9 @@
  #define LIFO_ERROR_FILE               2
  #define LIFO_ERROR_DATA               3
  
@@ -382,9 +321,21 @@ http://tracker.nagios.org/view.php?id=182
  
  
  
---- nagios-3.0.3/sample-config/cgi.cfg.in      2007-10-07 22:42:52.000000000 
+0300
-+++ nagios-3.0.3-cgi/sample-config/cgi.cfg.in  2008-10-11 12:34:44.472657400 
+0300
-@@ -36,6 +36,11 @@
+diff -ur nagios.org/include/objects.h nagios/include/objects.h
+--- nagios.org/include/objects.h       2013-09-20 21:01:20.000000000 +0200
++++ nagios/include/objects.h   2013-10-01 21:50:02.750744397 +0200
+@@ -707,6 +707,7 @@
+       struct timeperiod *dependency_period_ptr;
+       } hostdependency;
+ 
++extern char *http_charset;
+ extern struct command *command_list;
+ extern struct timeperiod *timeperiod_list;
+ extern struct host *host_list;
+diff -ur nagios.org/sample-config/cgi.cfg.in nagios/sample-config/cgi.cfg.in
+--- nagios.org/sample-config/cgi.cfg.in        2013-09-20 21:01:20.000000000 
+0200
++++ nagios/sample-config/cgi.cfg.in    2013-10-01 21:49:29.446624276 +0200
+@@ -35,6 +35,11 @@
  url_html_path=@htmurl@
  
  
diff --git a/nagios-googlemap.patch b/nagios-googlemap.patch
index a6d30ab..40f5d6e 100644
--- a/nagios-googlemap.patch
+++ b/nagios-googlemap.patch
@@ -11,32 +11,32 @@
  #include "../include/config.h"
  #include "../include/common.h"
  #include "../include/objects.h"
-@@ -93,13 +97,27 @@
+@@ -92,6 +92,7 @@ extern int default_statusmap_layout_meth
  #define LAYOUT_CIRCULAR                 4
  #define LAYOUT_CIRCULAR_MARKUP          5
  #define LAYOUT_CIRCULAR_BALLOON         6
--
-+#define LAYOUT_GOOGLEMAP                              7
++#define LAYOUT_GOOGLEMAP                7
+ 
  
- typedef struct layer_struct {
-       char *layer_name;
-       struct layer_struct *next;
-       } layer;
+ struct layer {
+@@ -99,6 +100,20 @@ struct layer {
+       struct layer *next;
+ };
  
-+typedef struct location_t {
++struct location_t {
 +      char* name;
 +      char* note;
 +      char* latitude;
 +      char* longitude;
 +      struct location_t* next;
-+} location_t;
++};
 +
-+typedef struct general_location_t {
++struct general_location_t {
 +      char* key;
 +      char* zoom;
 +      char* latitude;
 +      char* longitude;
-+} general_location_t;
++};
  
  void document_header(int);
  void document_footer(void);
@@ -190,9 +190,9 @@
 +      char* filename;
 +      int state = 0;
 +      int counter = 0;
-+      general_location_t gen_loc;
-+      location_t* loc;
-+      location_t* loc_list=NULL;
++      struct general_location_t gen_loc;
++      struct location_t* loc;
++      struct location_t* loc_list=NULL;
 +
 +
 +/***************************************
diff --git a/system-jquery.patch b/system-jquery.patch
index 2fc8e28..9f44c78 100644
--- a/system-jquery.patch
+++ b/system-jquery.patch
@@ -11,23 +11,23 @@
  
 --- nagios-3.4.1/include/cgiutils.h~   2012-05-24 17:15:30.000000000 +0300
 +++ nagios-3.4.1/include/cgiutils.h    2012-05-28 23:56:18.921757228 +0300
-@@ -80,7 +80,7 @@
+@@ -77,7 +77,7 @@
  #define SUMMARY_CSS             "summary.css"
  
        /********************************* JAVASCRIPT INCLUDES 
**********************/
--#define JQUERY_JS             "jquery-1.7.1.min.js"   
+-#define JQUERY_JS             "jquery-1.7.1.min.js"
 +#define JQUERY_JS             "/js/jquery/jquery.js"
  
        /********************************* ICONS 
************************************/
  
 --- nagios-3.4.1/cgi/status.c~ 2012-05-24 17:15:30.000000000 +0300
 +++ nagios-3.4.1/cgi/status.c  2012-05-28 23:57:04.933694000 +0300
-@@ -558,7 +558,7 @@
+@@ -525,7 +525,7 @@
                }
  
        /* added jquery library 1/31/2012 */
--      printf("<script type='text/javascript' src='%s%s'></script>\n", 
url_js_path, JQUERY_JS);
-+      printf("<script type='text/javascript' src='%s'></script>\n", 
JQUERY_JS);
+-      printf("<script type='text/javascript' 
src='%s%s'></script>\n",url_js_path, JQUERY_JS);
++      printf("<script type='text/javascript' src='%s'></script>\n",JQUERY_JS);
        /* JS function to append content to elements on page */
        printf("<script type='text/javascript'>\n");
        printf("$(document).ready(function() { 
$('#top_page_numbers').append($('#bottom_page_numbers').html() ); });");
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios.git/commitdiff/e277f689d2f6f9ba0c1788a2a2b8004d9a6a26dd

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to