gitosis not working after upgrade to 9.04

Bug #368895 reported by luispedro
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gitosis (Debian)
Fix Released
Unknown
gitosis (Ubuntu)
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

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 http://launchpadlibrarian.net/30697473/gitosis_0.2%2B20080825-2ubuntu0.1.debdiff

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/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", 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.

Revision history for this message
Michael Shadle (mshadle) wrote :

Here is the debianb ug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508469

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?

Revision history for this message
Michael Shadle (mshadle) wrote :

Here is the debian bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508469

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?

Revision history for this message
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:

http://kylecordes.com/2009/04/30/gitosis-ubuntu-jaunty/

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

Revision history for this message
Michael Shadle (mshadle) wrote :

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

Revision history for this message
Alessio Treglia (quadrispro) wrote :

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

Changed in gitosis (Ubuntu):
status: New → Incomplete
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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/id_rsa.pub
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
Revision history for this message
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 (https://launchpad.net/~broder/+archive/ubuntu-tests). 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)
description: updated
Changed in gitosis (Ubuntu Jaunty):
assignee: nobody → Devid Antonio Filoni (d.filoni)
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

@Evan Broder: your debdiff doesn't look good, it's better to do http://launchpadlibrarian.net/27170877/gitosis_0.2%2B20080825-14_0.2%2B20080825-14ubuntu1.diff.gz
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
Revision history for this message
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
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

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
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

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

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

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>.

Revision history for this message
Evan Broder (broder) wrote :

*shrug* Ok, if that's the patch you want, here it is. Build is running in my PPA now (https://launchpad.net/~broder/+archive/ubuntu-tests), but I've verified that it builds locally.

Changed in gitosis (Ubuntu Jaunty):
status: Incomplete → Confirmed
description: updated
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

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
Revision history for this message
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.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

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

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :
Revision history for this message
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 setup.py 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 http://launchpadlibrarian.net/30697473/gitosis_0.2%2B20080825-2ubuntu0.1.debdiff and http://launchpadlibrarian.net/30699699/gitosis_0.2%2B20080825-2ubuntu0.1.debdiff definitely work. I would be fine with either being uploaded.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

motu-sru ACK. http://launchpadlibrarian.net/30697473/gitosis_0.2%2B20080825-2ubuntu0.1.debdiff uploaded to jaunty proposed. Thanks for all your work.

Changed in gitosis (Ubuntu Jaunty):
status: New → Confirmed
Revision history for this message
Jonathan Riddell (jr) wrote :

accepted into jaunty-proposed, please test

Changed in gitosis (Ubuntu Jaunty):
status: Confirmed → Fix Committed
Revision history for this message
Evan Broder (broder) wrote :

Installs and runs for me.

Revision history for this message
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
Revision history for this message
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  
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.