*** ./build/Makefile.Linux.orig 2019-03-11 17:17:41.000000000 -0600 --- ./build/Makefile.Linux 2019-08-01 13:51:18.217119000 -0600 *************** *** 2,17 **** OSDEF = -DLINUX ! # NETLIBS: Use replacement rpc ! NETLIBS = -ltirpc # Compile flags for normal build CC = gcc GCCVER := $(shell test 0`gcc -dumpversion|cut -d. -f1` -ge 4 && echo yes) ifeq ($(GCCVER),yes) ! CFLAGS = -g -O2 -Wall -Wno-unused -I/usr/include/tirpc -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) else ! CFLAGS = -g -O2 -Wall -Wno-unused -I/usr/include/tirpc -D_REENTRANT $(LFSDEF) $(OSDEF) endif ifndef PKGBUILD --- 2,30 ---- OSDEF = -DLINUX ! # Compares two dotted numeric strings (e.g 2.3.16.1) for $1 >= $2 ! define version_ge ! $(findstring TRUE,$(shell bash -c 'sort -cu -t. -k1,1nr -k2,2nr -k3,3nr -k4,4nr <(echo -e "$2\n$1") >/dev/null 2>&1 || echo TRUE')) ! endef ! ! GLIBCVER := $(shell ldd --version|head -1|tac -s' '|head -1) ! ifeq ($(call version_ge,$(GLIBCVER),2.26),TRUE) ! # NETLIBS: Use replacement RPC for glibc 2.26 or later ! NETLIBS = -ltirpc ! TIRPC_INCLUDE = -I/usr/include/tirpc ! else ! # NETLIBS: None needed on Linux with glibc earlier than 2.26 ! NETLIBS = ! TIRPC_INCLUDE = ! endif # Compile flags for normal build CC = gcc GCCVER := $(shell test 0`gcc -dumpversion|cut -d. -f1` -ge 4 && echo yes) ifeq ($(GCCVER),yes) ! CFLAGS = -g -O2 -Wall -Wno-unused $(TIRPC_INCLUDE) -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) else ! CFLAGS = -g -O2 -Wall -Wno-unused $(TIRPC_INCLUDE) -D_REENTRANT $(LFSDEF) $(OSDEF) endif ifndef PKGBUILD *** ./lib/acklog.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/acklog.c 2019-07-30 14:54:13.269312000 -0600 *************** *** 126,135 **** --- 126,139 ---- /* Show only the first 30 characters in message */ if (strlen(ackmsg) > 30) ackmsg[30] = '\0'; + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif snprintf(ackfn, sizeof(ackfn), "%s/ack.%s", xgetenv("XYMONACKDIR"), hosttest); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif testname = strrchr(hosttest, '.'); if (testname) { *** ./lib/htmllog.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/htmllog.c 2019-07-30 14:52:03.455093000 -0600 *************** *** 647,654 **** --- 647,656 ---- * else just put the hostname there. */ + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif if (documentationurl) { snprintf(result, sizeof(result), "%s", urldoclink(documentationurl, hostname), *************** *** 668,674 **** --- 670,678 ---- snprintf(result, sizeof(result), "%s", xgetenv("XYMONPAGEROWFONT"), nameandcomment(hinfo, hostname, usetooltip)); } + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif return result; } *** ./lib/holidays.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/holidays.c 2019-07-30 14:51:50.173836000 -0600 *************** *** 596,605 **** --- 596,609 ---- if ((tm.tm_mon >= mfirst) && (tm.tm_mon <= mlast)) { strftime(dstr, sizeof(dstr), fmt, localtime(&t)); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif snprintf(oneh, sizeof(oneh), "%s%s\n", desc, dstr); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif addtobuffer(buf, oneh); } } *** ./lib/eventlog.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/eventlog.c 2019-07-30 14:52:31.580586000 -0600 *************** *** 42,51 **** --- 42,55 ---- if (!eventignorecolumns || (strlen(service) > (sizeof(svc)-3))) return 1; + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif snprintf(svc, sizeof(svc), ",%s,", service); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif result = (strstr(eventignorecolumns, svc) == NULL); *** ./lib/misc.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/misc.c 2019-07-30 14:52:45.091769000 -0600 *************** *** 465,473 **** --- 465,475 ---- ip3 = ((ip32 >> 8) & 0xFF); ip4 = (ip32 & 0xFF); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" #pragma GCC diagnostic pop + #endif snprintf(result, result_buflen, "%d.%d.%d.%d", ip1, ip2, ip3, ip4); return result; *** ./lib/tree.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/tree.c 2019-07-30 14:53:29.569562000 -0600 *************** *** 472,479 **** --- 472,481 ---- #ifdef STANDALONE + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-result" + #endif int main(int argc, char **argv) { *************** *** 542,547 **** --- 544,551 ---- return 0; } + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop #endif + #endif *** ./lib/stackio.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/stackio.c 2019-07-30 14:53:45.201887000 -0600 *************** *** 380,389 **** --- 380,393 ---- if ((fnlen >= 8) && ((strcmp(d->d_name + fnlen - 8, ".rpmsave") == 0) || (strcmp(d->d_name + fnlen - 8, ".rpmorig") == 0) ) ) continue; if ((fnlen >= 7) && (strcmp(d->d_name + fnlen - 7, ".rpmnew") == 0)) continue; + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif snprintf(fn, sizeof(fn), "%s/%s", dirfn, d->d_name); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif if (stat(fn, &st) == -1) continue; if (S_ISDIR(st.st_mode)) { *** ./lib/timefunc.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./lib/timefunc.c 2019-07-30 14:54:01.125092000 -0600 *************** *** 393,402 **** --- 393,406 ---- if (d2[0] == '0') { d2[0] = d2[1]; d2[1] = '\0'; } strftime(d3, sizeof(d3), "_%H:%M:%S_%Y", localtime(&histtime)); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif snprintf(result, result_buflen, "%s%s%s", d1, d2, d3); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif MEMUNDEFINE(d1); MEMUNDEFINE(d2); MEMUNDEFINE(d3); *** ./web/showgraph.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./web/showgraph.c 2019-07-30 11:58:18.985245000 -0600 *************** *** 11,17 **** /* */ /*----------------------------------------------------------------------------*/ ! static char rcsid[] = "$Id: showgraph.c 8064M 2019-07-23 14:46:51Z (local) $"; #include #include --- 11,17 ---- /* */ /*----------------------------------------------------------------------------*/ ! static char rcsid[] = "$Id: showgraph.c 8064M 2019-07-23 14:46:51Z (local), patched 2019-07-30 TSchmidt $"; #include #include *************** *** 1035,1040 **** --- 1035,1053 ---- rrddbs[rrddbcount].rrdparam = (char *)malloc(buflen); snprintf(rrddbs[rrddbcount].rrdparam, buflen, "http://%s", param); } + /* + * Change underscores to spaces as this is a common mangling + * used by temperature and lic backends + */ + else if ((strcmp(gdef->name, "temperature") == 0) || (strcmp(gdef->name, "lic") == 0)) { + char *p; + int i; + p = param; + for (i=0; (i < strlen(p)); i++) { + if (p[i] == '_') p[i] = ' '; + } + rrddbs[rrddbcount].rrdparam = strdup(p); + } else { rrddbs[rrddbcount].rrdparam = strdup(param); } *** ./xymond/etcfiles/graphs.cfg.orig 2017-01-05 19:21:07.000000000 -0700 --- ./xymond/etcfiles/graphs.cfg 2019-07-30 12:10:53.398263000 -0600 *************** *** 1,5 **** --- 1,7 ---- # This file defines how RRD graphs are generated by the showgraph CGI. # + # Patched 2019-07-30 TSchmidt + # # Each section begins with a "[SERVICE]" indicator - this is the name passed # to showgraph.cgi?host=foo&service=SERVICE # *************** *** 109,121 **** TITLE Disk Utilization YAXIS Used DEF:p@RRDIDX@=@RRDFN@:used:AVERAGE ! CDEF:p@RRDIDX@t=p@RRDIDX@,1024,* ! LINE2:p@RRDIDX@t#@COLOR@:@RRDPARAM@ -l 0 ! GPRINT:p@RRDIDX@:LAST: \: %5.1lf KB (cur) ! GPRINT:p@RRDIDX@:MAX: \: %5.1lf KB (max) ! GPRINT:p@RRDIDX@:MIN: \: %5.1lf KB (min) ! GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf KB (avg)\n # The qtree graphs are based on the qtree report from filerstats2bb.pl # These handle NetApp storage devices. --- 111,122 ---- TITLE Disk Utilization YAXIS Used DEF:p@RRDIDX@=@RRDFN@:used:AVERAGE ! LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ -l 0 ! GPRINT:p@RRDIDX@:LAST: \: %5.1lf%s (cur) ! GPRINT:p@RRDIDX@:MAX: \: %5.1lf%s (max) ! GPRINT:p@RRDIDX@:MIN: \: %5.1lf%s (min) ! GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n # The qtree graphs are based on the qtree report from filerstats2bb.pl # These handle NetApp storage devices. *************** *** 2112,2114 **** --- 2113,2130 ---- ########### end of ifmib graphs ########### + # License Manager (like FlexLM) Utilization + [lic] + FNPATTERN ^lic.(.+).rrd + TITLE License Utilization + YAXIS Licenses + DEF:t@RRDIDX@=@RRDFN@:total:AVERAGE + DEF:u@RRDIDX@=@RRDFN@:used:AVERAGE + LINE2:u@RRDIDX@#@COLOR@:@RRDPARAM@ + COMMENT:\n + GPRINT:t@RRDIDX@:LAST: \: %4.0lf (total) + GPRINT:u@RRDIDX@:LAST: \: %4.0lf (cur) + GPRINT:u@RRDIDX@:MAX: \: %4.0lf (max) + GPRINT:u@RRDIDX@:MIN: \: %4.0lf (min) + GPRINT:u@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n + *** ./xymond/rrd/do_disk.c.orig 2012-07-13 08:05:20.000000000 -0600 --- ./xymond/rrd/do_disk.c 2019-07-30 12:10:27.763767000 -0600 *************** *** 8,14 **** /* */ /*----------------------------------------------------------------------------*/ ! static char disk_rcsid[] = "$Id: do_disk.c 7026 2012-07-13 14:05:20Z storner $"; int do_disk_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) { --- 8,14 ---- /* */ /*----------------------------------------------------------------------------*/ ! static char disk_rcsid[] = "$Id: do_disk.c 7026 2012-07-13 14:05:20Z storner, patched 2019-07-30 TSchmidt $"; int do_disk_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) { *** ./xymond/rrd/do_temperature.c.orig 2019-04-17 17:56:30.000000000 -0600 --- ./xymond/rrd/do_temperature.c 2019-07-30 13:08:56.453320000 -0600 *************** *** 42,48 **** */ ! static char temperature_rcsid[] = "$Id: do_temperature.c 8050 2019-04-17 23:56:30Z jccleaver $"; int do_temperature_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) { --- 42,48 ---- */ ! static char temperature_rcsid[] = "$Id: do_temperature.c 8050 2019-04-17 23:56:30Z jccleaver, patched 2019-07-30 TSchmidt $"; int do_temperature_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) { *************** *** 70,75 **** --- 70,81 ---- if (gotone) { char savech; + /* Strip off any leading bold and italic HTML tags */ + if (strncasecmp(bol, "", 6) == 0) { bol += 6; } + else if (strncasecmp(bol, "", 3) == 0) { bol += 3; } + else if (strncasecmp(bol, "", 6) == 0) { bol += 6; } + else if (strncasecmp(bol, "", 3) == 0) { bol += 3; } + bol += strspn(bol, " \t"); p = strstr(bol, "\t"); *** ./xymonnet/xymonnet.c.orig 2019-07-23 08:46:51.000000000 -0600 --- ./xymonnet/xymonnet.c 2019-07-30 14:54:30.953636000 -0600 *************** *** 1310,1317 **** --- 1310,1319 ---- } /* Ignore gcc warnings about truncating filenames when adding a number */ + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" + #endif /* Open the new ping result file */ snprintf(fn, sizeof(fn), "%s.%02d", pinglog, i); *************** *** 1335,1341 **** --- 1337,1345 ---- if (errfd) fclose(errfd); } if (!debug) unlink(fn); + #if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop + #endif if (failed) { /* Flag all ping tests as "undecided" */