python-ncrypt does no longer compile in lucid

Bug #587345 reported by Felix Dreher on 2010-05-29
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ncrypt (Ubuntu)
Undecided
Unassigned
Lucid
Medium
Unassigned

Bug Description

In lucid, the python-ncrypt binary package is no longer included, because the source (ncrypt 0.6.4-0ubuntu3) no longer compiles; dpkg-buildpackage fails with the following error message:

----snip----
ncrypt_x509.c:1:2: error: #error Do not use this file, it is the result of a failed Pyrex compilation.
error: command 'gcc' failed with exit status 1
make: *** [debian/python-module-stampdir/python-ncrypt] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
----snip----

The deeper reason is a compilation step performed by pyrexc (source files ncrypt_x509.pyx and ncrypt_x509.pxd being compiled to ncrypt_x509.c) that fails due to missing declarations:

----snip----
pyrexc ncrypt_x509.pyx --> ncrypt_x509.c
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:131:4: Warning: __new__ method of extension type will change semantics in a future version of Pyrex. Use __cinit__ instead.
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:206:4: Warning: __new__ method of extension type will change semantics in a future version of Pyrex. Use __cinit__ instead.
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:281:25: 'X509Name' is not declared
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:281:25: 'X509Name' is not a type identifier
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:281:4: Only extension type arguments can have 'not None'
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:305:26: 'X509Name' is not declared
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:305:26: 'X509Name' is not a type identifier
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:305:4: Only extension type arguments can have 'not None'
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:342:28: 'ncrypt_rsa' is not declared
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:342:4: Only extension type arguments can have 'not None'
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:409:20: 'ncrypt_rsa' is not declared
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:409:4: Only extension type arguments can have 'not None'
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:410:12: 'ncrypt_digest' is not declared
/tmp/ncrypt-0.6.4/ncrypt_x509.pyx:409:4: Only extension type arguments can have 'not None'
----snip----

While it is not entirely clear to me which change from karmic to lucid has caused this compilation error (I suspect some enforced syntax check settings in the compilers but might be also some change in openssl headers though I found no evidence for that), this issue can be fixed by adding the appropriate forward declarations to ncrypt_x509.pxd.

I have attached a patch with those changes applicable to the source package ncrypt 0.6.4-0ubuntu3.

I would appreciate very much if this patch could be included in the ubuntu source package and if python-ncrypt could again be included in the universe repository, though the issue might also be something that should be fixed upstream (I found one report of the same failure during building ncrypt on Mac OS X, but ncrypt source seems to be unchanged upstream for quite a long time, no idea if there is still an active maintainer upstream...).

The python-ncrypt package is essential for some 3rd party python programs like CSpace (http://cspace.in/ ; an encrypted cross-platform remote desktop solution working through firewalls, which is a task for which I could not yet find any other tool.

Felix Dreher (felix-dreher) wrote :

sorry, first patch was in unusable diff format...

Bhavani Shankar (bhavi) wrote :

Attached is the SRU debdiff

PS: the patch also fixes FTBFS in maverick which is fixed in

https://edge.launchpad.net/ubuntu/+source/ncrypt/0.6.4-0ubuntu4

Bhavani Shankar (bhavi) wrote :

Oops forgot to subscribe sponsors...

Subscribing

Benjamin Drung (bdrung) on 2010-08-02
Changed in ncrypt (Ubuntu):
status: New → Fix Released
Changed in ncrypt (Ubuntu Lucid):
importance: Undecided → Medium
status: New → Fix Committed
John Dong (jdong) wrote :

ACK from SRU team.

Accepted ncrypt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Jonathan Riddell (jr) wrote :

Accepted from lucid-proposed New queue, please test

Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with ncrypt 0.6.4-0ubuntu3 in lucid and have verified that the version of ncrypt 0.6.4-0ubuntu3.1 in -proposed fixes the issue. I've verified that the package is available and run the following examples with success:
---
from ncrypt.digest import DigestType, Digest

sha256Type = DigestType( 'SHA256' )

def calc_sha256( data ) :
    d = Digest( sha256Type )
    return d.digest( data )

md5Type = DigestType( 'MD5' )

def calc_md5( file_obj ) :
    d = Digest( md5Type )
    while 1 :
        data = file_obj.read( 65536 )
        if not data : break
        d.update( data )
    return d.digest()

>>>calc_sha256('abcd')
'\x88\xd4&o\xd4\xe63\x8d\x13\xb8E\xfc\xf2\x89W\x9d \x9c\x89x#\xb9!}\xa3\xe1a\x93o\x03\x15\x89'
>>> f=open('/tmp/593990/result02.pdf','rb')
>>> calc_md5(f)
'q\xafm\x1b\xdb\x8e5Z\x16\xa4^\xe6}\xa9\x84\x80'

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ncrypt - 0.6.4-0ubuntu3.1

---------------
ncrypt (0.6.4-0ubuntu3.1) lucid-proposed; urgency=low

  * ncrypt-0.6.4/ncrypt_x509.pxd:
    + fix "#error Do not use this file, it is the result of a failed
      Pyrex compilation." compile error and hence fix install problems
      Thanks to Felix Dreher for the patch (LP: #587345)
 -- Bhavani Shankar <email address hidden> Mon, 12 Jul 2010 22:06:22 +0530

Changed in ncrypt (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers