diff --git a/Build/BundledPrograms.hs b/Build/BundledPrograms.hs index ae49f3061f..0c2e177f4d 100644 --- a/Build/BundledPrograms.hs +++ b/Build/BundledPrograms.hs @@ -22,6 +22,10 @@ bundledPrograms = catMaybes #ifndef mingw32_HOST_OS -- git is not included in the windows bundle , Just "git" + -- Not strictly needed in PATH by git-annex, but called + -- by git when it sshes to a remote. + , Just "git-upload-pack" + , Just "git-receive-pack" #endif , Just "cp" #ifndef mingw32_HOST_OS diff --git a/Makefile b/Makefile index b0535bcb1c..3d97e79254 100644 --- a/Makefile +++ b/Makefile @@ -108,7 +108,7 @@ linuxstandalone: linuxstandalone-nobuild: Build/Standalone Build/LinuxMkLibs rm -rf "$(LINUXSTANDALONE_DEST)" mkdir -p tmp - cp -R standalone/linux "$(LINUXSTANDALONE_DEST)" + cp -R standalone/linux/skel "$(LINUXSTANDALONE_DEST)" install -d "$(LINUXSTANDALONE_DEST)/bin" cp dist/build/git-annex/git-annex "$(LINUXSTANDALONE_DEST)/bin/" diff --git a/debian/changelog b/debian/changelog index 6e0ae120a6..5328f5f92a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ git-annex (5.20131222) UNRELEASED; urgency=medium (tasty was stuck in incoming.) * Fix typo in test suite. * Fix bug in Linux standalone build's shimming that broke git-annex-shell. + * Include git-receive-pack, git-upload-pack, and git wrappers in the Linux + standalone build, and OSX app, so they will be available when it's + added to PATH. -- Joey Hess Tue, 24 Dec 2013 13:54:32 -0400 diff --git a/doc/bugs/armel_standalone:_git-upload-pack_and_-receive-pack_not_shimmed.mdwn b/doc/bugs/armel_standalone:_git-upload-pack_and_-receive-pack_not_shimmed.mdwn index bc6a2bfa81..317b9fcda8 100644 --- a/doc/bugs/armel_standalone:_git-upload-pack_and_-receive-pack_not_shimmed.mdwn +++ b/doc/bugs/armel_standalone:_git-upload-pack_and_-receive-pack_not_shimmed.mdwn @@ -18,3 +18,6 @@ $ git-upload-pack $ git-receive-pack /volume1/downloads/git-annex.linux/shimmed/sh/sh: 20: git-receive-pack: not found """]] + +> [[fixed|done]]; added git, git-upload-pack, and git-receive-pack wrappers +> to git-annex.linux/. Also to equivilant place in OSX app. --[[Joey]] diff --git a/standalone/linux/README b/standalone/linux/skel/README similarity index 100% rename from standalone/linux/README rename to standalone/linux/skel/README diff --git a/standalone/linux/skel/git b/standalone/linux/skel/git new file mode 100755 index 0000000000..f32cf81932 --- /dev/null +++ b/standalone/linux/skel/git @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/bin/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git "$@" diff --git a/standalone/linux/git-annex b/standalone/linux/skel/git-annex similarity index 100% rename from standalone/linux/git-annex rename to standalone/linux/skel/git-annex diff --git a/standalone/linux/git-annex-shell b/standalone/linux/skel/git-annex-shell similarity index 100% rename from standalone/linux/git-annex-shell rename to standalone/linux/skel/git-annex-shell diff --git a/standalone/linux/git-annex-webapp b/standalone/linux/skel/git-annex-webapp similarity index 100% rename from standalone/linux/git-annex-webapp rename to standalone/linux/skel/git-annex-webapp diff --git a/standalone/linux/skel/git-receive-pack b/standalone/linux/skel/git-receive-pack new file mode 100755 index 0000000000..32d166e84e --- /dev/null +++ b/standalone/linux/skel/git-receive-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/bin/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-receive-pack "$@" diff --git a/standalone/linux/skel/git-upload-pack b/standalone/linux/skel/git-upload-pack new file mode 100755 index 0000000000..f05aad83ee --- /dev/null +++ b/standalone/linux/skel/git-upload-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/bin/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-upload-pack "$@" diff --git a/standalone/linux/runshell b/standalone/linux/skel/runshell similarity index 100% rename from standalone/linux/runshell rename to standalone/linux/skel/runshell diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git b/standalone/osx/git-annex.app/Contents/MacOS/git new file mode 100755 index 0000000000..ccf2cd7411 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack new file mode 100755 index 0000000000..efbbf2bb30 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-receive-pack "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack new file mode 100755 index 0000000000..5049371c9e --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-upload-pack "$@"