diff mbox series

[meta-darwin,12/21] libarchive: drop acl/xattr PACKAGECONFIGs for Darwin nativesdk

Message ID 20261014141209.488034-12-ecordonnier@snap.com
State New
Headers show
Series [meta-darwin,01/21] meta-darwin: bump layer series to wrynose (6.0.3) | expand

Commit Message

Etienne Cordonnier Oct. 14, 2026, 2:10 p.m. UTC
From: Etienne Cordonnier <ecordonnier@snap.com>

Both pull in nativesdk-attr (and nativesdk-acl also DEPENDS on it), which
fails to build for Darwin: attr's libattr.c/getfattr.c/attr_copy_file.c use
the GNU/Linux <attr/xattr.h> API unconditionally, and upstream has never
grown any __APPLE__/Darwin support. Darwin's own xattr() family takes a
different signature (extra position/options args) and has no lXXX-prefixed
symlink variants, so attr's calls don't even parse there, let alone link.
Same story for acl's libacl, which uses the POSIX.1e acl_get_file() family
that Darwin doesn't implement at all.

libarchive only uses these for optional xattr/ACL preservation when reading
or writing archives; dropping them for the Darwin nativesdk build (which
only needs libarchive to link nativesdk-elfutils' debuginfod client) loses
that preservation but nothing else.

AI-Generated: Claude Sonnet 5

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 recipes-extended/libarchive/libarchive_%.bbappend | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
diff mbox series

Patch

diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
new file mode 100644
index 0000000..e3c1941
--- /dev/null
+++ b/recipes-extended/libarchive/libarchive_%.bbappend
@@ -0,0 +1,6 @@ 
+# libattr/libacl are the GNU/Linux implementations of xattr and POSIX.1e ACL
+# support; Darwin's own xattr/ACL syscalls are real but have a different,
+# incompatible signature/model and neither upstream library has ever grown a
+# Darwin port. Drop both PACKAGECONFIGs here: libarchive still reads/writes
+# archives fine without xattr/ACL preservation.
+PACKAGECONFIG:remove:class-nativesdk:darwin21 = "acl xattr"