summaryrefslogtreecommitdiff
path: root/scripts/ipkg-build
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-09-11 16:33:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-09-11 16:33:26 +0000
commit4baec2468a88a08058a97406e48a5b1faf3d1fa4 (patch)
treebe954e8b71cee419044b640547bf81c1b2d864e4 /scripts/ipkg-build
parente6fb730daa347e6e4866166857ae7b23c0ad378b (diff)
downloadmtk-20170518-4baec2468a88a08058a97406e48a5b1faf3d1fa4.zip
mtk-20170518-4baec2468a88a08058a97406e48a5b1faf3d1fa4.tar.gz
mtk-20170518-4baec2468a88a08058a97406e48a5b1faf3d1fa4.tar.bz2
include/image.mk: make tar reproducible
several packages reported different file order between builds make binutils, kmod-sched reproducible Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> SVN-Revision: 46859
Diffstat (limited to 'scripts/ipkg-build')
-rwxr-xr-xscripts/ipkg-build6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index cd70c1f..a54e9b5 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -139,20 +139,20 @@ mkdir $tmp_dir
echo $CONTROL > $tmp_dir/tarX
# Preserve permissions (-p) when creating data.tar.gz as non-root user
-( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX --format=gnu -czpf $tmp_dir/data.tar.gz --mtime="$TIMESTAMP" . )
+( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX --format=gnu --sort=name -czpf $tmp_dir/data.tar.gz --mtime="$TIMESTAMP" . )
installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
$pkg_dir/$CONTROL/control
-( cd $pkg_dir/$CONTROL && $TAR $ogargs --format=gnu -czf $tmp_dir/control.tar.gz --mtime="$TIMESTAMP" . )
+( cd $pkg_dir/$CONTROL && $TAR $ogargs --format=gnu --sort=name -czf $tmp_dir/control.tar.gz --mtime="$TIMESTAMP" . )
rm $tmp_dir/tarX
echo "2.0" > $tmp_dir/debian-binary
pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
rm -f $pkg_file
-( cd $tmp_dir && $TAR --format=gnu -zcf $pkg_file --mtime="$TIMESTAMP" ./debian-binary ./data.tar.gz ./control.tar.gz )
+( cd $tmp_dir && $TAR --format=gnu --sort=name -zcf $pkg_file --mtime="$TIMESTAMP" ./debian-binary ./data.tar.gz ./control.tar.gz )
rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz
rmdir $tmp_dir