[Python-modules-team] Bug#515200: Making your own package to work around the bugs in gnutls

Mike Palmer mike at edgeos.com
Thu May 21 19:54:30 UTC 2009


I figured I'd post a workaround for people to fix the python-pycurl 
package themselves.

1.) sudo apt-get install build-essential fakeroot dpkg-dev
2.) mkdir ~/python-pycurl-openssl
3.) cd ~/python-pycurl-openssl
4.) sudo apt-get source python-pycurl
5.) sudo apt-get build-dep python-pycurl
6.) sudo apt-get install libcurl4-openssl-dev
7.) dpkg-source -x pycurl_7.18.2-1.dsc
8.) cd pycurl-7.18.2
9.) Edit the debian/control file and replace all instances of 
"libcurl4-gnutls-dev" with "libcurl4-openssl-dev"
10.) dpkg-buildpackage -rfakeroot -b
11.) sudo dpkg -i ../python-pycurl_7.18.2-1_i386.deb


To test just jump on the interpretor and look at the version.

It used to say:

shell~# python
Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import pycurl
 >>> pycurl.version
'libcurl/7.18.2 GnuTLS/2.4.2 zlib/1.2.3.3 libidn/1.8'

It will now say (if you did everything right):

shell~# python
Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import pycurl
 >>> pycurl.version
'libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18'


The reason just editing the debian/control file works here is because 
both libcurl4-gnutls-dev and libcurl4-openssl-dev use the file 
/usr/bin/curl-config to build its packages. One is for gnutls 
enviroments while the other is for openssl.

-Mike





More information about the Python-modules-team mailing list