Hi,
here are two patches which makes reproducible builds possible.
Best, lynxis
Alexander Couzens (2): buildversion.sh: remove build hostname from version buildversion.h: use the last git commit as timestamp if available
scripts/buildversion.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
It doesn't contain any useful information and blocks reproducible builds.
Signed-off-by: Alexander Couzens lynxis@fe80.eu --- scripts/buildversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/buildversion.sh b/scripts/buildversion.sh index e5ce96c..16c043f 100755 --- a/scripts/buildversion.sh +++ b/scripts/buildversion.sh @@ -11,7 +11,7 @@ elif [ -f .version ]; then else VERSION="?" fi -VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`" +VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`" echo "Version: ${VERSION}"
# Build header file
Additional set TZ=UTC to have predictable `date` output.
Signed-off-by: Alexander Couzens lynxis@fe80.eu --- scripts/buildversion.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/scripts/buildversion.sh b/scripts/buildversion.sh index 16c043f..f63b9a0 100755 --- a/scripts/buildversion.sh +++ b/scripts/buildversion.sh @@ -2,16 +2,18 @@ # Script to generate a C file with version information. OUTFILE="$1" VAR16MODE="$2" +DATE=$(date +%s)
# Extract version info if [ -d .git -o -f .git ]; then - VERSION="`git describe --tags --long --dirty`" + VERSION="$(git describe --tags --long --dirty)" + DATE="$(git log --date=local --pretty=format:%ct -1)" elif [ -f .version ]; then - VERSION="`cat .version`" + VERSION="$(cat .version)" else VERSION="?" fi -VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`" +VERSION="${VERSION}-$(TZ=UTC date -d @$DATE +%Y%m%d_%H%M%S)" echo "Version: ${VERSION}"
# Build header file
On Sat, Mar 07, 2015 at 06:45:28PM +0100, Alexander Couzens wrote:
Hi,
here are two patches which makes reproducible builds possible.
Best, lynxis
FYI, there was a thread on this just a few weeks ago:
http://www.seabios.org/pipermail/seabios/2015-February/008603.html
-Kevin