[coreboot-gerrit] New patch to review for coreboot: util/release: make release archives reproducible

Alexander Couzens (lynxis@fe80.eu) gerrit at coreboot.org
Fri Sep 9 00:09:20 CEST 2016


Alexander Couzens (lynxis at fe80.eu) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16556

-gerrit

commit 6f9e0d94665438e19bbd3b55a11714194c733f61
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Fri Sep 9 00:05:54 2016 +0200

    util/release: make release archives reproducible
    
    tar doesn't sort by default and take the order of the OS which is in most cases
    the order of creation. Sort by name and set influencing environment TZ and language.
    
    Change-Id: I3d043952417000d12e81353677f1ea4aa2da4fc1
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 util/release/build-release | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/util/release/build-release b/util/release/build-release
index f09f5b2..0012e44 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -2,6 +2,12 @@
 # $1: new version name
 # $2: commit id (if not master)
 set -e
+
+LC_ALL=C
+LANG=C
+TZ=UTC
+export LC_ALL LANG TZ
+
 if [ -z "$1" ]; then
 	echo "usage: $0 version [commit id]"
 	echo "tags a new coreboot version and creates a tar archive"
@@ -17,5 +23,5 @@ git tag -a --force $1 -m "coreboot version $1"
 printf "$1-$(git log --pretty=%H|head -1)\n" > .coreboot-version
 tstamp=$(git log --pretty=format:%ci -1)
 cd ..
-tar --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs --exclude=coreboot-${1}/3rdparty/blobs -cvf - coreboot-${1} |xz -9 > coreboot-${1}.tar.xz
-tar --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs -cvf - coreboot-${1}/3rdparty/blobs |xz -9 > coreboot-blobs-${1}.tar.xz
+tar --sort=name --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs --exclude=coreboot-${1}/3rdparty/blobs -cvf - coreboot-${1} |xz -9 > coreboot-${1}.tar.xz
+tar --sort=name --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs -cvf - coreboot-${1}/3rdparty/blobs |xz -9 > coreboot-blobs-${1}.tar.xz



More information about the coreboot-gerrit mailing list