List for cgit developers and users
 help / color / mirror / Atom feed
From: mailings at hupie.com (Ferry Huberts)
Subject: [PATCH] Update git to v1.8.2.1
Date: Mon, 08 Apr 2013 20:38:06 +0200	[thread overview]
Message-ID: <51630E8E.2090508@hupie.com> (raw)
In-Reply-To: <20130408182208.GU2222@serenity.lan>



On 08/04/13 20:22, John Keeping wrote:
> On Mon, Apr 08, 2013 at 08:12:09PM +0200, Ferry Huberts wrote:
>> I'm sorry to report that this patch, commit
>> 849ecd961df9454d6f849eac34e6f501395c4f01, breaks on my CentOS 6.4 servers.
>>
>> I'm getting an 'Internal Server Error' with entries like the following
>> in the logs, and cgit just dies.
>>
>>> [Mon Apr 08 20:01:38 2013] [error] [client 192.168.180.8] warning: unable to access '/root/etc/gitconfig': Permission denied, referer: https://git/reposerf/cgit/
>>> [Mon Apr 08 20:01:38 2013] [error] [client 192.168.180.8] warning: unable to access '/root/etc/gitattributes': Permission denied, referer: https://git/reposerf/cgit/
>>>
>>> [Mon Apr 08 20:07:19 2013] [error] [client 192.168.180.8] fatal: unable to access '/root/etc/gitconfig': Permission denied, referer: http://git/reposerf/cgit/
>>> [Mon Apr 08 20:07:19 2013] [error] [client 192.168.180.8] Premature end of script headers: reposerfCgit.cgi, referer: http://git/reposerf/cgit/
>>>
>>> [Mon Apr 08 20:07:28 2013] [error] [client 192.168.180.8] fatal: unable to access '/root/etc/gitconfig': Permission denied, referer: http://git/reposerf/cgit/
>>> [Mon Apr 08 20:07:28 2013] [error] [client 192.168.180.8] Premature end of script headers: reposerfCgit.cgi, referer: http://git/reposerf/cgit/
>>
>>
>>
>> Why are these files suddenly accessed?
>> They weren't before...
> 
> At a guess, I'd say that Git (embedded in CGit) thinks that its system
> configuration file is at '/root/etc/gitconfig'.
> 
> I think you're being bitten by Git's default configuration (assuming
> that you built as root, or at least with $HOME set to /root), which
> looks like this:
> 
>     prefix = $(HOME)
>     bindir_relative = bin
>     bindir = $(prefix)/$(bindir_relative)
>     mandir = share/man
>     infodir = share/info
>     gitexecdir = libexec/git-core
>     mergetoolsdir = $(gitexecdir)/mergetools
>     sharedir = $(prefix)/share
>     gitwebdir = $(sharedir)/gitweb
>     localedir = $(sharedir)/locale
>     template_dir = share/git-core/templates
>     htmldir = share/doc/git-doc
>     ETC_GITCONFIG = $(sysconfdir)/gitconfig
>     ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
> 
> You may need to create a "config.mak" inside the "git" subdirectory of
> your CGit clone and add the line:
> 
>     prefix = /usr


ok that seems to work.
Adjusting my deploy script.


This indicates to me that there is a bug somewhere.
A permission denied should not crash cgit. It should treat that as 'file
not there', the same as with the config.mak hack.


PS.

I do have to do a 'make get-git' _before_ doing the rest.

  git remote update --prune
  git clean -fdx
  git reset --hard origin/master

  # create cgit.conf

  make get-git

  # create git/config.mak

  make install install-man install-html



> 
> This shouldn't have any untoward effects since you're never going to
> install Git from that build or use any of the command-line tools built
> there.
> 
> That will cause ETC_GITCONFIG (and ETC_GITATTRIBUTES) to point at
> /usr/etc/... which won't exist but should at least avoid permissions
> errors.
> 
>> My build config (cgit.conf) is
>>
>>> CGIT_SCRIPT_NAME = reposerfCgit.cgi
>>> CGIT_SCRIPT_PATH = /var/www/cgi-bin
>>> CGIT_DATA_PATH = /home/reposerf/cgit/httpd.html
>>> CGIT_CONFIG = /home/reposerf/cgit/cgit.d/cgitrc
>>> CACHE_ROOT = /var/cache/reposerf.cgit
>>> filterdir = /home/reposerf/cgit/cgit.filters

-- 
Ferry Huberts




  reply	other threads:[~2013-04-08 18:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08  8:00 john
2013-04-08  8:42 ` mailings
2013-04-08 13:41 ` Jason
2013-04-08 18:12 ` mailings
2013-04-08 18:16   ` mailings
2013-04-08 18:25     ` cgit
2013-04-08 18:31       ` Jason
2013-04-08 18:30     ` john
2013-04-08 18:37       ` Jason
2013-04-08 18:22   ` john
2013-04-08 18:38     ` mailings [this message]
2013-04-08 18:39       ` Jason
2013-04-08 18:42         ` mailings
2013-04-08 18:43       ` 
2013-04-08 18:47       ` john
2013-04-08 18:48         ` Jason
2013-04-08 18:52           ` [PATCH] Do not load system gitconfig and gitattributes john
2013-04-08 18:55             ` Jason
2013-04-08 19:00               ` mailings
2013-04-08 19:02                 ` Jason
2013-04-08 19:15                   ` Jason
2013-04-08 19:24                     ` john
2013-04-08 19:29                       ` Jason
2013-04-08 19:28                     ` mailings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51630E8E.2090508@hupie.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).