[Git][ghc/ghc][wip/ghc-9.10] bindist: Fix xattr cleaning

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Apr 26 21:07:19 UTC 2024



Ben Gamari pushed to branch wip/ghc-9.10 at Glasgow Haskell Compiler / GHC


Commits:
ea3839f6 by Rodrigo Mesquita at 2024-04-26T17:06:49-04:00
bindist: Fix xattr cleaning

The original fix (725343aa) was incorrect because it used the shell
bracket syntax which is the quoting syntax in autoconf, making the test
for existence be incorrect and therefore `xattr` was never run.

Fixes #24554

(cherry picked from commit e03760db6713068ad8ba953d2252ec12b3278c9b)

- - - - -


1 changed file:

- distrib/configure.ac.in


Changes:

=====================================
distrib/configure.ac.in
=====================================
@@ -114,16 +114,16 @@ if test "$HostOS" = "darwin"; then
     # 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.
-    XATTR=${XATTR:-/usr/bin/xattr}
+    XATTR="${XATTR:-/usr/bin/xattr}"
 
-    if [ -e "${XATTR}" ]; then
+    if test -e "${XATTR}"; then
 
         # Instead of cleaning the attributes of the ghc-toolchain binary only,
         # we clean them from all files in the bin/ and lib/ directories, as it additionally future
         # proofs running executables from the bindist besides ghc-toolchain at configure time, and
         # we can avoid figuring out the path to the ghc-toolchain dynlib specifically.
-        /usr/bin/xattr -rc bin/
-        /usr/bin/xattr -rc lib/
+        "$XATTR" -rc bin/
+        "$XATTR" -rc lib/
 
     fi
 fi



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ea3839f64bf5dfc8373734f18d766766b024c026

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ea3839f64bf5dfc8373734f18d766766b024c026
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240426/45a0fa68/attachment-0001.html>


More information about the ghc-commits mailing list