Hi there!
I've been playing with git so I decided to install the virtualmin module today.
I made a repository called "Demo". While the repository apparently works fine, when I try to browse it, for example, using the "Browse Repository" button inside the "Git Repositories" listing, GitWeb opens but I get some permission errors.
Then I noticed some strange urls on GitWeb that aren't related to me at all, pointing to xmms.se
[SEE FIRST ATTACHMENT, gitweb.png]
So, I've been investigating a bit and, in the file you are apparently using as a base: /usr/share/webmin/virtualmin-git/gitweb.cgi.source.new you are pointing to some other people git, git.xmms.se, and that gets into my own config files.
[SEE SECOND ATTACHMENT gitweb_cgi.png]
Apparently this gitweb is based on something xmms people did, so, probably, some foreign code got dragged on the way.
Thanks
Comments
Submitted by andor on Wed, 11/07/2012 - 19:18 Comment #1
I forgot:
Webmin: 1.600 Virtualmin: 3.94GPL
Submitted by JamieCameron on Wed, 11/07/2012 - 23:32 Comment #2
Thanks for pointing this out - I didn't realize that the standard gitweb.cgi contained links to the developer's site! I will fix this in the next release of the Virtualmin Git plugin.
Submitted by Issues on Wed, 11/21/2012 - 23:46 Comment #3
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by lulatsch66 on Wed, 11/27/2013 - 11:52 Comment #4
Just installed the virtualmin-git module from http://www.webmin.com/cgi-bin/search_third.cgi?cat=Virtualmin
First problem: the apache authz_svn module was not enabled, so apache2ctl -t said:
Syntax error on line 67 of /etc/apache2/sites-enabled/repos.conf: Invalid command 'AuthzSVNAccessFile', perhaps misspelled or defined by a module not included in the server configuration Action '-t' failed.
After correcting that, it seems that the issue mentioned by andor is not fixed:
description Git repository for ... owner www-data last change Thu, 1 Jan 1970 00:00:00 +0000 url git://git.xmms.se/xmms2/xxxx
My system: up to date wheezy running in kvm under cloudmin Webmin-Modules:
webmin/sarge uptodate 1.660 webmin-security-updates/virtualmin-universal uptodate 4.4 webmin-virtual-server/virtualmin-universal uptodate 4.03.gpl webmin-virtual-server-mobile/virtualmin-universal uptodate 2.6 webmin-virtual-server-theme/virtualmin-universal uptodate 8.7 webmin-virtualmin-awstats/virtualmin-universal uptodate 4.9 webmin-virtualmin-dav/virtualmin-universal uptodate 3.6 webmin-virtualmin-htpasswd/virtualmin-universal uptodate 2.6 webmin-virtualmin-mailman/virtualmin-universal uptodate 6.2 webmin-virtualmin-svn/virtualmin-universal uptodate 5.0
Then, I noticed that there is a webmin-virtualmin-git debian package version 1.5.
After installing it, the repo url is correct.
So please - upgrade the link at http://www.webmin.com/cgi-bin/search_third.cgi?cat=Virtualmin for virtualmin-git.wbm.gz in version 1.5.
But it's even not possible to browse the repo, as now we seem to hit this bug: http://www.virtualmin.com/node/18247
[Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Can't exec "/usr/bin/git-rev-parse": No such file or directory at gitweb.cgi line 466. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value $commit_id in concatenation (.) or string at gitweb.cgi line 587. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Can't exec "/usr/bin/git-rev-list": No such file or directory at gitweb.cgi line 587. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value $epoch in gmtime at gitweb.cgi line 813. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value $epoch in addition (+) at gitweb.cgi line 823. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 129. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 130. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Can't exec "/usr/bin/git-rev-parse": No such file or directory at gitweb.cgi line 466. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Use of uninitialized value in concatenation (.) or string at gitweb.cgi line 1144. [Wed Nov 27 18:23:39 2013] [error] [client 192.168.5.4] [Wed Nov 27 18:23:39 2013] gitweb.cgi: Can't exec "/usr/bin/git-rev-list": No such file or directory at gitweb.cgi line 1144.
root@wheezy-dev:~# find / -iname git-rev-list /usr/lib/git-core/git-rev-list root@wheezy-dev:~# find / -iname git-rev-parse /usr/lib/git-core/git-rev-parse
Analysing the gitweb.cgi shows that the $gitbin variable is not set correctly:
location of the git-core binariesmy $gitbin = '/usr/bin';
After changing this to '/usr/lib/git-core' the browsing of the repositories is possible
thanx for your great work, anyways. Falko
Submitted by JamieCameron on Wed, 11/27/2013 - 12:37 Comment #5
Thanks for pointing out the old version - I'll fix that.
Did you install
git
from the standard Debian package, or was it from another source?Submitted by lulatsch66 on Wed, 11/27/2013 - 13:31 Comment #6
git is from Debian repos.
git/wheezy uptodate 1:1.7.10.4-1+wheezy1 git-man/wheezy uptodate 1:1.7.10.4-1+wheezy1 webmin-virtualmin-git/virtualmin-universal uptodate 1.5
Submitted by JamieCameron on Thu, 11/28/2013 - 11:35 Comment #7
Thanks - the next release of the Git plugin will use the correct path.
Submitted by Issues on Thu, 12/12/2013 - 11:41 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.
I just enabled the git module, and the location of the git-core binaries is still set to /usr/bin.
I am using CentOS 6 and the path there is: /usr/libexec/git-core
git-1.7.1-3.el6_4.1.x86_64 (installed via yum)
wbm-virtualmin-git-1.4-1.noarch
After adding the missing ScriptAlias to run gitweb.cgi from the git directory, creating a new git repo resulted in foreign URL errors. I found that there was fix done, but it was showing up as a .new file. I renamed the active gitweb.cgi to .old, made the .new current, deleted and recreated the git repo, and it filled in correctly.
/usr/libexec/webmin/virtualmin-git/gitweb.cgi.source <-- fails
/usr/libexec/webmin/virtualmin-git/gitweb.cgi.source.new <-- works
If you attempt to browse a newly created library, a substantial number of errors gets logged because $commit_id is undefined in the script, probably because nothing has been committed yet.
[Thu Jun 19 14:37:37 2014] [error] [client 65.130.157.38] fatal: Needed a single revision
[Thu Jun 19 14:37:37 2014] [error] [client 65.130.157.38] [Thu Jun 19 14:37:37 2014] gitweb.cgi: Use of uninitialized value $commit_id in concatenation (.) or string at gitweb.cgi line 587.
...
Also, the ownership of the git repository is incorrect, being "apache" instead of the domain owner, causing suexec to fail. cgi scripts are set to run as "owner."
(After fixing owner, write and execute access on the repository, I am now getting "permission denied" errors trying to "push upload master" with "suexec failure: could not open log file". But I've had enough for tonight.)
For a production module, this is really quite the exercise in frustration.