cdfbe4
%global from_checkout 1
21d866
%global commit 465785f85f87508209117264c677080e901e957c
cdfbe4
%global shortcommit %(c=%{commit}; echo ${c:0:7})
80f6bf
80f6bf
Name:           python-dns
21d866
Version:        1.12.0
cba790
Release:        4%{?from_checkout:.20150617git%{shortcommit}}%{?dist}
80f6bf
Summary:        DNS toolkit for Python
80f6bf
80f6bf
Group:          Development/Languages
80f6bf
License:        MIT
80f6bf
URL:            http://www.dnspython.org/
cdfbe4
%if 0%{?from_checkout}
cdfbe4
Source0:        https://github.com/rthalley/%{name}/archive/%{commit}.tar.gz
cdfbe4
%else
80f6bf
Source0:        http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
cdfbe4
%endif
a1d60e
Patch0:			incorrect-exception-to-udp-function.patch
cba790
# Reject lines with less than two tokens
cba790
# Fixed upstream: https://github.com/rthalley/dnspython/commit/13347e2450c7bfa928eb80b01850e52dfa095802
cba790
# Resolves:     https://bugzilla.redhat.com/show_bug.cgi?id=1400934
cba790
Patch1:         reject-lines-with-less-than-two-tokens.patch
cba790
# Fix typo in resolver.py
cba790
# Fixed upstream: https://github.com/rthalley/dnspython/commit/84d3c7dffec9c0a380aa5f696ca728879dbe38ac
cba790
# Resolves:     https://bugzilla.redhat.com/show_bug.cgi?id=1440037
cba790
Patch2:         fix-typo-in-resolver.patch
80f6bf
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
80f6bf
80f6bf
BuildArch:      noarch
a1d60e
BuildRequires:  python-setuptools
80f6bf
80f6bf
%description
80f6bf
dnspython is a DNS toolkit for Python. It supports almost all record
80f6bf
types. It can be used for queries, zone transfers, and dynamic
80f6bf
updates. It supports TSIG authenticated messages and EDNS0.
80f6bf
80f6bf
dnspython provides both high and low level access to DNS. The high
80f6bf
level classes perform queries for data of a given name, type, and
80f6bf
class, and return an answer set. The low level classes allow direct
80f6bf
manipulation of DNS zones, messages, names, and records.
80f6bf
80f6bf
%prep
21d866
%setup -q -n rthalley-dnspython-%{?from_checkout:%{shortcommit}}%{!?from_checkout:%{version}}
a1d60e
%patch0 -p1
cba790
%patch1 -p1
cba790
%patch2 -p1
80f6bf
80f6bf
# strip executable permissions so that we don't pick up dependencies
80f6bf
# from documentation
80f6bf
find examples -type f | xargs chmod a-x
80f6bf
80f6bf
80f6bf
%build
80f6bf
CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
80f6bf
80f6bf
80f6bf
%install
80f6bf
rm -rf %{buildroot}
80f6bf
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
80f6bf
80f6bf
80f6bf
%check
80f6bf
pushd tests
80f6bf
# skip one test because it queries the network
cdfbe4
mv test_resolver.py test_resolver.pynorun
cdfbe4
%{__python} utest.py
80f6bf
80f6bf
80f6bf
%files
80f6bf
%doc ChangeLog LICENSE README examples
80f6bf
80f6bf
%{python_sitelib}/*egg-info
80f6bf
%{python_sitelib}/dns
80f6bf
80f6bf
cdfbe4
%changelog
cba790
* Wed Apr 19 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.12.0-4
cba790
- Fix typo in resolver.py
cba790
Resolves: rhbz#1440037
cba790
cba790
* Tue Feb 14 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.12.0-3
cba790
- Reject lines with less than two tokens
cba790
Resolves: rhbz#1400934
cba790
a1d60e
* Tue Mar 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.12.0-2
a1d60e
- Added patch to fix incorrect exception to udp function
a1d60e
Resolves: rhbz#1312770
a1d60e
a1d60e
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.12.0-1.20150617git465785f
21d866
- Update to 1.12.0 (465785f)
21d866
Resolves: rhbz#1196971
21d866
cdfbe4
* Mon Sep 01 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.11.1-2.20140901git9329daf
cdfbe4
- Rebase to latest upstream commit
cdfbe4
- Remove unnecessary sources and patches
cdfbe4
- Specfile cleanup
cdfbe4
Resolves: rhbz#1112999
80f6bf
cdfbe4
* Tue Aug 26 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.11.1-1
cdfbe4
- Rebase to version 1.11.1
cdfbe4
- Remove downstream patch that was merged upstream
cdfbe4
Resolves: rhbz#1112999
80f6bf
82b895
* Tue Jan 28 2014 Robert Kuska <rkuska@redhat.com> - 1.10.0-5
82b895
- Patch to fix LOC records parsing
82b895
Resolves: rhbz#1056747
82b895
82b895
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.10.0-4
82b895
- Mass rebuild 2013-12-27
82b895
80f6bf
* Sat Feb 16 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.10.0-3
80f6bf
- add python3-dns subpackage (rhbz#911933)
80f6bf
80f6bf
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.0-2
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
80f6bf
80f6bf
* Mon Sep 17 2012 Paul Wouters <pwouters@redhat.com> - 1.10.0-1
80f6bf
- Updated to 1.10.0
80f6bf
- Patch to support TLSA RRtype
80f6bf
80f6bf
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.4-3
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
80f6bf
80f6bf
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.4-2
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
80f6bf
80f6bf
* Mon Mar 28 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.4-1
80f6bf
-
80f6bf
- dnspython 1.9.4 has been released and is available at
80f6bf
- http://www.dnspython.org/kits/1.9.4/
80f6bf
-
80f6bf
- There is no new functionality in this release; just a few bug fixes
80f6bf
- in RRSIG and SIG code.
80f6bf
-
80f6bf
- I will be eliminating legacy code for earlier versions of DNSSEC in a
80f6bf
- future release of dnspython.
80f6bf
80f6bf
* Fri Mar 25 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.3-1
80f6bf
-
80f6bf
- New since 1.9.2:
80f6bf
-
80f6bf
-     A boolean parameter, 'raise_on_no_answer', has been added to
80f6bf
- the query() methods.  In no-error, no-data situations, this
80f6bf
- parameter determines whether NoAnswer should be raised or not.
80f6bf
- If True, NoAnswer is raised.  If False, then an Answer()
80f6bf
- object with a None rrset will be returned.
80f6bf
-
80f6bf
- Resolver Answer() objects now have a canonical_name field.
80f6bf
-
80f6bf
- Rdata now have a __hash__ method.
80f6bf
-
80f6bf
- Bugs fixed since 1.9.2:
80f6bf
-
80f6bf
-        Dnspython was erroneously doing case-insensitive comparisons
80f6bf
- of the names in NSEC and RRSIG RRs.
80f6bf
-
80f6bf
- We now use "is" and not "==" when testing what section an RR
80f6bf
- is in.
80f6bf
-
80f6bf
- The resolver now disallows metaqueries.
80f6bf
80f6bf
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.2-2
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
80f6bf
80f6bf
* Tue Nov 23 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.2-1
80f6bf
- It's brown paper bag time :) The fix for the import problems was
80f6bf
- actually bad, but didn't show up in testing because the test suite's
80f6bf
- conditional importing code hid the problem.
80f6bf
-
80f6bf
- Any, 1.9.2 is out.
80f6bf
-
80f6bf
- Sorry for the churn!
80f6bf
80f6bf
* Mon Nov 22 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.9.1-1
80f6bf
- New since 1.9.0:
80f6bf
-
80f6bf
-        Nothing.
80f6bf
-
80f6bf
- Bugs fixed since 1.9.0
80f6bf
-
80f6bf
-        The dns.dnssec module didn't work with DSA due to namespace
80f6bf
-        contamination from a "from"-style import.
80f6bf
-
80f6bf
- New since 1.8.0:
80f6bf
-
80f6bf
-        dnspython now uses poll() instead of select() when available.
80f6bf
-
80f6bf
-        Basic DNSSEC validation can be done using dns.dnsec.validate()
80f6bf
-        and dns.dnssec.validate_rrsig() if you have PyCrypto 2.3 or
80f6bf
-        later installed.  Complete secure resolution is not yet
80f6bf
-        available.
80f6bf
-
80f6bf
-        Added key_id() to the DNSSEC module, which computes the DNSSEC
80f6bf
-        key id of a DNSKEY rdata.
80f6bf
-
80f6bf
-        Added make_ds() to the DNSSEC module, which returns the DS RR
80f6bf
-        for a given DNSKEY rdata.
80f6bf
-
80f6bf
-        dnspython now raises an exception if HMAC-SHA284 or
80f6bf
-        HMAC-SHA512 are used with a Python older than 2.5.2.  (Older
80f6bf
-        Pythons do not compute the correct value.)
80f6bf
-
80f6bf
-        Symbolic constants are now available for TSIG algorithm names.
80f6bf
-
80f6bf
- Bugs fixed since 1.8.0
80f6bf
-
80f6bf
-        dns.resolver.zone_for_name() didn't handle a query response
80f6bf
-        with a CNAME or DNAME correctly in some cases.
80f6bf
-
80f6bf
-        When specifying rdata types and classes as text, Unicode
80f6bf
-        strings may now be used.
80f6bf
-
80f6bf
-        Hashlib compatibility issues have been fixed.
80f6bf
-
80f6bf
-        dns.message now imports dns.edns.
80f6bf
-
80f6bf
-        The TSIG algorithm value was passed incorrectly to use_tsig()
80f6bf
-        in some cases.
80f6bf
80f6bf
* Fri Aug 13 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-3
80f6bf
- Add a patch from upstream to fix a Python 2.7 issue.
80f6bf
80f6bf
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.8.0-2.1
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
80f6bf
80f6bf
* Wed Jan 27 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-1.1
80f6bf
- Fix error
80f6bf
80f6bf
* Wed Jan 27 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.8.0-1
80f6bf
- New since 1.7.1:
80f6bf
-
80f6bf
-  Support for hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and
80f6bf
-  hmac-sha512 has been contributed by Kevin Chen.
80f6bf
-
80f6bf
-  The tokenizer's tokens are now Token objects instead of (type,
80f6bf
-  value) tuples.
80f6bf
-
80f6bf
- Bugs fixed since 1.7.1:
80f6bf
-
80f6bf
-  Escapes in masterfiles now work correctly.  Previously they were
80f6bf
-  only working correctly when the text involved was part of a domain
80f6bf
-  name.
80f6bf
-
80f6bf
-  When constructing a DDNS update, if the present() method was used
80f6bf
-  with a single rdata, a zero TTL was not added.
80f6bf
-
80f6bf
-  The entropy pool needed locking to be thread safe.
80f6bf
-
80f6bf
-  The entropy pool's reading of /dev/random could cause dnspython to
80f6bf
-  block.
80f6bf
-
80f6bf
-  The entropy pool did buffered reads, potentially consuming more
80f6bf
-  randomness than we needed.
80f6bf
-
80f6bf
-  The entropy pool did not seed with high quality randomness on
80f6bf
-  Windows.
80f6bf
-
80f6bf
-  SRV records were compared incorrectly.
80f6bf
-
80f6bf
-  In the e164 query function, the resolver parameter was not used.
80f6bf
80f6bf
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1-2
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
80f6bf
80f6bf
* Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-1
80f6bf
- New since 1.7.0:
80f6bf
-
80f6bf
-        Nothing
80f6bf
-
80f6bf
- Bugs fixed since 1.7.0:
80f6bf
-
80f6bf
-        The 1.7.0 kitting process inadventently omitted the code for the
80f6bf
-        DLV RR.
80f6bf
-
80f6bf
-        Negative DDNS prerequisites are now handled correctly.
80f6bf
80f6bf
* Fri Jun 19 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.0-1
80f6bf
- New since 1.6.0:
80f6bf
-
80f6bf
-        Rdatas now have a to_digestable() method, which returns the
80f6bf
-        DNSSEC canonical form of the rdata, suitable for use in
80f6bf
-        signature computations.
80f6bf
-
80f6bf
-        The NSEC3, NSEC3PARAM, DLV, and HIP RR types are now supported.
80f6bf
-
80f6bf
-        An entropy module has been added and is used to randomize query ids.
80f6bf
-
80f6bf
-        EDNS0 options are now supported.
80f6bf
-
80f6bf
-        UDP IXFR is now supported.
80f6bf
-
80f6bf
-        The wire format parser now has a 'one_rr_per_rrset' mode, which
80f6bf
-        suppresses the usual coalescing of all RRs of a given type into a
80f6bf
-        single RRset.
80f6bf
-
80f6bf
-        Various helpful DNSSEC-related constants are now defined.
80f6bf
-
80f6bf
-        The resolver's query() method now has an optional 'source' parameter,
80f6bf
-        allowing the source IP address to be specified.
80f6bf
-
80f6bf
- Bugs fixed since 1.6.0:
80f6bf
-
80f6bf
-        On Windows, the resolver set the domain incorrectly.
80f6bf
-
80f6bf
-        DS RR parsing only allowed one Base64 chunk.
80f6bf
-
80f6bf
-        TSIG validation didn't always use absolute names.
80f6bf
-
80f6bf
-        NSEC.to_text() only printed the last window.
80f6bf
-
80f6bf
-        We did not canonicalize IPv6 addresses before comparing them; we
80f6bf
-        would thus treat equivalent but different textual forms, e.g.
80f6bf
-        "1:00::1" and "1::1" as being non-equivalent.
80f6bf
-
80f6bf
-        If the peer set a TSIG error, we didn't raise an exception.
80f6bf
-
80f6bf
-        Some EDNS bugs in the message code have been fixed (see the ChangeLog
80f6bf
-        for details).
80f6bf
80f6bf
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-4
80f6bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
80f6bf
80f6bf
* Sat Nov 29 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.6.0-3
80f6bf
- Rebuild for Python 2.6
80f6bf
80f6bf
* Fri Aug 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.6.0-2
80f6bf
- fix license tag
80f6bf
80f6bf
* Sat Dec  4 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.6.0-1
80f6bf
- Update to 1.6.0
80f6bf
80f6bf
* Tue Oct  9 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.5.0-2
80f6bf
- Follow new Python egg packaging specs
80f6bf
80f6bf
* Thu Jan 11 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.5.0-1
80f6bf
- Update to 1.5.0
80f6bf
80f6bf
* Fri Dec  8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-3
80f6bf
- Bump release for rebuild with Python 2.5
80f6bf
80f6bf
* Mon Aug 14 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-2
80f6bf
- No longer ghost *.pyo files, thus further simplifying the files section.
80f6bf
80f6bf
* Sat Aug  5 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-1
80f6bf
- Update to 1.4.0
80f6bf
- Remove unneeded python-abi requires
80f6bf
- Remove unneeded python_sitearch macro
80f6bf
80f6bf
* Fri May 26 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.3.5-1
80f6bf
- First version for Fedora Extras
80f6bf