[commit: ghc] master: get-win32-tarballs: Use correct `find` (a4c2ac2)

git at git.haskell.org git at git.haskell.org
Tue Sep 5 11:22:20 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a4c2ac2cef3d0ad3c968b8195daf651e672d3435/ghc

>---------------------------------------------------------------

commit a4c2ac2cef3d0ad3c968b8195daf651e672d3435
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Sep 4 08:01:04 2017 -0400

    get-win32-tarballs: Use correct `find`
    
    This fixes #12502 by using the `find` utility found by FP_PROG_FIND
    instead of the first one in PATH.
    
    Test Plan: Validate on Windows
    
    Reviewers: Phyx, austin, hvr
    
    Reviewed By: Phyx
    
    Subscribers: rwbarton, thomie, erikd
    
    GHC Trac Issues: #12502
    
    Differential Revision: https://phabricator.haskell.org/D3907


>---------------------------------------------------------------

a4c2ac2cef3d0ad3c968b8195daf651e672d3435
 distrib/configure.ac.in  | 6 ++++++
 mk/get-win32-tarballs.sh | 9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 7c27dad..9a94cf2 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -63,6 +63,12 @@ dnl ** figure out how to do a BSD-ish install **
 AC_PROG_INSTALL
 
 #
+dnl ** find `find`, used by get-win32-tarballs.sh (see #12502)
+#
+FP_PROG_FIND()
+export FIND
+
+#
 dnl ** how to do symlinks **
 #
 AC_PROG_LN_S()
diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh
index 75889ee..b3c9e07 100755
--- a/mk/get-win32-tarballs.sh
+++ b/mk/get-win32-tarballs.sh
@@ -3,6 +3,9 @@
 tarball_dir='ghc-tarballs'
 missing_files=0
 
+# see #12502
+if test -z "$FIND"; then FIND="find"; fi
+
 fail() {
     echo >&2
     echo "$1" >&2
@@ -148,16 +151,16 @@ sync_binaries_and_sources() {
     verify=0
     download_sources
 
-    for f in $(find ghc-tarballs/mingw-w64 -iname '*.sig'); do
+    for f in $($FIND ghc-tarballs/mingw-w64 -iname '*.sig'); do
         echo "Verifying $f"
         gpg --verify $f
     done
 
-    md5sum `find ghc-tarballs -type f -a -not -iname '*.sig'` >| mk/win32-tarballs.md5sum
+    md5sum `$FIND ghc-tarballs -type f -a -not -iname '*.sig'` >| mk/win32-tarballs.md5sum
     chmod -R ugo+rX ghc-tarballs
 
     rsync -av ghc-tarballs/mingw-w64/* downloads.haskell.org:public_html/mingw
-    for f in $(find ghc-tarballs/mingw-w64); do
+    for f in $($FIND ghc-tarballs/mingw-w64); do
         curl -XPURGE http://downloads.haskell.org/~ghc/mingw/$f
     done
 }



More information about the ghc-commits mailing list