views:

53

answers:

1

I'm trying to "portablize" git, so I want to send the required executables from the make process of git to my hosted web server. Can I do that? Do you think the executables will work?

+3  A: 

The way I do it is to:

  • get all Git dependencies (as listed in this Solaris package site, but this works for any Unix platform)
  • compile those dependencies with --prefix=/home/myuser and install them in the usr/local/lib of my home directory
  • then compile Git (still avoiding any reference to a system path like /usr/local/lib, but only using the lib and include within my homedir)
  • and install Git in the /home/myuser/git directory

I can then copy only /home/myuser/git and /home/myuser/usr/local (and $prefix/libexec/git-core as Jakub mentions in the comments) to any other similar server, knowing it will work in isolation from any existing system libraries.

VonC
That will work with built-in commands, but some commands are external scripts / programs and have to be copied separately from `$prefix/libexec/git-core/` (including e.g. `git stash`, `git pull` (but not `git fetch`), `git bisect`, etc.)
Jakub Narębski
how do you mean copied separately?
jphenow
Umm... Okay now its saying cannot execute binary file...
jphenow
@jphenow: it is just a permission issue (like `chmod 755` the copied binaries)? Or a `PATH` issue? (remember to set a similar set of environment variable when using that distribution on the remote server. `/usr/local/lib` shouldn't be part of the `PATH`)
VonC
jphenow
@jphenow: that is probably the cause of the execution issue: I always deploy on "similar" platform.
VonC
I'll have to find out what the shared servers on GoDaddy are running and try it again
jphenow