From d4f9211a5528028afbdc8127692d84c00ff02603 Mon Sep 17 00:00:00 2001 From: mcepl <> Date: Aug 01 2022 20:21:04 +0000 Subject: Update python-truststore to version 0.4.0 / rev 1 via SR 991821 https://build.opensuse.org/request/show/991821 by user mcepl + RBrownFactory Will be used by the next version of pip. --- diff --git a/.files b/.files new file mode 100644 index 0000000..ddb7fbf Binary files /dev/null and b/.files differ diff --git a/.meta b/.meta new file mode 100644 index 0000000..867deee --- /dev/null +++ b/.meta @@ -0,0 +1,6 @@ + + Verify certificates using OS trust stores + Verify certificates using OS trust stores. Supports macOS, Windows, and Linux (with OpenSSL). This project should be considered experimental. + + https://github.com/sethmlarson/truststore + diff --git a/.rev b/.rev new file mode 100644 index 0000000..c4ce6f0 --- /dev/null +++ b/.rev @@ -0,0 +1,10 @@ + + + 2544ecb66300fb146eaa9d31272cc670 + 0.4.0 + + RBrownFactory + Will be used by the next version of pip. + 991821 + + diff --git a/no-network-testing.patch b/no-network-testing.patch new file mode 100644 index 0000000..bbf080e --- /dev/null +++ b/no-network-testing.patch @@ -0,0 +1,44 @@ +--- + pyproject.toml | 3 +++ + test_truststore.py | 7 +++---- + 2 files changed, 6 insertions(+), 4 deletions(-) + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -26,3 +26,6 @@ Home = "https://github.com/sethmlarson/t + [tool.pytest.ini_options] + asyncio_mode = "strict" + filterwarnings = ["error"] ++markers = [ ++ "network: test case requires network connection", ++] +--- a/test_truststore.py ++++ b/test_truststore.py +@@ -21,7 +21,7 @@ import truststore + # if the client drops the connection due to a cert verification error + socket.setdefaulttimeout(10) + +-successful_hosts = pytest.mark.parametrize("host", ["example.com", "1.1.1.1"]) ++successful_hosts = pytest.mark.network + + + @dataclass +@@ -113,9 +113,7 @@ if platform.system() != "Linux": + ) + ) + +-failure_hosts = pytest.mark.parametrize( +- "failure", failure_hosts_list, ids=attrgetter("host") +-) ++failure_hosts = pytest.mark.network + + + @pytest.fixture(scope="session") +@@ -242,6 +240,7 @@ def test_trustme_cert_loaded_via_capath( + assert len(resp.data) > 0 + + ++@pytest.mark.network + def test_trustme_cert_still_uses_system_certs(trustme_ca): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + trustme_ca.configure_trust(ctx) diff --git a/python-truststore.changes b/python-truststore.changes new file mode 100644 index 0000000..2762dbb --- /dev/null +++ b/python-truststore.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Thu Jul 28 15:00:19 UTC 2022 - Matej Cepl + +- Initial packaging effort for truststore 0.4.0. +- Add no-network-testing.patch to skip networked tests + (gh#sethmlarson/truststore#65). diff --git a/python-truststore.spec b/python-truststore.spec new file mode 100644 index 0000000..25f4c78 --- /dev/null +++ b/python-truststore.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-truststore +# +# Copyright (c) 2022 SUSE LLC +# +# 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/ +# + + +%define skip_python2 1 +%define skip_python38 1 +%define skip_python39 1 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-truststore +Version: 0.4.0 +Release: 0 +Summary: Verify certificates using OS trust stores +License: MIT +URL: https://github.com/sethmlarson/truststore +Source: https://github.com/sethmlarson/truststore/archive/refs/tags/v%{version}.tar.gz#/truststore-%{version}.tar.gz +# PATCH-FEATURE-UPSTREAM no-network-testing.patch bsc#[0-9]+ mcepl@suse.com +# skip tests requiring network access +Patch0: no-network-testing.patch +BuildRequires: %{python_module aiohttp} +BuildRequires: %{python_module flit-core} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-httpserver} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module trustme} +BuildRequires: %{python_module urllib3} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +Verify certificates using OS trust stores. Supports macOS, +Windows, and Linux (with OpenSSL). This project should be +considered experimental. + +%prep +%autosetup -p1 -n truststore-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -s -k 'not network' + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/truststore +%{python_sitelib}/truststore-%{version}*-info + +%changelog diff --git a/truststore-0.4.0.tar.gz b/truststore-0.4.0.tar.gz new file mode 120000 index 0000000..8d8c352 --- /dev/null +++ b/truststore-0.4.0.tar.gz @@ -0,0 +1 @@ +/ipfs/bafkreihii4qqawv263b2txa6hbjdcmbtj7i6a7l6zcy5yysluzpcsgbkbm \ No newline at end of file