Hello list, While building larger and large images to see whether they build reproducibly [1], I noticed that the size in live/filesystem.size (which is included in the image itself and is its uncompressed size) is not reproducible and not to be trusted. My investigation so far: * The content of live/filesystem.size (measured by 'du -B 1 -s' in binary_rootfs) differs slightly between different runs * I've added the output of non-summary commands to the script to find the causes (du -B 1 -a chroot/chroot | sort -h > du.details) * Sometimes, a file with identical content would be reported 4kiB larger in a consecutive run * Quite often, the size of a directory would differ (but not always the same directory) * All these differences would disappear when building on /dev/shm instead of the disk-image I was using previously, so there appears to be some memory-effect * All reported sizes are multiples of 4kiB, which is the block size of my disk-image on the host, it does not reflect the block size of the image (128kiB for squashfs, 1kiB for ext[234]) * My attempts to use a 'mount' command within the chroot, to do a 'du' on the actual squashfs image failed * For a squashfs image, the size of the files listed in config/rootfs/excludes is also counted * The code got added in 7837cd5f8a4c8c2e97eca443bbc4304b94172fb9, 2010-07-02T14:29:52+0200 and has not changed significantly since then My conclusion: * The current code for calculating the size (at least for squashfs) is broken My proposal: Fixing is not so straightforward, I would rather recommend to delete this part of the code. If you agree, I'll prepare the merge request. With kind regards, Roland Clobus [1] https://wiki.debian.org/ReproducibleInstalls/LiveImages
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature