From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- dev-python/pycares/Manifest | 5 ++ .../pycares/files/pycares-4.2.0-c-ares-1.18.patch | 37 +++++++++++++++ dev-python/pycares/pycares-4.2.0.ebuild | 55 ++++++++++++++++++++++ dev-python/pycares/pycares-4.2.1.ebuild | 51 ++++++++++++++++++++ 4 files changed, 148 insertions(+) create mode 100644 dev-python/pycares/files/pycares-4.2.0-c-ares-1.18.patch create mode 100644 dev-python/pycares/pycares-4.2.0.ebuild create mode 100644 dev-python/pycares/pycares-4.2.1.ebuild (limited to 'dev-python/pycares') diff --git a/dev-python/pycares/Manifest b/dev-python/pycares/Manifest index 46ca6f20a91c..e34fd74dc42a 100644 --- a/dev-python/pycares/Manifest +++ b/dev-python/pycares/Manifest @@ -1,3 +1,8 @@ +AUX pycares-4.2.0-c-ares-1.18.patch 1504 BLAKE2B 071494623af58e35516a32f4b73ad79a4e110f2794b7580af5e15856fecdd339d24b37129d8707752116e0ef078667fccf5073e90b45180011b4a9d3a9852165 SHA512 e8d9ba57015c9326b7939aac797324f9682daa7fbe2ba549164095792182b53bc49818ab1bc4be8bc0e8215d2e1336e262749058aa251a5e0371570a13b1ebb1 DIST pycares-4.1.2.tar.gz 43668 BLAKE2B 4b26f8643ff5ce297981b0b60b3afb34b249138e8f702dd4aa0a38935e9e5338d048f3be1b4fb64d6d8b2259a279a8881dbd44b412c10427dbd7eee664e70495 SHA512 6fb2d24fb5f2638c55424608b02ebe9f630866d644decfb663ab9d8e2bb7a42629748fa220054747f9c36ce3dcb42f3b8e457c5c39009f94b564ff07efde0c84 +DIST pycares-4.2.0.gh.tar.gz 43939 BLAKE2B 6cac12ff2b3c44cf7d04b4ce3067d5435d416788e89251d87825e5ea265ecb178948e0187c47e8dfe40ec0480a66b8b2f6cc2c45e74473e9d66f5cc74269f50f SHA512 14c813242ff6cdc5249ae52c2b9ff1870d7b74c7c6083868b2b4bbe0ce2af3f15e9b2775f67940ffbfc4ce84a6a9232ba4fab5a17ef389f7a197a15318280e43 +DIST pycares-4.2.1.gh.tar.gz 43939 BLAKE2B 40f147189d5daf841a8165da86d881f1822763fbd050b040f11bd1f63a768dfbc71c78230d41331486cbc2354175b528f298dbb167ef7801e57b05b4a13c820d SHA512 b5462b58bf75a9ee39496209c8270bc9c07070d34d9c2f2a2eed4752ebf83392e256248dda06ec5934c235cb37636e55a21cff4181b0a03c3eff24fbf9297eb4 EBUILD pycares-4.1.2.ebuild 837 BLAKE2B 7af483901bdb74f49ef8cf1ea7e36ad0eee1001e2969d7c58b52bce4bc4726b4e06496c140de9f42af9e11fa1ecc8344e9d5ce4363e08dc8126387cec0da0155 SHA512 13bda8a1153c57e5993849408184ce77679d581ba27285a37ce4510782c2653be30e5754e00aa34f9834fde2ea3e0098e027d63fe8ecbc7b586ab967ab9576cf +EBUILD pycares-4.2.0.ebuild 982 BLAKE2B 0f17afdd1894faa0d862a00204418c1af0e33ebe95e11314c451057e0c833eb35b260171f4f7b2020afff38a0bc1b339c903878aa7cfe2f28f16d909a380620e SHA512 cfa353fc11ff452dca68dfa364d3116a1da979db19342e6279a4c6ee7b4f42956d2fea6c47bdd11a23fddf01a066ad556d75f4746111e2fb5396ae2c836089d6 +EBUILD pycares-4.2.1.ebuild 962 BLAKE2B ae6fd34d7202f21aefc7bb5d5a6bad660e154c3f1de6f54e11498a1755ee4a916ca9693bdb95377825ea505fd2dfd606d30f08bb221473b11bc38ca0ee73b51e SHA512 85d716de5bfe4e44b06404fd8bfbaab6290b550a896fb3e7fe77dd660f7eaacdd0c38f483fb6f3edda65fcb831f71dc5057f1747a13f9a0da7c1711c8772ab44 MISC metadata.xml 444 BLAKE2B a68f545c6f704176b98ebb3665e2f56e4879016ea4ffa4f342954d568d6fe76ad67bcf9d521f694b8fc0f199bff50969eb646554fff4a78f8644ac44edda0cdf SHA512 fe893795f2031639d9fa27efcb8afbb5a3e0ac2eb2a05f0465391813d60fba07372633e40136ce38eb429bae95d1ae5dccecd0aba228537553524343133dd202 diff --git a/dev-python/pycares/files/pycares-4.2.0-c-ares-1.18.patch b/dev-python/pycares/files/pycares-4.2.0-c-ares-1.18.patch new file mode 100644 index 000000000000..2e094a2b2f1c --- /dev/null +++ b/dev-python/pycares/files/pycares-4.2.0-c-ares-1.18.patch @@ -0,0 +1,37 @@ +From 72202e0bc135e360102371708e83334856d485cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Wed, 22 Jun 2022 07:38:33 +0200 +Subject: [PATCH] core: add flexible member to ares_addrinfo to fix c-ares 1.18 + +Add a flexible member to account for c-ares 1.18 adding an additional +`name` member to `struct ares_addrinfo`. This fixes the following +exception from cffi, and the resulting test_getaddrinfo* failures: + +``` +Exception ignored from cffi callback : +Traceback (most recent call last): + File "/tmp/pycares/.tox/py39/lib/python3.9/site-packages/pycares/__init__.py", line 162, in _addrinfo_cb + result = ares_addrinfo_result(res) + File "/tmp/pycares/.tox/py39/lib/python3.9/site-packages/pycares/__init__.py", line 841, in __init__ + cname_ptr = ares_addrinfo.cnames +ffi.error: struct ares_addrinfo: wrong total size (cdef says 16, but C compiler says 24). fix it or use "...;" as the last field in the cdef for struct ares_addrinfo to make it flexible +``` +--- + src/_cffi_src/build_cares.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/_cffi_src/build_cares.py b/src/_cffi_src/build_cares.py +index 77f03aa..dec42c9 100644 +--- a/src/_cffi_src/build_cares.py ++++ b/src/_cffi_src/build_cares.py +@@ -337,6 +337,7 @@ struct ares_addrinfo_cname { + struct ares_addrinfo { + struct ares_addrinfo_cname *cnames; + struct ares_addrinfo_node *nodes; ++ ...; + }; + + struct ares_addrinfo_hints { +-- +2.35.1 + diff --git a/dev-python/pycares/pycares-4.2.0.ebuild b/dev-python/pycares/pycares-4.2.0.ebuild new file mode 100644 index 000000000000..1b84ec92ebb6 --- /dev/null +++ b/dev-python/pycares/pycares-4.2.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 + +DESCRIPTION="Python interface for c-ares" +HOMEPAGE=" + https://github.com/saghul/pycares/ + https://pypi.org/project/pycares/ +" +SRC_URI=" + https://github.com/saghul/pycares/archive/${P}.tar.gz + -> ${P}.gh.tar.gz +" +S=${WORKDIR}/pycares-${P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" +IUSE="test" +# Tests fail with network-sandbox, since they try to resolve google.com +PROPERTIES="test_network" +RESTRICT="test" + +DEPEND=" + net-dns/c-ares:= +" +BDEPEND=" + virtual/python-cffi[${PYTHON_USEDEP}] +" +RDEPEND=" + dev-python/idna[${PYTHON_USEDEP}] + ${DEPEND} + ${BDEPEND} +" +BDEPEND+=" + test? ( + dev-python/idna[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-c-ares-1.18.patch +) + +export PYCARES_USE_SYSTEM_LIB=1 + +python_test() { + "${EPYTHON}" tests/tests.py -v || die +} diff --git a/dev-python/pycares/pycares-4.2.1.ebuild b/dev-python/pycares/pycares-4.2.1.ebuild new file mode 100644 index 000000000000..aa636a8ce629 --- /dev/null +++ b/dev-python/pycares/pycares-4.2.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 + +DESCRIPTION="Python interface for c-ares" +HOMEPAGE=" + https://github.com/saghul/pycares/ + https://pypi.org/project/pycares/ +" +SRC_URI=" + https://github.com/saghul/pycares/archive/${P}.tar.gz + -> ${P}.gh.tar.gz +" +S=${WORKDIR}/pycares-${P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" +IUSE="test" +# Tests fail with network-sandbox, since they try to resolve google.com +PROPERTIES="test_network" +RESTRICT="test" + +DEPEND=" + net-dns/c-ares:= +" +BDEPEND=" + virtual/python-cffi[${PYTHON_USEDEP}] +" +RDEPEND=" + dev-python/idna[${PYTHON_USEDEP}] + ${DEPEND} + ${BDEPEND} +" +BDEPEND+=" + test? ( + dev-python/idna[${PYTHON_USEDEP}] + ) +" + +export PYCARES_USE_SYSTEM_LIB=1 + +python_test() { + "${EPYTHON}" tests/tests.py -v || die "Tests failed with ${EPYTHON}" +} -- cgit v1.2.3