aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2018-12-06 11:09:18 +0100
committerMathias Kresin <dev@kresin.me>2019-01-02 22:36:16 +0100
commit894bcf59dc5b11ff38259a43cf4a0a3e9acada96 (patch)
tree7ec355367606df02db1bbfd8bd6fb86e6b460a14
parent15f6351ea32ec13104301fe02233f54f1adce4f2 (diff)
downloadupstream-894bcf59dc5b11ff38259a43cf4a0a3e9acada96.tar.gz
upstream-894bcf59dc5b11ff38259a43cf4a0a3e9acada96.tar.bz2
upstream-894bcf59dc5b11ff38259a43cf4a0a3e9acada96.zip
build: Use stable file ordering in sysupgrade.tar
The file ordering in the current sysupgrade depends on the order of file in a filesystem. This is often already in a sane (alphabetical order) but this is not always the case. For example, the OpenWrt build servers return a different ordering. This breaks the reproducibility of the sysupgrade tarballs significantly and also resulted in images which cannot be used for upgrades on devices like the OpenMesh A42/A62. Signed-off-by: Sven Eckelmann <sven@narfation.org>
-rwxr-xr-xscripts/sysupgrade-tar.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sysupgrade-tar.sh b/scripts/sysupgrade-tar.sh
index 45b17daccd..ca5577387d 100755
--- a/scripts/sysupgrade-tar.sh
+++ b/scripts/sysupgrade-tar.sh
@@ -61,7 +61,7 @@ if [ -n "$SOURCE_DATE_EPOCH" ]; then
mtime="--mtime=@${SOURCE_DATE_EPOCH}"
fi
-(cd "$tmpdir"; tar cvf sysupgrade.tar sysupgrade-${board} ${mtime})
+(cd "$tmpdir"; tar --sort=name -cvf sysupgrade.tar sysupgrade-${board} ${mtime})
err="$?"
if [ -e "$tmpdir/sysupgrade.tar" ]; then
cp "$tmpdir/sysupgrade.tar" "$outfile"