[packages/nagios] - up to 4.2.4; upstream now uses utf-8 as cgi charset; magpiers no longer in upstream
arekm
arekm at pld-linux.org
Mon Jan 9 08:23:45 CET 2017
commit 26e7e1319e021cc6b9fbd5166b14fca0807b341b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Jan 9 08:23:30 2017 +0100
- up to 4.2.4; upstream now uses utf-8 as cgi charset; magpiers no longer in upstream
nagios-cgi-http_charset.patch | 349 ------------------------------------------
nagios.spec | 16 +-
system-magpierss.patch | 54 -------
3 files changed, 7 insertions(+), 412 deletions(-)
---
diff --git a/nagios.spec b/nagios.spec
index 5345825..e6442d0 100644
--- a/nagios.spec
+++ b/nagios.spec
@@ -12,12 +12,12 @@ Summary: Open Source host, service and 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: 4.2.1
-Release: 0.1
+Version: 4.2.4
+Release: 1
License: GPL v2+
Group: Networking
Source0: https://assets.nagios.com/downloads/nagioscore/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 96a71803c10afe1a7d2b05e61e35578a
+# Source0-md5: 02a4d396eb3efe689e19b0405be00ad4
Source1: %{name}-apache.conf
Source2: %{name}.init
Source3: %{name}.sysconfig
@@ -34,13 +34,13 @@ Source9: %{name}wall.php
Patch0: %{name}-resources.patch
Patch1: %{name}-iconv-in-libc.patch
Patch2: %{name}-webapps.patch
-Patch3: %{name}-cgi-http_charset.patch
+
Patch4: %{name}-cmd-typo.patch
Patch5: config.patch
Patch6: %{name}-googlemap.patch
Patch7: %{name}-doc-usermacros.patch
Patch8: archivelog-timeformat.patch
-Patch9: system-magpierss.patch
+
Patch10: system-jquery.patch
Patch11: do-not-fetch-rss.patch
URL: https://www.nagios.org/projects/nagios-core/
@@ -252,14 +252,14 @@ mv %{name}-%{version}/* .
%patch0 -p0
%patch1 -p1
%patch2 -p1
-%patch3 -p1
+
#fixed
#%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
+
%patch10 -p1
%patch11 -p1
@@ -568,8 +568,6 @@ EOF
%{htmldir}/images/marker.png
%{htmldir}/images/shadow50.png
%{htmldir}/nagioswall.php
-%{htmldir}/rss-corefeed.html
-%{htmldir}/rss-newsfeed.html
%{htmldir}/angularjs
%{htmldir}/bootstrap-3.3.0
diff --git a/nagios-cgi-http_charset.patch b/nagios-cgi-http_charset.patch
deleted file mode 100644
index 1ee09d4..0000000
--- a/nagios-cgi-http_charset.patch
+++ /dev/null
@@ -1,349 +0,0 @@
-applied in icinga :)
-https://git.icinga.org/?p=icinga-core.git;a=commit;h=82c07167e482d0936f18f2763a342b78af0b618e
-https://dev.icinga.org/issues/1002
-
-but not in nagios :(
-http://tracker.nagios.org/view.php?id=182
-
---- 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;
- int interval_length;
-+char *http_charset = NULL;
- char *illegal_output_chars;
- 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)
-- 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/csv\r\n\r\n");
-+ printf("Content-type: text/csv; charset=\"%s\"\r\n\r\n", http_charset);
- return;
- }
-
-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;
-
-+ my_free(http_charset);
-+ http_charset = strdup(DEFAULT_HTTP_CHARSET);
-+
- statusmap_background_image = NULL;
- 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);
-
-+ else if(!strcmp(var, "http_charset"))
-+ http_charset = strdup(val);
-+
- else if(!strcmp(var, "notes_url_target"))
- notes_url_target = strdup(val);
-
-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];
-
-+extern char *http_charset;
-+
- extern int nagios_process_state;
-
- extern int use_authentication;
-@@ -242,7 +244,7 @@
-
- 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");
-@@ -254,7 +256,7 @@
-
- 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");
-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);
-- 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");
-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)
- return;
-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)
- return;
-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)
- return;
-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)
- return;
-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;
-
-+extern char *http_charset;
-+
- extern char main_config_file[MAX_FILENAME_LENGTH];
- extern char url_html_path[MAX_FILENAME_LENGTH];
- extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
-@@ -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)
- return;
-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)
- return;
-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 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;
-@@ -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)
- return;
-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)
- return;
-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;
-
-+extern char *http_charset;
-+
- #define DISPLAY_HOST 0
- #define DISPLAY_SERVICE 1
- #define DISPLAY_HOSTGROUP 2
-@@ -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");
-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];
-
-+extern char *http_charset;
-+
- extern char *statuswrl_include;
-
- 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;
- }
-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)
-- 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);
- return;
- }
-
-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];
-
-+extern char *http_charset;
-+
- extern int refresh_rate;
-
- extern char *service_critical_sound;
-@@ -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)
- return;
-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];
-
-+extern char *http_charset;
-+
- extern int log_rotation_method;
-
- /* 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)
- return;
-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
-
-+/************************** HTTP CHARSET ****************************/
-+
-+#define DEFAULT_HTTP_CHARSET "utf-8"
-
-
-
-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@
-
-
-+# HTTP CHARSET
-+# This defines charset that is sent with HTTP headers.
-+
-+http_charset=utf-8
-+
-
- # CONTEXT-SENSITIVE HELP
- # This option determines whether or not a context-sensitive
diff --git a/system-magpierss.patch b/system-magpierss.patch
deleted file mode 100644
index 6d2ec91..0000000
--- a/system-magpierss.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- nagios-3.4.1/html/rss-corefeed.php~ 2012-05-28 23:27:38.000000000 +0300
-+++ nagios-3.4.1/html/rss-corefeed.php 2012-05-28 23:49:41.701706368 +0300
-@@ -1,11 +1,11 @@
- <?php
-
- // RSS reader
--define('MAGPIE_DIR', './includes/rss/');
-+define('MAGPIE_DIR', '/usr/share/php/magpierss/');
- define('MAGPIE_CACHE_ON', 0);
- define('MAGPIE_CACHE_AGE', 0);
- define('MAGPIE_CACHE_DIR', '/tmp/magpie_cache');
--require_once(MAGPIE_DIR.'rss_fetch.inc');
-+require_once(MAGPIE_DIR . 'rss_fetch.inc');
-
-
- //build splash divs to ajax load
---- nagios-3.4.1/html/rss-newsfeed.php~ 2012-05-28 23:27:38.000000000 +0300
-+++ nagios-3.4.1/html/rss-newsfeed.php 2012-05-28 23:49:56.285653400 +0300
-@@ -1,11 +1,11 @@
- <?php
-
- // RSS reader
--define('MAGPIE_DIR', './includes/rss/');
-+define('MAGPIE_DIR', '/usr/share/php/magpierss/');
- define('MAGPIE_CACHE_ON', 0);
- define('MAGPIE_CACHE_AGE', 0);
- define('MAGPIE_CACHE_DIR', '/tmp/magpie_cache');
--require_once(MAGPIE_DIR.'rss_fetch.inc');
-+require_once(MAGPIE_DIR . 'rss_fetch.inc');
-
-
- //build splash divs to ajax load
---- nagios-4.2.1/html/Makefile.in~ 2016-09-06 17:59:22.000000000 +0300
-+++ nagios-4.2.1/html/Makefile.in 2016-09-07 19:25:18.613096481 +0300
-@@ -54,8 +54,6 @@
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos
- $(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)/ssi
- # Directories for new CGI pages
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/angularjs
-@@ -120,10 +120,6 @@
- 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
- # Support files for new graphical CGIs
- $(INSTALL) -m 664 $(INSTALL_OPTS) angularjs/angular-1.3.9/angular.min.js $(DESTDIR)$(HTMLDIR)/angularjs/angular-1.3.9
- $(INSTALL) -m 664 $(INSTALL_OPTS) angularjs/angular-1.3.9/angular.min.js.map $(DESTDIR)$(HTMLDIR)/angularjs/angular-1.3.9
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios.git/commitdiff/26e7e1319e021cc6b9fbd5166b14fca0807b341b
More information about the pld-cvs-commit
mailing list