Bug#882170: python-cryptography: missing dependency on python-cffi

2017-11-19 Thread Tristan Seligmann
Control: retitle -1 python-cryptography: extraneous setuptools dependency
on cffi
Control: tags -1 + pending

Argh! This is caused by an incomplete fix for #882011 of course.

On Sun, 19 Nov 2017 at 22:45 Adrian Bunk  wrote:

> pkg_resources.DistributionNotFound: The 'cffi>=1.7' distribution was not
> found and is required by cryptography
>

This problem is actually backwards from what it seems; python-cffi has a
pydist file that translates into a dependency on python-cffi-backend only
as python-cffi is not needed at runtime, and translated dependencies are
removed from requires.txt by dh_python2. However, since dh_python2 doesn't
understand the environment marker in the dependency, we are passing
--depends=cffi manually to take care of the dependency; unfortunately the
entry in requires.txt is thus not removed, so setuptools/pkg_resources
think that cffi needs to be available.

Stripping out the untranslated distributions from requires.txt ourselves
should fix this, I'll upload this fix once I've done a little more testing.


Bug#882170: python-cryptography: missing dependency on python-cffi

2017-11-19 Thread Adrian Bunk
Package: python-cryptography
Version: 2.1.3-2
Severity: serious
Control: affects -1 src:keystone

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/keystone.html

...
==
FAIL: 
keystone.tests.unit.common.test_database_conflicts.DuplicateTestCase.test_credential_duplicate_conflict_gives_name
keystone.tests.unit.common.test_database_conflicts.DuplicateTestCase.test_credential_duplicate_conflict_gives_name
--
_StringException: pythonlogging:'': {{{
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend.
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
detected 'bcrypt' backend, version u'3.1.4'
'bcrypt' backend lacks $2$ support, enabling workaround
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
NeedRegenerationException
no value, waiting for create lock
value creation lock  acquired
Calling creation function
Released creation lock
}}}

Traceback (most recent call last):
  File "keystone/tests/unit/test_v3.py", line 178, in setUp
super(RestfulTestCase, self).setUp(app_conf=app_conf)
  File "keystone/tests/unit/rest.py", line 65, in setUp
self.loadapp(app_conf, name='main'))
  File "keystone/tests/unit/core.py", line 770, in loadapp
return service.loadapp(self._paste_config(config), name=name)
  File "keystone/version/service.py", line 52, in loadapp
controllers.latest_app = deploy.loadapp(conf, name=name)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, 
in loadapp
return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, 
in loadobj
return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, 
in create
return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, 
in invoke
**context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in 
fix_call
val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 31, in 
urlmap_factory
app = loader.get_app(app_name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, 
in get_app
name=name, global_conf=global_conf).create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 362, 
in app_context
APP, name=name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 450, 
in get_context
global_additions=global_additions)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 559, 
in _pipeline_app_context
APP, pipeline[-1], global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 454, 
in get_context
section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 476, 
in _context_from_use
object_type, name=use, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 406, 
in get_context
global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, 
in loadcontext
global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 328, 
in _loadegg
return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 620, 
in get_context
object_type, name=name)
  File "keystone/tests/unit/core.py", line 121, in find_egg_entry_point
object_type, name=name)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 640, 
in find_egg_entry_point
pkg_resources.require(self.spec)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__