summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-05-24 09:38:55 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-15 20:33:04 -0400
commitaa9d9381e5c5d7b96966d817372085897585ecdd (patch)
treecb934f814433af15fc064e939e335081d31cc0b7
parent59bc600871eb23d3cf83025a3c05dbb3a14b033a (diff)
downloadhaskell-aa9d9381e5c5d7b96966d817372085897585ecdd.tar.gz
hadrian: Run xattr -rc . on bindist tarball
Fixes #21506.
-rw-r--r--hadrian/bindist/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile
index 40efe553c1..cffeb4f973 100644
--- a/hadrian/bindist/Makefile
+++ b/hadrian/bindist/Makefile
@@ -15,6 +15,13 @@ default:
# TODO : find if a better function exists
eq=$(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+# the following is the work around suggested by @carter in #17418 during install
+# time. This should help us with code signing issues by removing extended
+# attributes from all files.
+ifeq "$(Darwin_Host)" "YES"
+XATTR ?= /usr/bin/xattr
+endif
+
define installscript
# $1 = package name
# $2 = wrapper path
@@ -164,6 +171,8 @@ install_bin_libdir:
for i in $(BINARIES); do \
cp -R $$i "$(DESTDIR)$(ActualBinsDir)"; \
done
+ # Work around #17418 on Darwin
+ if [ -e "${XATTR}" ]; then "${XATTR}" -c -r "$(DESTDIR)$(ActualBinsDir)"; fi
install_bin_direct:
@echo "Copying binaries to $(DESTDIR)$(WrapperBinsDir)"