import python-dns-2.3.0-2.el9

c9-beta imports/c9-beta/python-dns-2.3.0-2.el9
MSVSphere Packaging Team 1 year ago
parent 5fd858f7b4
commit 1edb42c77c

2
.gitignore vendored

@ -1 +1 @@
SOURCES/dnspython-2.2.1.tar.gz SOURCES/dnspython-2.3.0.tar.gz

@ -1 +1 @@
0689dbb669d348310514ca402a1f3b470708527e SOURCES/dnspython-2.2.1.tar.gz 698b6e84cf9d0ce2a0157b3bdaf7c4a852adf3dc SOURCES/dnspython-2.3.0.tar.gz

@ -0,0 +1,27 @@
From 76e10ef549aed9f1438d97b116495c312a450a34 Mon Sep 17 00:00:00 2001
From: Bob Halley <halley@dnspython.org>
Date: Wed, 18 Jan 2023 04:50:29 -0800
Subject: [PATCH 1/4] Add missing quic files to setup.py cythonize [#887].
(cherry picked from commit 211419bb0df840bab4696be3f6d9544d57df6603)
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index c91c719..2ccaf8b 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,8 @@ else:
from Cython.Build import cythonize
ext_modules = cythonize(
- ["dns/*.py", "dns/rdtypes/*.py", "dns/rdtypes/*/*.py"], language_level="3"
+ ["dns/*.py", "dns/quic/*.py", "dns/rdtypes/*.py", "dns/rdtypes/*/*.py"],
+ language_level="3",
)
kwargs = {
--
2.40.1

@ -1,105 +0,0 @@
From 0414551fab97825fb826882b9c23c1a3ea0b71ea Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Thu, 22 Apr 2021 10:08:41 -0300
Subject: [PATCH] Skip tests that require external network connection.
---
tests/test_async.py | 11 ++---------
tests/test_query.py | 9 ++-------
tests/test_resolver.py | 10 ++--------
tests/test_resolver_override.py | 9 ++-------
4 files changed, 8 insertions(+), 31 deletions(-)
diff --git a/tests/test_async.py b/tests/test_async.py
index 0252f22..370c6bb 100644
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -38,15 +38,10 @@ try:
except Exception:
_ssl_available = False
-# Some tests require the internet to be available to run, so let's
-# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+# RHEL 9 build environment does not have provide external network access.
+_network_available = False
# Look for systemd-resolved, as it does dangling CNAME responses incorrectly.
#
diff --git a/tests/test_query.py b/tests/test_query.py
index 2cff377..99dc873 100644
--- a/tests/test_query.py
+++ b/tests/test_query.py
@@ -36,13 +36,8 @@ import dns.query
import dns.tsigkeyring
import dns.zone
-# Some tests require the internet to be available to run, so let's
-# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+# RHEL 9 build environment does not have provide external network access.
+_network_available = False
# Some tests use a "nano nameserver" for testing. It requires trio
# and threading, so try to import it and if it doesn't work, skip
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index 4f5643d..b26ab65 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -18,7 +18,6 @@
from io import StringIO
import selectors
import sys
-import socket
import time
import unittest
@@ -31,13 +30,8 @@ import dns.resolver
import dns.tsig
import dns.tsigkeyring
-# Some tests require the internet to be available to run, so let's
-# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+# RHEL 9 build environment does not have provide external network access.
+_network_available = False
# Some tests use a "nano nameserver" for testing. It requires trio
# and threading, so try to import it and if it doesn't work, skip
diff --git a/tests/test_resolver_override.py b/tests/test_resolver_override.py
index ac93316..036a42e 100644
--- a/tests/test_resolver_override.py
+++ b/tests/test_resolver_override.py
@@ -9,13 +9,8 @@ import dns.rdataclass
import dns.rdatatype
import dns.resolver
-# Some tests require the internet to be available to run, so let's
-# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+# RHEL 9 build environment does not have provide external network access.
+_network_available = False
@unittest.skipIf(not _network_available, "Internet not reachable")
--
2.30.2

@ -0,0 +1,112 @@
From ecf2b229bd23229928599751950eda1639cd7e05 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Wed, 14 Jun 2023 15:17:57 -0300
Subject: [PATCH 2/4] Disable SHA1 tests.
Disable SHA1 dependent tests, as SHA1 is not available on c9s/RHEL 9.
---
tests/test_dnssec.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/test_dnssec.py b/tests/test_dnssec.py
index 098af69..920c955 100644
--- a/tests/test_dnssec.py
+++ b/tests/test_dnssec.py
@@ -603,25 +603,30 @@ class DNSSECValidatorTestCase(unittest.TestCase):
self.assertEqual(dns.dnssec.key_id(rsamd5_keys[abs_example][0]), 30239)
self.assertEqual(dns.dnssec.key_id(rsamd5_keys[abs_example][1]), 62992)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAbsoluteRSAGood(self): # type: () -> None
dns.dnssec.validate(abs_soa, abs_soa_rrsig, abs_keys, None, when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testDuplicateKeytag(self): # type: () -> None
dns.dnssec.validate(
abs_soa, abs_soa_rrsig, abs_keys_duplicate_keytag, None, when
)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAbsoluteRSABad(self): # type: () -> None
def bad(): # type: () -> None
dns.dnssec.validate(abs_other_soa, abs_soa_rrsig, abs_keys, None, when)
self.assertRaises(dns.dnssec.ValidationFailure, bad)
+ @unittest.skip(reason="SHA1 is not supported.")
def testRelativeRSAGood(self): # type: () -> None
dns.dnssec.validate(rel_soa, rel_soa_rrsig, rel_keys, abs_dnspython_org, when)
# test the text conversion for origin too
dns.dnssec.validate(rel_soa, rel_soa_rrsig, rel_keys, "dnspython.org", when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testRelativeRSABad(self): # type: () -> None
def bad(): # type: () -> None
dns.dnssec.validate(
@@ -630,6 +635,7 @@ class DNSSECValidatorTestCase(unittest.TestCase):
self.assertRaises(dns.dnssec.ValidationFailure, bad)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAbsoluteDSAGood(self): # type: () -> None
dns.dnssec.validate(
abs_dsa_soa,
@@ -742,6 +748,7 @@ class DNSSECValidatorTestCase(unittest.TestCase):
rsasha512_ns, rsasha512_ns_rrsig, rsasha512_keys, None, rsasha512_when
)
+ @unittest.skip(reason="SHA1 is not supported.")
def testWildcardGoodAndBad(self):
dns.dnssec.validate(
wildcard_txt, wildcard_txt_rrsig, wildcard_keys, None, wildcard_when
@@ -768,6 +775,7 @@ class DNSSECValidatorTestCase(unittest.TestCase):
com_txt, com_txt_rrsig[0], wildcard_keys, None, wildcard_when
)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAlternateParameterFormats(self): # type: () -> None
# Pass rrset and rrsigset as (name, rdataset) tuples, not rrsets
rrset = (abs_soa.name, abs_soa.to_rdataset())
@@ -882,6 +890,7 @@ class DNSSECMiscTestCase(unittest.TestCase):
class DNSSECMakeDSTestCase(unittest.TestCase):
+ @unittest.skip(reason="SHA1 is not supported.")
def testMnemonicParser(self):
good_ds_mnemonic = dns.rdata.from_text(
dns.rdataclass.IN,
@@ -891,6 +900,7 @@ class DNSSECMakeDSTestCase(unittest.TestCase):
)
self.assertEqual(good_ds, good_ds_mnemonic)
+ @unittest.skip(reason="SHA1 is not supported.")
def testMakeExampleSHA1DS(self): # type: () -> None
algorithm: Any
for algorithm in ("SHA1", "sha1", dns.dnssec.DSDigest.SHA1):
@@ -909,6 +919,7 @@ class DNSSECMakeDSTestCase(unittest.TestCase):
)
self.assertEqual(ds, example_ds_sha1)
+ @unittest.skip(reason="SHA1 is not supported.")
def testMakeExampleSHA1DSValidationOkByPolicy(self): # type: () -> None
algorithm: Any
for algorithm in ("SHA1", "sha1", dns.dnssec.DSDigest.SHA1):
@@ -924,6 +935,7 @@ class DNSSECMakeDSTestCase(unittest.TestCase):
)
self.assertEqual(ds, example_ds_sha1)
+ @unittest.skip(reason="SHA1 is not supported.")
def testMakeExampleSHA1DSDeniedByPolicy(self): # type: () -> None
with self.assertRaises(dns.dnssec.DeniedByPolicy):
ds = dns.dnssec.make_ds(abs_example, example_sep_key, "SHA1")
@@ -1174,6 +1186,7 @@ class DNSSECSignatureTestCase(unittest.TestCase):
rrsig_template = abs_soa_rrsig[0]
data = dns.dnssec._make_rrsig_signature_data(abs_soa, rrsig_template)
+ @unittest.skip(reason="SHA1 is not supported.")
def testSignatureRSASHA1(self): # type: () -> None
key = rsa.generate_private_key(
public_exponent=65537, key_size=2048, backend=default_backend()
--
2.40.1

@ -1,27 +0,0 @@
diff -Naur dnspython-2.2.1-orig/pyproject.toml dnspython-2.2.1/pyproject.toml
--- dnspython-2.2.1-orig/pyproject.toml 2023-01-04 12:32:36.727371811 -0300
+++ dnspython-2.2.1/pyproject.toml 2023-01-04 12:36:36.898599002 -0300
@@ -70,4 +70,3 @@
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
-[tool.setuptools_scm]
diff -Naur dnspython-2.2.1-orig/setup.cfg dnspython-2.2.1/setup.cfg
--- dnspython-2.2.1-orig/setup.cfg 2023-01-04 12:32:36.727371811 -0300
+++ dnspython-2.2.1/setup.cfg 2023-01-04 12:36:24.587382315 -0300
@@ -1,5 +1,6 @@
[metadata]
name = dnspython
+version = 2.2.1
author = Bob Halley
author_email = halley@dnspython.org
license = ISC
@@ -46,7 +47,7 @@
dns.rdtypes.CH
python_requires = >=3.6
test_suite = tests
-setup_requires = setuptools>=44; wheel; setuptools_scm[toml]>=3.4.3
+setup_requires = setuptools>=44
[options.extras_require]
DOH = httpx>=0.21.1; h2>=4.1.0; requests; requests-toolbelt

@ -0,0 +1,34 @@
From 8c23aaa4a213624cce86caa2e452ad19123d36f4 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Wed, 14 Jun 2023 15:24:02 -0300
Subject: [PATCH 3/4] Do not use setuptools_scm[toml] for build.
---
setup.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index af48e0e..e9bec34 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,7 @@ version = 2.3.0
author = Bob Halley
author_email = halley@dnspython.org
license = ISC
-license_file = LICENSE
+license_files = LICENSE
description = DNS toolkit
url = https://www.dnspython.org
project_urls =
@@ -46,7 +46,7 @@ packages =
dns.rdtypes.CH
python_requires = >=3.7
test_suite = tests
-setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
+setup_requires = setuptools>=44
[options.extras_require]
DOH = httpx>=0.21.1; h2>=4.1.0; requests; requests-toolbelt
--
2.40.1

@ -1,50 +0,0 @@
diff -Naur dnspython-2.2.1/tests/test_dnssec.py dnspython-2.2.1-upd/tests/test_dnssec.py
--- dnspython-2.2.1/tests/test_dnssec.py 2022-03-06 20:04:56.000000000 -0300
+++ dnspython-2.2.1-upd/tests/test_dnssec.py 2023-01-06 15:17:49.763218922 -0300
@@ -271,18 +271,22 @@
self.assertEqual(dns.dnssec.key_id(rsamd5_keys[abs_example][0]), 30239)
self.assertEqual(dns.dnssec.key_id(rsamd5_keys[abs_example][1]), 62992)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAbsoluteRSAGood(self): # type: () -> None
dns.dnssec.validate(abs_soa, abs_soa_rrsig, abs_keys, None, when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testDuplicateKeytag(self): # type: () -> None
dns.dnssec.validate(abs_soa, abs_soa_rrsig, abs_keys_duplicate_keytag, None, when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAbsoluteRSABad(self): # type: () -> None
def bad(): # type: () -> None
dns.dnssec.validate(abs_other_soa, abs_soa_rrsig, abs_keys, None,
when)
self.assertRaises(dns.dnssec.ValidationFailure, bad)
+ @unittest.skip(reason="SHA1 is not supported.")
def testRelativeRSAGood(self): # type: () -> None
dns.dnssec.validate(rel_soa, rel_soa_rrsig, rel_keys,
abs_dnspython_org, when)
@@ -290,6 +294,7 @@
dns.dnssec.validate(rel_soa, rel_soa_rrsig, rel_keys,
'dnspython.org', when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testRelativeRSABad(self): # type: () -> None
def bad(): # type: () -> None
dns.dnssec.validate(rel_other_soa, rel_soa_rrsig, rel_keys,
@@ -358,6 +363,7 @@
dns.dnssec.validate(rsasha512_ns, rsasha512_ns_rrsig, rsasha512_keys,
None, rsasha512_when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testWildcardGoodAndBad(self):
dns.dnssec.validate(wildcard_txt, wildcard_txt_rrsig,
wildcard_keys, None, wildcard_when)
@@ -384,6 +390,7 @@
dns.dnssec.validate_rrsig(com_txt, com_txt_rrsig[0], wildcard_keys,
None, wildcard_when)
+ @unittest.skip(reason="SHA1 is not supported.")
def testAlternateParameterFormats(self): # type: () -> None
# Pass rrset and rrsigset as (name, rdataset) tuples, not rrsets
rrset = (abs_soa.name, abs_soa.to_rdataset())

@ -0,0 +1,26 @@
From d8fea6c4e5512fd830c48035035ff3ea16b06444 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Wed, 14 Jun 2023 17:06:47 -0300
Subject: [PATCH 4/4] Disable tests that require external internet connection
---
tests/util.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/util.py b/tests/util.py
index 5518b41..87ede4c 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -27,7 +27,8 @@ import dns.rdataclass
import dns.rdatatype
# Cache for is_internet_reachable()
-_internet_reachable = None
+# RHEL 9 build environment does not have provide external network access.
+_internet_reachable = False
_have_ipv4 = False
_have_ipv6 = False
--
2.40.1

@ -0,0 +1,24 @@
From 9d29457ac5e8d5ab932c62c39665ac1b057040d3 Mon Sep 17 00:00:00 2001
From: Bob Halley <halley@dnspython.org>
Date: Sat, 11 Feb 2023 15:17:27 -0800
Subject: [PATCH] Add dns.quic to setup.cfg for legacy setup.py installs [#896]
---
setup.cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.cfg b/setup.cfg
index bd07111..f536eee 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -40,6 +40,7 @@ provides = dns
[options]
packages =
dns
+ dns.quic
dns.rdtypes
dns.rdtypes.IN
dns.rdtypes.ANY
--
2.41.0

@ -13,18 +13,20 @@
%endif %endif
Name: python-%{py_package_name} Name: python-%{py_package_name}
Version: 2.2.1 Version: 2.3.0
Release: 2%{?dist} Release: 2%{?dist}
Summary: DNS toolkit for Python Summary: DNS toolkit for Python
# The entire package is licensed with both licenses, see LICENSE file # The entire package is licensed with both licenses, see LICENSE file
License: ISC and MIT License: ISC
URL: http://www.dnspython.org URL: http://www.dnspython.org
Source0: https://github.com/rthalley/%{pypi_name}/archive/v%{version}%{rctag}/%{pypi_name}-%{version}%{rctag}.tar.gz Source0: https://github.com/rthalley/%{pypi_name}/archive/v%{version}%{rctag}/%{pypi_name}-%{version}%{rctag}.tar.gz
Patch0: 0001-Skip-tests-that-require-external-network-connection_rhbz#1914296.patch Patch0: 0001-Add-missing-quic-files-to-setup.py-cythonize-887.patch
Patch1: 0002-Do-not-build-with-setuptools-scm_rhbz#2088661.patch Patch1: 0002-Disable-SHA1-tests.patch
Patch2: 0003-Skip-DNSSEC-tests-with-SHA1_rhbz#2107651.patch Patch2: 0003-Do-not-use-setuptools_scm-toml-for-build.patch
Patch3: 0004-Disable-tests-that-require-external-internet-connect.patch
Patch4: 0005-Add-dns.quic-to-setup.cfg-for-legacy-setup.py-install.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python3-devel
@ -113,6 +115,14 @@ pytest -k "not testCanonicalNameDangling"
} }
%changelog %changelog
* Mon May 26 2023 Rafael Jeffman <rjeffman@redhat.com> - 2.3.0-2
- Fix build for legacy setup.py
Related: rhbz#2177854
* Wed May 17 2023 Rafael Jeffman <rjeffman@redhat.com> - 2.3.0-1
- Rebase to version 2.3.0
Resolves: rhbz#2177854
* Sat Jan 07 2023 Rafael Jeffman <rjeffman@redhat.com> - 2.2.1-2 * Sat Jan 07 2023 Rafael Jeffman <rjeffman@redhat.com> - 2.2.1-2
- Remove pycache from patch 0003. - Remove pycache from patch 0003.
Related: rhbz#2107651 Related: rhbz#2107651

Loading…
Cancel
Save