From: Viktor Kleinik Date: Mon, 11 Jan 2021 14:29:00 +0000 (-0800) Subject: Use BUILD_DATE for reproducibility X-Git-Tag: v1.8.0~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1102%2Fhead;p=thirdparty%2Frrdtool-1.x.git Use BUILD_DATE for reproducibility Use reproducible build date instead of compilation time and date. Signed-off-by: Viktor Kleinik --- diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 8576a9bf..e58069f6 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -680,7 +680,11 @@ static char *rrdgetinternal( if (strcasecmp(args[0], "VERSION") == 0) { return stralloc(PACKAGE_VERSION); } else if (strcasecmp(args[0], "COMPILETIME") == 0) { +#ifdef BUILD_DATE + return stralloc(BUILD_DATE); +#else return stralloc(__DATE__ " " __TIME__); +#endif } else { return stralloc("[ERROR: internal unknown argument]"); } diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 679e1745..16645cf3 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -309,7 +309,11 @@ static void PrintUsage( else if (!strcmp(cmd, "pwd")) help_cmd = C_PWD; } +#ifdef BUILD_DATE + fprintf(stdout, _(help_main), PACKAGE_VERSION, BUILD_DATE); +#else fprintf(stdout, _(help_main), PACKAGE_VERSION, __DATE__, __TIME__); +#endif fflush(stdout); switch (help_cmd) { case C_NONE: