If the Gentoo repository (i.e. /var/db/repos/gentoo) is on a filesystem without xattr support, emerging packages like net-mail/mailbase or app-arch/tar fails on hardened (i.e. default/linux/amd64/17.1/no-multilib/hardened), due to install-xattr failing to retrieve the extended attributes of certain files: install-xattr: listxattr() failed: Operation not supported According to strace: listxattr("/var/tmp/portage/net-mail/mailbase-1.5-r2/files/mailcap.5", NULL, 0) = -1 EOPNOTSUPP (Operation not supported) where /var/tmp/portage/net-mail/mailbase-1.5-r2/files is actually a symlink to /var/db/repos/gentoo/net-mail/mailbase/files during the merge. During debugging this I wasted quite a lot of time trying to figure out what is wrong with the xattr support on my /var/tmp/portage/ filesystem (which does have xattr support) before I found that the FILESDIR was actually a symlink to the other filesystem. Please add support for repositories on filesystems without xattr or provide better diagnostics. Should extended attributes from files residing on different filesystems than ${PORTAGE_BUILDDIR} at all be considered for copying? Thanks!
*** Bug 931675 has been marked as a duplicate of this bug. ***
Created attachment 895998 [details, diff] 0001-install-xattr-do-to-fail-if-source-filesystem-does-n.patch Attached patch should fix this.
Needs something similar xlistattr(), which is causing emerging linux-firmware to fail. This handles both: --- install-xattr/install-xattr.c 2024-08-18 21:52:42.316666599 -0400 +++ install-xattr/install-xattr.c 2024-08-18 22:02:32.773333234 -0400 @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> #include <err.h> +#include <errno.h> #include <fnmatch.h> #include <ctype.h> #include <getopt.h> @@ -80,6 +81,7 @@ xlistxattr(const char *path, char *list, size_t size) { ssize_t ret = listxattr(path, list, size); + if (ret < 0 && errno == ENOTSUP) ret=0; if (ret < 0) err(1, "listxattr() failed"); return ret; @@ -89,6 +91,7 @@ xgetxattr(const char *path, char *list, char *value, size_t size) { ssize_t ret = getxattr(path, list, value, size); + if (ret < 0 && errno == ENOTSUP) ret=0; if (ret < 0) err(1, "getxattr() failed"); return ret;