From 6364af25d98ad6e741dbf89d07976c375f36c4fbc8490c9052258bcdc60886a9 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Thu, 11 Jul 2024 05:59:03 +0000 Subject: [PATCH 1/3] Accepting request 1185834 from home:hsk17:branches:server:database rrdtool-1.8.0-gcc14.patch from upstream should fix build with gcc-14, have disabled rrdtool-tclsegfault.patch, see comments in .spec file OBS-URL: https://build.opensuse.org/request/show/1185834 OBS-URL: https://build.opensuse.org/package/show/server:database/rrdtool?expand=0&rev=8 --- .gitattributes | 23 + .gitignore | 1 + ...703bbcc0af949ee365206426b6394c340c6f.patch | 53 + harden_rrdcached.service.patch | 24 + rrdcached-systemd-pre | 41 + rrdcached.service | 39 + rrdtool-1.8.0-gcc14.patch | 1586 +++++++++++++++++ rrdtool-1.8.0.tar.gz | 3 + rrdtool-tclsegfault.patch | 30 + rrdtool-zero_vs_nothing.patch | 29 + rrdtool.changes | 951 ++++++++++ rrdtool.spec | 422 +++++ sysconfig.rrdcached | 105 ++ 13 files changed, 3307 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 e59f703bbcc0af949ee365206426b6394c340c6f.patch create mode 100644 harden_rrdcached.service.patch create mode 100644 rrdcached-systemd-pre create mode 100644 rrdcached.service create mode 100644 rrdtool-1.8.0-gcc14.patch create mode 100644 rrdtool-1.8.0.tar.gz create mode 100644 rrdtool-tclsegfault.patch create mode 100644 rrdtool-zero_vs_nothing.patch create mode 100644 rrdtool.changes create mode 100644 rrdtool.spec create mode 100644 sysconfig.rrdcached diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/e59f703bbcc0af949ee365206426b6394c340c6f.patch b/e59f703bbcc0af949ee365206426b6394c340c6f.patch new file mode 100644 index 0000000..534716e --- /dev/null +++ b/e59f703bbcc0af949ee365206426b6394c340c6f.patch @@ -0,0 +1,53 @@ +From e59f703bbcc0af949ee365206426b6394c340c6f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= +Date: Wed, 23 Mar 2022 17:58:45 +0100 +Subject: [PATCH] Fix BUILD_DATE in rrdtool help output + +- This is a followup to #1102 +- Fixes segfault when running "rrdtool --help" +- Change DATE_FMT to the same date format as the __DATE__ macro [1]: + mmm dd yyyy + +[1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html +--- + configure.ac | 2 +- + src/rrd_tool.c | 8 ++++++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4d234585..5169b0d4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -695,7 +695,7 @@ AC_MSG_RESULT(${COMP_PERL:-No Perl Modules will be built}) + + # Use reproducible build date and time + if test "$SOURCE_DATE_EPOCH"; then +- DATE_FMT="%d %b %Y %H:%M:%S" ++ DATE_FMT="%b %d %Y %H:%M:%S" + BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT") + AC_DEFINE_UNQUOTED([BUILD_DATE], ["$BUILD_DATE"], [Use reproducible build date]) + fi +diff --git a/src/rrd_tool.c b/src/rrd_tool.c +index 930d0827..cc6119d9 100644 +--- a/src/rrd_tool.c ++++ b/src/rrd_tool.c +@@ -45,11 +45,19 @@ static void PrintUsage( + char *cmd) + { + ++#ifdef BUILD_DATE ++ const char *help_main = ++ N_("RRDtool %s" ++ " Copyright by Tobias Oetiker \n" ++ " Compiled %s\n\n" ++ "Usage: rrdtool [options] command command_options\n"); ++#else + const char *help_main = + N_("RRDtool %s" + " Copyright by Tobias Oetiker \n" + " Compiled %s %s\n\n" + "Usage: rrdtool [options] command command_options\n"); ++#endif + + const char *help_list = + N_ diff --git a/harden_rrdcached.service.patch b/harden_rrdcached.service.patch new file mode 100644 index 0000000..81e7728 --- /dev/null +++ b/harden_rrdcached.service.patch @@ -0,0 +1,24 @@ +Index: rrdtool-1.7.2/etc/rrdcached.service.in +=================================================================== +--- rrdtool-1.7.2.orig/etc/rrdcached.service.in ++++ rrdtool-1.7.2/etc/rrdcached.service.in +@@ -8,6 +8,19 @@ Description=Data caching daemon for rrdt + Documentation=man:rrdcached(1) + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++PrivateDevices=true ++ProtectHostname=true ++ProtectClock=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + # If you enable socket-activable rrdcached.socket, + # command line socket declarations will be ignored + ExecStart=@prefix@/bin/rrdcached -g diff --git a/rrdcached-systemd-pre b/rrdcached-systemd-pre new file mode 100644 index 0000000..d1c20f9 --- /dev/null +++ b/rrdcached-systemd-pre @@ -0,0 +1,41 @@ +#!/bin/sh +# +# script to create the file system environment for rrdcached +# from rrdtool package. This is needed, as openSUSE >= 13.1 +# enforces use of systemd, and does not allow the old-style +# init.d script. +# Hence, the content here is shamelessly ripped from the +# init.d script. +# + +# Check for existence of needed config file and read it +RRDCACHED_CONFIG='/etc/sysconfig/rrdcached' +test -r $RRDCACHED_CONFIG || { echo "$RRDCACHED_CONFIG not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + +# Read config +. $RRDCACHED_CONFIG + +check_and_create_dir() { + local DIR=$1 + test -d "$DIR" || mkdir -p "$DIR" +} + +case "$RRDCACHED_ADDRESS" in + unix:*) + SOCKETDIR=$(dirname ${RRDCACHED_ADDRESS#unix:}) + check_and_create_dir "$SOCKETDIR" + chgrp $RRDCACHED_GROUP "$SOCKETDIR" + ;; +esac +case "$RRDCACHED_CHROOT_DIR" in + /tmp) + echo "Warning: starting with chroot dir $RRDCACHED_CHROOT_DIR" >&2 + ;; + *) + check_and_create_dir "$RRDCACHED_CHROOT_DIR" + chown $RRDCACHED_USER:$RRDCACHED_GROUP "$RRDCACHED_CHROOT_DIR" + ;; +esac + diff --git a/rrdcached.service b/rrdcached.service new file mode 100644 index 0000000..4b68f85 --- /dev/null +++ b/rrdcached.service @@ -0,0 +1,39 @@ +# This file is part of package rrdtool. +# +# Description: +# +# Used to start rrdcached Data caching daemon for rrdtool +# + +[Unit] +Description=RRDcached RRD Data Caching Service +Requires=var-run.mount +Wants=network.target +After=network.target + +[Service] +# added automatically, for details please see +# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort +ProtectSystem=full +ProtectHome=true +PrivateDevices=true +ProtectHostname=true +ProtectClock=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +# end of automatic additions +Type=forking +ExecStartPre=-/bin/echo 'Starting RRD data caching service (rrdtools - rrdcached)' +ExecStartPre=/bin/sh -c "/usr/share/rrdcached/rrdcached-systemd-pre" +EnvironmentFile=-/etc/sysconfig/rrdcached +ExecStart=/usr/bin/rrdcached -s $RRDCACHED_GROUP -b "$RRDCACHED_CHROOT_DIR" -p /run/rrdcached/rrdcached.pid -l $RRDCACHED_ADDRESS -m $RRDCACHED_SOCKET_MASK -w $RRDCACHED_DISKWRITE -z $RRDCACHED_DELAY -t $RRDCACHED_WRITE_THREADS $RRDCACHED_OPTIONS +Restart=always +RestartSec=1 +PIDFile=/run/rrdcached/rrdcached.pid +TimeoutStopSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/rrdtool-1.8.0-gcc14.patch b/rrdtool-1.8.0-gcc14.patch new file mode 100644 index 0000000..e4bdc83 --- /dev/null +++ b/rrdtool-1.8.0-gcc14.patch @@ -0,0 +1,1586 @@ + +https://github.com/oetiker/rrdtool-1.x/pull/1242 + patch to CHANGES removed + + +From b76e3c578f1e9f582e9c28f50d82b1f569602075 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Such=C3=A1nek?= +Date: Fri, 5 Jan 2024 15:31:48 +0100 +Subject: [PATCH] Constify argv, fix warnings. (#1242) + +* Fix perl warnings + + - cast POPs to void to avoid unused value warning + - declare functions that don't set RETVAL as returning void + +Signed-off-by: Michal Suchanek + +* Constify argv + +rrd has no business modifying the string pointed to by passed agrv, and +as far as gcc can see it does indeed not modify them because it compiles +with const argv. + +This fixes warnings when passing const strings into rrd, and avoids the +need to duplicate all strings in the tcl bindings. + +This fixes warnings like these: +[ 3s] prog/sensord/rrd.c: In function 'rrdInit': +[ 3s] prog/sensord/rrd.c:302:40: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] +[ 3s] 302 | ret = rrd_create(argc, (char**) argv); +[ 3s] | ^ +[ 3s] prog/sensord/rrd.c: In function 'rrdUpdate': +[ 3s] prog/sensord/rrd.c:458:42: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] +[ 3s] 458 | if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) { +[ 3s] | ^ + +Signed-off-by: Michal Suchanek + +* tcl: Do not duplicate const strings + +--------- + +Signed-off-by: Michal Suchanek +--- + bindings/lua/rrdlua.c | 25 +++++----- + bindings/perl-shared/RRDs.xs | 36 +++++++------- + bindings/python/rrdtoolmodule.c | 38 +++++++-------- + bindings/ruby/main.c | 10 ++-- + bindings/tcl/tclrrd.c | 84 ++++++++------------------------- + src/optparse.c | 14 +++--- + src/optparse.h | 6 +-- + src/rrd.h | 38 +++++++-------- + src/rrd_cgi.c | 24 +++++----- + src/rrd_create.c | 2 +- + src/rrd_daemon.c | 12 ++--- + src/rrd_dump.c | 4 +- + src/rrd_fetch.c | 2 +- + src/rrd_first.c | 2 +- + src/rrd_flushcached.c | 2 +- + src/rrd_graph.c | 6 +-- + src/rrd_graph.h | 4 +- + src/rrd_graph_helper.c | 2 +- + src/rrd_info.c | 2 +- + src/rrd_last.c | 2 +- + src/rrd_lastupdate.c | 2 +- + src/rrd_list.c | 6 +-- + src/rrd_modify.c | 2 +- + src/rrd_modify.h | 2 +- + src/rrd_resize.c | 4 +- + src/rrd_restore.c | 2 +- + src/rrd_tool.c | 26 +++++----- + src/rrd_tune.c | 2 +- + src/rrd_update.c | 4 +- + src/rrd_xport.c | 2 +- + src/rrdupdate.c | 7 +-- + 31 files changed, 168 insertions(+), 209 deletions(-) + +diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c +index d1a700641..2095c3b5b 100644 +--- a/bindings/lua/rrdlua.c ++++ b/bindings/lua/rrdlua.c +@@ -37,8 +37,8 @@ + extern void rrd_freemem(void *mem); + + extern int luaopen_rrd (lua_State * L); +-typedef int (*RRD_FUNCTION)(int, char **); +-typedef rrd_info_t *(RRD_FUNCTION_V)(int, char **); ++typedef int (*RRD_FUNCTION)(int, const char **); ++typedef rrd_info_t *(RRD_FUNCTION_V)(int, const char **); + + /**********************************************************/ + +@@ -49,9 +49,9 @@ static void reset_rrd_state(void) + rrd_clear_error(); + } + +-static char **make_argv(const char *cmd, lua_State * L) ++static const char **make_argv(const char *cmd, lua_State * L) + { +- char **argv; ++ const char **argv; + int i; + int argc = lua_gettop(L) + 1; + +@@ -60,13 +60,12 @@ static char **make_argv(const char *cmd, lua_State * L) + luaL_error(L, "Can't allocate memory for arguments array", cmd); + + /* fprintf(stderr, "Args:\n"); */ +- argv[0] = (char *) cmd; /* Dummy arg. Cast to (char *) because rrd */ +- /* functions don't expect (const * char) */ ++ argv[0] = cmd; + /* fprintf(stderr, "%s\n", argv[0]); */ + for (i=1; i + #include "../../src/rrd_tool.h" + #include "../../src/rrd_format.h" ++#include "../../src/unused.h" + + /* support pre-8.4 tcl */ + +@@ -41,47 +42,39 @@ extern int Tclrrd_SafeInit( + * Hence, we need to do some preparation before + * calling the rrd library functions. + */ +-static char **getopt_init( ++static const char **getopt_init( + int argc, + CONST84 char *argv[]) + { +- char **argv2; ++ const char **argv2; + int i; + + argv2 = calloc(argc, sizeof(char *)); + for (i = 0; i < argc; i++) { +- argv2[i] = strdup(argv[i]); ++ argv2[i] = argv[i]; + } + return argv2; + } + + static void getopt_cleanup( +- int argc, +- char **argv2) ++ int UNUSED(argc), ++ const char **argv2) + { +- int i; +- +- for (i = 0; i < argc; i++) { +- if (argv2[i] != NULL) { +- free(argv2[i]); +- } +- } +- free(argv2); ++ free((void *)argv2); + } + + static void getopt_free_element( +- char *argv2[], ++ const char *argv2[], + int argn) + { + if (argv2[argn] != NULL) { +- free(argv2[argn]); + argv2[argn] = NULL; + } + } + + static void getopt_squieeze( + int *argc, +- char *argv2[]) ++ const char *argv2[]) + { + int i, null_i = 0, argc_tmp = *argc; + +@@ -104,7 +97,7 @@ static int Rrd_Create( + CONST84 char *argv[]) + { + int argv_i; +- char **argv2; ++ const char **argv2; + char *parsetime_error = NULL; + time_t last_up = time(NULL) - 10; + long int long_tmp; +@@ -295,7 +288,7 @@ static int Rrd_Flushcached( + return TCL_ERROR; + } + +- rrd_flushcached(argc, (char**)argv); ++ rrd_flushcached(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -380,7 +373,7 @@ static int Rrd_Update( + CONST84 char *argv[]) + { + int argv_i; +- char **argv2, *template = NULL; ++ const char **argv2, *template = NULL; + + argv2 = getopt_init(argc, argv); + +@@ -391,16 +384,10 @@ static int Rrd_Update( + Tcl_AppendResult(interp, "RRD Error: option '", + argv2[argv_i - 1], "' needs an argument", + (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } +- if (template != NULL) { +- free(template); +- } +- template = strdup(argv2[argv_i]); ++ template = argv2[argv_i]; + getopt_free_element(argv2, argv_i - 1); + getopt_free_element(argv2, argv_i); + } else if (!strcmp(argv2[argv_i], "--")) { +@@ -409,9 +396,6 @@ static int Rrd_Update( + } else if (argv2[argv_i][0] == '-') { + Tcl_AppendResult(interp, "RRD Error: unknown option '", + argv2[argv_i], "'", (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } +@@ -422,18 +406,12 @@ static int Rrd_Update( + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + + rrd_update_r(argv2[1], template, argc - 2, (const char **)argv2 + 2); + +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { +@@ -454,7 +432,6 @@ static int Rrd_Info( + { + int status = TCL_OK; + rrd_info_t *data; +- char **argv2; + + /* TODO: support for rrdcached */ + if (argc != 2) { +@@ -463,9 +440,7 @@ static int Rrd_Info( + return TCL_ERROR; + } + +- argv2 = getopt_init(argc, argv); +- +- data = rrd_info_r(argv2[1]); ++ data = rrd_info_r(argv[1]); + + if (data) { + Tcl_SetObjResult(interp, convert_info(data)); +@@ -477,7 +452,6 @@ static int Rrd_Info( + status = TCL_ERROR; + } + +- getopt_cleanup(argc, argv2); + return status; + } + +@@ -488,7 +462,6 @@ static int Rrd_Lastupdate( + CONST84 char *argv[]) + { + time_t last_update; +- char **argv2; + char **ds_namv; + char **last_ds; + char s[30]; +@@ -502,8 +475,7 @@ static int Rrd_Lastupdate( + return TCL_ERROR; + } + +- argv2 = getopt_init(argc, argv); +- if (rrd_lastupdate_r(argv2[1], &last_update, ++ if (rrd_lastupdate_r(argv[1], &last_update, + &ds_cnt, &ds_namv, &last_ds) == 0) { + listPtr = Tcl_GetObjResult(interp); + for (i = 0; i < ds_cnt; i++) { +@@ -527,7 +499,6 @@ static int Rrd_Lastupdate( + free(ds_namv); + } + } +- getopt_cleanup(argc, argv2); + return TCL_OK; + } + +@@ -543,10 +514,8 @@ static int Rrd_Fetch( + char **ds_namv; + Tcl_Obj *listPtr; + char s[30]; +- char **argv2; + +- argv2 = getopt_init(argc, argv); +- if (rrd_fetch(argc, argv2, &start, &end, &step, ++ if (rrd_fetch(argc, argv, &start, &end, &step, + &ds_cnt, &ds_namv, &data) != -1) { + datai = data; + listPtr = Tcl_GetObjResult(interp); +@@ -562,7 +531,6 @@ static int Rrd_Fetch( + free(ds_namv); + free(data); + } +- getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -590,7 +558,7 @@ static int Rrd_Graph( + int rc, xsize, ysize; + double ymin, ymax; + char dimensions[50]; +- char **argv2; ++ const char **argv2; + CONST84 char *save; + + /* +@@ -692,11 +660,7 @@ static int Rrd_Tune( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_tune(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_tune(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -716,11 +680,7 @@ static int Rrd_Resize( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_resize(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_resize(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -740,11 +700,7 @@ static int Rrd_Restore( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_restore(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_restore(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +diff --git a/src/optparse.c b/src/optparse.c +index 9040ba8b2..79a3efe11 100644 +--- a/src/optparse.c ++++ b/src/optparse.c +@@ -10,7 +10,7 @@ + #define options_argv(i) \ + ((i) < options->argc ? options->argv[i] : NULL) + +-void optparse_init(struct optparse *options, int argc, char **argv) ++void optparse_init(struct optparse *options, int argc, const char **argv) + { + options->argv = argv; + options->argc = argc; +@@ -42,7 +42,7 @@ is_longopt(const char *arg) + static void + permute(struct optparse *options, int index) + { +- char *nonoption = options->argv[index]; ++ const char *nonoption = options->argv[index]; + for (int i = index; i < options->optind - 1; i++) + options->argv[i] = options->argv[i + 1]; + options->argv[options->optind - 1] = nonoption; +@@ -67,7 +67,7 @@ int optparse(struct optparse *options, const char *optstring) + options->errmsg[0] = '\0'; + options->optopt = 0; + options->optarg = NULL; +- char *option = options_argv(options->optind); ++ const char *option = options_argv(options->optind); + if (option == NULL) { + return -1; + } else if (is_dashdash(option)) { +@@ -88,7 +88,7 @@ int optparse(struct optparse *options, const char *optstring) + option += options->subopt + 1; + options->optopt = option[0]; + int type = argtype(optstring, option[0]); +- char *next = options_argv(options->optind + 1); ++ const char *next = options_argv(options->optind + 1); + switch (type) { + case -1: + opterror(options, "invalid option -- '%c'", option[0]); +@@ -128,10 +128,10 @@ int optparse(struct optparse *options, const char *optstring) + return 0; + } + +-char *optparse_arg(struct optparse *options) ++const char *optparse_arg(struct optparse *options) + { + options->subopt = 0; +- char *option = options->argv[options->optind]; ++ const char *option = options->argv[options->optind]; + if (option != NULL) + options->optind++; + return option; +@@ -222,7 +222,7 @@ optparse_long(struct optparse *options, + int *longindex) + { + // printf("%i < %i\n",options->optind,options->argc); +- char *option = options_argv(options->optind); ++ const char *option = options_argv(options->optind); + if (option == NULL) { + return -1; + } else if (is_dashdash(option)) { +diff --git a/src/optparse.h b/src/optparse.h +index c4b0ec19c..7a0bb3885 100644 +--- a/src/optparse.h ++++ b/src/optparse.h +@@ -44,7 +44,7 @@ + */ + + struct optparse { +- char **argv; ++ const char **argv; + int argc; + int permute; + int optind; +@@ -65,7 +65,7 @@ struct optparse_long { + /** + * Initializes the parser state. + */ +-void optparse_init(struct optparse *options, int argc, char **argv); ++void optparse_init(struct optparse *options, int argc, const char **argv); + + /** + * Read the next option in the argv array. +@@ -98,6 +98,6 @@ optparse_long(struct optparse *options, + * subcommand returned by optparse_arg(). This function allows you to + * ignore the value of optind. + */ +-char *optparse_arg(struct optparse *options); ++const char *optparse_arg(struct optparse *options); + + #endif +diff --git a/src/rrd.h b/src/rrd.h +index 184887ccc..b40f9a449 100644 +--- a/src/rrd.h ++++ b/src/rrd.h +@@ -155,10 +155,10 @@ extern "C" { + /* main function blocks */ + int rrd_create( + int, +- char **); ++ const char **); + rrd_info_t *rrd_info( + int, +- char **); ++ const char **); + rrd_info_t *rrd_info_push( + rrd_info_t *, + char *, +@@ -170,19 +170,19 @@ extern "C" { + rrd_info_t *); + char *rrd_list( + int, +- char **); ++ const char **); + char *rrd_list_r( + int, +- char *dirname); ++ const char *dirname); + int rrd_update( + int, +- char **); ++ const char **); + rrd_info_t *rrd_update_v( + int, +- char **); ++ const char **); + int rrd_graph( + int, +- char **, ++ const char **, + char ***, + int *, + int *, +@@ -191,11 +191,11 @@ extern "C" { + double *); + rrd_info_t *rrd_graph_v( + int, +- char **); ++ const char **); + + int rrd_fetch( + int, +- char **, ++ const char **, + time_t *, + time_t *, + unsigned long *, +@@ -204,32 +204,32 @@ extern "C" { + rrd_value_t **); + int rrd_restore( + int, +- char **); ++ const char **); + int rrd_dump( + int, +- char **); ++ const char **); + int rrd_tune( + int, +- char **); ++ const char **); + time_t rrd_last( + int, +- char **); ++ const char **); + int rrd_lastupdate( + int argc, +- char **argv); ++ const char **argv); + time_t rrd_first( + int, +- char **); ++ const char **); + int rrd_resize( + int, +- char **); ++ const char **); + char *rrd_strversion( + void); + double rrd_version( + void); + int rrd_xport( + int, +- char **, ++ const char **, + int *, + time_t *, + time_t *, +@@ -239,7 +239,7 @@ extern "C" { + rrd_value_t **); + int rrd_flushcached( + int argc, +- char **argv); ++ const char **argv); + + void rrd_freemem( + void *mem); +@@ -323,7 +323,7 @@ extern "C" { + const char **argv); + int rrd_dump_opt_r( + const char *filename, +- char *outname, ++ const char *outname, + int opt_noheader); + int rrd_dump_r( + const char *filename, +diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c +index b82c310db..14a4f511a 100644 +--- a/src/rrd_cgi.c ++++ b/src/rrd_cgi.c +@@ -102,7 +102,7 @@ static char *rrdstrip( + static char *scanargs( + char *line, + int *argc, +- char ***args); ++ const char ***args); + + /* format at-time specified times using strftime */ + static char *printstrftime( +@@ -317,7 +317,7 @@ static const char *putvar( + } + + /* expand those RRD:* directives that can be used recursively */ +-static char *rrd_expand_vars( ++static const char *rrd_expand_vars( + char *buffer) + { + int i; +@@ -434,7 +434,7 @@ static int readfile( + + int main( + int argc, +- char *argv[]) ++ const char *argv[]) + { + char *buffer; + long i; +@@ -926,7 +926,7 @@ static char *drawgraph( + } + calfree(); + if (rrd_graph +- (argc + 1, (char **) args - 1, &calcpr, &xsize, &ysize, NULL, &ymin, ++ (argc + 1, args - 1, &calcpr, &xsize, &ysize, NULL, &ymin, + &ymax) != -1) { + return stralloc(calcpr[0]); + } else { +@@ -973,7 +973,7 @@ static char *printtimelast( + /* not raising argc in step with args - 1 since the last argument + will be used below for strftime */ + +- last = rrd_last(argc, (char **) args - 1); ++ last = rrd_last(argc, args - 1); + if (rrd_test_error()) { + char err[4096]; + +@@ -1027,7 +1027,7 @@ static char *printtimenow( + static char *scanargs( + char *line, + int *argument_count, +- char ***arguments) ++ const char ***arguments) + { + char *getP; /* read cursor */ + char *putP; /* write cursor */ +@@ -1039,8 +1039,8 @@ static char *scanargs( + + /* local array of arguments while parsing */ + int argc = 1; +- char **argv; +- char **argv_tmp; /* temp variable for realloc() */ ++ const char **argv; ++ const char **argv_tmp; /* temp variable for realloc() */ + + #ifdef DEBUG_PARSER + printf("<-- scanargs(%s) -->\n", line); +@@ -1051,7 +1051,7 @@ static char *scanargs( + + /* create initial argument array of char pointers */ + argsz = 32; +- argv = (char **) malloc(argsz * sizeof(char *)); ++ argv = malloc(argsz * sizeof(char *)); + if (!argv) { + return NULL; + } +@@ -1146,7 +1146,7 @@ static char *scanargs( + if (argc == argsz - 2) { + /* resize argument array */ + argsz *= 2; +- argv_tmp = (char **) rrd_realloc(argv, argsz * sizeof(char *)); ++ argv_tmp = rrd_realloc(argv, argsz * sizeof(char *)); + if (*argv_tmp == NULL) { + return NULL; + } +@@ -1213,7 +1213,7 @@ static int parse( + /* the name of the vairable ... */ + char *val; + long valln; +- char **args; ++ const char **args; + char *end; + long end_offset; + int argc; +@@ -1264,7 +1264,7 @@ static int parse( + /* make sure we do not shrink the mallocd block */ + size_t newbufsize = i + strlen(end) + valln + 1; + +- *buf = (char *) rrd_realloc(*buf, newbufsize); ++ *buf = rrd_realloc(*buf, newbufsize); + + if (*buf == NULL) { + perror("Realoc buf:"); +diff --git a/src/rrd_create.c b/src/rrd_create.c +index f9bad0866..919b4195a 100644 +--- a/src/rrd_create.c ++++ b/src/rrd_create.c +@@ -76,7 +76,7 @@ static void parseGENERIC_DS( + + int rrd_create( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"start", 'b', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c +index 751798aa1..21c38a11d 100644 +--- a/src/rrd_daemon.c ++++ b/src/rrd_daemon.c +@@ -1877,7 +1877,7 @@ static int handle_request_tune( + HANDLER_PROTO) + { /* {{{ */ + int status; +- char** argv = NULL; ++ const char** argv = NULL; + int argc, argc_tmp; + char* i; + int rc; +@@ -1916,7 +1916,7 @@ static int handle_request_tune( + goto done; + } + +- if ((argv = (char **) malloc(argc * sizeof(char*))) == NULL) { ++ if ((argv = malloc(argc * sizeof(char*))) == NULL) { + rc = send_response(sock, RESP_ERR, "%s\n", rrd_strerror(ENOMEM)); + goto done; + } +@@ -1927,7 +1927,7 @@ static int handle_request_tune( + argc_tmp += 1; + } + +- status = rrd_tune_r(file, argc, (const char **)argv); ++ status = rrd_tune_r(file, argc, argv); + if (status != 0) { + rc = send_response(sock, RESP_ERR, "Got error %s\n", rrd_get_error()); + goto done; +@@ -1935,7 +1935,7 @@ static int handle_request_tune( + rc = send_response(sock, RESP_OK, "Success\n"); + done: + free(file); +- free(argv); ++ free((void *)argv); + return rc; + } + +@@ -4505,7 +4505,7 @@ static int cleanup( + + static int read_options( + int argc, +- char **argv) ++ const char **argv) + { /* {{{ */ + struct optparse_long longopts[] = { + {NULL, 'a', OPTPARSE_REQUIRED}, +@@ -5050,7 +5050,7 @@ static int read_options( + + int main( + int argc, +- char **argv) ++ const char **argv) + { + int status; + +diff --git a/src/rrd_dump.c b/src/rrd_dump.c +index a4490d594..c58e0ee4a 100644 +--- a/src/rrd_dump.c ++++ b/src/rrd_dump.c +@@ -497,7 +497,7 @@ static size_t rrd_dump_opt_cb_fileout( + + int rrd_dump_opt_r( + const char *filename, +- char *outname, ++ const char *outname, + int opt_noheader) + { + FILE *out_file; +@@ -543,7 +543,7 @@ int rrd_dump_r( + + int rrd_dump( + int argc, +- char **argv) ++ const char **argv) + { + int opt; + struct optparse_long longopts[] = { +diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c +index c739bfc45..54780f19b 100644 +--- a/src/rrd_fetch.c ++++ b/src/rrd_fetch.c +@@ -61,7 +61,7 @@ + + int rrd_fetch( + int argc, +- char **argv, ++ const char **argv, + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ +diff --git a/src/rrd_first.c b/src/rrd_first.c +index a696c5c38..f3dde5404 100644 +--- a/src/rrd_first.c ++++ b/src/rrd_first.c +@@ -13,7 +13,7 @@ + + time_t rrd_first( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"rraindex", 129, OPTPARSE_REQUIRED}, +diff --git a/src/rrd_flushcached.c b/src/rrd_flushcached.c +index 090bca749..3bf6cd29d 100644 +--- a/src/rrd_flushcached.c ++++ b/src/rrd_flushcached.c +@@ -22,7 +22,7 @@ + #include "rrd_tool.h" + #include "rrd_client.h" + +-int rrd_flushcached (int argc, char **argv) ++int rrd_flushcached (int argc, const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_graph.c b/src/rrd_graph.c +index b32d45085..46511e9a3 100644 +--- a/src/rrd_graph.c ++++ b/src/rrd_graph.c +@@ -4607,7 +4607,7 @@ int scan_for_col( + /* Now just a wrapper around rrd_graph_v */ + int rrd_graph( + int argc, +- char **argv, ++ const char **argv, + char ***prdata, + int *xsize, + int *ysize, +@@ -4690,7 +4690,7 @@ int rrd_graph( + + rrd_info_t *rrd_graph_v( + int argc, +- char **argv) ++ const char **argv) + { + image_desc_t im; + rrd_info_t *grinfo; +@@ -4953,7 +4953,7 @@ void rrd_graph_init( + + void rrd_graph_options( + int argc, +- char *argv[], ++ const char **argv, + struct optparse *poptions, + image_desc_t *im) + { +diff --git a/src/rrd_graph.h b/src/rrd_graph.h +index 4df32ec66..083cf3800 100644 +--- a/src/rrd_graph.h ++++ b/src/rrd_graph.h +@@ -473,12 +473,12 @@ void time_clean( + + void rrd_graph_options( + int, +- char **, ++ const char **, + struct optparse *, + image_desc_t *); + void rrd_graph_script( + int, +- char **, ++ const char **, + image_desc_t *const, + int); + int rrd_graph_color( +diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c +index 99cdefa65..ba90e1a6c 100644 +--- a/src/rrd_graph_helper.c ++++ b/src/rrd_graph_helper.c +@@ -1952,7 +1952,7 @@ static int parse_xport( + + void rrd_graph_script( + int argc, +- char *argv[], ++ const char **argv, + image_desc_t *const im, + int optno) + { +diff --git a/src/rrd_info.c b/src/rrd_info.c +index c0c6f68c7..eb0d4e4de 100644 +--- a/src/rrd_info.c ++++ b/src/rrd_info.c +@@ -82,7 +82,7 @@ rrd_info_t + + rrd_info_t *rrd_info( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_last.c b/src/rrd_last.c +index 026a1e828..1aae72512 100644 +--- a/src/rrd_last.c ++++ b/src/rrd_last.c +@@ -11,7 +11,7 @@ + + time_t rrd_last( + int argc, +- char **argv) ++ const char **argv) + { + char *opt_daemon = NULL; + time_t lastupdate; +diff --git a/src/rrd_lastupdate.c b/src/rrd_lastupdate.c +index ab30dcf67..4f7f4770e 100644 +--- a/src/rrd_lastupdate.c ++++ b/src/rrd_lastupdate.c +@@ -14,7 +14,7 @@ + #include "rrd_client.h" + #include + +-int rrd_lastupdate (int argc, char **argv) ++int rrd_lastupdate (int argc, const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_list.c b/src/rrd_list.c +index e743b9b7d..6e96220ea 100644 +--- a/src/rrd_list.c ++++ b/src/rrd_list.c +@@ -37,7 +37,7 @@ static char *move_past_prefix(const char *prefix, const char *string) + return (char *)&(string[index]); + } + +-static char *rrd_list_rec(int recursive, char *root, char *dirname) ++static char *rrd_list_rec(int recursive, const char *root, const char *dirname) + { + #define SANE_ASPRINTF2(_dest_str, _format, ...) \ + if (asprintf(&_dest_str, _format, __VA_ARGS__) == -1) { \ +@@ -138,7 +138,7 @@ static char *rrd_list_rec(int recursive, char *root, char *dirname) + return out; + } + +-char *rrd_list_r(int recursive, char *dirname) ++char *rrd_list_r(int recursive, const char *dirname) + { + #define SANE_ASPRINTF(_dest_str, _format, ...) \ + if (asprintf(&_dest_str, _format, __VA_ARGS__) == -1) { \ +@@ -240,7 +240,7 @@ char *rrd_list_r(int recursive, char *dirname) + return rrd_list_rec(recursive, dirname, dirname); + } + +-char *rrd_list(int argc, char **argv) ++char *rrd_list(int argc, const char **argv) + { + char *opt_daemon = NULL; + int status; +diff --git a/src/rrd_modify.c b/src/rrd_modify.c +index a2b07f640..70ac9e77f 100644 +--- a/src/rrd_modify.c ++++ b/src/rrd_modify.c +@@ -1297,7 +1297,7 @@ static int add_rras(const rrd_t *in, rrd_t *out, const int *ds_map, + } + + int handle_modify(const rrd_t *in, const char *outfilename, +- int argc, char **argv, int optidx, ++ int argc, const char **argv, int optidx, + int newstep) { + // parse add/remove options + int rc = -1; +diff --git a/src/rrd_modify.h b/src/rrd_modify.h +index 52d8789be..64a39926e 100644 +--- a/src/rrd_modify.h ++++ b/src/rrd_modify.h +@@ -28,7 +28,7 @@ typedef struct { + } rra_mod_op_t; + + int handle_modify(const rrd_t *in, const char *outfilename, +- int argc, char **argv, int optind, ++ int argc, const char **argv, int optind, + int newstep); + + typedef union { +diff --git a/src/rrd_resize.c b/src/rrd_resize.c +index fb75d81ff..742e6d141 100644 +--- a/src/rrd_resize.c ++++ b/src/rrd_resize.c +@@ -12,9 +12,9 @@ + + int rrd_resize( + int argc, +- char **argv) ++ const char **argv) + { +- char *infilename, outfilename[11] = "resize.rrd"; ++ const char *infilename, outfilename[11] = "resize.rrd"; + rrd_t rrdold, rrdnew; + rrd_value_t buffer; + int version; +diff --git a/src/rrd_restore.c b/src/rrd_restore.c +index 85d481e0c..ebef5efe8 100644 +--- a/src/rrd_restore.c ++++ b/src/rrd_restore.c +@@ -1378,7 +1378,7 @@ int write_file( + + int rrd_restore( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"range-check", 'r', OPTPARSE_NONE}, +diff --git a/src/rrd_tool.c b/src/rrd_tool.c +index cc6119d9a..56321ee1a 100644 +--- a/src/rrd_tool.c ++++ b/src/rrd_tool.c +@@ -22,16 +22,16 @@ + + + static void PrintUsage( +- char *cmd); ++ const char *cmd); + static int CountArgs( + char *aLine); + static int CreateArgs( ++ const char *, + char *, +- char *, +- char **); ++ const char **); + static int HandleInputLine( + int, +- char **, ++ const char **, + FILE *); + int RemoteMode = 0; + int ChangeRoot = 0; +@@ -42,7 +42,7 @@ int ChangeRoot = 0; + + + static void PrintUsage( +- char *cmd) ++ const char *cmd) + { + + #ifdef BUILD_DATE +@@ -443,11 +443,11 @@ static char *fgetslong( + + int main( + int argc, +- char *argv[]) ++ const char *argv[]) + { +- char **myargv; ++ const char **myargv; + char *aLine; +- char *firstdir = ""; ++ const char *firstdir = ""; + + #ifdef MUST_DISABLE_SIGFPE + signal(SIGFPE, SIG_IGN); +@@ -526,7 +526,7 @@ int main( + printf("ERROR: not enough arguments\n"); + continue; + } +- if ((myargv = (char **) malloc((argc + 1) * ++ if ((myargv = malloc((argc + 1) * + sizeof(char *))) == NULL) { + perror("malloc"); + exit(1); +@@ -572,7 +572,7 @@ int main( + resolving them portably is not really simple. */ + static int HandleInputLine( + int argc, +- char **argv, ++ const char **argv, + FILE * out) + { + #if defined(HAVE_OPENDIR) && defined (HAVE_READDIR) +@@ -887,12 +887,12 @@ static int CountArgs( + * CreateArgs - take a string (aLine) and tokenize + */ + static int CreateArgs( +- char *pName, ++ const char *pName, + char *aLine, +- char **argv) ++ const char **argv) + { + char *getP, *putP; +- char **pargv = argv; ++ const char **pargv = argv; + char Quote = 0; + int inArg = 0; + int len; +diff --git a/src/rrd_tune.c b/src/rrd_tune.c +index 198817f37..dd3f3f7cb 100644 +--- a/src/rrd_tune.c ++++ b/src/rrd_tune.c +@@ -71,7 +71,7 @@ static int set_hwsmootharg( + + int rrd_tune( + int argc, +- char **argv) ++ const char **argv) + { + char *opt_daemon = NULL; + const char *in_filename = NULL; +diff --git a/src/rrd_update.c b/src/rrd_update.c +index fbbe2820a..bb9a0602c 100644 +--- a/src/rrd_update.c ++++ b/src/rrd_update.c +@@ -299,7 +299,7 @@ static void initialize_time( + + rrd_info_t *rrd_update_v( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"template", 't', OPTPARSE_REQUIRED}, +@@ -674,7 +674,7 @@ static int rrd_template_update(const char *filename, /* {{{ */ + + int rrd_update( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"template", 't', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_xport.c b/src/rrd_xport.c +index d15d33dd9..93c02f926 100644 +--- a/src/rrd_xport.c ++++ b/src/rrd_xport.c +@@ -73,7 +73,7 @@ static int rrd_xport_format_addprints( + + int rrd_xport( + int argc, +- char **argv, ++ const char **argv, + int UNUSED(*xsize), + time_t *start, + time_t *end, /* which time frame do you want ? +diff --git a/src/rrdupdate.c b/src/rrdupdate.c +index cbbf48cc1..e368516c8 100644 +--- a/src/rrdupdate.c ++++ b/src/rrdupdate.c +@@ -20,19 +20,20 @@ int main( + int argc, + char **argv) + { ++ const char **cargv = (const char **)argv; + char *name=basename(argv[0]); + rrd_info_t *info; + + if (!strcmp(name, "rrdcreate")) { +- rrd_create(argc, argv); ++ rrd_create(argc, cargv); + } + else if (!strcmp(name, "rrdinfo")) { +- info=rrd_info(argc, argv); ++ info=rrd_info(argc, cargv); + rrd_info_print(info); + rrd_info_free(info); + } + else { +- rrd_update(argc, argv); ++ rrd_update(argc, cargv); + } + + if (rrd_test_error()) { diff --git a/rrdtool-1.8.0.tar.gz b/rrdtool-1.8.0.tar.gz new file mode 100644 index 0000000..641d9ea --- /dev/null +++ b/rrdtool-1.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd37614137d7a8dc523359648eb2a81631a34fd91a82ed5581916a52c08433f4 +size 2955398 diff --git a/rrdtool-tclsegfault.patch b/rrdtool-tclsegfault.patch new file mode 100644 index 0000000..b3d48f5 --- /dev/null +++ b/rrdtool-tclsegfault.patch @@ -0,0 +1,30 @@ +Index: bindings/tcl/tclrrd.c +=================================================================== +--- a/bindings/tcl/tclrrd.c ++++ b/bindings/tcl/tclrrd.c +@@ -472,6 +472,12 @@ static int Rrd_Graph( + char **argv2; + CONST84 char *save; + ++ if (argc < 2) { ++ Tcl_AppendResult(interp, "RRD Error: needs image filename", ++ (char *) NULL); ++ return TCL_ERROR; ++ } ++ + /* + * If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to + * that file descriptor. Will this work with windoze? I have no idea. +@@ -597,6 +603,12 @@ static int Rrd_Resize( + { + char **argv2; + ++ if (argc < 2) { ++ Tcl_AppendResult(interp, "RRD Error: needs rrd filename", ++ (char *) NULL); ++ return TCL_ERROR; ++ } ++ + argv2 = getopt_init(argc, argv); + rrd_resize(argc, argv2); + getopt_cleanup(argc, argv2); diff --git a/rrdtool-zero_vs_nothing.patch b/rrdtool-zero_vs_nothing.patch new file mode 100644 index 0000000..b6d7a5b --- /dev/null +++ b/rrdtool-zero_vs_nothing.patch @@ -0,0 +1,29 @@ +Index: rrdtool-1.6.0/src/rrd_gfx.c +=================================================================== +--- rrdtool-1.6.0.orig/src/rrd_gfx.c ++++ rrdtool-1.6.0/src/rrd_gfx.c +@@ -329,10 +329,10 @@ void gfx_line_fit( + line_width = cairo_get_line_width(cr); + line_height = line_width; + cairo_user_to_device_distance(cr, &line_width, &line_height); +- line_width = line_width / 2.0 - ceil(line_width / 2.0); +- line_height = line_height / 2.0 - ceil(line_height / 2.0); +- *x = floor(*x - 0.5) - line_width; +- *y = ceil(*y + 0.5) + line_height; ++ line_width = line_width / 2.0 - (long) (line_width / 2.0); ++ line_height = line_height / 2.0 - (long) (line_height / 2.0); ++ *x = (double) ((long) (*x + 0.5)) - line_width; ++ *y = (double) ((long) (*y + 0.5)) + line_height; + cairo_device_to_user(cr, x, y); + } + +@@ -348,7 +348,7 @@ void gfx_area_fit( + if (!im->gridfit) + return; + cairo_user_to_device(cr, x, y); +- *x = floor(*x); +- *y = ceil(*y); ++ *x = (double) ((long) (*x + 0.5)); ++ *y = (double) ((long) (*y + 0.5)); + cairo_device_to_user(cr, x, y); + } diff --git a/rrdtool.changes b/rrdtool.changes new file mode 100644 index 0000000..df2b211 --- /dev/null +++ b/rrdtool.changes @@ -0,0 +1,951 @@ +------------------------------------------------------------------- +Fri Jul 5 20:30:43 UTC 2024 - Friedrich Haubensak + +- add rrdtool-1.8.0-gcc14.patch from upstream to fix build with + gcc-14 +- disable rrdtool-tclsegfault.patch, does not apply and seems + unneccessary +------------------------------------------------------------------- +Mon Dec 25 16:26:00 UTC 2023 - Michal Suchanek + +- Use autosetup + +------------------------------------------------------------------- +Wed Mar 22 12:56:56 UTC 2023 - Adam Majer + +- Decouple e59f703bbcc0af949ee365206426b6394c340c6f.patch from + github url + +------------------------------------------------------------------- +Tue Mar 21 18:55:20 UTC 2023 - Bjørn Lie + +- Follow upstream, disable the following, failing tests: rpn1 + https://github.com/oetiker/rrdtool-1.x/blob/master/.travis.yml#L30 + +------------------------------------------------------------------- +Wed Apr 13 08:27:59 UTC 2022 - Guillaume GARDET + +- Add patch to fix segfault (seen in %check on aarch64): + * e59f703bbcc0af949ee365206426b6394c340c6f.patch + +------------------------------------------------------------------- +Tue Mar 29 13:41:16 UTC 2022 - Danilo Spinella + +- Update to 1.8.0: + For the list of changes, please have a look here: + https://github.com/oetiker/rrdtool-1.x/blob/master/CHANGES +- Remove unneeded python3.patch + +------------------------------------------------------------------- +Sun Jan 16 13:28:42 UTC 2022 - Dirk Müller + +- remove conditionals around patch declaration, found by Stefan Liehmann + +------------------------------------------------------------------- +Tue Jan 11 21:16:22 UTC 2022 - Dirk Müller + +- add python-rpm-macros + +------------------------------------------------------------------- +Tue Nov 16 08:36:04 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_rrdcached.service.patch + Modified: + * rrdcached.service + +------------------------------------------------------------------- +Sun Sep 22 16:40:00 UTC 2019 - Andreas Stieger + +- rrdtool 1.7.2: + * fix segfault on non-existent RRD file when using rrdcached + * fix bounds handling, documentation and checking on rrdtool xport + * Fix %s/%S unit autoscaling in gprint for json/xml + * Optimized PDP Calculation +- drop rrdtool-1.7.1-compile_fix.patch, upstream + +------------------------------------------------------------------- +Wed Feb 13 10:09:13 UTC 2019 - kstreitova@suse.com + +- Version update to 1.7.1: + * fix many compile time warnings + * Re-enable 0-width lines + * Include rrd_pdpcalc.pod in Makefile.am also + * Lots of spelling fixes for rrdtool source and documentation + * fix off by one issue in rrdtool xport output + * fix lua extension build + * fix python bindings + * fix multiple static variable issues in conflict with MT + * make translations actually work + * Fixed configure --enable / --disable options + * rrd_daemon stability fixes + * fix tcl bindings + * do not call umask ever (not MT safe) + * Multiline Titles + * French translation + * Added support for --allow-shrink with --rigid flag (#843) + * Added SUSPEND/RESUME/SUSPENDALL/RESUMEALL commands for rrd_cached + * include the daemon name in the error message +- add rrdtool-1.7.1-compile_fix.patch to fix build with the new + version + +------------------------------------------------------------------- +Sun Feb 4 08:56:33 UTC 2018 - obs@botter.cc + +- fix building bindings for Python 2 for suse_version < 1500 + +------------------------------------------------------------------- +Thu Nov 23 13:53:48 UTC 2017 - rbrown@suse.com + +- Replace references to /var/adm/fillup-templates with new + %_fillupdir macro (boo#1069468) + +------------------------------------------------------------------- +Fri Nov 10 18:20:19 UTC 2017 - jmatejek@suse.com + +- build bindings for Python 3 instead of Python 2 + * python3.patch + +------------------------------------------------------------------- +Mon Jul 24 12:14:04 UTC 2017 - dimstar@opensuse.org + +- Only move the lua bindings from /usr/local when needed: this was + generally only a hack as our lua.pc 'forgot' to expose the + variables INSTALL_CMOD. As lua is now being fixed, this hack is + no longer needed (for compatibility with older/broken lua + packages we keep it in place, but don't abort if the move + failed). + +------------------------------------------------------------------- +Mon Jul 3 11:22:55 UTC 2017 - tchvatal@suse.com + +- Cleanup bit with spec-cleaner +- Move all BR to the top so it is obvious what is needed for which + part +- Build with latest lua not 5.1 + +------------------------------------------------------------------- +Mon Jul 3 11:14:05 UTC 2017 - tchvatal@suse.com + +- Version update to 1.7.0: + * Many coverity scan bugfixes + * For full detailed log see CHANGES file +- Add dependency on python-setuptools for python building + +------------------------------------------------------------------- +Tue Dec 6 12:59:16 UTC 2016 - jengelh@inai.de + +- Implement shared library packaging guideline +- Reduce %serivce_* calls, speed up find by using {}+ instead, + rectify RPM groups, trim descriptions. +- Abort package installation when user/group cannot be created. + +------------------------------------------------------------------- +Thu Dec 1 16:44:25 UTC 2016 - luizluca@tre-sc.jus.br + +- Update to 1.6.0 + + Features + * librrd is now fully thread-safe. librrd_th is gone + * make lua bindings work with lua 5.1 + * configure option to disable doc building --enable-docs=no + * new CDEF function SMIN: a,b,c,3,SMIN -> min(a,b,c) + * new CDEF function SMAX: a,b,c,3,SMAX -> max(a,b,c) + * new CDEF function STDEV: a,b,c,3,STDEV -> stdev(a,b,c) + * new CDEF function POW: a,b,POW -> a**b + * new CDEF function PERCENT: a,b,c,95,3,PERCENT -> find 95percentile of a,b,c + * re-introducted --showtime option on rrdxport + * be more careful in determining the locales idea of first day of the week + * lots of spelling fixes all around + +- Removed rrdtool-1.5.4-lua-5.2.patch as upstream already supports lua 5.2 since + https://github.com/oetiker/rrdtool-1.x/commit/7af5f76227330504d4d16234488c1118d4409621 + However, spec still requires explicitily lua51-devel (but lua52-devel also works) +- librrd_th* references are gone +- Patches refreshed + +------------------------------------------------------------------- +Wed Nov 25 12:40:01 UTC 2015 - aj@ajaissle.de + +- Update to 1.5.5 + + Bugfixes + * fix JSON output in xport with legend and gprint blocks + * fix parse_time mutex unlocking in the error case + * don't crash on invalid variable names in CDEF + * add mutex locking in rrdc_fetch + * fix buffer overflow in rrd_restore + * shorten test precision to 7 digits ... + * never exit from a library function + * buffer overflow in rrd_restore.c fixed #669 + +- Added rrdtool-1.5.4-lua-5.2.patch: lua >= 5.2 uses lua_callk + +------------------------------------------------------------------- +Wed Sep 23 07:55:35 UTC 2015 - aj@ajaissle.de + +- Update to 1.5.4 + + Bug Fixes + * parse floating point numbers according to C locale in rrdtool create + arguments, regardless of the systems locale setting. + * include missing rrd_rados.h into distribution archive + * make rrdtool work on ARM again + * make rrdtool test suit pass on 32bit OSs + * fix --grid-dash option regression in graph + * fix systemd support + * fix link dependency for libpng since we are using functions directly + * fix python module name + * fix rrdtool tune to accept U in minimum and maximum options + * fi + * rrd_parsetime now uses a mutex lock to become thread safe + * rrd_xport is now thread safe + * stop using MAX_PATH and make everything dynamic and make rrdtool work on + Gnu HURD ... thanks nirgal! + + Features + * new RPN operators: STEPWIDTH, NEWDAY, NEWWEEK, NEWMONTH and NEWWEEK + together they allow to draw graphs where a rate is converted back to + absolute numbers and accumulated over a period.. + +- Changelog 1.5.3 + + Bug Fixes + * Brought commmand-line options and documentation back into sync. + * Make LINE dashes option work again + +- Changelog 1.5.2 + + Bug Fixes + * paramters in VDEF are vnames and not data source names, hence + they can be 255 chars long and not only 20 + +- Changelog 1.5.1 + + Bug Fixes + * parse numbers up to 40 characters long .. + * fix install rules for Python and Lua + * include missing VERSION and LICENSE file + * unlink before rename in rrd_create when running on WIN32 + +- Changelog 1.5.0 + + New Features + * automatic x-axis labels that work from 1s to 30y on a single chart + * librados integration + * new datasource types: DCOUNTER and DDERIVE (they work the same as the + original DS, except that they can deal with floatingpoint numbers). + * compile without graphics libraries: ./configure --disable-rrd_graph + * updated windows port (see WIN32-BUILD-TIPS.txt) + * single step RRAs for MIN,MAX,LAST are generated virtually from + an AVERAGE RRA + * ignore updates in the past with rrdtool update --skip-past-updates + * ignore a LINE when scaling a chart using the skipscale option + * detect 32bit timeoverflows + * massive performance boost for charts with more than 100 DEF line by + switching form a linear search to a HASH when searching for data + * improved cross compilation support + * .Net bindings + * allow rrdtool graph to silently skip non-existing source files using the + --use-nan-for-all-missing-data option + * restore from a pipe (rrdtool restore - y.rrd) + * in rrdtool create, row count and step can be defined in absolute time + * all new "create on steroids" can pull both data and configuration from + existing rrd files + * use rrdtool graph to chart arbitrary data via a callback function for data fetching + support is integrated in the perl bindings. + * re-written parser for rrdtool graph commands. It now follows a simple key + value pattern, compatible with the previous syntax. + * MEDIAN op for CDEF expressions + * DEPTH,INDEX,COPY,ROL ops for CDEF (as seen in PostScript) + * gradient AREA backgrounds + * no more locale magic while reading numeric data. + + Bugfixes + * all the bugs fixed in 1.4.x during 1.5 development + +- Changelog 1.4.9 + + New Features + * allows rrdrestore to read input from stdin + * add documentation for RRDs::xport + * RPN operators MINNAN and MAXNAN + * --left-axis-format option to rrd_graph + + Bugfixes + * properly verify validity of user suplied format strings + * remove graph functions from python module when compiled without graphing + support + * verify that only short integers are used in COMPUTE rpn expressions + * eliminate duplicate setlocale calls + * fixed endless loop and double frees in rrd_restore + * fixed missing variable initializations in rrd_graph + * fixed JSON output format to actually be valid JSON + * detect failing fallocate and fall back to seeking + * fixed format string in ruby bindings + +- Changelog 1.4.8 + + Highlights + * rrd_graph now uses a map to lookup variable names causing graphs with many + items to be drawn magnitudes faster as the linear search of the variable + tables is gone now. + * the optional argument :skipscale allows for a LINE or AREA instruction to be + excluded from having an effect on the scaling of the graph + * TRENDNAN is now working properly and als not crashing anymore + * Added a no-op string positioning combo "\." this allows to write + COMMENT:OS\2\. which would otherwise not be possible. + * JSON output of xport is now actually json compilant by its keys + being properly quoted now. + * The label positioner in rrd_graph is now properly ignoring the current + state of DST. + * fixes and enhancements for Python, Ruby, TCL and Perl bindings + * improved error reporting in rrd_graph + * portability and cross compilation + * code and bugtracker moved to https://github.com/oetiker/rrdtool-1.x + +- Dropped patches (included upstream): + - rrdtool-1.4.7-CVE-2013-2131-imginfo_format_check.patch + +- Dropped patches (resolved otherwise): + - rrdtool-lua-ruby_lib64.patch + - rrdtool-tclversion.patch + +- Dropped cgilib-0.7.tar.gz + cgilib-fix_automake.patch (no + references to cgilib or cgi.h found, so benefit unclear) + +- Spec cleanup + + Added new perl-rrdtool subpackage containing the perl bindings + + Added new -doc subpackge + * bcond_without for lua, python, ruby and tcl + * bcond_without for libdbi, libwrap (tcpd) + * bcond_with for rados (ceph) + - Dropped BuildRequires: autoconf + automake (was needed for cgilib) + - Dropped BuildRequires: libart_lgpl-devel (replaced by cairo/pango + in earlier releases) + +------------------------------------------------------------------- +Fri Jul 31 18:07:53 UTC 2015 - jengelh@inai.de + +- Do not hard-depend on systemd, the macros support soft fails. +- Ignore errors from useradd/groupadd +- Update RPM groups + +------------------------------------------------------------------- +Fri Jul 31 09:53:10 UTC 2015 - dimstar@opensuse.org + +- Ignore absence of systemd-tmpfiles, it won't be present in the + build env. + +------------------------------------------------------------------- +Tue Mar 10 11:26:06 UTC 2015 - p.drouand@gmail.com + +- add rddtool.changes to sources list + +------------------------------------------------------------------- +Wed Mar 4 15:35:01 UTC 2015 - kstreitova@suse.com + +- modify a %prep phase to replace all timestamps in *.c and *.h + with the date and time obtained from the last changelog entry + bnc#915946 + +------------------------------------------------------------------- +Thu Dec 4 16:40:33 UTC 2014 - kstreitova@suse.com + +- add rrdtool-1.4.7-CVE-2013-2131-imginfo_format_check.patch that + adds check to the imginfo format to prevent crash or exploit + bnc#828003, CVE-2013-2131. + +------------------------------------------------------------------- +Sun Nov 23 06:16:00 UTC 2014 - Led + +- fix bashisms in rrdcached-systemd-pre script + +------------------------------------------------------------------- +Wed Nov 19 22:59:24 UTC 2014 - dimstar@opensuse.org + +- Replace systemd BuildRequires with pkgconfig(systemd): we do not + require the full installation / dep chain of systemd. + +------------------------------------------------------------------- +Sun Feb 9 08:58:51 UTC 2014 - obs@botter.cc + +- again fix PIDfile handling for rrdcached in systemd file + (ugly now: because of removal of declaration in sysconfig file; + it has to be declared twice in service file) +- add PIDfile directory using tmpfiles now + +------------------------------------------------------------------- +Mon Jan 13 08:42:10 UTC 2014 - coolo@suse.com + +- don't require ruby, the package but the right version of the abi + +------------------------------------------------------------------- +Thu Jan 9 13:21:12 UTC 2014 - jreidinger@suse.com + +- fix build for ruby 2.1 + +------------------------------------------------------------------- +Mon Nov 18 11:33:36 UTC 2013 - vdziewiecki@suse.com + +- Fix bnc#793636 almost undistinguishable wheter there is "no data" + or "zero valued data" on the rendered graph - rrdtool-zero_vs_nothing.patch +- I did this to prepare rrdtool for SLE12 - bnc#831773 - [openSUSE goes SLE12]: rrdtool: Change and/or patches may have been lost + + +------------------------------------------------------------------- +Fri Oct 4 17:01:23 UTC 2013 - p.drouand@gmail.com + +- Remove PIDfile definition of sysconfig file and add it in systemd + service file +- Fix PIDfile location to /run instead of var/lib/rccached + +------------------------------------------------------------------- +Fri Oct 4 10:40:05 UTC 2013 - obs@botter.cc + +- fix rrdcached service file (type=forking), add pid file variable + +------------------------------------------------------------------- +Thu Oct 3 14:41:37 UTC 2013 - p.drouand@gmail.com + +- Build is disable for SLE; remove sysvinit support +- CLean obsolete conditionnal macros +- Fix devel package Group; it have to be Development/Libraries + +------------------------------------------------------------------- +Wed Oct 2 13:40:14 UTC 2013 - obs@botter.cc + +- add systemd service for rrdcached + +------------------------------------------------------------------- +Wed Jul 10 15:02:53 UTC 2013 - dvaleev@suse.com + +- rename rrdtool-lua_lib64.patch to rrdtool-lua-ruby_lib64.patch + since it sets libdir for ruby as well +- Package ruby bindings into ruby-rrdtool package + +------------------------------------------------------------------- +Sat Jun 1 09:20:20 UTC 2013 - schwab@suse.de + +- Work around makefile dependencies on installed ruby headers during + installation +- Avoid running autoreconf, remove rrdtool-automake.patch + +------------------------------------------------------------------- +Wed May 29 11:07:08 UTC 2013 - mhrusecky@suse.com + +- Fix the hack from previous entry to work everywhere + +------------------------------------------------------------------- +Thu May 16 13:54:25 UTC 2013 - vdziewiecki@suse.com + +- Fix build failure: make looks for ruby.h in wrong place. + +------------------------------------------------------------------- +Fri Apr 5 12:35:29 UTC 2013 - idonmez@suse.com + +- Add Source URL, see https://en.opensuse.org/SourceUrls + +------------------------------------------------------------------- +Sat Jan 12 19:17:30 UTC 2013 - coolo@suse.com + +- remove suse_update_config + +------------------------------------------------------------------- +Fri Oct 26 15:34:06 UTC 2012 - coolo@suse.com + +- add explicit buildrequire on groff for man pages + +------------------------------------------------------------------- +Thu May 24 10:25:44 UTC 2012 - idonmez@suse.com + +- Fix build with new automake + +------------------------------------------------------------------- +Tue Apr 3 11:52:10 UTC 2012 - saschpe@suse.de + +- Only require lua51-devel on openSUSE_12.2 or later + +------------------------------------------------------------------- +Mon Mar 5 11:41:55 UTC 2012 - vdziewiecki@suse.com + +- update to 1.4.7 + * check in /usr/lib64 for tclConfig.sh too + * remove perl 5.004 compatibility hack and make RRDs compile with newer + perls. + * added support for rrdgraph to use the yotta, zetta, zepto, yocto prefixes. + * configure option to disable building rrd_graph: --disable-rrd_graph + With support from Ulf Zimmermann (OpenLane) + * fixed segfault in rrdtool (xport, fetch, graph) when handling + error conditions. -- James Brown + * fix uninitialized variable in rrd_graph (#322) + * improved data reduction algorithm in graph: after fetching, data must be + reduced to at least chart resolution, else some data will not get plotted. + fix for #298 + * plug memory leak in lua bindings #301 + * improve cross compiling -- Michael Olbrich + +------------------------------------------------------------------- +Mon Jan 30 19:28:22 CET 2012 - dmueller@suse.de + +- require lua51-devel + +------------------------------------------------------------------- +Thu May 12 11:35:26 UTC 2011 - max@novell.com + +- Fix two segfaults in the Tcl binding. + +------------------------------------------------------------------- +Wed May 11 11:48:32 UTC 2011 - max@novell.com + +- Move the Tcl bindings into a separate subpackage. +- Remove the superfluous call to (bnc#693085). +- Adopt the current practice of packaging Tcl extensions. + +------------------------------------------------------------------- +Tue Dec 28 02:05:03 UTC 2010 - pascal.bleser@opensuse.org + +- build lua bindings (new subpackage lua-rrdtool) + +- update to 1.4.5: + * rrdcached: print \n at the end of log messages when running rrdcached in the foreground + * rrdcached: Let the -s, -m and -P options affect the default socket as well + * rrdgraph: font related memory leaks fixed #208 + * rrdgraph-libdbi: print error message instead of dumping core on sql problem + * rrdgraph-libdbi: properly allocated response buffer + * rrdtool: in remote mode, make argument count for remote commmands strict + * rrdgraph: fix problems with second %s in right-axis format + * everywhere: fix locale handling. locales were not properly reset after calling set locale + * rrdgraph: fix use of %s in strftime (G)PRINT commands #277 + * ruby: fix bindings to be compatible with curent ruby implementations #279 + * rrdcached: Ensure that response_read() always calls fflush() or fclose() #278 + * rrd_client: free addrinfo list after use ... + * rrdupdate: follow the normal code path for exiting rrd_update if there is a problem with rrdc, plugging a memory leak on the way + * rrdgraph: make sure we do not try to draw points all that far outside the drawing area since some versions of cairo seem to go unstable when this happens + * rrdgraph: fix an endles loop near 2^31 timestamp (32bit platform problem) + * rrdcached: fix permissions of the default socket + * rrdgraph-libdbi: Fix sigma calculation + * rrdcreate: better checks for RRA arguments + * rrdgraph: if there is no right label, do not reserve any space for it + * Enhancements: + + rrdcached: add hosts_access support + + rrdfetch/graph: introduce "epoch" as a new base time reference, meaning timestamp 0: you can now write epoch+11111111s or epoch+19711205s + * update in-tree cgilib to 0.7: + + allow cookies without regular CGI POST/GET variables + + support for ';' as delimiter + + support for multipart/form-data + + support for file upload + + decode variable names and data + +------------------------------------------------------------------- +Tue Dec 7 05:50:32 UTC 2010 - coolo@novell.com + +- fix perl file list on factory + +------------------------------------------------------------------- +Tue Jul 27 16:20:46 CEST 2010 - anicka@suse.cz + +- update to 1.4.4 + * legal: Relicense the RRDCacheD client interface under the MIT + license + * legal: Updted FLOSS Exception for latest PHP license + * rrd_cached: better help output + * bugfixes +- remove last patch, fixed in upstream +- disable calling autoreconf (needs too new gettext) + +------------------------------------------------------------------- +Fri Apr 16 19:41:43 CEST 2010 - anicka@suse.cz + +- fixed bnc#594981 (-double.diff) + +------------------------------------------------------------------- +Tue Mar 30 18:16:24 CEST 2010 - anicka@suse.cz + +- update to 1.4.3 + * rrdcached: Log to stderr (in addition to syslog) when running + in foreground. + * rrdcached: Added -m command line option. + * rrdcached: Added -s option so set group permissions of the + UNIX domain socket. + * rrd_create: added --no-overwrite option. It prevents rrdtool + from clobbering existing rrd files. + * ruby bindings: rb_rrd_xport function + * use locale settings and _NL_TIME_WEEK_1STDAY to determine + the first day of the week. Works on Linux at least + * rrd_graph: \u to backup one line for special legend placement + tricks + * rrd_update: new (better) checker for incoming COUNTER + or DERIVED data. + +------------------------------------------------------------------- +Mon Mar 8 10:00:49 UTC 2010 - coolo@novell.com + +- update to 1.4.2 + * RRD Caching Daemon (rrdcached) + See rrdcached documentation. + * The output of rrdtool dump has been adjusted to be simpler to parse by + existing xml parsers. + * RRD Graphing functions (rrdtool graph) + + VDEF PERCENTNAN (a PRECENT that ignores NAN) + + CDEF PREDICT and PREDICTSIGMA functions for on-the-fly + data prediction without the need to modify existing rrd files as it is + required for HoltWinters. + + LibDBI integration provides a path to read data directly of a supported + SQL database into rrdtool graph. See rrdgraph_libdbi documentation. + * quite some more - see NEWS and CHANGES + +------------------------------------------------------------------- +Mon Apr 20 17:59:12 CEST 2009 - crrodriguez@suse.de + +- use --disable-static instead of removing static libraries + +------------------------------------------------------------------- +Mon Apr 20 17:14:12 CEST 2009 - anicka@suse.cz + +- update to 1.3.7 + * many small updates to the POD documents. + * improved win32 source + * OSX compilation fixes + * rrd_fetch: fix memory leak + * rrd_cgi: fix segfault in error reporting routine + * rrd_graph: fix TICK for negative numbers + * rrd_graph: fix image size reporting for LP64BE architectures + * rrd_resize: fix GROW for mmap (it was totally broken) + +------------------------------------------------------------------- +Wed Feb 04 16:23:37 CET 2009 - mfabian@suse.de + +- bnc#467362: use --with-rrd-default-font="monospace" instead of + --with-rrd-default-font=/usr/share/fonts/truetype/DejaVuSansMono.ttf, + rrdtools uses fontconfig now, not only freetype and the latter + is not a correct font name for fontconfig. + +------------------------------------------------------------------- +Fri Jan 23 15:45:30 CET 2009 - anicka@suse.cz + +- update to 1.3.6 + * bugfixes, documentation improvements + +------------------------------------------------------------------- +Mon Oct 6 14:17:04 CEST 2008 - anicka@suse.cz + +- update to 1.3.4 + * detect short/truncated files on open (rrdtool used to crash + later on some platforms) + * stop rrd_resize from altering the original file (mmap side + effect) + * fix VDEF and SHIFT use. Now it returns correct data and does + not crash anymore. + * fix rrd_xport when used on datasources with different + resolutions. This has been broken from day 1 of this tools + exsitance. + * fixed default prefix for ruby install + * added rpath for perl bindings on bsd + * do not [fm]advise past the end of the file since this + causes crashes on sparc. + +------------------------------------------------------------------- +Wed Sep 10 18:50:23 CEST 2008 - anicka@suse.cz + +- update to 1.3.2 + * fix for data corruption bug: + http://oss.oetiker.ch/rrdtool-trac/ticket/178 + +------------------------------------------------------------------- +Mon Jul 28 21:31:41 CEST 2008 - coolo@suse.de + +- remove la files and static libs (to fix depending packages) + +------------------------------------------------------------------- +Mon Jun 30 17:18:41 CEST 2008 - schwab@suse.de + +- Fix configure script and use of libtool. + +------------------------------------------------------------------- +Fri Jun 27 19:12:17 CEST 2008 - anicka@suse.cz + +- update to 1.3.0 + * Multiplicative Holt-Winters Forecasting + * MMAP IO + * Graphing with Cairo/Pango + * New graphv Interface + * many more changes - major release + +------------------------------------------------------------------- +Mon Mar 10 15:03:46 CET 2008 - anicka@suse.cz + +- update to 1.2.27 + * bindings/ruby/main.c: be more helpful when raising rb_eTypeError + in string_arr string_arr_new(VALUE rb_strings). + * src/rrd_update.c: dropping cache after update does not help (in + this implementation) + * bindings/Makefile.am, bindings/python/setup.py: yet another + attempt to make the python build environment REALY cool + * bindings/Makefile.am, bindings/python/setup.py: make sure the + python extension gets the final resting place of the rrdlibrary + compiled in ... + * src/rrd_graph.c: don't use round since it is c99 ... use + floor(x+0.5) for positive numbers instead. + * src/rrd_graph.c: added some more rounding for int to float + comparisons + * src/rrd_graph.c: Testing an double and an integer for equality is + bound to produce odd results on times. Don't do it! -- + * bugfixes, documentation fixes +- remove python patch (fixed in upstream) + +------------------------------------------------------------------- +Wed Feb 20 16:35:44 CET 2008 - dmueller@suse.de + +- make dejavu font requirement unversioned again, as + there was no released openSUSE distro with the wrongly + named font + +------------------------------------------------------------------- +Mon Jan 14 17:17:53 CET 2008 - dmueller@suse.de + +- dejavu font was renamed back, adjust + +------------------------------------------------------------------- +Wed Nov 28 10:30:29 CET 2007 - dmueller@suse.de + +- fix default font after dejavu font update +- add dejavu to the package requires +- build parallel + +------------------------------------------------------------------- +Mon Jul 9 14:56:57 CEST 2007 - dmueller@suse.de + +- apply python requires only to python-rrdtool subpackage + +------------------------------------------------------------------- +Thu Jun 21 22:40:05 CEST 2007 - dmueller@suse.de + +- split off python and -devel package to reduce + size and make the python dependency optional + (needed for 1 CD installer) + +------------------------------------------------------------------- +Thu May 24 02:06:09 CEST 2007 - ro@suse.de + +- added ldconfig to post scripts + +------------------------------------------------------------------- +Wed May 9 15:11:35 CEST 2007 - anicka@suse.cz + +- fix rpath in python module + +------------------------------------------------------------------- +Fri May 4 21:16:36 CEST 2007 - anicka@suse.cz + +- update to 2.1.23 + * many bugfixes (mostly python) +- remove stderr.diff and buffer.diff (fixed in upstream) + +------------------------------------------------------------------- +Mon Jan 29 14:42:59 CET 2007 - anicka@suse.cz + +- update to 1.2.18 + * many bugfixes + * DoS in rrd_graph.c fixed [#231212] +- fix overflow in rrd_tool.c + +------------------------------------------------------------------- +Fri Jan 5 14:50:05 CET 2007 - anicka@suse.cz + +- fix librrd_th.la +- remove packaged fonts and use system fonts instead +- fix last patch + +------------------------------------------------------------------- +Tue Jan 2 15:17:22 CET 2007 - anicka@suse.cz + +- fix memory allocation bug when graphing logarithmic data + with upstream patch [#231212] + +------------------------------------------------------------------- +Mon Sep 25 14:28:25 CEST 2006 - anicka@suse.cz + +- use %py_requires [#207920] + +------------------------------------------------------------------- +Fri Sep 15 20:43:30 CEST 2006 - anicka@suse.cz + +- store value returned with PyTuple_Size in + Py_ssize_t instead of int + +------------------------------------------------------------------- +Mon Jul 17 15:44:14 CEST 2006 - anicka@suse.cz + +- update to 1.2.15 + * vnames can be up to MAX_VNAME_LEN long + * bugfixes, documentation fixes + +------------------------------------------------------------------- +Wed Jan 25 21:41:13 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Jan 5 16:15:10 CET 2006 - anicka@suse.cz + +- update to 1.2.12 + +------------------------------------------------------------------- +Wed Dec 14 12:00:44 CET 2005 - max@suse.de + +- Fixed installation of the Tcl bindings. + +------------------------------------------------------------------- +Tue Nov 1 13:57:12 CET 2005 - anicka@suse.cz + +- fix build - return proper value from strerror_r + +------------------------------------------------------------------- +Wed Sep 21 12:13:53 CEST 2005 - anicka@suse.cz + +- fix build + +------------------------------------------------------------------- +Sun Jul 31 15:45:44 CEST 2005 - cthiel@suse.de + +- moved pkgIndex.tcl to /usr/share/tcl/tclrrd + +------------------------------------------------------------------- +Tue Jul 26 10:43:57 CEST 2005 - cthiel@suse.de + +- update to 1.2.11 + +------------------------------------------------------------------- +Tue Jun 21 18:26:37 CEST 2005 - anicka@suse.cz + +- update to 1.2.10 +- drop no longer neccessary rrdtool-tcl.patch + +------------------------------------------------------------------- +Thu May 19 14:03:10 CEST 2005 - mcihar@suse.cz + +- update to 1.2.8 +- reneabled tcl (copilation fixed by rrdtool-tcl.patch) +- added python bindings + +------------------------------------------------------------------- +Tue May 10 15:42:40 CEST 2005 - mcihar@suse.cz + +- update to 1.2.6 +- dropped tcl for now, it's somewhat broken + +------------------------------------------------------------------- +Mon Apr 18 11:28:37 CEST 2005 - mcihar@suse.de + +- include correct config.h + +------------------------------------------------------------------- +Wed Aug 11 09:44:35 CEST 2004 - tcrhak@suse.cz + +- update to 1.0.49 + +------------------------------------------------------------------- +Fri Aug 06 16:02:18 CEST 2004 - tcrhak@suse.cz + +- update to 1.0.48 + +------------------------------------------------------------------- +Thu Mar 04 17:39:04 CET 2004 - tcrhak@suse.cz + +- do not use its own (and old) libpng and libz + +------------------------------------------------------------------- +Wed Feb 18 16:11:59 CET 2004 - tcrhak@suse.cz + +- update to version 1.0.46 + +------------------------------------------------------------------- +Sat Jan 10 15:31:20 CET 2004 - adrian@suse.de + +- build as user + +------------------------------------------------------------------- +Wed Aug 20 20:22:29 CEST 2003 - mjancar@suse.cz + +- require the perl version we build with + +------------------------------------------------------------------- +Mon Jul 28 21:26:29 CEST 2003 - tcrhak@suse.cz + +- removed %{vendor_perl}/auto from filelist + +------------------------------------------------------------------- +Mon Jul 28 17:54:01 CEST 2003 - tcrhak@suse.cz + +- update to version 1.0.45 +- fixed file list +- require perl + +------------------------------------------------------------------- +Mon Jul 28 14:27:35 CEST 2003 - ro@suse.de + +- install perl files to vendor location + +------------------------------------------------------------------- +Fri May 23 14:23:53 CEST 2003 - ro@suse.de + +- fix build with current libtool + +------------------------------------------------------------------- +Sun Jan 12 18:39:32 CET 2003 - tcrhak@suse.cz + +- update to 1.0.40 + +------------------------------------------------------------------- +Tue Nov 19 02:05:37 CET 2002 - ro@suse.de + +- run full autoreconf and extend configure.in for that + +------------------------------------------------------------------- +Fri Aug 9 12:48:00 MEST 2002 - mls@suse.de + +- use sitearch macro + +------------------------------------------------------------------- +Tue Jul 09 20:32:48 CEST 2002 - tcrhak@suse.cz + +- update to version 1.0.39 + +------------------------------------------------------------------- +Mon Jun 3 15:34:36 CEST 2002 - ro@suse.de + +- fix build on lib64 platforms + +------------------------------------------------------------------- +Mon May 6 12:20:52 CEST 2002 - tcrhak@suse.cz + +- omitted prefix i386-suse-linux from names of binaries + and example scripts (bug #16105) + +------------------------------------------------------------------- +Fri Feb 8 02:53:26 MET 2002 - draht@suse.de + +- added rrdtool-1.0.33-zlib-zfree.dif against duplicate free() in + zlib + +------------------------------------------------------------------- +Thu Jun 14 14:43:21 CEST 2001 - adostal@suse.cz + +- fix for new autoconf (add libtoolize --force) + +------------------------------------------------------------------- +Wed Apr 11 11:52:52 CEST 2001 - cihlar@suse.cz + +- updated to version 1.0.33 + +------------------------------------------------------------------- +Mon Mar 19 15:40:18 CET 2001 - cihlar@suse.cz + +- fixed call of suse_update_config + +------------------------------------------------------------------- +Fri Jan 26 13:11:32 CET 2001 - cihlar@suse.cz + +- package created + diff --git a/rrdtool.spec b/rrdtool.spec new file mode 100644 index 0000000..6ac3712 --- /dev/null +++ b/rrdtool.spec @@ -0,0 +1,422 @@ +# +# spec file for package rrdtool +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define python python +%if 0%{?suse_version} >= 1500 + %define python python3 +%endif +#Compat macro for new _fillupdir macro introduced in Nov 2017 +%if ! %{defined _fillupdir} + %define _fillupdir %{_localstatedir}/adm/fillup-templates +%endif +%bcond_without lua +%bcond_without python +%bcond_without ruby +%bcond_without tcl +%bcond_without libdbi +%bcond_without libwrap +%bcond_with rados +Name: rrdtool +Version: 1.8.0 +Release: 0 +Summary: Round Robin Database Tool to store and display time-series data +License: GPL-2.0-or-later AND LGPL-2.0-or-later +Group: Productivity/Scientific/Math +URL: https://oss.oetiker.ch/rrdtool/ +Source0: https://github.com/oetiker/%{name}-1.x/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source2: sysconfig.rrdcached +Source4: rrdcached-systemd-pre +Source5: rrdcached.service +Source99: %{name}.changes +# PATCH-FIX-UPSTREAM -- Fix BUILD_DATE in rrdtool help output (fix segfault) +# https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f.patch +Patch1: e59f703bbcc0af949ee365206426b6394c340c6f.patch +## PATCH-FIX-UPTREAM -- https://github.com/oetiker/rrdtool-1.x/pull/1242 +Patch2: rrdtool-1.8.0-gcc14.patch +# PATCH-FIX-UPTREAM -- Prevent possible segfault +## this patch against rrdtool-1.4.5 dates from 2011, seems unneccessary today, +## never appeared upstream, and it does no longer apply +##Patch3: rrdtool-tclsegfault.patch +# PATCH-FIX-UPSTREAM -- bnc#793636 +Patch12: rrdtool-zero_vs_nothing.patch +Patch14: harden_rrdcached.service.patch +# Needed for tests +BuildRequires: bc +BuildRequires: cairo-devel >= 1.2 +BuildRequires: freetype2-devel +BuildRequires: gcc-c++ +BuildRequires: gettext-tools +BuildRequires: glib2-devel +BuildRequires: groff +BuildRequires: intltool >= 0.35.0 +BuildRequires: libpng-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: openssl-devel +BuildRequires: pango-devel >= 1.14 +BuildRequires: python-rpm-macros +BuildRequires: systemd-rpm-macros +BuildRequires: zlib-devel +Requires: dejavu +%if %{with python} +BuildRequires: %{python}-devel +BuildRequires: %{python}-setuptools +%endif +%if %{with lua} +BuildRequires: lua-devel +%endif +%if %{with ruby} +BuildRequires: ruby-devel +%endif +%if %{with tcl} +BuildRequires: tcl-devel >= 8.0 +%endif +%if %{with libdbi} +BuildRequires: libdbi-devel +%endif +%if %{with libwrap} +BuildRequires: tcpd-devel +%endif +%if %{with rados} +BuildRequires: librados2-devel +%endif + +%description +RRD stands for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). It stores the data in a compact way that will not +expand over time, and it presents useful graphs by processing the data to +enforce a certain data density. It can be used either via simple wrapper +scripts (from shell or Perl) or via frontends that poll network devices and +put a friendly user interface on it. + +%package -n librrd8 +Summary: Round Robin Database tool library +Group: System/Libraries + +%description -n librrd8 +RRD stands for Round Robin Database. RRD is a system to store and +display time-series data. + +%package devel +Summary: RRDtool header files +Group: Development/Libraries/C and C++ +Requires: librrd8 = %{version}-%{release} + +%description devel +RRD stands for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package allow you to build programs making +use of the library. + +%package doc +Summary: Documentation for rrdtool +Group: Documentation/Howto + +%description doc +RRD is the Acronym for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package contains documentation on using RRD. + +%package -n perl-%{name} +Summary: Perl bindings for RRDtool +Group: Development/Languages/Perl +Requires: %{name} = %{version}-%{release} +Requires: perl = %{perl_version} + +%description -n perl-%{name} +RRD is the Acronym for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package contains documentation on using RRD. + +This package contains the Perl bindings. + +%if %{with lua} +%package -n lua-%{name} +Summary: Lua bindings for RRDtool +Group: Development/Languages/Other +Requires: %{name} = %{version}-%{release} + +%description -n lua-%{name} +RRD is the Acronym for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package contains documentation on using RRD. + +This package contains the Lua bindings. +%endif + +%if %{with python} +%package -n %{python}-%{name} +Summary: Python bindings for RRDtool +Group: Development/Languages/Python +Requires: %{name} = %{version}-%{release} +Requires: %{python} + +%description -n %{python}-%{name} +Python RRDtool bindings. +%endif + +%if %{with ruby} +%package -n ruby-%{name} +Summary: Ruby bindings for RRDtool +Group: Development/Languages/Ruby +Requires: %{name} = %{version}-%{release} +Requires: ruby(abi) >= %{rb_ver} + +%description -n ruby-%{name} +RRD is the Acronym for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package contains documentation on using RRD. + +This package contains the Ruby bindings. +%endif + +%if %{with tcl} +%package -n tcl-%{name} +Summary: Tcl bindings for RRDtool +Group: Development/Languages/Tcl +Requires: %{name} = %{version}-%{release} +Requires: tcl >= 8.0 + +%description -n tcl-%{name} +RRD is the Acronym for Round Robin Database. RRD is a system to store and +display time-series data (i.e. network bandwidth, machine-room temperature, +server load average). This package contains documentation on using RRD. + +This package contains the Tcl bindings. +%endif + +%package cached +%define rrdcached_user rrdcached +%define rrdcached_group rrdcached +Summary: Data caching daemon for RRDtool +Group: Productivity/Scientific/Math +Requires: %{name} = %{version}-%{release} +Requires(post): %fillup_prereq +Requires(pre): shadow + +%description cached +rrdcached is a daemon that receives updates to existing RRD files, +accumulates them and, if enough have been received or a defined time has +passed, writes the updates to the RRD file. The daemon was written with +big setups in mind which usually runs into I/O related problems. This +daemon was written to alleviate these problems. + +%prep +%autosetup -p1 + +# rrd_tool/rrd_cgi: use the date of the last change +modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" +DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" +TIME="\"$(date -d "${modified}" "+%%R")\"" +find . -name '*.c' -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" "{}" "+" + +%build +# we are patching configure, we need to reconf +autoreconf -fi + +# --disable-nls: there is only partial hungarian translation, does not make %{?_smp_mflags} +# much sense to ship package for it +%configure \ + --disable-nls \ + --disable-silent-rules \ + --enable-shared \ + --disable-static\ + --disable-rpath \ +%if %{with lua} + --enable-lua \ + --enable-lua-site-install \ +%else + --disable-lua \ +%endif + --enable-perl \ + --enable-perl-site-install \ + --with-perl-options='INSTALLDIRS="vendor"' \ +%if %{with python} + --enable-python \ +%else + --disable-python \ +%endif +%if %{with ruby} + --enable-ruby \ + --enable-ruby-site-install \ + --with-ruby-options='sitedir="%{rb_sitearchdir}"' \ +%else + --disable-ruby \ +%endif +%if %{with tcl} + --enable-tcl \ + --enable-tcl-site \ + --with-tcllib=%{_libdir} \ +%else + --disable-tcl \ +%endif + --with-rrd-default-font="monospace" \ + --with-pic \ + --with-gnu-ld \ + --with-systemdsystemunitdir=%{_unitdir} + +make %{?_smp_mflags} + +%install +make \ + DESTDIR=%{buildroot} \ + idocdir=%{_docdir}/%{name}/txt/ \ + ihtmldir=%{_docdir}/%{name}/html/ \ + examplesdir=%{_docdir}/%{name}/examples/ \ + libdir=%{_libdir} \ +%if %{with tcl} + pkglibdir=%{tcl_archdir}/tclrrd%{version} \ +%endif + install + +%perl_process_packlist + +%if %{with lua} +# Move lua lib to the right point, in case lua did not expose the right INSTALL_CMOD variable +mv %{buildroot}%{_prefix}/local/lib/lua %{buildroot}%{_libdir}/lua || true +%endif + +%if %{with ruby} +install -D bindings/ruby/RRD.so %{buildroot}%{rb_sitearchdir}/RRD.so +%endif + +# remove cruft +find %{buildroot} -type f -name "*.la" -delete -print + +# documentation +rm %{buildroot}%{_docdir}/%{name}/txt/*.pod +find %{buildroot}%{_docdir}/%{name}/examples/ -type f -exec chmod 0644 "{}" "+" + +# install rrdcached specials +install -D -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.rrdcached + +# install systemd specific files +install -D -m 0755 %{SOURCE4} %{buildroot}%{_datadir}/rrdcached/rrdcached-systemd-pre +install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/rrdcached.service +install -d -m 0755 %{buildroot}%{_tmpfilesdir} +echo "d /run/rrdcached 0755 %{rrdcached_user} %{rrdcached_group}" > %{buildroot}%{_tmpfilesdir}/rrdcached.conf +chmod 644 %{buildroot}%{_tmpfilesdir}/rrdcached.conf + +mkdir -p %{buildroot}%{_sbindir} +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrrdcached + +%check +# Follow upstream, disable the following, failing tests: rpn1 +# https://github.com/oetiker/rrdtool-1.x/blob/master/.travis.yml#L30 +make %{?_smp_mflags} check TESTS="modify1 modify2 modify3 modify4 modify5 rpn2 xport1 \ +tune1 tune2 graph1 rrdcreate dump-restore create-with-source-1 create-with-source-2 \ +create-with-source-3 create-with-source-4 create-with-source-and-mapping-1 \ +create-from-template-1 dcounter1 vformatter1 list1 pdp-calc1" + +%pre cached +getent group %{rrdcached_group} >/dev/null || groupadd %{rrdcached_group} +getent passwd %{rrdcached_user} >/dev/null || useradd -s /sbin/nologin -g %{rrdcached_group} -c %{rrdcached_user} -d %{_localstatedir}/lib %{rrdcached_user} +%service_add_pre rrdcached.service rrdcached.socket + +%post cached +%fillup_only rrdcached +%service_add_post rrdcached.servicet rrdcached.socket +%tmpfiles_create %{_tmpfilesdir}/rddcached.conf + +%preun cached +%service_del_preun rrdcached.service rrdcached.socket + +%postun cached +%service_del_postun rrdcached.service rrdcached.socket + +%post -n librrd8 -p /sbin/ldconfig +%postun -n librrd8 -p /sbin/ldconfig + +%files +%exclude %{_docdir}/%{name} +%{_mandir}/*/* +%exclude %{_mandir}/man1/rrdcached* +%exclude %{_mandir}/man3/RRD* +%{_bindir}/* +%exclude %{_bindir}/rrdcached + +%files -n librrd8 +%{_libdir}/librrd.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/librrd.so +%{_libdir}/pkgconfig/librrd.pc + +%files doc +%doc CONTRIBUTORS COPYRIGHT NEWS THREADS TODO +%doc %{_docdir}/rrdtool +%exclude %{_docdir}/rrdtool/html/RRD*.html + +%files -n perl-%{name} +%doc %{_docdir}/rrdtool/html/RRD*.html +%{_mandir}/man3/RRD* +%{perl_vendorlib}/RRDp.pm +%{perl_vendorarch}/RRDs.pm +%{perl_vendorarch}/auto/* + +%if %{with lua} +%files -n lua-%{name} +%doc bindings/lua/README +%dir %{_libdir}/lua +%dir %{_libdir}/lua/* +%{_libdir}/lua/*/rrd.so +%{_libdir}/lua/*/rrd.so.* +%endif + +%if %{with python} +%files -n %{python}-%{name} +%license bindings/python/COPYING +%doc bindings/python/README.md +%if 0%{?suse_version} >= 1500 +%{python3_sitearch}/* +%else +%{python_sitearch}/* +%endif +%endif + +%if %{with ruby} +%files -n ruby-%{name} +%doc bindings/ruby/README +%{rb_sitearchdir}/RRD.so +%endif + +%if %{with tcl} +%files -n tcl-%{name} +%doc bindings/tcl/README +%{tcl_archdir}/* +%{_libdir}/tclrrd*.so +%endif + +%files cached +%{_mandir}/man1/rrdcached* +%{_bindir}/rrdcached +%{_sbindir}/rcrrdcached +%{_fillupdir}/sysconfig.rrdcached +%{_datadir}/rrdcached +%{_datadir}/rrdcached/rrdcached-systemd-pre +%{_unitdir}/rrdcached.service +%{_unitdir}/rrdcached.socket +%if 0%{?suse_version} <= 1320 +%dir %{_libexecdir}/tmpfiles.d +%endif +%{_tmpfilesdir}/rrdcached.conf +%ghost /run/rrdcached + +%changelog diff --git a/sysconfig.rrdcached b/sysconfig.rrdcached new file mode 100644 index 0000000..1d61ed9 --- /dev/null +++ b/sysconfig.rrdcached @@ -0,0 +1,105 @@ +# Settings for rrdcached +#OPTIONS="-l unix:/var/rrdtool/rrdcached/rrdcached.sock -s rrdcached -m 664 -b /var/rrdtool/rrdcached" +#OPTIONS="-w 1800 -z 1800 -p /tmp/rrdcached.pid -j /tmp -s nagios -m 0660 -l unix:/tmp/rrdcached.sock" +## Path: Network/WWW/RRDCached +## Description: Start parameters for RRDCached +## Type: string +## Default: "rrdcached" +## Config: rrdcached +## ServiceRestart: rrdcached +# +# username rrdcached should run as +# +RRDCACHED_USER="nagios" + + +## Type: string +## Default: "rrdcached" +## Config: rrdcached +## ServiceRestart: rrdcached +# +# group rrdcached should be run as +# +RRDCACHED_GROUP="nagios" + + +## Type: string +## Default: "unix:/var/rrdtool/rrdcached/rrdcached.sock" +## Config: rrdcached +## ServiceRestart: rrdcached +# +# Bind to address and accept incoming connections on that socket. +# +# If address begins with "unix:", everything following that prefix is +# interpreted as the path to a UNIX domain socket. +# +# If the address is an IPv4 address or a fully qualified domain name +# the square brackets can be omitted, resulting in the (simpler) +# "address:port" pattern. +# +# The default port is 42217/tcp. +# +RRDCACHED_ADDRESS="unix:/tmp/rrdcached.sock" + + +## Type: integer +## Default: 0664 +## Config: rrdcached +## ServiceRestart: rrdcached +# +# File permissions of a UNIX domain socket, if given via +# RRDCACHED_ADDRESS="unix:/" +# +RRDCACHED_SOCKET_MASK="0660" + + +## Type: integer +## Default: 300 +## Config: rrdcached +## ServiceRestart: rrdcached +# +# How often should data be written to disk +# in seconds. +# +RRDCACHED_DISKWRITE="300" + + +## Type: integer +## Default: 300 +## Config: rrdcached +## ServiceRestart: rrdcached +# +# Delay writing of each RRD for a random number of +# seconds in the range [0,delay) +# +RRDCACHED_DELAY="300" + + +## Type: integer +## Default: 4 +## Config: rrdcached +## ServiceRestart: rrdcached +# +# Number of threads used for writing RRD files. +# +RRDCACHED_WRITE_THREADS="4" + +## Type: string +## Default: "/var/rrdtool/rrdcached" +## Config: rrdcached +## ServiceRestart: rrdcached +# +# Change into a specific directory at startup. +# If not given the default, "/tmp", will be used. +# +RRDCACHED_CHROOT_DIR="/tmp" + +## Type: string +## Default: "" +## Config: rrdcached +## ServiceRestart: rrdcached +# +# Other options - see man 1 rrdcached +# +RRDCACHED_OPTIONS="" + From 382e5030de2b9168eda388b8153bf473001f749e890420eb330c07b425fc9671 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 16 Jul 2024 11:11:46 +0000 Subject: [PATCH 2/3] Accepting request 1187184 from home:jamborm:gcc14fixes - Added rrdtool-fix_extra_reference.patch to fix pointer type incompatibility and allow the package to be built with GCC 14 without explicitely demoting errors to warnings. [boo#1225919] If the request is OK, please forward it to Factory soon-ish so that we can switch the default compiler. OBS-URL: https://build.opensuse.org/request/show/1187184 OBS-URL: https://build.opensuse.org/package/show/server:database/rrdtool?expand=0&rev=9 --- rrdtool-fix_extra_reference.patch | 50 +++++++++++++++++++++++++++++++ rrdtool.changes | 7 +++++ rrdtool.spec | 3 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 rrdtool-fix_extra_reference.patch diff --git a/rrdtool-fix_extra_reference.patch b/rrdtool-fix_extra_reference.patch new file mode 100644 index 0000000..97310a6 --- /dev/null +++ b/rrdtool-fix_extra_reference.patch @@ -0,0 +1,50 @@ +From: Martin Jambor +Date: Fri, 12 Jul 2024 17:02:04 +0200 +Subject: [PATCH] Fix extra reference of parameters of rrd_fetch_dbi_{long,double} +Upstream: https://github.com/oetiker/rrdtool-1.x/pull/1255 +Refrences: boo#1225919 + +Functions rrd_fetch_dbi_long and rrd_fetch_dbi_double currently take +the first parameter of type "bi_result result *" even though that is +already a pointer and the use of that parameter suggests the extra +indirection is not wanted. What is more, the caller passes just +"bi_result result" to the corresponding actual arguments which results +in compile errors with GCC 14 because it now does not accept +incompatible pointer types by default. +--- + src/rrd_fetch_libdbi.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/rrd_fetch_libdbi.c b/src/rrd_fetch_libdbi.c +index fe02b0d8..e4eccaa5 100644 +--- a/src/rrd_fetch_libdbi.c ++++ b/src/rrd_fetch_libdbi.c +@@ -26,13 +26,13 @@ static char* _find_next_separator(char* start,char separator); + static char* _find_next_separator_twice(char*start,char separator); + static char _hexcharhelper(char c); + static int _inline_unescape (char* string); +-static double rrd_fetch_dbi_double(dbi_result *result,int idx); +-static long rrd_fetch_dbi_long(dbi_result *result,int idx); ++static double rrd_fetch_dbi_double(dbi_result result,int idx); ++static long rrd_fetch_dbi_long(dbi_result result,int idx); + + /* the real code */ + + /* helpers to get correctly converted values from DB*/ +-static long rrd_fetch_dbi_long(dbi_result *result,int idx) { ++static long rrd_fetch_dbi_long(dbi_result result,int idx) { + char *ptmp=""; + long value=DNAN; + /* get the attributes for this filed */ +@@ -89,7 +89,7 @@ static long rrd_fetch_dbi_long(dbi_result *result,int idx) { + return value; + } + +-static double rrd_fetch_dbi_double(dbi_result *result,int idx) { ++static double rrd_fetch_dbi_double(dbi_result result,int idx) { + char *ptmp=""; + double value=DNAN; + /* get the attributes for this filed */ +-- +2.45.2 + diff --git a/rrdtool.changes b/rrdtool.changes index df2b211..6ec71cd 100644 --- a/rrdtool.changes +++ b/rrdtool.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jul 12 15:12:22 UTC 2024 - Martin Jambor + +- Added rrdtool-fix_extra_reference.patch to fix pointer type + incompatibility and allow the package to be built with GCC 14 + without explicitely demoting errors to warnings. [boo#1225919] + ------------------------------------------------------------------- Fri Jul 5 20:30:43 UTC 2024 - Friedrich Haubensak diff --git a/rrdtool.spec b/rrdtool.spec index 6ac3712..d1f5f83 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -1,7 +1,7 @@ # # spec file for package rrdtool # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -55,6 +55,7 @@ Patch2: rrdtool-1.8.0-gcc14.patch # PATCH-FIX-UPSTREAM -- bnc#793636 Patch12: rrdtool-zero_vs_nothing.patch Patch14: harden_rrdcached.service.patch +Patch15: rrdtool-fix_extra_reference.patch # Needed for tests BuildRequires: bc BuildRequires: cairo-devel >= 1.2 From 1b3b3f2b0f808c31159f5736aeb5cc4f22631a860ef59a53ba92cb18f82e76be Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 29 Jul 2024 07:26:32 +0000 Subject: [PATCH 3/3] - Remove disabled patch rrdtool-tclsegfault.patch - Small spec file modernisation OBS-URL: https://build.opensuse.org/package/show/server:database/rrdtool?expand=0&rev=10 --- rrdtool-tclsegfault.patch | 30 ------------------------------ rrdtool.changes | 6 ++++++ rrdtool.spec | 4 ++-- 3 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 rrdtool-tclsegfault.patch diff --git a/rrdtool-tclsegfault.patch b/rrdtool-tclsegfault.patch deleted file mode 100644 index b3d48f5..0000000 --- a/rrdtool-tclsegfault.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: bindings/tcl/tclrrd.c -=================================================================== ---- a/bindings/tcl/tclrrd.c -+++ b/bindings/tcl/tclrrd.c -@@ -472,6 +472,12 @@ static int Rrd_Graph( - char **argv2; - CONST84 char *save; - -+ if (argc < 2) { -+ Tcl_AppendResult(interp, "RRD Error: needs image filename", -+ (char *) NULL); -+ return TCL_ERROR; -+ } -+ - /* - * If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to - * that file descriptor. Will this work with windoze? I have no idea. -@@ -597,6 +603,12 @@ static int Rrd_Resize( - { - char **argv2; - -+ if (argc < 2) { -+ Tcl_AppendResult(interp, "RRD Error: needs rrd filename", -+ (char *) NULL); -+ return TCL_ERROR; -+ } -+ - argv2 = getopt_init(argc, argv); - rrd_resize(argc, argv2); - getopt_cleanup(argc, argv2); diff --git a/rrdtool.changes b/rrdtool.changes index 6ec71cd..73fc993 100644 --- a/rrdtool.changes +++ b/rrdtool.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 29 07:19:23 UTC 2024 - Martin Pluskal + +- Remove disabled patch rrdtool-tclsegfault.patch +- Small spec file modernisation + ------------------------------------------------------------------- Fri Jul 12 15:12:22 UTC 2024 - Martin Jambor diff --git a/rrdtool.spec b/rrdtool.spec index d1f5f83..220547a 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -272,7 +272,7 @@ autoreconf -fi --with-gnu-ld \ --with-systemdsystemunitdir=%{_unitdir} -make %{?_smp_mflags} +%make_build %install make \ @@ -320,7 +320,7 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrrdcached %check # Follow upstream, disable the following, failing tests: rpn1 # https://github.com/oetiker/rrdtool-1.x/blob/master/.travis.yml#L30 -make %{?_smp_mflags} check TESTS="modify1 modify2 modify3 modify4 modify5 rpn2 xport1 \ +%make_build check TESTS="modify1 modify2 modify3 modify4 modify5 rpn2 xport1 \ tune1 tune2 graph1 rrdcreate dump-restore create-with-source-1 create-with-source-2 \ create-with-source-3 create-with-source-4 create-with-source-and-mapping-1 \ create-from-template-1 dcounter1 vformatter1 list1 pdp-calc1"