mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 00:07:09 +04:00
Several image recipes call tar without the options that pin the member order, the owner, the mode and the modification time. The archive then holds the build time, the umask of the build user and the readdir order of the build directory, so two builds of the same source produce different images. Pass the same options that Image/mkfs/targz and sysupgrade-tar.sh already use. The recipes define no member order, so sorting the members takes nothing away. The diffoscope of the published WAX610 archive shows the order differing between the build machines, which is what a readdir order produces. --mode=go-w clears the write bit of the group and of the others. tar keeps the mode of the file on disk, which follows the umask of the build user, so without it the archive differs between a host with umask 022 and one with umask 002. Covers the Netgear factory archives of ipq40xx, ipq60xx and ipq807x, the Creality factory archive of mt76x8, the D-Link DWL8610AP archive of bcm53xx, the Freecom archive of ixp4xx and the Linksys switch archive of realtek. Signed-off-by: John Crispin <john@phrozen.org>