Make makepkg compute sizes properly
Makepkg used to use du --apparent-size to compute the size of the package. Unfortunately, this would result in different sizes depending on the filesystem used (e.g., btrfs vs ext4), which would affect reproducible builds. Use a wc-based approach to compute sizes Signed-off-by: Santiago Torres <santiago@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
c61cd050f9
commit
f26cb61cb6
1 changed files with 1 additions and 2 deletions
|
@ -588,8 +588,7 @@ write_kv_pair() {
|
||||||
}
|
}
|
||||||
|
|
||||||
write_pkginfo() {
|
write_pkginfo() {
|
||||||
local size="$(@DUPATH@ @DUFLAGS@)"
|
local size="$(find . -type f -exec cat {} + 2>/dev/null | wc -c)"
|
||||||
size="$(( ${size%%[^0-9]*} * 1024 ))"
|
|
||||||
|
|
||||||
merge_arch_attrs
|
merge_arch_attrs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue