From 643678da68a1482fbec03192fac52c99340730ef Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 5 Apr 2024 18:47:47 +0800 Subject: [PATCH 1/3] add: pip-system-certs --- anda/langs/python/pip-system-certs/anda.hcl | 5 ++ .../python-pip-system-certs.spec | 56 +++++++++++++++++++ .../langs/python/pip-system-certs/update.rhai | 1 + 3 files changed, 62 insertions(+) create mode 100644 anda/langs/python/pip-system-certs/anda.hcl create mode 100644 anda/langs/python/pip-system-certs/python-pip-system-certs.spec create mode 100644 anda/langs/python/pip-system-certs/update.rhai diff --git a/anda/langs/python/pip-system-certs/anda.hcl b/anda/langs/python/pip-system-certs/anda.hcl new file mode 100644 index 0000000000..238551b593 --- /dev/null +++ b/anda/langs/python/pip-system-certs/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "python-pip-system-certs.spec" + } +} diff --git a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec new file mode 100644 index 0000000000..ee84fd96fe --- /dev/null +++ b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec @@ -0,0 +1,56 @@ +# Created by pyp2rpm-3.3.10 +%global pypi_name pip-system-certs +%global pypi_version 4.0 + +Name: python-%{pypi_name} +Version: %{pypi_version} +Release: 1%{?dist} +Summary: Live patches pip to use system certs by default + +License: BSD-2-Clause +URL: https://gitlab.com/alelec/pip-system-certs +Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/pip_system_certs-%{pypi_version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel python3-pip python3dist(setuptools) python3dist(wheel) + + +%description +This package patches pip and requests at runtime to use +certificates from the default system store (rather than the bundled certs +ca). This will allow pip to verify tls/ssl connections to servers who's cert is +trusted by your system install. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(wrapt) >= 1.10.4 +%description -n python3-%{pypi_name} +This package patches pip and requests at runtime to use +certificates from the default system store (rather than the bundled certs +ca). This will allow pip to verify tls/ssl connections to servers who's cert is +trusted by your system install. + +%prep +%autosetup -n pip_system_certs-%{pypi_version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +pip install git-versioner +%pyproject_wheel + +%install +%pyproject_install + +%pyproject_save_files pip_system_certs + +%files -n python3-%{pypi_name} -f %pyproject_files +%license LICENSE +%doc README.rst +%python3_sitelib/pip_system_certs.pth + +%changelog +* Thu Apr 04 2024 madomado - 4.0-1 +- Initial package. diff --git a/anda/langs/python/pip-system-certs/update.rhai b/anda/langs/python/pip-system-certs/update.rhai new file mode 100644 index 0000000000..a08ae89c6a --- /dev/null +++ b/anda/langs/python/pip-system-certs/update.rhai @@ -0,0 +1 @@ +rpm.global("pypi_version", pypi("pip-system-certs")); From 3d42100aac4d153ee52f5ba0befef137a70cc2fd Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 5 Apr 2024 18:54:29 +0800 Subject: [PATCH 2/3] git --- anda/langs/python/pip-system-certs/python-pip-system-certs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec index ee84fd96fe..6dfc694f2c 100644 --- a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec +++ b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec @@ -12,7 +12,7 @@ URL: https://gitlab.com/alelec/pip-system-certs Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/pip_system_certs-%{pypi_version}.tar.gz BuildArch: noarch -BuildRequires: python3-devel python3-pip python3dist(setuptools) python3dist(wheel) +BuildRequires: python3-devel python3-pip python3dist(setuptools) python3dist(wheel) git %description From 4e5a701caf46d1ecbefd58b2c2606cd41bdda8c5 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 5 Apr 2024 21:18:09 +0800 Subject: [PATCH 3/3] Update anda.hcl Signed-off-by: madomado --- anda/langs/python/pip-system-certs/anda.hcl | 1 + 1 file changed, 1 insertion(+) diff --git a/anda/langs/python/pip-system-certs/anda.hcl b/anda/langs/python/pip-system-certs/anda.hcl index 238551b593..c480550cba 100644 --- a/anda/langs/python/pip-system-certs/anda.hcl +++ b/anda/langs/python/pip-system-certs/anda.hcl @@ -1,4 +1,5 @@ project pkg { + arches = ["x86_64"] rpm { spec = "python-pip-system-certs.spec" }