From 1afe3d8443aacbaf72a9148448bc6e0e2d2d0a9c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Thu, 6 Dec 2018 11:23:00 +0100 Subject: [PATCH] build: Drop user/group ID/name from sysupgrade.tar Tar will automatically record the user/group ID and name for files/directories. This reduces the reproducibility of the sysupgrade.tar because most of the people don't use the same username as the OpenWrt buildserver. Signed-off-by: Sven Eckelmann --- scripts/sysupgrade-tar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sysupgrade-tar.sh b/scripts/sysupgrade-tar.sh index ca5577387d..d1d627a96e 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 --sort=name -cvf sysupgrade.tar sysupgrade-${board} ${mtime}) +(cd "$tmpdir"; tar --sort=name --owner=0 --group=0 --numeric-owner -cvf sysupgrade.tar sysupgrade-${board} ${mtime}) err="$?" if [ -e "$tmpdir/sysupgrade.tar" ]; then cp "$tmpdir/sysupgrade.tar" "$outfile" -- 2.25.1