tahoe-lafs can't start because foolscap packaging metadata doesn't declare the fact that it supports secure_connections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tahoe-LAFS |
Fix Released
|
Unknown
|
|||
foolscap |
Fix Released
|
Unknown
|
|||
foolscap (Ubuntu) |
Fix Released
|
Medium
|
Julian Taylor | ||
Natty |
Fix Released
|
Medium
|
Julian Taylor |
Bug Description
foolscap has accidentally dropped a build dependency on python-setuptools so the requires.txt is not installed.
This leads to software breaking which use this setuptools feature to check if a package provides the [secure_
This is fixed by lp:~jtaylor/ubuntu/natty/foolscap/foolscap-fix-782414
TESTCASE:
> python -c 'import pkg_resources; print pkg_resources.
What should happen:
[foolscap 0.6.1 (/usr/lib/
What happens:
$ python -c 'import pkg_resources; print pkg_resources.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
needed = self.resolve(
File "/usr/lib/
requirement
File "/usr/lib/
"%s has no such extra feature %r" % (self, ext)
pkg_resources.
the dependency tahoe-lafs is broken by this
(it is also broken by bug 782461 and bug 769935 unrelated to foolscap)
original description:
The foolscap setup.py file (http://
Other Python packages can then specify that they depend on "foolscap with its extra feature of 'secure_
Currently the packaging of foolscap in Natty claims that it doesn't know about the "secure_
$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.
[foolscap 0.6.1 (/usr/lib/
>>> pkg_resources.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
needed = self.resolve(
File "/usr/lib/
requirement
File "/usr/lib/
"%s has no such extra feature %r" % (self, ext)
pkg_resources.
This means that, for example, the tahoe-lafs executable that is packaged in Natty cannot start:
$ tahoe --version
Traceback (most recent call last):
File "/usr/bin/tahoe", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/
working_
File "/usr/lib/
needed = self.resolve(
File "/usr/lib/
requirement
File "/usr/lib/
"%s has no such extra feature %r" % (self, ext)
pkg_resources.
$ type tahoe
tahoe is hashed (/usr/bin/tahoe)
$ dpkg --search /usr/bin/tahoe
tahoe-lafs: /usr/bin/tahoe
$ apt-cache policy tahoe-lafs
tahoe-lafs:
Installed: 1.8.2-0ubuntu1
Candidate: 1.8.2-0ubuntu1
Version table:
*** 1.8.2-0ubuntu1 0
500 http://
100 /var/lib/
By inspecting the foolscap setup.py, you can see that the stanza that declares this extra feature is inside a test for the existence of setuptools: http://
So the easiest way to fix this is probably to configure the Ubuntu packaging of foolscap to indicate that setuptools is a build-time requirement of foolscap, and then rebuild. This should produce the metadata file (named /usr/share/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-foolscap 0.6.1-1
ProcVersionSign
Uname: Linux 2.6.38-8-virtual i686
Architecture: i386
Date: Fri May 13 20:23:17 2011
Ec2AMI: ami-ccf405a5
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: t1.micro
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: foolscap
UpgradeStatus: Upgraded to natty on 2011-05-13 (0 days ago)
Related branches
- Martin Pitt: Approve
- Micah Gersten: Pending requested
-
Diff: 59 lines (+30/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+1/-1)
debian/preinst (+20/-0)
debian/pydist-overrides (+1/-0)
Changed in foolscap: | |
status: | Unknown → New |
Changed in foolscap: | |
status: | Unknown → New |
Changed in foolscap (Ubuntu): | |
importance: | Undecided → High |
importance: | High → Undecided |
importance: | Undecided → Medium |
description: | updated |
Changed in foolscap (Ubuntu Natty): | |
assignee: | nobody → Julian Taylor (jtaylor) |
Changed in tahoe-lafs: | |
status: | New → Fix Released |
Changed in foolscap: | |
status: | New → Fix Released |
In this comment I suggest an alternate fix.
In my opinion this is a flaw in the packaging of foolscap for Ubuntu, and will cause this trouble for any code which tries to use foolscap and to specify that it requires foolscap's "secure_ connections" feature. In my opinion the easiest way to fix this is to add the Python packaging metadata to foolscap, as described above.
However, if for some reason that doesn't work, an alternate approach would be to change Tahoe-LAFS as packaged in Ubuntu, remove the part of its code (in http:// tahoe-lafs. org/trac/ tahoe-lafs/ browser/ trunk/src/ allmydata/ _auto_deps. py?annotate= blame&rev= 4976#L21 ) that says that it depends on 'foolscap[ "secure_ connections" ]' and replace it with code that says it depends on just 'foolscap'. At the same time, add code that says that it depends on pyOpenSSL. Here is a patch to Tahoe-LAFS that will do that.
diff -rN -u old-pristine/ src/allmydata/ _auto_deps. py new-pristine/ src/allmydata/ _auto_deps. py src/allmydata/ _auto_deps. py 2011-05-13 16:16:49.000000000 -0600 src/allmydata/ _auto_deps. py 2011-05-13 16:16:50.000000000 -0600 secure_ connections] >= 0.6.1", connections" foolscap. lothar. com/trac/ ticket/ 174 ).
--- old-pristine/
+++ new-pristine/
@@ -23,7 +23,21 @@
# of size N.
# foolscap < 0.6 is incompatible with Twisted 10.2.0.
# foolscap 0.6.1 quiets a DeprecationWarning.
- "foolscap[
+ "foolscap >= 0.6.1",
+
+ # foolscap requires pyOpenSSL in order to provide secure
+ # connections, but unfortunately we can't rely on distributions of
+ # foolscap to declare that they provide the "secure_
+ # feature even when they do (see
+ # http://
+ # Therefore, we specify here that Tahoe-LAFS depends on pyOpenSSL.
+ # Note that this is a fiction--Tahoe-LAFS itself does not require
+ # pyOpenSSL for anything. If a future version of foolscap provided
+ # secure connections without using pyOpenSSL, or required a newer
+ # version of pyOpenSSL, or required a different library than
+ # pyOpenSSL, then Tahoe-LAFS users who are provided with that
+ # newer version of foolscap would need to edit this declaration.
+ "pyOpenSSL",
"Nevow >= 0.6.0",