diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-28 06:57:12 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-28 06:57:12 +0000 |
commit | 3afceb132f6ff416c4f715f21857dacb9c605bc8 (patch) | |
tree | 6d5fd8da5f1ddb80d670334d15492be7cdeb7dcf /dev-python/dnspython | |
parent | 2865ab43f3d9f17ce41a2b048f7ca1ea32177955 (diff) |
gentoo auto-resync : 28:01:2024 - 06:57:12
Diffstat (limited to 'dev-python/dnspython')
-rw-r--r-- | dev-python/dnspython/Manifest | 3 | ||||
-rw-r--r-- | dev-python/dnspython/dnspython-2.5.0.ebuild | 6 | ||||
-rw-r--r-- | dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch | 67 |
3 files changed, 75 insertions, 1 deletions
diff --git a/dev-python/dnspython/Manifest b/dev-python/dnspython/Manifest index c9f97fffc0f6..f12eac7e4fb7 100644 --- a/dev-python/dnspython/Manifest +++ b/dev-python/dnspython/Manifest @@ -1,5 +1,6 @@ +AUX dnspython-2.5.0-musl-test.patch 2797 BLAKE2B 0f2b3e9cce32de491ea9fc1c896a0acbf27972a75fc75fca9440faad1aa4f2e5adfaf44f2f94518fcc95793381d73c742d902fd94d44262be6892b97d7414011 SHA512 93ca5a2cce940c505a35846aa96cdae235f3871c4b2e871ed6b61860c4b22cf927b684ca9c651bcf1c1fd939990fe1145adb9217d42715c6dba10608a9a5e90d DIST dnspython-2.4.2.gh.tar.gz 357675 BLAKE2B ceb2f4a824a1c2b834401d2eb7943e62a5fb28a19be64cea8071d7e294d1a6aa80dc82266586d050fcb1c0eff881d9e139be335313d2098b6c3c6cf690f398ab SHA512 6a76331fc8bc282bb8ef61509317b1956bec6fb516a57409b1df38c8f5094e5ddfcaabc951f7678f1be75e735962c94f225b6e78eb4abe56b27e075180c62576 DIST dnspython-2.5.0.gh.tar.gz 366093 BLAKE2B f8e3d8632a74b0421f7c77316dc80e01936277d701c282239ed60e79952755d34c673f15e19d4da812883e33d5f2cb54a8faa419185d8d198de923a2f3861095 SHA512 8ed207f9cee88dc1deb626d727c510dabace327586911e340df435c8cce5936efee51937b52881b4b4452d9c8c5bd903044bfef5a4effa95aaf05f24c0213b07 EBUILD dnspython-2.4.2.ebuild 1036 BLAKE2B 09065dc34e1d6c65eaa2efaeb7432a74ee004070a5e49ced70e2ad0aee9a7e38ef14decc18286410fa3aa2640c503d815e3c3fd870a2148a6376c0676130b6bd SHA512 dba146f266a31de5bace5606a4df9d7adce10cebf951fcb2e14d764216efaaed094f0a0b2ac2d2bd9dfbe7f837756789175629c5b251fe9ac72c2ec73f83388b -EBUILD dnspython-2.5.0.ebuild 1027 BLAKE2B 0575a64e02ae1f60d17083e87b30b3a7a90735c2fcd0014c16a52662dd5dd5017ce683ba03c8d936bc9ea02c7529ca584612201fff2301a295c362c6d63a06e2 SHA512 3c8798e6fe0fa22fab1de512b4b2c5e4b46493598f0a0bc5bdd87a8a7a8ebd01bc8624728ed2a8b450aa844f626c439aaa85aff92e52ba2c41db2bafa5f5c13f +EBUILD dnspython-2.5.0.ebuild 1218 BLAKE2B 5ea439d151f479a5caae4c210cd85ed71165fd1eebb971bc92428bf9b799066197a195170a2b0848d9020a7762bd4a99fe37cdc761a77dca7917e359a0c0911c SHA512 0fca8099351427bb5683a7ac379c6ff49964466c70b12b86416e4de5eb418948856e12eb05200429b52a5a00a5fadbe641632f6e8a2055d604f90b2a534ce46e MISC metadata.xml 1709 BLAKE2B abd502753325fedca3f1ca94818258c9d1b82f88766f9e005b35b3e79aff71ca2efaf06188e73ea30830f80ec011cdf5c42df320130c9295e13d3c427a148f8c SHA512 8c25d579a4a2a7c5ff34c21643a1386a434545f6b9b465f4aa8e07f7da3aee203bbc0341e930ddb767af431f64e8024ddd6cc8513cfce862c5900da4637bb1c8 diff --git a/dev-python/dnspython/dnspython-2.5.0.ebuild b/dev-python/dnspython/dnspython-2.5.0.ebuild index fa76df91c401..c942143466ba 100644 --- a/dev-python/dnspython/dnspython-2.5.0.ebuild +++ b/dev-python/dnspython/dnspython-2.5.0.ebuild @@ -38,6 +38,12 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + # https://github.com/rthalley/dnspython/issues/1035 + # https://github.com/rthalley/dnspython/commit/1b22985f2d67b6dd43259e3c6b853498f1cff712 + "${FILESDIR}/${P}-musl-test.patch" +) + python_install_all() { distutils-r1_python_install_all if use examples; then diff --git a/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch b/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch new file mode 100644 index 000000000000..a5aec3378fdd --- /dev/null +++ b/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch @@ -0,0 +1,67 @@ +From 1b22985f2d67b6dd43259e3c6b853498f1cff712 Mon Sep 17 00:00:00 2001 +From: Bob Halley <halley@dnspython.org> +Date: Sat, 27 Jan 2024 12:38:03 -0800 +Subject: [PATCH] In tests, work around musl libc and docker issues. + +Specifically: musl libc's getaddrinfo behavior always returns +a canonical name. + +Docker's resolver proxy doesn't do dangling CNAMEs correctly +and also answers NXDOMAIN in some cases where it should say +no error, no data. +--- + tests/test_async.py | 14 +++++++++++--- + tests/test_resolver.py | 21 +++++++++++++++------ + tests/test_resolver_override.py | 19 ++++++++++++------- + tests/util.py | 10 +++++++++- + 4 files changed, 47 insertions(+), 17 deletions(-) + +diff --git a/tests/test_resolver_override.py b/tests/test_resolver_override.py +index aed7a53d..be9e53f2 100644 +--- a/tests/test_resolver_override.py ++++ b/tests/test_resolver_override.py +@@ -69,7 +69,7 @@ def test_override(self): + dns.resolver.restore_system_resolver() + self.assertTrue(socket.getaddrinfo is dns.resolver._original_getaddrinfo) + +- def equivalent_info(self, a, b): ++ def equivalent_info(self, a, b, q): + if len(a) != len(b): + return False + for x in a: +@@ -78,16 +78,21 @@ def equivalent_info(self, a, b): + # looking for a zero protocol. + y = (x[0], x[1], 0, x[3], x[4]) + if y not in b: +- print("NOT EQUIVALENT") +- print(a) +- print(b) +- return False ++ # musl libc insists on always providing a canonical name, so ++ # accept that too. ++ y = (x[0], x[1], x[2], q, x[4]) ++ if y not in b: ++ print("NOT EQUIVALENT") ++ print(a) ++ print(b) ++ return False + return True + + def equivalent(self, *args, **kwargs): ++ q = args[0] + a = socket.getaddrinfo(*args, **kwargs) + b = dns.resolver._original_getaddrinfo(*args, **kwargs) +- return self.equivalent_info(a, b) ++ return self.equivalent_info(a, b, q) + + @unittest.skipIf( + sys.platform == "win32", "avoid windows original getaddrinfo issues" +@@ -139,7 +144,7 @@ def test_getaddrinfo_nxdomain(self): + def test_getaddrinfo_service(self): + a = socket.getaddrinfo("dns.google", "domain") + b = socket.getaddrinfo("dns.google", 53) +- self.assertTrue(self.equivalent_info(a, b)) ++ self.assertTrue(self.equivalent_info(a, b, "dns.google")) + try: + socket.getaddrinfo("dns.google", "domain", flags=socket.AI_NUMERICSERV) + self.assertTrue(False) # should not happen! |