system/abuild: zero-size files not added to archive
04:23 <+smaeul> unless it got fixed, *-binsh packages being empty is a longstanding bug in abuild when run on a filesystem that can embed small files in the inode (e.g. xfs), such that they have a 0 block size
04:27 <+smaeul> https://tpaste.us/NMzP
04:28 <+smaeul> this breaks because apk-tools skips unpacking the package when size == 0
This patch is needed:
From 9969ec002c408b616714a99a6317c7f996965dd4 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 19 Jan 2022 02:35:19 -0600
Subject: [PATCH] abuild: Correctly package files that fit in inode
On filesystems such as XFS, abuild will skip small files and symlinks
because the file fits in an inode and shows a size of 0.
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Acked-by: Zach van Rijn <me@zv.io>
---
abuild.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/abuild.in b/abuild.in
index 6bb087a..3e83563 100644
--- a/abuild.in
+++ b/abuild.in
@@ -927,7 +927,7 @@ prepare_metafiles() {
sync;;
esac
- local size="$(du -sk | awk '{print $1 * 1024}')"
+ local size="$(du -sk --apparent-size | awk '{print $1 * 1024}')"
if [ "$arch" != "$apkbuild_arch" ]; then
local msg="Split function set arch=\"$arch\" for $name, use subpackages=pkg:split:arch format instead"
--
2.32.0 (Apple Git-132)