Installing Gitolite on NAS - FATAL: have errors but logging failed
I'm trying to install Gitolite on my Synology DiskStation, following these instructions.
Under Install Gitolite on the DiskStation and Run Setup, when I run the Gitolite install command:
DiskStation> /volume1/homes/git/gitolite/install -ln /bin
I get the following error:
FATAL: have errors but logging failed!
2012-05-31.00:10:22 no GL_LOGFILE env var
2012-05-31.00:10:22 die could not symlink /volume1/home/git/gitolite/src/gitolite to /bin<<newline>> at /volume1/home/git/gitolite/install line 71<<newline>>
I am very new to all of this. Does anyone know what this means, and how I can fix this error?
2 issues:
The new GitoliteV3 (g3) doesn't handle gracefully the lack of a 'logs' directory, which should be present by default in $HOME/.gitolite
.
See Rc.pm:
$rc{LOG_TEMPLATE} = "$ENV{HOME}/.gitolite/logs/gitolite-%y-%m.log";
$rc{GL_LOGFILE} = $ENV{GL_LOGFILE} ||= gen_lfn( $rc{LOG_TEMPLATE} );
Common.pm
:
sub gl_log {
# the log filename and the timestamp come from the environment. If we get
# called even before they are set, we have no choice but to dump to STDERR
# (and probably call "logger").
logger_plus_stderr( "$ts no GL_LOGFILE env var", "$ts $msg" ) if not $ENV{GL_LOGFILE};
open my $lfh, ">>", $ENV{GL_LOGFILE} or logger_plus_stderr( "open log failed: $!", $msg );
Create a logs directory: .mkdir -p $HOME/.gitolite/logs
and relaunch the installation
As sitearm (who, I can only assume from his empty profile, is Sitaram Chamarty, the creator/maintainer of Gitolite), this shouldn't be needed.
And from the OP's answer below, this wasn't needed anyway.
sitearm adds:
The
LOGFILE
error message is misleading; it happens when the installation directory is not in$PATH
.
The latest commit on Common.pm
(June, 16th 2012) has indeed replaced the error message in order to not reference anymore the mysterious GL_LOGFILE
:
logger_plus_stderr( "errors found before logging could be setup", "$msg" ) if not $ENV{GL_LOGFILE};
Note that if you have your own perl in a non-standard path, none of those install scripts will work, since their shebang references /usr/bin/perl
instead of a /usr/bin/env perl
...
Second issue:
could not symlink /volume1/home/git/gitolite/src/gitolite to /bin
Check if you have the rights to symlink in
As mentioned below /bin
. Are you root?
DiskStation> /volume1/homes/git/gitolite/install -ln
(without /bin
) would keep everything under $HOME
(no /bin writing access issue)
I generally prefer a local installation
$HOME/gitolite/github/install -to $HOME/gitolite/bin
(so '-to
' instead of '-ln
', with an absolute path in my account rather than a system path) with:
-
github
the name of the local clone ofhttps://github.com/sitaramc/gitolite
-
$HOME/gitolite/bin
a directory that I have added to my$PATH
.