From 2dc3850b2309f4aa94bd7c96b4acc350598d6a1455048e241bb0b70dc88fcac0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 12 Aug 2025 22:09:12 +0000 Subject: [PATCH 1/2] - Update to 4.10.0 (actually fixes CVE-2025-48945, bsc#1244691) * Remove unused import by @saghul in #240 * Fixup chunked TXT record test by @saghul in #242 * Remove overzealous checks by @saghul in #241 * Fix OpenBSD build by @saghul in #243 * Make result.type Final by @Dreamsorcerer in #246 * Idna resource reduction using a length check by @Vizonex in #247 * Add read & write process_fd functions by @Vizonex in #245 * build(deps): bump pypa/cibuildwheel from 2.23.3 to 3.0.0 by @dependabot[bot] in #244 * Remove context manager support by @saghul in #252 * Fixup test CI by @saghul in #254 * Refactor channel destruction logic by @saghul in #253 - use system c-ares instead of bundled version OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycares?expand=0&rev=32 --- .gitattributes | 23 ++++++ .gitignore | 1 + cleanup_tests.patch | 9 ++ pycares-4.10.0.tar.gz | 3 + pycares-4.4.0.tar.gz | 3 + pycares-4.5.0.tar.gz | 3 + pycares-4.6.0.tar.gz | 3 + pycares-4.6.1.tar.gz | 3 + pycares-4.9.0.tar.gz | 3 + python-pycares.changes | 181 +++++++++++++++++++++++++++++++++++++++++ python-pycares.spec | 71 ++++++++++++++++ 11 files changed, 303 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cleanup_tests.patch create mode 100644 pycares-4.10.0.tar.gz create mode 100644 pycares-4.4.0.tar.gz create mode 100644 pycares-4.5.0.tar.gz create mode 100644 pycares-4.6.0.tar.gz create mode 100644 pycares-4.6.1.tar.gz create mode 100644 pycares-4.9.0.tar.gz create mode 100644 python-pycares.changes create mode 100644 python-pycares.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cleanup_tests.patch b/cleanup_tests.patch new file mode 100644 index 0000000..97de9db --- /dev/null +++ b/cleanup_tests.patch @@ -0,0 +1,9 @@ +--- + tests/__init__.py | 1 + + 1 file changed, 1 insertion(+) + +--- /dev/null ++++ b/tests/__init__.py +@@ -0,0 +1 @@ ++# This file intentionally left blank. +\ No newline at end of file diff --git a/pycares-4.10.0.tar.gz b/pycares-4.10.0.tar.gz new file mode 100644 index 0000000..e6b9a5e --- /dev/null +++ b/pycares-4.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9df70dce6e05afa5d477f48959170e569485e20dad1a089c4cf3b2d7ffbd8bf9 +size 654318 diff --git a/pycares-4.4.0.tar.gz b/pycares-4.4.0.tar.gz new file mode 100644 index 0000000..aed7105 --- /dev/null +++ b/pycares-4.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f47579d508f2f56eddd16ce72045782ad3b1b3b678098699e2b6a1b30733e1c2 +size 821630 diff --git a/pycares-4.5.0.tar.gz b/pycares-4.5.0.tar.gz new file mode 100644 index 0000000..4581563 --- /dev/null +++ b/pycares-4.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:025b6c2ffea4e9fb8f9a097381c2fecb24aff23fbd6906e70da22ec9ba60e19d +size 821554 diff --git a/pycares-4.6.0.tar.gz b/pycares-4.6.0.tar.gz new file mode 100644 index 0000000..f48a8e2 --- /dev/null +++ b/pycares-4.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8a004b18a7465ac9400216bc3fad9d9966007af1ee32f4412d2b3a94e33456e +size 822080 diff --git a/pycares-4.6.1.tar.gz b/pycares-4.6.1.tar.gz new file mode 100644 index 0000000..8a5db00 --- /dev/null +++ b/pycares-4.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1d981206a16240eedc79b51af3293575715d4b0b971f4eb47e24839d5ab440 +size 822359 diff --git a/pycares-4.9.0.tar.gz b/pycares-4.9.0.tar.gz new file mode 100644 index 0000000..684d8e0 --- /dev/null +++ b/pycares-4.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ee484ddb23dbec4d88d14ed5b6d592c1960d2e93c385d5e52b6fad564d82395 +size 655365 diff --git a/python-pycares.changes b/python-pycares.changes new file mode 100644 index 0000000..7ef006d --- /dev/null +++ b/python-pycares.changes @@ -0,0 +1,181 @@ +------------------------------------------------------------------- +Fri Aug 8 12:39:36 UTC 2025 - Nico Krapp + +- Update to 4.10.0 (actually fixes CVE-2025-48945, bsc#1244691) + * Remove unused import by @saghul in #240 + * Fixup chunked TXT record test by @saghul in #242 + * Remove overzealous checks by @saghul in #241 + * Fix OpenBSD build by @saghul in #243 + * Make result.type Final by @Dreamsorcerer in #246 + * Idna resource reduction using a length check by @Vizonex in #247 + * Add read & write process_fd functions by @Vizonex in #245 + * build(deps): bump pypa/cibuildwheel from 2.23.3 to 3.0.0 + by @dependabot[bot] in #244 + * Remove context manager support by @saghul in #252 + * Fixup test CI by @saghul in #254 + * Refactor channel destruction logic by @saghul in #253 +- use system c-ares instead of bundled version + +------------------------------------------------------------------- +Wed Jun 18 12:58:39 UTC 2025 - Nico Krapp + +- Update to 4.9.0 (fixes CVE-2025-48945, bsc#1244691) + * Create dependabot configuration by @bdraco in #226 + * build(deps): bump pypa/cibuildwheel from 2.22.0 to 2.23.3 + by @dependabot in #227 + * Pin Python version to 3.13.3 to avoid Windows build error by @saghul in #235 + * Fix shutdown race by @bdraco in #236 + * Add support for windows arm64 by @finnagin in #233 +- Update to 4.8.0 + * Cancel previous CI jobs on pull request update by @bdraco in #222 + * Update bundled c-ares to v1.34.5 by @bdraco in #221 + * Add ARES_FLAG_NO_DFLT_SVR and ARES_FLAG_EDNS to API by @bdraco in #224 +- Update to 4.7.0 + * Update c-ares to 1.29.0 to add reinit support to Channel by @bdraco in #219 + * Add event thread support by @bdraco in #220 + +------------------------------------------------------------------- +Mon Apr 28 16:43:05 UTC 2025 - Dirk Müller + +- update to 4.6.1: + * Fix missing attribute type information for errno + +------------------------------------------------------------------- +Fri Apr 11 07:18:09 UTC 2025 - Matej Cepl + +- Clean up the SPEC file. + +------------------------------------------------------------------- +Thu Apr 10 12:28:57 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 4.6.0 + * Swap out is_all_ascii for built-in str.isascii by @bdraco in (#209) + * Fixup tests by @saghul in (#214) + * Add initial type annotations by @Dreamsorcerer in (#212) + * Fix module has no attribute type errors by @Dreamsorcerer in (#211) + +------------------------------------------------------------------- +Fri Jan 10 09:20:14 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 4.5.0 + * Test data updates to fix test failures + * Update test_idna_encoding_query_a with + new errno to align to new c-ares version + * Do not define HAVE_GETSERVBYPORT_R for + platforms Android, Cygwin, Darwin + * Drop distutils + * build(deps): bump actions/download-artifact + from 3 to 4.1.7 in /.github/workflows + * Add 3.13 support, remove 3.8 + * chore(ci): fix upload & add more platforms to cibuildwheel + * Test building release wheels on PRs + * Fix building sdist + * Fixup CI + +------------------------------------------------------------------- +Mon Dec 11 08:24:45 UTC 2023 - Dirk Müller + +- update to 4.4.0: + * Add support for 3.12, drop EOL 3.7 + +------------------------------------------------------------------- +Fri Apr 21 12:30:27 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:43:34 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Tue Dec 13 16:24:44 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 4.3.0 + * Bump cibuildwheel to build for Python 3.11 + CI total time speedups by @Jackenmen in #174 + Fix tests that depended on external sites by @Jackenmen in #180 + Complete the Python 3.11 support by @Jackenmen in #179 + Drop CPython 3.6 by @saghul in #181 + Improve test compatibility with pytest by @saghul in #182 + Update c-ares submodule to 1.18.1 by @saghul in #183 + +------------------------------------------------------------------- +Thu Dec 8 22:21:16 UTC 2022 - Matej Cepl + +- Add cleanup_tests.patch to make the test suite slightly more sane. +- No, the test suite is just broken, and the upstream doesn't care. + +------------------------------------------------------------------- +Tue Oct 4 23:59:04 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 4.2.2 + no changelog + +------------------------------------------------------------------- +Mon Jul 11 13:59:59 UTC 2022 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 4.2.1: + * core: add flexible member to ares_addrinfo to fix c-ares 1.18 + +- changes from version 4.2.0: + * tests: ignoring 2 tests due to dead servers + * tests: updated google TXT records for an outdated test + * deps: update bundled c-ares + +- changes from version 4.1.2: + * build: add PYPIREADME.rst to manifest + +- changes from version 4.1.1: + * misc: add PyPI README without images + * misc: update c-ares URL + +- changes from version 4.1.0: + * ci: use stable 3.10, rather than dev + * core: add support for Python 3.10 + * doc: fix typo in README + * doc: updatee changelog + * doc: uppdate README + * core: add support for CAA queries + * core: add support for getaddrinfo() + * doc: update README + * core: add ability to use the system installed c-ares + +------------------------------------------------------------------- +Mon May 31 11:54:19 UTC 2021 - Adrian Schröter + +- update to 4.0.0 + * core: add support for CAA queries + * core: add support for getaddrinfo() + * core: add ability to use the system installed c-ares + * test: remove TTL tests + * core: update c-ares and use a submodule + * core: drop bundled c-ares version + * misc: drop tasks.py + +------------------------------------------------------------------- +Thu Mar 19 12:52:26 UTC 2020 - Marketa Calabkova + +- Update to 3.1.1 + * misc: add Python 3.8 classifier + * ci: run tests in Python 3.8 too + * test: remove no longer valid test + * test: remove empty test + * errno: return str from errno.strerror + * core: fix crash when processing .onion queries + * core: fix support for ARES_OPT_LOOKUPS option + * misc: simplify non-ascii txt test example + * core: fix long TXT record with non-ascii bytes + +------------------------------------------------------------------- +Thu Mar 21 13:59:43 UTC 2019 - Ondřej Súkup + +- update to 3.0.0 + * first stable version in 3.0 series + +------------------------------------------------------------------- +Fri Mar 1 07:55:18 UTC 2019 - Ondřej Súkup + +- initial commit diff --git a/python-pycares.spec b/python-pycares.spec new file mode 100644 index 0000000..0440ee4 --- /dev/null +++ b/python-pycares.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-pycares +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-pycares +Version: 4.10.0 +Release: 0 +Summary: Python interface for c-ares +License: MIT +Group: Development/Languages/Python +URL: https://github.com/saghul/pycares +Source: https://files.pythonhosted.org/packages/source/p/pycares/pycares-%{version}.tar.gz +# PATCH-FIX-UPSTREAM cleanup_tests.patch bsc#[0-9]+ mcepl@suse.com +# Make the test suite slightly more normal +Patch0: cleanup_tests.patch +BuildRequires: %{python_module cffi} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: c-ares-devel +BuildRequires: fdupes +BuildRequires: gcc +BuildRequires: python-rpm-macros +Requires: python-cffi +Recommends: python-idna +%python_subpackages + +%description +pycares is a Python module which provides an interface to +c-ares. c-ares is a C library that performs DNS requests and name +resolutions asynchronously + +%prep +%autosetup -p1 -n pycares-%{version} + +%build +export PYCARES_USE_SYSTEM_LIB=1 +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +# Test suite is broken anywhere else outside of the upstream CI, +# and upstream doesn't care. +# %%pyunittest_arch -v tests.tests + +%files %{python_files} +%license LICENSE +%doc ChangeLog README.rst +%{python_sitearch}/pycares +%{python_sitearch}/pycares-%{version}*-info + +%changelog From e507b4114fe221abeaa8e97050cca44f1bdae942ece7cafcad68d918c512f51c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 12 Aug 2025 23:06:28 +0000 Subject: [PATCH 2/2] - add python-pycares.rpmlintrc to ignore false positive of using gethostbyname. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycares?expand=0&rev=33 --- python-pycares.changes | 2 ++ python-pycares.rpmlintrc | 1 + python-pycares.spec | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 python-pycares.rpmlintrc diff --git a/python-pycares.changes b/python-pycares.changes index 7ef006d..e61a627 100644 --- a/python-pycares.changes +++ b/python-pycares.changes @@ -15,6 +15,8 @@ Fri Aug 8 12:39:36 UTC 2025 - Nico Krapp * Fixup test CI by @saghul in #254 * Refactor channel destruction logic by @saghul in #253 - use system c-ares instead of bundled version +- add python-pycares.rpmlintrc to ignore false positive of using + gethostbyname. ------------------------------------------------------------------- Wed Jun 18 12:58:39 UTC 2025 - Nico Krapp diff --git a/python-pycares.rpmlintrc b/python-pycares.rpmlintrc new file mode 100644 index 0000000..0962594 --- /dev/null +++ b/python-pycares.rpmlintrc @@ -0,0 +1 @@ +addFilter("binary-or-shlib-calls-gethostbyname") diff --git a/python-pycares.spec b/python-pycares.spec index 0440ee4..659f25c 100644 --- a/python-pycares.spec +++ b/python-pycares.spec @@ -24,7 +24,8 @@ Summary: Python interface for c-ares License: MIT Group: Development/Languages/Python URL: https://github.com/saghul/pycares -Source: https://files.pythonhosted.org/packages/source/p/pycares/pycares-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/pycares/pycares-%{version}.tar.gz +Source99: python-pycares.rpmlintrc # PATCH-FIX-UPSTREAM cleanup_tests.patch bsc#[0-9]+ mcepl@suse.com # Make the test suite slightly more normal Patch0: cleanup_tests.patch