pacman/scripts/libmakepkg
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
..
buildenv build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
executable Add fossil scm support to makepkg 2020-11-26 21:58:40 +10:00
integrity makepkg/repo-add: handle GPGKEY with spaces 2020-06-11 10:56:30 +10:00
lint_config build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
lint_package build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
lint_pkgbuild build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
source Add fossil scm support to makepkg 2020-11-26 21:58:40 +10:00
tidy makepkg: don't let the strip routine mess up file attributes 2021-02-08 14:22:55 +10:00
util Add fossil scm support to makepkg 2020-11-26 21:58:40 +10:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
buildenv.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
executable.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
integrity.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
lint_config.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
lint_package.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
lint_pkgbuild.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
meson.build meson: remove useless mkdir -p 2018-12-12 10:12:41 +10:00
source.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
srcinfo.sh.in srcinfo.sh: remove trailing newline 2020-06-26 16:00:26 +10:00
tidy.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
util.sh.in build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00