aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ghc/0003-do-not-use-SHELL.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ghc/0003-do-not-use-SHELL.patch')
-rw-r--r--testing/ghc/0003-do-not-use-SHELL.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/testing/ghc/0003-do-not-use-SHELL.patch b/testing/ghc/0003-do-not-use-SHELL.patch
new file mode 100644
index 0000000000..540efa92b1
--- /dev/null
+++ b/testing/ghc/0003-do-not-use-SHELL.patch
@@ -0,0 +1,71 @@
+Description: Do not use $SHELL
+ as $SHELL is the user's preferred interactive shell. We do not want this to
+ leak into the wrapper scripts.
+Author: Joachim Breitner <nomeata@debian.org>
+
+Index: ghc/driver/ghci/ghc.mk
+===================================================================
+--- ghc.orig/driver/ghci/ghc.mk 2016-07-07 12:40:40.690866042 +0200
++++ ghc/driver/ghci/ghc.mk 2016-07-07 12:40:40.686863966 +0200
+@@ -21,7 +21,7 @@
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ $(call removeFiles, "$(WRAPPER)")
+ $(CREATE_SCRIPT) "$(WRAPPER)"
+- echo '#!$(SHELL)' >> "$(WRAPPER)"
++ echo '#!/bin/sh' >> "$(WRAPPER)"
+ echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
+ $(EXECUTABLE_FILE) "$(WRAPPER)"
+ $(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
+@@ -56,7 +56,7 @@
+ install_driver_ghcii:
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ $(call removeFiles,"$(GHCII_SCRIPT)")
+- echo "#!$(SHELL)" >> $(GHCII_SCRIPT)
++ echo "#!/bin/sh" >> $(GHCII_SCRIPT)
+ echo 'exec "$$(dirname "$$0")"/ghc --interactive "$$@"' >> $(GHCII_SCRIPT)
+ $(EXECUTABLE_FILE) $(GHCII_SCRIPT)
+ cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
+Index: ghc/rules/shell-wrapper.mk
+===================================================================
+--- ghc.orig/rules/shell-wrapper.mk 2016-07-07 12:40:40.690866042 +0200
++++ ghc/rules/shell-wrapper.mk 2016-07-07 12:40:40.686863966 +0200
+@@ -41,7 +41,7 @@
+ endif
+ $$($1_$2_INPLACE_WRAPPER): $$($1_$2_INPLACE)
+ $$(call removeFiles, $$@)
+- echo '#!$$(SHELL)' >> $$@
++ echo '#!/bin/sh' >> $$@
+ echo 'executablename="$$(TOP)/$$<"' >> $$@
+ echo 'datadir="$$(TOP)/$$(INPLACE_LIB)"' >> $$@
+ echo 'bindir="$$(TOP)/$$(INPLACE_BIN)"' >> $$@
+@@ -80,7 +80,7 @@
+ $$(INSTALL_DIR) "$$(DESTDIR)$$(bindir)"
+ $$(call removeFiles, "$$(WRAPPER)")
+ $$(CREATE_SCRIPT) "$$(WRAPPER)"
+- echo '#!$$(SHELL)' >> "$$(WRAPPER)"
++ echo '#!/bin/sh' >> "$$(WRAPPER)"
+ echo 'exedir="$$(ghclibexecdir)/bin"' >> "$$(WRAPPER)"
+ echo 'exeprog="$$($1_$2_PROG)"' >> "$$(WRAPPER)"
+ echo 'executablename="$$$$exedir/$$$$exeprog"' >> "$$(WRAPPER)"
+@@ -106,7 +106,7 @@
+
+ $$($1_$2_BINDIST_WRAPPER): $1/$2/build/tmp/$$($1_$2_PROG)
+ $$(call removeFiles, $$@)
+- echo '#!$$(SHELL)' >> $$@
++ echo '#!/bin/sh' >> $$@
+ ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
+ echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_REL_DIRS_SEARCHPATH))' >> $$@
+ endif
+Index: ghc/utils/mkdirhier/ghc.mk
+===================================================================
+--- ghc.orig/utils/mkdirhier/ghc.mk 2016-07-07 12:40:40.690866042 +0200
++++ ghc/utils/mkdirhier/ghc.mk 2016-07-07 12:40:40.686863966 +0200
+@@ -14,7 +14,7 @@
+ mkdir -p $(INPLACE_BIN)
+ mkdir -p $(INPLACE_LIB)
+ $(call removeFiles,$@)
+- echo '#!$(SHELL)' >> $@
++ echo '#!/bin/sh' >> $@
+ cat utils/mkdirhier/mkdirhier.sh >> $@
+ $(EXECUTABLE_FILE) $@
+