pbuilder building python-paramiko with wrong dependencies for dapper

Asked by Tom Haddon

I'm fairly new to pbuilder, but had the following problem when trying to backport python-paramiko to dapper:

I've verified that I have dapper as my DISTRIBUTION in /etc/pbuilderrc

I then ran the following from a clean directory:

apt-get source python-paramiko
sudo pbuilder create
sudo pbuilder build *.dsc
dpkg -I /var/cache/pbuilder/result/python-paramiko_1.6.4-1_all.deb

 new debian package, version 2.0.
 size 115438 bytes: control archive= 2167 bytes.
     782 bytes, 17 lines control
    4460 bytes, 48 lines md5sums
     239 bytes, 7 lines * postinst #!/bin/sh
     216 bytes, 7 lines * prerm #!/bin/sh
 Package: python-paramiko
 Version: 1.6.4-1
 Section: python
 Priority: optional
 Architecture: all
 Depends: python, python-support (>= 0.2), python-crypto
 Conflicts: python2.3-paramiko (<< 1.5-1.1), python2.4-paramiko (<< 1.5-1.1)
 Replaces: python2.3-paramiko (<< 1.5-1.1), python2.4-paramiko (<< 1.5-1.1)
 Provides: python2.3-paramiko, python2.5-paramiko, python2.4-paramiko
 Installed-Size: 576
 Maintainer: Jeremy T. Bouse <email address hidden>
 Source: paramiko
 Description: make SSH2 connections with python
  This is a library for making SSH2 connections (client or server).
  Emphasis is on using SSH2 as an alternative to SSL for making secure
  connections between python scripts. All major ciphers and hash methods
  are supported. SFTP client and server mode are both supported too.

However, apt-cache show python-support on a dapper machine gives:

Package: python-support
Priority: optional
Section: universe/python
Installed-Size: 116
Maintainer: Josselin Mouette <email address hidden>
Architecture: all
Version: 0.1.1ubuntu1
Depends: python (>= 2.4), python (<< 2.5)
Filename: pool/universe/p/python-support/python-support_0.1.1ubuntu1_all.deb
Size: 5322
MD5sum: aca0481461f6a9d8208bbb0aa9c1834d
Description: automated rebuilding support for python modules
 This package contains the 'update-python-modules' script, which takes
 care of byte-compilation of python-only modules.
 .
 Private modules are automatically rebuilt upon major python upgrades,
 avoiding the need for strong dependencies.
 .
 Public modules are automatically made available for all installed python
 versions.
Bugs: mailto:<email address hidden>
Origin: Ubuntu

Am I missing something?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pbuilder Edit question
Assignee:
No assignee Edit question
Solved by:
Tom Haddon
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

You can't just backport an unmodified .dsc and hope it works.
In this case you have to manually modify the versioned dependancy on python support so that it fits the avaliable dapper library (0.1.1) and hope that this will work.

Revision history for this message
Tom Haddon (mthaddon) said :
#2

I tried modifying debian/control in the paramiko-1.6.4 directory to point to python-support (>= 0.1), ran dch -i and then ran debuild -S. I then ran sudo pbuilder build paramiko_1.6.4-1ubuntu1.dsc, and the package built ok, but:

$ dpkg -I /var/cache/pbuilder/result/python-paramiko_1.6.4-1ubuntu1_all.deb
 new debian package, version 2.0.
 size 115520 bytes: control archive= 2170 bytes.
     789 bytes, 17 lines control
    4460 bytes, 48 lines md5sums
     239 bytes, 7 lines * postinst #!/bin/sh
     216 bytes, 7 lines * prerm #!/bin/sh
 Package: python-paramiko
 Version: 1.6.4-1ubuntu1
 Section: python
 Priority: optional
 Architecture: all
 Depends: python, python-support (>= 0.2), python-crypto
 Conflicts: python2.3-paramiko (<< 1.5-1.1), python2.4-paramiko (<< 1.5-1.1)
 Replaces: python2.3-paramiko (<< 1.5-1.1), python2.4-paramiko (<< 1.5-1.1)
 Provides: python2.3-paramiko, python2.5-paramiko, python2.4-paramiko
 Installed-Size: 576
 Maintainer: Jeremy T. Bouse <email address hidden>
 Source: paramiko
 Description: make SSH2 connections with python
  This is a library for making SSH2 connections (client or server).
  Emphasis is on using SSH2 as an alternative to SSL for making secure
  connections between python scripts. All major ciphers and hash methods
  are supported. SFTP client and server mode are both supported too.

$ cat paramiko_1.6.4-1ubuntu1.dsc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.0
Source: paramiko
Version: 1.6.4-1ubuntu1
Binary: python-paramiko
Maintainer: Jeremy T. Bouse <email address hidden>
Architecture: all
Standards-Version: 3.7.2
Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python-support (>= 0.1)
Uploaders: Guido Guenther <email address hidden>
Files:
 de744aeed6d5df5e5227477e2b57fb60 235182 paramiko_1.6.4.orig.tar.gz
 29850fe5025556c414a4ef2539b9d08e 1928 paramiko_1.6.4-1ubuntu1.diff.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGwx2NzGYMwz8CpN8RAu+xAJ9kBsIYjQYZypExwXwe9pmmg23QLACaApel
ClGZdi7KFhZiaOZcYLWpObI=
=gC8D
-----END PGP SIGNATURE-----

So from what I can see, the dsc is showing the correct version of python-support, but the resulting .deb is still relying on a higher version.

Does this mean I've done something wrong, or just that it can't be built with that version of python-support?

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

You just changed the Build-Depnds not the Depends, so you are still depending on the higher version on the runtime.
You should also change the Depends.

Revision history for this message
Tom Haddon (mthaddon) said :
#4

Hi Cesare,

First of all, many thanks for the help so far. I'm not sure how to specify the Depends. This is the line in my debian/control file that I think is relevant:

Depends: ${misc:Depends}, ${python:Depends}, python-crypto

I've tried appending ", python-support (<< 0.2)" but it seems that isn't the right syntax. I've also tried googling and haven't be able to find what I need. I'd really appreciate if you could let me know how to do that.

Thanks, Tom

Revision history for this message
Cesare Tirabassi (norsetto) said :
#5

You should add a debian/pyversions file with -0.1.2 in it (you can also try -0.1.1 but I don't think it will work).

Revision history for this message
Tom Haddon (mthaddon) said :
#6

Ok, thanks. It turns out I had a mistake in my config which meant that I was pulling feisty packages as part of a hook script - once I changed that back to dapper, this issue is no longer the problem (now the problem is just getting the right package dependencies for other packages).

Thanks for all the help.