mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/rrdtool: fix patch fuzz
Commit 8f88a644ed "support/scripts/apply-patches.sh: set the maximum
fuzz factor to 0" reduced the fuzz factor.
Due to this change, rrdtool fails to build with output:
patching file src/rrd_tool.c
Hunk #2 FAILED at 42.
Hunk #3 succeeded at 435 (offset -8 lines).
Hunk #4 succeeded at 518 (offset -8 lines).
Hunk #5 succeeded at 564 (offset -8 lines).
Hunk #6 succeeded at 879 (offset -8 lines).
1 out of 6 hunks FAILED -- saving rejects to file src/rrd_tool.c.rej
Because this was caused by an upstream patch we do not change it but add
another upstream patch to be applied before our current patch to avoid
the problem.
Fixes:
http://autobuild.buildroot.net/results/6996dbd764b0066da49dd009f1385196342c89dc/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Reviewed-by: Yann E. MORIN <yann.morin@orange.com>
Tested-by: Yann E. MORIN <yann.morin@orange.com>
[yann.morin.1998@free.fr:
- add comment as suggested by yann.morin@orange.com
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
20973140c1
commit
4928032d6c
@@ -0,0 +1,57 @@
|
||||
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
|
||||
|
||||
Upstream: https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/rrd_tool.c | 8 ++++++++
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4d2345855..5169b0d49 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 930d08272..cc6119d9a 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_
|
||||
@@ -9,10 +9,13 @@ RRDTOOL_SITE = https://github.com/oetiker/rrdtool-1.x/releases/download/v$(RRDTO
|
||||
RRDTOOL_LICENSE = GPL-2.0+ with FLOSS license exceptions as explained in COPYRIGHT
|
||||
RRDTOOL_LICENSE_FILES = COPYRIGHT LICENSE
|
||||
RRDTOOL_DEPENDENCIES = host-pkgconf libglib2 $(TARGET_NLS_DEPENDENCIES)
|
||||
# autoreconf needed to avoid link failure due to missing -lintl,
|
||||
|
||||
# 0001-Fix-BUILD_DATE-in-rrdtool-help-output.patch
|
||||
# autoreconf also needed to avoid link failure due to missing -lintl,
|
||||
# autopoint needed as a consequence of autoreconf
|
||||
RRDTOOL_AUTORECONF = YES
|
||||
RRDTOOL_AUTOPOINT = YES
|
||||
|
||||
RRDTOOL_INSTALL_STAGING = YES
|
||||
RRDTOOL_CONF_OPTS = \
|
||||
--disable-examples \
|
||||
|
||||
Reference in New Issue
Block a user