From a393a68a0e1db47faafb71308f9bc93c3704bcb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 16 Feb 2016 00:29:24 -0500 Subject: [PATCH] make build reproducible we do this by removing the uname usage everywhere: it is not actually used at runtime at all. we keep the timestamp, because it is actually used in user_welcome() but allow it to be overriden. ideally, that timestamp would be completely removed, but I am not sure what to put in its place, or if it would break some mysterious RFC (or client!) if we remove that announcement. --- include/ircd.h | 1 - ircd/version.c.SH | 9 +++++---- libratbox/src/version.c.SH | 10 ---------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/include/ircd.h b/include/ircd.h index 2ad4963b..c3fa25db 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -61,7 +61,6 @@ extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */ extern const char *creation; extern const char *generation; -extern const char *platform; extern const char *infotext[]; extern const char *serno; extern const char *ircd_version; diff --git a/ircd/version.c.SH b/ircd/version.c.SH index 3ab433a3..4788589c 100644 --- a/ircd/version.c.SH +++ b/ircd/version.c.SH @@ -17,13 +17,15 @@ fi generation=`expr $generation + 1` -uname=`uname -a` - -creation=`LC_ALL=C date | \ +if test "$EXTERNAL_BUILD_TIMESTAMP" = ''; then + creation=`LC_ALL=C date | \ awk '{if (NF == 6) \ { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ else \ { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'` +else + creation="$EXTERNAL_BUILD_TIMESTAMP" +fi $spitshell >version.c <version.c <version.c <version.c <