From 72b6a54e0a67e4a2cde6da59ff051a9bfaa7c791 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sun, 20 May 2012 10:07:29 +0530 Subject: [PATCH] test packaging instructions and make required changes --- doc/install.mkd | 9 +++++---- src/lib/Gitolite/Hooks/PostUpdate.pm | 4 ++-- src/lib/Gitolite/Setup.pm | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/install.mkd b/doc/install.mkd index 25e7cbe..519ab52 100644 --- a/doc/install.mkd +++ b/doc/install.mkd @@ -152,15 +152,16 @@ Gitolite has broad similarities to git in terms of packaging requirements. With that said, here's one way to package gitolite: - * Put the two executables (gitolite and gitolite-shell) somewhere in PATH. - Then change the 2 assignments to `$ENV{GL_BINDIR}`, one in 'gitolite', one - in 'gitolite-shell', to "/usr/libexec/gitolite". + * Put the executable `gitolite` somewhere in PATH. Put the executable + `gitolite-shell` in /usr/libexec/gitolite (along with those 5 directories). + Change the 2 assignments to `$ENV{GL_BINDIR}`, one in 'gitolite', one in + 'gitolite-shell', to "/usr/libexec/gitolite" from `$FindBin::RealBin`. This is equivalent to "make" embedding the exec-path into the executable. **OR** - Put the two executables `gitolite` and `gitolite-shell` also into + Put both executables `gitolite` and `gitolite-shell` also into /usr/libexec/gitolite (i.e., as siblings to the 5 directories mentioned above). Then *symlink* `/usr/libexec/gitolite/gitolite` to some directory in the PATH. Do not *copy* it; it must be a symlink. diff --git a/src/lib/Gitolite/Hooks/PostUpdate.pm b/src/lib/Gitolite/Hooks/PostUpdate.pm index 70e23f8..9013ee9 100644 --- a/src/lib/Gitolite/Hooks/PostUpdate.pm +++ b/src/lib/Gitolite/Hooks/PostUpdate.pm @@ -29,8 +29,8 @@ sub post_update { local $ENV{GIT_WORK_TREE} = $rc{GL_ADMIN_BASE}; tsh_try("git checkout -f --quiet master"); } - _system("$ENV{GL_BINDIR}/gitolite compile"); - _system("$ENV{GL_BINDIR}/gitolite trigger POST_COMPILE"); + _system("gitolite compile"); + _system("gitolite trigger POST_COMPILE"); exit 0; } diff --git a/src/lib/Gitolite/Setup.pm b/src/lib/Gitolite/Setup.pm index 0a677a8..1077c0e 100644 --- a/src/lib/Gitolite/Setup.pm +++ b/src/lib/Gitolite/Setup.pm @@ -46,8 +46,8 @@ sub setup { setup_glrc(); setup_gladmin( $admin, $pubkey, $argv ); - _system("$ENV{GL_BINDIR}/gitolite compile"); - _system("$ENV{GL_BINDIR}/gitolite trigger POST_COMPILE"); + _system("gitolite compile"); + _system("gitolite trigger POST_COMPILE"); hook_repos(); # all of them, just to be sure }