Skip to content

Commit

Permalink
makepkg: avoid creating .tar files with extended attributes
Browse files Browse the repository at this point in the history
Extended attributes are not necessary for pacman to work. Extended
attributes may not even be supported by the file system to which we
extract the files.

And worst of all: pacman cannot handle extended attributes, but simply
stops extracting files when it encounters an extended attribute.

This is particularly nasty when creating packages on a system configured
to cache, say, file integrity information about .exe files in extended
attributes, as the created packages will fail to install any .exe files.

The fix is very easy: simply pass the -no-xattrs option to bsdtar.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho authored and lazka committed Feb 27, 2023
1 parent d270855 commit da9e3f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/makepkg.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ create_package() {
msg2 "$(gettext "Compressing package...")"
# TODO: Maybe this can be set globally for robustness
shopt -s -o pipefail
list_package_files | LANG=C bsdtar --no-fflags -cnf - --null --files-from - |
list_package_files | LANG=C bsdtar --no-fflags --no-xattrs -cnf - --null --files-from - |
compress_as "$PKGEXT" > "${pkg_file}" || ret=$?

shopt -u -o pipefail
Expand Down

0 comments on commit da9e3f3

Please sign in to comment.