pacman/scripts
Jonas Witschel f5f9e0f4ea makepkg: use bsdtar --no-read-sparse for archive creation if available
bsdtar uses the "pax" TAR archive format by default, which has support for
storing sparse file information in the archive. Unfortunately this is a source
of unreproducibility because the sparse encoding is taken from the file system
and different file systems handle sparse files differently: some file systems
have no support for sparsely encoded files at all, and even file systems with
sparse file support can report different file information for identical files
due to differing implementations.

As a real world example where this happens, consider the Arch Linux package
"brotli-testdata 1.0.9-7", which contains a sparsely encoded all-zeros file
"usr/share/brotli/testdata/zeros". Building this package on a btrfs file system
yields a different package than building it on tmpfs or ext4 solely due to
different sparse file information that gets recorded in the package tarball.

To improve the reproducibility of archives containing sparsely encoded files,
libarchive version 3.6.0 introduces a new --no-read-sparse option. This skips
reading sparse file information from disk entirely and therefore stores files
"expanded" in the archive, which is the only way to make them reliably
reproducible across file systems.

makepkg will use this option if libarchive is recent enough to support it,
which is detected at build time.

Signed-off-by: Allan McRae <allan@archlinux.org>
2022-03-11 09:43:59 +10:00
..
completion Always enable TotalDownload 2021-04-23 09:43:30 +10:00
libmakepkg Make link time optimization flags configurable 2022-03-06 14:45:36 +10:00
po Update mailing list url 2021-11-20 12:38:25 -08:00
.gitignore libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
libmakepkg.pc.in Update urls to not use www. for archlinux.org 2021-04-08 10:14:33 +10:00
makepkg-template.pl.in Update copyright years 2022-01-02 13:34:52 +10:00
makepkg.sh.in makepkg: use bsdtar --no-read-sparse for archive creation if available 2022-03-11 09:43:59 +10:00
meson.build meson: do not use meson.source_root() and meson.build_root() 2022-03-06 16:26:34 +10:00
pacman-db-upgrade.sh.in Update copyright years 2022-01-02 13:34:52 +10:00
pacman-key.sh.in Update copyright years 2022-01-02 13:34:52 +10:00
repo-add.sh.in Update copyright years 2022-01-02 13:34:52 +10:00
wrapper.sh.in Update copyright years 2022-01-02 13:34:52 +10:00