pacman/scripts/libmakepkg/tidy
Eli Schwartz 88d054093c makepkg: don't let the strip routine mess up file attributes
It updates the stripped/objcopied file by creating a temp file,
chown/chmodding it, and replacing the original file. But upstream
binutils has CVE-worthy issues with this if running strip as root, and
some recent versions of strip don't play nicely with fakeroot.

Also, this has always destroyed xattrs. :/

Sidestep the issue by telling strip/objcopy to write to a temporary
file, and manually dump the contents of that back into the original
binary. Since the original binary is intact, albeit with different
contents, it retains its correct attributes in fakeroot.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-02-08 14:22:55 +10:00
..
docs.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
emptydirs.sh.in makepkg: emptydirs: fix typo 2020-10-21 11:19:01 +10:00
libtool.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
meson.build Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
purge.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
staticlibs.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
strip.sh.in makepkg: don't let the strip routine mess up file attributes 2021-02-08 14:22:55 +10:00
zipman.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00