gitosis not working after upgrade to 9.04

Bug #368895 reported by luispedro on 2009-04-28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gitosis (Debian)
Fix Released
gitosis (Ubuntu)

Bug Description

Binary package hint: gitosis

IMPACT: This bug causes the gitosis package to be completely unusable on Jaunty, unless you know to manually install python2.5 (which is not a dependency of the package).

DEVELOPMENT: Fixed in Debian/Karmic by dropping the --install-lib and using --root and --install-layout=deb instead.

PATCH: Attached as

REPRODUCE: Install gitosis (and uninstall python2.5, if you have it). Run gitosis-init. Observe that you get a Python traceback.

REGRESSION: In basic functionality tests, a test build from my PPA seems to work completely. The Python 2.6 package also comes as close to passing its test suite as it did under Python 2.5.

Original bug report:

After upgrade to 9.04, gitosis fails with

Traceback (most recent call last):
  File "/usr/bin/gitosis-init", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/dist-packages/", line 2562, in <module>
  File "/usr/lib/python2.6/dist-packages/", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/dist-packages/", line 524, in resolve
    raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: gitosis==0.2

I hacked the files /usr/bin/gitosis-* to call python2.5 instead of python and that fixed it, but I guess that this is not the best fix.

Michael Shadle (mshadle) wrote :

Here is the debianb ug:

And yes - changing the shebang to force python2.5 fixes this, thank god.

This should be marked as CRITICAL as out of the box gitosis is broken on jaunty now.

I am not sure if the fix to the debian package will resolve this or not, but please, can someone grab it and get it into the ubuntu repos?

Michael Shadle (mshadle) wrote :

Here is the debian bug:

And yes - changing the shebang to force python2.5 fixes this, thank god.

This should be marked as CRITICAL as out of the box gitosis is broken on jaunty now.

I am not sure if the fix to the debian package will resolve this or not, but please, can someone grab it and get it into the ubuntu repos?

Kyle Cordes (kyle-kylecordes) wrote :

This appears to be already fixed in the newer debian "unstable" package; I pulled that down, put it in as described here:

... and it works, without needing to edit any files.

Michael Shadle (mshadle) wrote :

alright. then how do we push the priority on this to be officially in the ubuntu repo?

Alessio Treglia (quadrispro) wrote :

Can anyone confirm this bug with latest 0.2+20080825-14ubuntu1 (karmic)?

Changed in gitosis (Ubuntu):
status: New → Incomplete
Michael Shadle (mshadle) wrote :

Please someone check this out!

I would try, but my gitosis repository is actually -extremely- important, and if I try this out on production I would be raked over hot coals (and I have no development setup to try this on)

It should be a -very- simple fix to test.

Michael Shadle (mshadle) wrote :

Actually, can you give us the download location of the .deb? Sorry, I don't know where to find it.

I will at least diff it, see if I am comfortable doing it, and possibly try it out.

Michael Shadle (mshadle) wrote :

Jorge: that bug is marked as fixed, and the only bug that I can tell from the gitosis package in 9.04 is the shebang. Changing that by itself manually has everything working properly still.

According to all the other notes the Debian package works great too, not sure why it can't be promoted/etc

Anders Kaseorg (andersk) wrote :

Seems to work in Karmic.

$ sudo aptitude install gitosis
$ dpkg-query -W gitosis
gitosis 0.2+20080825-15
$ sudo -H -u gitosis gitosis-init < ~/.ssh/
Initialized empty Git repository in /srv/gitosis/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /srv/gitosis/repositories/gitosis-admin.git/

Changed in gitosis (Ubuntu):
status: Incomplete → Fix Released
Evan Broder (broder) wrote :

This patch seems to fix the package for Jaunty, although I can't figure out why it's not introducing a versioned python dependency.

I have a test build with this patch in my PPA ( I've verified that it builds, installs, and runs. I also ran the test suite. The package in my PPA errors out on one of the tests, but so does the package currently in Jaunty.

Evan Broder (broder) on 2009-08-22
description: updated
Changed in gitosis (Ubuntu Jaunty):
assignee: nobody → Devid Antonio Filoni (d.filoni)

@Evan Broder: your debdiff doesn't look good, it's better to do
Also I think you should also take from Debian the fixes for Debian bugs #525566 and #508469.

Changed in gitosis (Ubuntu Jaunty):
assignee: Devid Antonio Filoni (d.filoni) → nobody
Evan Broder (broder) wrote :

d.filoni, I disagree. An SRU is supposed to contain the minimal patch to fix the bug. The changes introduced in -14ubuntu1 completely change the way the package is installed, which I believe is more likely to introduce regressions than the simple and straightforward change I'm advocating.

Changed in gitosis (Ubuntu Jaunty):
status: New → Confirmed

Your patch is not good because it forces to use python2.6 instead of python2.5 which is not good, the patch made by quadrispro works better. And yes, I know about the SRU procedure, I'm a member of motu-sru team.

Changed in gitosis (Ubuntu Jaunty):
status: Confirmed → Incomplete
Luca Falavigna (dktrkranz) wrote :

FYI, target directory must be debian/gitosis/usr/lib/python2.6/dist-packages.

mhhh... the old package does not use distutils so please change the target directory as suggested by Luca, also please set the maintainer to Ubuntu MOTU Developers <email address hidden>.

Evan Broder (broder) wrote :

*shrug* Ok, if that's the patch you want, here it is. Build is running in my PPA now (, but I've verified that it builds locally.

Changed in gitosis (Ubuntu Jaunty):
status: Incomplete → Confirmed
description: updated

Sorry but still not, after a discussion with Luca in IRC (Luca knows about how python works better than me) I wrote to use the same patch you did with the changed proposed by Luca in comment #14 and with the maintainer set to MOTU. Please, also set the bug as New when done, motu-sru team use Confirmed when the proposed debdiff is ACKed. Thanks and sorry for the dupe work.

Changed in gitosis (Ubuntu Jaunty):
status: Confirmed → New
Evan Broder (broder) wrote :

No worries about the duplicate work - I'm glad this bug is getting attention. Actually, it looks like thanks to bug #362570, I can't just do s/site-packages/dist-packages/ and have this work. I think that this debdiff is the simplest one that will still install with the correct layout.

Why can't you do s/site-packages/dist-packages/ and s/python2.5/python2.6/ ?

Evan Broder (broder) wrote :

I've tested all 3 of my debdiffs; they all work, although the first one has some issues with installing into site-packages instead of dist-packages - I've noticed that, while running the actual gitosis scripts works, `python -m gitosis` does not.

The reason I can't do s/site-packages/dist-packages/ and s/python2.5/python2.6/ is because of the bug I linked (bug #362570). Doing `python install --prefix=blah` with Python 2.6, it installs into /usr/lib/python2.6/site-packages instead of dist-packages, which makes everything unhappy. I wouldn't have expected that to matter once python-support gets into the picture (since it moves the modules out of /usr/lib and into /usr/share/python-support/$PACKAGE), but I'll admit that I'm not entirely clear on how pysupport works.

But both and definitely work. I would be fine with either being uploaded.

motu-sru ACK. uploaded to jaunty proposed. Thanks for all your work.

Changed in gitosis (Ubuntu Jaunty):
status: New → Confirmed
Jonathan Riddell (jr) wrote :

accepted into jaunty-proposed, please test

Changed in gitosis (Ubuntu Jaunty):
status: Confirmed → Fix Committed
Evan Broder (broder) wrote :

Installs and runs for me.

Steve Beattie (sbeattie) wrote :

I have reproduced the issue with gitosis-init failing to work with the version of gitosis in jaunty, 0.2+20080825-2, and confirmed that the version of gitosis in jaunty-proposed, 0.2+20080825-2ubuntu0.1, fixes the issue. I was able to set up and check out the gitosis admin repository, so I don't see any sign of regression here. Marking verification-done.

tags: added: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gitosis - 0.2+20080825-2ubuntu0.1

gitosis (0.2+20080825-2ubuntu0.1) jaunty-proposed; urgency=low

  * Rebuild using Python 2.6 instead of 2.5 (LP: #368895).

 -- Evan Broder <email address hidden> Fri, 21 Aug 2009 15:38:23 -0400

Changed in gitosis (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in gitosis (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.