From 2e11edcfe4a6f5d82289c6ecb3efe73b9f39afed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Dec 2013 20:47:48 -0400 Subject: work around git path-defying behavior that broke "git annex" in standalone tarball, while "git-annex" worked --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9ffa011b8..8d5d7b6c4 100644 --- a/Makefile +++ b/Makefile @@ -143,13 +143,16 @@ linuxstandalone: Build/Standalone find $(LINUXSTANDALONE_DEST) -type d -name gconv | head -n 1 | sed 's!$(LINUXSTANDALONE_DEST)/*!!' > $(LINUXSTANDALONE_DEST)/gconvdir find $(LINUXSTANDALONE_DEST) | grep ld-linux | head -n 1 | sed 's!$(LINUXSTANDALONE_DEST)/*!!' > $(LINUXSTANDALONE_DEST)/linker - # Install linker shim for each binary. + # Install linker shim for each binary. Note that each binary is put + # in its own separate directory, to avoid eg git looking for + # binaries in its directory rather than in PATH. for file in $$(find "$(LINUXSTANDALONE_DEST)" -type f); do \ if file "$$file" | grep ELF | grep -q executable; then \ - mkdir -p "$(LINUXSTANDALONE_DEST)/shimmed"; \ - mv "$$file" "$(LINUXSTANDALONE_DEST)/shimmed"; \ + base=$$(basename "$$file"); \ + mkdir -p "$(LINUXSTANDALONE_DEST)/shimmed/$$base"; \ + mv "$$file" "$(LINUXSTANDALONE_DEST)/shimmed/$$base/"; \ echo "#!/bin/sh" > "$$file"; \ - echo "exec \"\$$GIT_ANNEX_LINKER\" --library-path \"\$$GIT_ANNEX_LD_LIBRARY_PATH\" \"\$$GIT_ANNEX_SHIMMED/$$(basename "$$file")\" \"\$$@\"" >> "$$file"; \ + echo "exec \"\$$GIT_ANNEX_LINKER\" --library-path \"\$$GIT_ANNEX_LD_LIBRARY_PATH\" \"\$$GIT_ANNEX_SHIMMED/$$base/$$base\" \"\$$@\"" >> "$$file"; \ chmod +x "$$file"; \ fi; \ done -- cgit v1.2.3