Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
make build reproducible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anarcat committed Feb 16, 2016
1 parent d670fe5 commit a393a68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion include/ircd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions ircd/version.c.SH
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<!SUB!THIS!
/*
Expand Down Expand Up @@ -54,7 +56,6 @@ $spitshell >version.c <<!SUB!THIS!
const char *generation = "$generation";
const char *creation = "$creation";
const char *platform = "$uname";
const char *ircd_version = PATCHLEVEL;
const char *serno = SERNO;
Expand Down
10 changes: 0 additions & 10 deletions libratbox/src/version.c.SH
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ fi

generation=`expr $generation + 1`

uname=`uname -a`

creation=`date | \
awk '{if (NF == 6) \
{ print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \
else \
{ print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`

$spitshell >version.c <<!SUB!THIS!
/*
* libratbox: a library used by ircd-ratbox and other things
Expand Down Expand Up @@ -55,9 +47,7 @@ $spitshell >version.c <<!SUB!THIS!
#include "../include/serno.h"
const char *libratbox_generation = "$generation";
const char *libratbox_platform = "$uname";
const char *libratbox_serno = SERIALNUM;
const char *libratbox_creation = "$creation";
const char *libratbox_infotext[] =
{
Expand Down

0 comments on commit a393a68

Please sign in to comment.