update to python-dnspython needed for code bug fix

Bug #660749 reported by Jeffrey Forman
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dnspython (Ubuntu)
Fix Released
High
Scott Kitterman
Maverick
Fix Released
High
Scott Kitterman

Bug Description

Binary package hint: python-dnspython

I was attempting to use the Python libraries included in this package, but have found that a fairly critical bug was fixed after this package was built.

The bug involves this traceback:
Traceback (most recent call last):
  File "./add_dnsrecord.py", line 15, in <module>
    response = dns.query.udp(update, "10.10.0.1")
  File "/usr/lib/pymodules/python2.6/dns/query.py", line 113, in udp
    wire = q.to_wire()
  File "/usr/lib/pymodules/python2.6/dns/update.py", line 241, in to_wire
    return super(Update, self).to_wire(origin, max_size)
  File "/usr/lib/pymodules/python2.6/dns/message.py", line 418, in to_wire
    self.keyalgorithm)
  File "/usr/lib/pymodules/python2.6/dns/renderer.py", line 286, in add_tsig
    algorithm=algorithm)
  File "/usr/lib/pymodules/python2.6/dns/tsig.py", line 88, in sign
    time_mac = struct.pack('!HIH', upper_time, lower_time, fudge)

When I grabbed the source from the developer[1] and compiled it myself, the libraries were fully operational and worked as expected.

Would it be possible to get a bump to 1.8.0-2 for this package to take into account commit e80c56c6c5c6dd7aa12c439b1f3b664811f65dcb from this package?

Thanks!

-Jeff

[1] git://www.dnspython.org/dnspython.git

Output of lsb_release -rd:
Description: Ubuntu 10.10
Release: 10.10

jforman@monitor:~$ apt-cache policy python-dnspython
python-dnspython:
  Installed: 1.8.0-1
  Candidate: 1.8.0-1
  Version table:
 *** 1.8.0-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

TEST CASE: See comment #5.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 660749] [NEW] update to python-dnspython needed for code bug fix

I didn't look at the commit, but if it's reasonably self contained to the
issue you've described, it should be doable. I'll try and have a look next
week. If you don't see any progress on this in a week, please send me a ping.

Revision history for this message
Scott Kitterman (kitterman) wrote :

In order to get the fix for this into Maverick (since it's post-release), I will need a test case that a QA person could use to verify the problem and the fix. Could you provide a minimal python script that demonstrates the problem?

Changed in dnspython (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
Changed in dnspython (Ubuntu Maverick):
assignee: nobody → Scott Kitterman (kitterman)
Changed in dnspython (Ubuntu):
importance: Undecided → High
Changed in dnspython (Ubuntu Maverick):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dnspython - 1.8.0-1ubuntu1

---------------
dnspython (1.8.0-1ubuntu1) natty; urgency=low

  * Fix TSIG algorithm value passing, upstream git commit
    e80c56c6c5c6dd7aa12c439b1f3b664811f65dcb (LP: #660749)
 -- Scott Kitterman <email address hidden> Fri, 15 Oct 2010 10:22:34 -0400

Changed in dnspython (Ubuntu):
status: New → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

I've gone ahead and uploaded this for maverick-proposed on the assumption that you'll provide the test case.

Changed in dnspython (Ubuntu Maverick):
status: Triaged → Fix Committed
Revision history for this message
Jeffrey Forman (jeffreyforman) wrote :

Since I've never committed a package request for Ubuntu before, I'm not sure exactly what you folks require. To provide a test case for this, one would need a BIND server running and configured to accept DDNS updates for a particular zone with TSIG keys for authentication.

The test I did was running my python script against the Ubuntu-provided python-dnspython package and the compiled-from-git-checkout that contains the above code fix from the module author. With the former package my script showed the above traceback. With the compiled-from-git package, it worked as expected.

The script I used on both tests was:

add_dnsrecord.py:
----------------------------------
#!/usr/bin/env python

import dns.query
import dns.tsigkeyring
import dns.update
import sys

keyring = dns.tsigkeyring.from_text({
    'ddns-key.' : "kzz766iy/JXF/rUkFuFSKQ=="
})

update = dns.update.Update('test.mydomaintest.net.', keyring = keyring)
update.replace('host4', 300, 'A', sys.argv[1])

response = dns.query.tcp(update,'10.10.0.1')
---------------------------
executed as: add_dnsrecord.py 10.30.0.4

Revision history for this message
Scott Kitterman (kitterman) wrote :

Thank you.

Particularly for a first attempt, your report was very complete and thorough. You can be the QA person that validates the fixed package solves the problem once it's reviewed by the ubuntu-sru team and accepted. Given the non-trivial setup requirements, that's likely to get the package validated the most quickly.

Now we wait for the Stable Release Updates (SRU) team to review and accept this.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted dnspython into maverick-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
Revision history for this message
Jeffrey Forman (jeffreyforman) wrote :

Works great now! Thanks to all for the quick fix, I look forward to making this into the dominant repositories.

package info:
jforman@monitor:~$ apt-cache showpkg python-dnspython
Package: python-dnspython
Versions:
1.8.0-1ubuntu0.1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_maverick-proposed_main_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_maverick-proposed_main_binary-amd64_Packages
                  MD5: 5c7ff37ec0055b47241c383f2c0e3c03

1.8.0-1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_maverick_main_binary-amd64_Packages)
 Description Language:
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_maverick_main_binary-amd64_Packages
                  MD5: 5c7ff37ec0055b47241c383f2c0e3c03
.....

Executing the same script as above, this time without error:
jforman@monitor:~$ ./add_dnsrecord.py 10.30.0.44
jforman@monitor:~$

I would consider this issue fixed, at least from my viewpoint.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dnspython - 1.8.0-1ubuntu0.1

---------------
dnspython (1.8.0-1ubuntu0.1) maverick-proposed; urgency=low

  * Fix TSIG algorithm value passing, upstream git commit
    e80c56c6c5c6dd7aa12c439b1f3b664811f65dcb (LP: #660749)
 -- Scott Kitterman <email address hidden> Fri, 15 Oct 2010 10:22:34 -0400

Changed in dnspython (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.