[pacman-dev] [PATCH 2/2] support xattr when extracting packages
Eli Schwartz
eschwartz at archlinux.org
Mon Feb 8 00:55:17 UTC 2021
This permits storing the result of setcap during package() and applying
the resulting capabilities to the installed program. Formerly, it was
necessary to edit the binary after the fact (and thus dirty the file
according to -Qkk) by using an install scriptlet.
One problem that needs to be solved before this is useful, is preventing
the strip routine from destroying xattrs. This is taken care of in the
previous patch.
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
lib/libalpm/add.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index db0dba68d..53368b471 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -119,6 +119,7 @@ static int perform_extraction(alpm_handle_t *handle, struct archive *archive,
ARCHIVE_EXTRACT_PERM |
ARCHIVE_EXTRACT_TIME |
ARCHIVE_EXTRACT_UNLINK |
+ ARCHIVE_EXTRACT_XATTR |
ARCHIVE_EXTRACT_SECURE_SYMLINKS;
archive_entry_set_pathname(entry, filename);
--
2.30.0
More information about the pacman-dev
mailing list