forked from pool/rrdtool
This commit is contained in:
parent
ab955763eb
commit
c93b482e17
@ -1,53 +0,0 @@
|
|||||||
From e59f703bbcc0af949ee365206426b6394c340c6f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= <c72578@yahoo.de>
|
|
||||||
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 <tobi@oetiker.ch>\n"
|
|
||||||
+ " Compiled %s\n\n"
|
|
||||||
+ "Usage: rrdtool [options] command command_options\n");
|
|
||||||
+#else
|
|
||||||
const char *help_main =
|
|
||||||
N_("RRDtool %s"
|
|
||||||
" Copyright by Tobias Oetiker <tobi@oetiker.ch>\n"
|
|
||||||
" Compiled %s %s\n\n"
|
|
||||||
"Usage: rrdtool [options] command command_options\n");
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
const char *help_list =
|
|
||||||
N_
|
|
@ -1,9 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Wed Apr 13 08:27:59 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
||||||
|
|
||||||
- Add patch to fix segfault (seen in %check on aarch64):
|
|
||||||
* e59f703bbcc0af949ee365206426b6394c340c6f.patch
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 29 13:41:16 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>
|
Tue Mar 29 13:41:16 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>
|
||||||
|
|
||||||
|
@ -43,8 +43,6 @@ Source2: sysconfig.rrdcached
|
|||||||
Source4: rrdcached-systemd-pre
|
Source4: rrdcached-systemd-pre
|
||||||
Source5: rrdcached.service
|
Source5: rrdcached.service
|
||||||
Source99: %{name}.changes
|
Source99: %{name}.changes
|
||||||
# PATCH-FIX-UPSTREAM -- Fix BUILD_DATE in rrdtool help output (fix segfault)
|
|
||||||
Patch1: https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- Prevent possible segfault
|
# PATCH-FIX-UPSTREAM -- Prevent possible segfault
|
||||||
Patch3: rrdtool-tclsegfault.patch
|
Patch3: rrdtool-tclsegfault.patch
|
||||||
# PATCH-FIX-UPSTREAM -- bnc#793636
|
# PATCH-FIX-UPSTREAM -- bnc#793636
|
||||||
@ -214,7 +212,6 @@ daemon was written to alleviate these problems.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
|
||||||
%patch3
|
%patch3
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user