* Why /var/cache/git?
@ 2010-10-25 10:30 Bron Gondwana
2010-10-25 15:24 ` J.H.
0 siblings, 1 reply; 9+ messages in thread
From: Bron Gondwana @ 2010-10-25 10:30 UTC (permalink / raw)
To: git; +Cc: pape
(resent - correct address for git list!)
(Gerrit: you're CC'd as the attribution in README.Debian
which in the one place I can see /var/cache/git mentioned
in the docs - without a justification for why it was
chosen...)
I'm setting up shared repositories on a machine, and I notice
all the examples I can find on the web, and also the
auto-created directory from the packages are /var/cache/git/
So I looked at the FHS, because that seemed odd to me:
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
/var/cache is intended for cached data from applications.
Such data is locally generated as a result of time-consuming
I/O or calculation. The application must be able to regenerate
or restore the data. Unlike /var/spool, the cached files can
be deleted without data loss.
I guess in theory, someone else has all those commits in their
local git repository somewhere. Still, it feels to me that
/var/lib/git is the correct location. Is there any reason why
/var/spool/git was chosen?
(I'm running Debian Lenny with the 1.7.1 backport packages, but
I see examples from Fedora with the same paths as well)
Bron.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-25 10:30 Why /var/cache/git? Bron Gondwana
@ 2010-10-25 15:24 ` J.H.
2010-10-26 1:22 ` Bron Gondwana
0 siblings, 1 reply; 9+ messages in thread
From: J.H. @ 2010-10-25 15:24 UTC (permalink / raw)
To: Bron Gondwana; +Cc: git, pape
On 10/25/2010 03:30 AM, Bron Gondwana wrote:
> (resent - correct address for git list!)
>
> (Gerrit: you're CC'd as the attribution in README.Debian
> which in the one place I can see /var/cache/git mentioned
> in the docs - without a justification for why it was
> chosen...)
Couple of quick points:
$ grep -Ri "/var/git\|\/var\/git" *
Documentation/git-cvsserver.txt: export
CVSROOT=:ext:user@server:/var/git/project.git
gitweb/README: RewriteRule ^/var(/|/gitweb.cgi)?$
/cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
gitweb/README:Second, repositories found in /pub/scm/ and /var/git/ will
be accesible
Are the only 3 instances where this is mentioned. Looking at those
quick it was probably chosen based on the fact that it's a location that
likely exists on most machines. Or just for explanatory reasons like
/example/dir/project.git could be used.
> I'm setting up shared repositories on a machine, and I notice
> all the examples I can find on the web, and also the
> auto-created directory from the packages are /var/cache/git/
I can't speak for the web, it's a place filled with many many evil dirty
lies, but the primary documentation should likely get updated to not
actually shove perminant data into a transient location. Bonus that
gitweb (caching) might use the directory for it's cache storage which
could cause some amusement.
>
> So I looked at the FHS, because that seemed odd to me:
[...]
> I guess in theory, someone else has all those commits in their
> local git repository somewhere. Still, it feels to me that
> /var/lib/git is the correct location. Is there any reason why
> /var/spool/git was chosen?
Ummmm are you talking about for where a set of repositories exist on a
shared setup? Personally, and depending on your beliefs as a sysadmin,
it should likely end up under something like /home/git or some other
shared location like /group/git, /pub/git, /shared/git or really
anywhere where you are likely to do backups and not just run rm -rf
because it should be a transient location.
> (I'm running Debian Lenny with the 1.7.1 backport packages, but
> I see examples from Fedora with the same paths as well)
Speaking from the Fedora angle (since I don't have a Debian box handy
anywhere or in a VM) the only places I'm seeing /var/git mentioned is:
/usr/share/doc/git-1.7.2.3/git-cvsserver.txt
/usr/share/doc/git-1.7.2.3/git-cvsserver.html
/usr/share/doc/git-cvs-1.7.2.3/git-cvsserver.txt
/usr/share/doc/git-cvs-1.7.2.3/git-cvsserver.html
/usr/share/doc/git-cvs-1.7.2.3/git-cvsserver.html
/usr/share/doc/gitweb-1.7.2.3/README
/usr/share/doc/gitweb-caching-1.6.5.2/README
which are the latest versions of all of those packages and it's obvious
it's the git-cvs and gitweb stuff that are to blame for the confusion there.
Probably easiest thing to do is adjust the documentation to be
/example/dir/project.git vs. /var/git since I agree, that's actually
dangerous.
- John 'Warthog9' Hawley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-25 15:24 ` J.H.
@ 2010-10-26 1:22 ` Bron Gondwana
2010-10-26 13:21 ` Drew Northup
0 siblings, 1 reply; 9+ messages in thread
From: Bron Gondwana @ 2010-10-26 1:22 UTC (permalink / raw)
To: J.H.; +Cc: Bron Gondwana, git, pape
On Mon, Oct 25, 2010 at 08:24:47AM -0700, J.H. wrote:
> On 10/25/2010 03:30 AM, Bron Gondwana wrote:
> > (resent - correct address for git list!)
> >
> > (Gerrit: you're CC'd as the attribution in README.Debian
> > which in the one place I can see /var/cache/git mentioned
> > in the docs - without a justification for why it was
> > chosen...)
>
> Couple of quick points:
>
> $ grep -Ri "/var/git\|\/var\/git" *
> Documentation/git-cvsserver.txt: export
> CVSROOT=:ext:user@server:/var/git/project.git
>
> gitweb/README: RewriteRule ^/var(/|/gitweb.cgi)?$
> /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
>
> gitweb/README:Second, repositories found in /pub/scm/ and /var/git/ will
> be accesible
>
> Are the only 3 instances where this is mentioned. Looking at those
> quick it was probably chosen based on the fact that it's a location that
> likely exists on most machines. Or just for explanatory reasons like
> /example/dir/project.git could be used.
I have no problem with /var/git - it's /var/cache/git that worries
me, since the FHS quite clearly says that blowing away /var/cache/*
is not a problem. It makes sense to back up /var/lib/ on any machine,
since that's somewhere that contains application data. We already
back up a few things from /var/lib (like /var/lib/svn for example,
at least until we finish this switchover!)
Bron.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 1:22 ` Bron Gondwana
@ 2010-10-26 13:21 ` Drew Northup
2010-10-26 15:22 ` Gerrit Pape
0 siblings, 1 reply; 9+ messages in thread
From: Drew Northup @ 2010-10-26 13:21 UTC (permalink / raw)
To: Bron Gondwana; +Cc: J.H., git, pape
On Tue, 2010-10-26 at 12:22 +1100, Bron Gondwana wrote:
> On Mon, Oct 25, 2010 at 08:24:47AM -0700, J.H. wrote:
> > On 10/25/2010 03:30 AM, Bron Gondwana wrote:
> > > (resent - correct address for git list!)
> > >
> > > (Gerrit: you're CC'd as the attribution in README.Debian
> > > which in the one place I can see /var/cache/git mentioned
> > > in the docs - without a justification for why it was
> > > chosen...)
> >
> > Couple of quick points:
> >
> > $ grep -Ri "/var/git\|\/var\/git" *
> > Documentation/git-cvsserver.txt: export
> > CVSROOT=:ext:user@server:/var/git/project.git
> >
> > gitweb/README: RewriteRule ^/var(/|/gitweb.cgi)?$
> > /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
> >
> > gitweb/README:Second, repositories found in /pub/scm/ and /var/git/ will
> > be accesible
> >
> > Are the only 3 instances where this is mentioned. Looking at those
> > quick it was probably chosen based on the fact that it's a location that
> > likely exists on most machines. Or just for explanatory reasons like
> > /example/dir/project.git could be used.
>
> I have no problem with /var/git - it's /var/cache/git that worries
> me, since the FHS quite clearly says that blowing away /var/cache/*
> is not a problem. It makes sense to back up /var/lib/ on any machine,
> since that's somewhere that contains application data. We already
> back up a few things from /var/lib (like /var/lib/svn for example,
> at least until we finish this switchover!)
Bron,
Doing a 'git grep "/var"' on the git sources and then searching that
output for "cache" turns up nothing. I think you'd best bring this up
with the Debian package maintainer. Debian is well known for thinking it
knows better than the original authors where stuff should be--and that's
why I don't run Debian as a server (too much time spent transliterating
paths just to make stuff work properly--when I'm lucky; it makes an
excellent desktop for beginners).
--
-Drew Northup N1XIM
AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 13:21 ` Drew Northup
@ 2010-10-26 15:22 ` Gerrit Pape
2010-10-26 16:47 ` Jakub Narebski
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Gerrit Pape @ 2010-10-26 15:22 UTC (permalink / raw)
To: Drew Northup; +Cc: Bron Gondwana, J.H., git
On Tue, Oct 26, 2010 at 09:21:39AM -0400, Drew Northup wrote:
> On Tue, 2010-10-26 at 12:22 +1100, Bron Gondwana wrote:
> > I have no problem with /var/git - it's /var/cache/git that worries
> > me, since the FHS quite clearly says that blowing away /var/cache/*
> > is not a problem. It makes sense to back up /var/lib/ on any machine,
> > since that's somewhere that contains application data. We already
> > back up a few things from /var/lib (like /var/lib/svn for example,
> > at least until we finish this switchover!)
>
> Bron,
> Doing a 'git grep "/var"' on the git sources and then searching that
> output for "cache" turns up nothing. I think you'd best bring this up
> with the Debian package maintainer. Debian is well known for thinking it
> knows better than the original authors where stuff should be--and that's
> why I don't run Debian as a server (too much time spent transliterating
> paths just to make stuff work properly--when I'm lucky; it makes an
> excellent desktop for beginners).
Hi, it's also not my preference, but Debian adheres to the FHS.
Unfortunately /var/git is not allowed by the FHS, so a different
location must be chosen for Debian. I chose /var/cache/git/, and
suggested to populate that directory with symlinks to the repositories
that should be available through git-daemon or gitweb, see
http://bugs.debian.org/483788
Regards, Gerrit.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 15:22 ` Gerrit Pape
@ 2010-10-26 16:47 ` Jakub Narebski
2010-10-26 18:30 ` Junio C Hamano
2010-10-26 20:58 ` Bron Gondwana
2 siblings, 0 replies; 9+ messages in thread
From: Jakub Narebski @ 2010-10-26 16:47 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Drew Northup, Bron Gondwana, J.H., git
Gerrit Pape <pape@smarden.org> writes:
> On Tue, Oct 26, 2010 at 09:21:39AM -0400, Drew Northup wrote:
> > On Tue, 2010-10-26 at 12:22 +1100, Bron Gondwana wrote:
> > > I have no problem with /var/git - it's /var/cache/git that worries
> > > me, since the FHS quite clearly says that blowing away /var/cache/*
> > > is not a problem. It makes sense to back up /var/lib/ on any machine,
> > > since that's somewhere that contains application data. We already
> > > back up a few things from /var/lib (like /var/lib/svn for example,
> > > at least until we finish this switchover!)
> >
> > Doing a 'git grep "/var"' on the git sources and then searching that
> > output for "cache" turns up nothing. I think you'd best bring this up
> > with the Debian package maintainer. Debian is well known for thinking it
> > knows better than the original authors where stuff should be--and that's
> > why I don't run Debian as a server (too much time spent transliterating
> > paths just to make stuff work properly--when I'm lucky; it makes an
> > excellent desktop for beginners).
>
> Hi, it's also not my preference, but Debian adheres to the FHS.
> Unfortunately /var/git is not allowed by the FHS, so a different
> location must be chosen for Debian. I chose /var/cache/git/, and
> suggested to populate that directory with symlinks to the repositories
> that should be available through git-daemon or gitweb, see
> http://bugs.debian.org/483788
Where did you get '/var/git' from? "git grep /var/git" finds it
mentioned in one place in git-cvsserver manpage and in two places in
gitweb/README. But git-daemon and gitweb's defaults are /pub/scm/git
or /pub/git - they are FHS-compatibile, aren't they?
So why Debian doesn't use either /pub/scm/git or /pub/git for
git-daemon, git-cvsserver and gitweb?
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 15:22 ` Gerrit Pape
2010-10-26 16:47 ` Jakub Narebski
@ 2010-10-26 18:30 ` Junio C Hamano
2010-10-28 15:53 ` Gerrit Pape
2010-10-26 20:58 ` Bron Gondwana
2 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2010-10-26 18:30 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Drew Northup, Bron Gondwana, J.H., git
Gerrit Pape <pape@smarden.org> writes:
> Hi, it's also not my preference, but Debian adheres to the FHS.
> Unfortunately /var/git is not allowed by the FHS, so a different
> location must be chosen for Debian.
It seems that /var/lib/ seems to be more appropriate place to store
persistent database-y stuff. I see e.g. /var/lib/postgresql there.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 15:22 ` Gerrit Pape
2010-10-26 16:47 ` Jakub Narebski
2010-10-26 18:30 ` Junio C Hamano
@ 2010-10-26 20:58 ` Bron Gondwana
2 siblings, 0 replies; 9+ messages in thread
From: Bron Gondwana @ 2010-10-26 20:58 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Drew Northup, Bron Gondwana, J.H., git
On Tue, Oct 26, 2010 at 03:22:18PM +0000, Gerrit Pape wrote:
> On Tue, Oct 26, 2010 at 09:21:39AM -0400, Drew Northup wrote:
> > On Tue, 2010-10-26 at 12:22 +1100, Bron Gondwana wrote:
> > > I have no problem with /var/git - it's /var/cache/git that worries
> > > me, since the FHS quite clearly says that blowing away /var/cache/*
> > > is not a problem. It makes sense to back up /var/lib/ on any machine,
> > > since that's somewhere that contains application data. We already
> > > back up a few things from /var/lib (like /var/lib/svn for example,
> > > at least until we finish this switchover!)
> >
> > Bron,
> > Doing a 'git grep "/var"' on the git sources and then searching that
> > output for "cache" turns up nothing. I think you'd best bring this up
> > with the Debian package maintainer. Debian is well known for thinking it
> > knows better than the original authors where stuff should be--and that's
> > why I don't run Debian as a server (too much time spent transliterating
> > paths just to make stuff work properly--when I'm lucky; it makes an
> > excellent desktop for beginners).
>
> Hi, it's also not my preference, but Debian adheres to the FHS.
> Unfortunately /var/git is not allowed by the FHS, so a different
> location must be chosen for Debian. I chose /var/cache/git/, and
> suggested to populate that directory with symlinks to the repositories
> that should be available through git-daemon or gitweb, see
> http://bugs.debian.org/483788
Maybe you'd better read the FHS again to double check that you're
adhering.
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
Purpose:
/var/cache is intended for cached data from applications.
Such data is locally generated as a result of time-consuming
I/O or calculation. The application must be able to regenerate
or restore the data.
I fail to see how git can regenerate the symlinks...
Bron.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why /var/cache/git?
2010-10-26 18:30 ` Junio C Hamano
@ 2010-10-28 15:53 ` Gerrit Pape
0 siblings, 0 replies; 9+ messages in thread
From: Gerrit Pape @ 2010-10-28 15:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Drew Northup, Bron Gondwana, J.H., git
On Tue, Oct 26, 2010 at 11:30:04AM -0700, Junio C Hamano wrote:
> Gerrit Pape <pape@smarden.org> writes:
> > Hi, it's also not my preference, but Debian adheres to the FHS.
> > Unfortunately /var/git is not allowed by the FHS, so a different
> > location must be chosen for Debian.
>
> It seems that /var/lib/ seems to be more appropriate place to store
> persistent database-y stuff. I see e.g. /var/lib/postgresql there.
I agree and re-opened
http://bugs.debian.org/483788
Regards, Gerrit.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-28 15:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 10:30 Why /var/cache/git? Bron Gondwana
2010-10-25 15:24 ` J.H.
2010-10-26 1:22 ` Bron Gondwana
2010-10-26 13:21 ` Drew Northup
2010-10-26 15:22 ` Gerrit Pape
2010-10-26 16:47 ` Jakub Narebski
2010-10-26 18:30 ` Junio C Hamano
2010-10-28 15:53 ` Gerrit Pape
2010-10-26 20:58 ` Bron Gondwana
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).