Package: gitosis
Version: 0.2+20090917-10
Severity: normal

Consider the following snippet of gitosis.conf:

[repo foo]
owner = Me
description = foo
gitweb = yes

[repo foo/bar]
owner = Me
description = foobar
gitweb = yes

I now commit to these two repositories:

mkdir ~/bar
cd ~/bar
git init
git romote add origin gito...@host:foo/bar.git
touch FOOBAR
git add FOOBAR
git commit
git push origin master

mkdir ~/foo
cd ~/foo
git init
git romote add origin gito...@host:foo.git
touch FOO
git add FOO
git commit
git push origin master

If I now inspect /srv/gitosis, I'll see these files:

/srv/gitosis/repositories/foo.git/description
/srv/gitosis/repositories/foo/description
/srv/gitosis/repositories/foo/bar.git/description

So the gitweb description file gets written to both 'foo.git' and 'foo',
the former being wrong. Also if we inspect
/srv/gitosis/gitosis/projects.list, we'll see this:

foo Me
foo%2Fbar.git Me

In other words, gitosis has picked up 'foo' as a repository *instead* of
(the correct) 'foo.git'. This causes this repository to be absent from
gitweb ('foo' doesn't show up either, since it's not a valid
repository).

Looking at the code at /usr/share/pyshared/gitosis/gitweb.py, lines 77-84,
we see this:

if not os.path.exists(os.path.join(repositories, name)):
        namedotgit = '%s.git' % name
        if os.path.exists(os.path.join(repositories, namedotgit)):
                 name = namedotgit
        else:
                 log.warning(
                          'Cannot find %(name)r in %(repositories)r'
                          % dict(name=name, repositories=repositories))

It appears from this code, that gitosis will pick any repository without
the .git suffix over any with it, and I believe this is the reason why
'foo' is picked up incorrectly.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gitosis depends on:
ii  adduser                      3.112       add and remove users and groups
ii  debconf [debconf-2.0]        1.5.35      Debian configuration management sy
ii  git [git-core]               1:1.7.1-1.1 fast, scalable, distributed revisi
ii  openssh-server               1:5.5p1-4   secure shell (SSH) server, for sec
ii  python                       2.6.6-3     interactive high-level object-orie
ii  python-setuptools            0.6.14-1    Python Distutils Enhancements (set
ii  python-support               1.0.10      automated rebuilding support for P
ii  sudo                         1.7.4p4-2   Provide limited super user privile

gitosis recommends no packages.

Versions of packages gitosis suggests:
pn  git-daemon-run                <none>     (no description available)
pn  gitweb                        <none>     (no description available)

-- debconf information:
  gitosis/directory: /srv/gitosis
  gitosis/username: gitosis
  gitosis/key:



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to