Merge branch 'el5/master' into el6/master

This commit is contained in:
Jeffrey C. Ollie 2011-04-20 09:40:58 -05:00
commit 923bc15aee
5 changed files with 249 additions and 77 deletions

8
.gitignore vendored
View File

@ -1,2 +1,10 @@
dnspython-1.8.0.tar.gz dnspython-1.8.0.tar.gz
dnspython-1.8.0.tar.gz.asc dnspython-1.8.0.tar.gz.asc
/dnspython-1.9.1.tar.gz
/dnspython-1.9.1.tar.gz.asc
/dnspython-1.9.2.tar.gz
/dnspython-1.9.2.tar.gz.asc
/dnspython-1.9.3.tar.gz
/dnspython-1.9.3.tar.gz.asc
/dnspython-1.9.4.tar.gz
/dnspython-1.9.4.tar.gz.asc

View File

@ -0,0 +1,26 @@
From f6f6666438af884da7b4b1d76a258639f949406f Mon Sep 17 00:00:00 2001
From: Jeffrey C. Ollie <jeff@ocjtech.us>
Date: Thu, 2 Dec 2010 13:05:50 -0600
Subject: [PATCH] Don't fail on older python versions because of hashes.
---
dns/hash.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/dns/hash.py b/dns/hash.py
index 7bd5ae5..8582a9c 100644
--- a/dns/hash.py
+++ b/dns/hash.py
@@ -37,9 +37,6 @@ def _setup():
if sys.hexversion >= 0x02050200:
_hashes['SHA384'] = hashlib.sha384
_hashes['SHA512'] = hashlib.sha512
- else:
- _hashes['SHA384'] = _need_later_python('SHA384')
- _hashes['SHA512'] = _need_later_python('SHA512')
if sys.hexversion < 0x02050000:
# hashlib doesn't conform to PEP 247: API for
--
1.7.3.2

View File

@ -1,36 +0,0 @@
From e80c56c6c5c6dd7aa12c439b1f3b664811f65dcb Mon Sep 17 00:00:00 2001
From: Bob Halley <halley@nominum.com>
Date: Wed, 10 Mar 2010 14:22:32 +0000
Subject: [PATCH] The TSIG algorithm was being passed to use_tsig() incorrectly.
---
diff --git a/dns/resolver.py b/dns/resolver.py
index 372d7d8..cd0e5f8 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -593,7 +593,8 @@ class Resolver(object):
return answer
request = dns.message.make_query(qname, rdtype, rdclass)
if not self.keyname is None:
- request.use_tsig(self.keyring, self.keyname, self.keyalgorithm)
+ request.use_tsig(self.keyring, self.keyname,
+ algorithm=self.keyalgorithm)
request.use_edns(self.edns, self.ednsflags, self.payload)
response = None
#
diff --git a/dns/update.py b/dns/update.py
index 7d42636..97aea18 100644
--- a/dns/update.py
+++ b/dns/update.py
@@ -56,7 +56,7 @@ class Update(dns.message.Message):
self.find_rrset(self.question, self.origin, rdclass, dns.rdatatype.SOA,
create=True, force_unique=True)
if not keyring is None:
- self.use_tsig(keyring, keyname, keyalgorithm)
+ self.use_tsig(keyring, keyname, algorithm=keyalgorithm)
def _add_rr(self, name, ttl, rd, deleting=None, section=None):
"""Add a single RR to the update section."""
--
1.7.2.1

View File

@ -1,8 +1,18 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
%if 0%{?rhel} == 5
%global with_python26 1
%{!?py26dir: %global py26dir %{_builddir}/python26-%{name}-%{version}-%{release}}
%{!?__python26: %global __python26 /usr/bin/python26}
%{!?python26_sitelib: %global python26_sitelib %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif
Name: python-dns Name: python-dns
Version: 1.8.0 Version: 1.9.4
Release: 3%{?dist} Release: 1%{?dist}
Summary: DNS toolkit for Python Summary: DNS toolkit for Python
Group: Development/Languages Group: Development/Languages
@ -10,14 +20,21 @@ License: MIT
URL: http://www.dnspython.org/ URL: http://www.dnspython.org/
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
Source1: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz.asc Source1: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz.asc
Patch0: 0001-The-TSIG-algorithm-was-being-passed-to-use_tsig-inco.patch %if 0%{?rhel} == 5
Patch0: 0001-Don-t-fail-on-older-python-versions-because-of-hashe.patch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
%if 0%{?fedora} >= 8 BuildRequires: python-devel
BuildRequires: python-setuptools-devel %if 0%{?fedora} > 8
BuildRequires: python-setuptools-devel
%else %else
BuildRequires: python-setuptools BuildRequires: python-setuptools
%endif
%if 0%{?with_python26}
BuildRequires: python26-devel
%endif %endif
%description %description
@ -30,21 +47,61 @@ level classes perform queries for data of a given name, type, and
class, and return an answer set. The low level classes allow direct class, and return an answer set. The low level classes allow direct
manipulation of DNS zones, messages, names, and records. manipulation of DNS zones, messages, names, and records.
%if 0%{?with_python26}
%package -n python26-dns
Summary: DNS toolkit for Python 2.6
Group: Development/Languages
%description -n python26-dns
dnspython is a DNS toolkit for Python. It supports almost all record
types. It can be used for queries, zone transfers, and dynamic
updates. It supports TSIG authenticated messages and EDNS0.
dnspython provides both high and low level access to DNS. The high
level classes perform queries for data of a given name, type, and
class, and return an answer set. The low level classes allow direct
manipulation of DNS zones, messages, names, and records.
%endif
%prep %prep
%setup0 -q -n dnspython-%{version} %setup0 -q -n dnspython-%{version}
%patch0 -p1
# get rid of Mac goop
find . -name ._\* -delete
# strip executable permissions so that we don't pick up dependencies # strip executable permissions so that we don't pick up dependencies
# from documentation # from documentation
find examples -type f | xargs chmod a-x find examples -type f | xargs chmod a-x
%if 0%{?with_python26}
rm -rf %{py26dir}
cp -a . %{py26dir}
find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python26}|'
%endif
%if 0%{?rhel} == 5
%patch0 -p1
%endif
%build %build
CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
%if 0%{?with_python26}
pushd %{py26dir}
CFLAGS="%{optflags}" %{__python26} setup.py build
popd
%endif
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
%if 0%{?with_python26}
pushd %{py26dir}
CFLAGS="%{optflags}" %{__python26} setup.py install --skip-build --root %{buildroot}
popd
%endif
%check %check
pushd tests pushd tests
# skip one test because it queries the network # skip one test because it queries the network
@ -56,6 +113,18 @@ do
fi fi
done done
%if 0%{?with_python26}
pushd %{py26dir}/tests
# skip one test because it queries the network
for py in *.py
do
if [ $py != resolver.py ]
then
PYTHONPATH=%{buildroot}%{python26_sitelib} %{__python26} $py
fi
done
%endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -66,7 +135,112 @@ rm -rf %{buildroot}
%{python_sitelib}/*egg-info %{python_sitelib}/*egg-info
%{python_sitelib}/dns %{python_sitelib}/dns
%if 0%{?with_python26}
%files -n python26-dns
%defattr(-,root,root,-)
%doc ChangeLog LICENSE README TODO examples
%{python26_sitelib}/*egg-info
%{python26_sitelib}/dns
%endif
%changelog %changelog
* Mon Mar 28 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.4-1
-
- dnspython 1.9.4 has been released and is available at
- http://www.dnspython.org/kits/1.9.4/
-
- There is no new functionality in this release; just a few bug fixes
- in RRSIG and SIG code.
-
- I will be eliminating legacy code for earlier versions of DNSSEC in a
- future release of dnspython.
* Fri Mar 25 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.3-1
-
- New since 1.9.2:
-
- A boolean parameter, 'raise_on_no_answer', has been added to
- the query() methods. In no-error, no-data situations, this
- parameter determines whether NoAnswer should be raised or not.
- If True, NoAnswer is raised. If False, then an Answer()
- object with a None rrset will be returned.
-
- Resolver Answer() objects now have a canonical_name field.
-
- Rdata now have a __hash__ method.
-
- Bugs fixed since 1.9.2:
-
- Dnspython was erroneously doing case-insensitive comparisons
- of the names in NSEC and RRSIG RRs.
-
- We now use "is" and not "==" when testing what section an RR
- is in.
-
- The resolver now disallows metaqueries.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 2 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.2-2
- Build Python 2.6 subpackage for EPEL 5
* Tue Nov 23 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.2-1
- It's brown paper bag time :) The fix for the import problems was
- actually bad, but didn't show up in testing because the test suite's
- conditional importing code hid the problem.
-
- Any, 1.9.2 is out.
-
- Sorry for the churn!
* Mon Nov 22 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.1-1
- New since 1.9.0:
-
- Nothing.
-
- Bugs fixed since 1.9.0
-
- The dns.dnssec module didn't work with DSA due to namespace
- contamination from a "from"-style import.
-
- New since 1.8.0:
-
- dnspython now uses poll() instead of select() when available.
-
- Basic DNSSEC validation can be done using dns.dnsec.validate()
- and dns.dnssec.validate_rrsig() if you have PyCrypto 2.3 or
- later installed. Complete secure resolution is not yet
- available.
-
- Added key_id() to the DNSSEC module, which computes the DNSSEC
- key id of a DNSKEY rdata.
-
- Added make_ds() to the DNSSEC module, which returns the DS RR
- for a given DNSKEY rdata.
-
- dnspython now raises an exception if HMAC-SHA284 or
- HMAC-SHA512 are used with a Python older than 2.5.2. (Older
- Pythons do not compute the correct value.)
-
- Symbolic constants are now available for TSIG algorithm names.
-
- Bugs fixed since 1.8.0
-
- dns.resolver.zone_for_name() didn't handle a query response
- with a CNAME or DNAME correctly in some cases.
-
- When specifying rdata types and classes as text, Unicode
- strings may now be used.
-
- Hashlib compatibility issues have been fixed.
-
- dns.message now imports dns.edns.
-
- The TSIG algorithm value was passed incorrectly to use_tsig()
- in some cases.
* Fri Aug 13 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-3 * Fri Aug 13 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-3
- Add a patch from upstream to fix a Python 2.7 issue. - Add a patch from upstream to fix a Python 2.7 issue.
@ -78,35 +252,35 @@ rm -rf %{buildroot}
* Wed Jan 27 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-1 * Wed Jan 27 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-1
- New since 1.7.1: - New since 1.7.1:
- -
- Support for hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and - Support for hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and
- hmac-sha512 has been contributed by Kevin Chen. - hmac-sha512 has been contributed by Kevin Chen.
- -
- The tokenizer's tokens are now Token objects instead of (type, - The tokenizer's tokens are now Token objects instead of (type,
- value) tuples. - value) tuples.
- -
- Bugs fixed since 1.7.1: - Bugs fixed since 1.7.1:
- -
- Escapes in masterfiles now work correctly. Previously they were - Escapes in masterfiles now work correctly. Previously they were
- only working correctly when the text involved was part of a domain - only working correctly when the text involved was part of a domain
- name. - name.
- -
- When constructing a DDNS update, if the present() method was used - When constructing a DDNS update, if the present() method was used
- with a single rdata, a zero TTL was not added. - with a single rdata, a zero TTL was not added.
- -
- The entropy pool needed locking to be thread safe. - The entropy pool needed locking to be thread safe.
- -
- The entropy pool's reading of /dev/random could cause dnspython to - The entropy pool's reading of /dev/random could cause dnspython to
- block. - block.
- -
- The entropy pool did buffered reads, potentially consuming more - The entropy pool did buffered reads, potentially consuming more
- randomness than we needed. - randomness than we needed.
- -
- The entropy pool did not seed with high quality randomness on - The entropy pool did not seed with high quality randomness on
- Windows. - Windows.
- -
- SRV records were compared incorrectly. - SRV records were compared incorrectly.
- -
- In the e164 query function, the resolver parameter was not used. - In the e164 query function, the resolver parameter was not used.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1-2 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1-2
@ -114,56 +288,56 @@ rm -rf %{buildroot}
* Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-1 * Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-1
- New since 1.7.0: - New since 1.7.0:
- -
- Nothing - Nothing
- -
- Bugs fixed since 1.7.0: - Bugs fixed since 1.7.0:
- -
- The 1.7.0 kitting process inadventently omitted the code for the - The 1.7.0 kitting process inadventently omitted the code for the
- DLV RR. - DLV RR.
- -
- Negative DDNS prerequisites are now handled correctly. - Negative DDNS prerequisites are now handled correctly.
* Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.0-1 * Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.0-1
- New since 1.6.0: - New since 1.6.0:
- -
- Rdatas now have a to_digestable() method, which returns the - Rdatas now have a to_digestable() method, which returns the
- DNSSEC canonical form of the rdata, suitable for use in - DNSSEC canonical form of the rdata, suitable for use in
- signature computations. - signature computations.
- -
- The NSEC3, NSEC3PARAM, DLV, and HIP RR types are now supported. - The NSEC3, NSEC3PARAM, DLV, and HIP RR types are now supported.
- -
- An entropy module has been added and is used to randomize query ids. - An entropy module has been added and is used to randomize query ids.
- -
- EDNS0 options are now supported. - EDNS0 options are now supported.
- -
- UDP IXFR is now supported. - UDP IXFR is now supported.
- -
- The wire format parser now has a 'one_rr_per_rrset' mode, which - The wire format parser now has a 'one_rr_per_rrset' mode, which
- suppresses the usual coalescing of all RRs of a given type into a - suppresses the usual coalescing of all RRs of a given type into a
- single RRset. - single RRset.
- -
- Various helpful DNSSEC-related constants are now defined. - Various helpful DNSSEC-related constants are now defined.
- -
- The resolver's query() method now has an optional 'source' parameter, - The resolver's query() method now has an optional 'source' parameter,
- allowing the source IP address to be specified. - allowing the source IP address to be specified.
- -
- Bugs fixed since 1.6.0: - Bugs fixed since 1.6.0:
- -
- On Windows, the resolver set the domain incorrectly. - On Windows, the resolver set the domain incorrectly.
- -
- DS RR parsing only allowed one Base64 chunk. - DS RR parsing only allowed one Base64 chunk.
- -
- TSIG validation didn't always use absolute names. - TSIG validation didn't always use absolute names.
- -
- NSEC.to_text() only printed the last window. - NSEC.to_text() only printed the last window.
- -
- We did not canonicalize IPv6 addresses before comparing them; we - We did not canonicalize IPv6 addresses before comparing them; we
- would thus treat equivalent but different textual forms, e.g. - would thus treat equivalent but different textual forms, e.g.
- "1:00::1" and "1::1" as being non-equivalent. - "1:00::1" and "1::1" as being non-equivalent.
- -
- If the peer set a TSIG error, we didn't raise an exception. - If the peer set a TSIG error, we didn't raise an exception.
- -
- Some EDNS bugs in the message code have been fixed (see the ChangeLog - Some EDNS bugs in the message code have been fixed (see the ChangeLog
- for details). - for details).

View File

@ -1,2 +1,2 @@
77f379e0cb21e11470a35359e6211c53 dnspython-1.8.0.tar.gz 8a89b7865251c4e9d8ec2f8cc9f8cd78 dnspython-1.9.4.tar.gz
7234413d2cddf2ab1eb54bcf82e4f8bd dnspython-1.8.0.tar.gz.asc 413d7fc295c6bf03f872938731919c95 dnspython-1.9.4.tar.gz.asc