python-cryptography/python-cryptography.spec

186 lines
5.4 KiB
RPMSpec
Raw Normal View History

2023-05-19 16:04:53 +08:00
%global pypi_name cryptography
Name: python-%{pypi_name}
2024-02-01 10:44:07 +08:00
Version: 42.0.2
Release: 4
2020-02-13 16:45:17 +08:00
Summary: PyCA's cryptography library
License: ASL 2.0 or BSD
2020-08-08 16:27:57 +08:00
URL: https://cryptography.io/en/latest/
2023-05-19 16:04:53 +08:00
Source0: %{pypi_source %{pypi_name}}
2024-02-01 10:44:07 +08:00
# For Rust offline compile
# Decompress the source code of cryptography, then enter ./src/rust directory,
# execute "cargo vendor" to obtain "vendor" directory (Internet connection required),
# finally, tar -czvf cargo-vendor-cache.tar.gz vendor
# Note: Cargo needs to be consistent with the cargo version in the compile environment.
2023-05-19 16:04:53 +08:00
Source1: cargo-vendor-cache.tar.gz
2020-08-08 16:27:57 +08:00
2023-05-19 16:04:53 +08:00
Patch6002: backport-provide-openssl-apis-related-to-SM-for-python.patch
2024-02-27 09:39:15 +08:00
Patch6003: backport-CVE-2024-26130.patch
2023-02-14 17:10:23 +08:00
BuildRequires: openssl-devel cargo
2020-02-13 16:45:17 +08:00
BuildRequires: gcc
BuildRequires: rust-packaging rust
2020-02-13 16:45:17 +08:00
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-pytest >= 3.2.1
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-pretend
BuildRequires: python%{python3_pkgversion}-iso8601
BuildRequires: python%{python3_pkgversion}-cryptography-vectors = %{version}
BuildRequires: python%{python3_pkgversion}-hypothesis >= 1.11.4
BuildRequires: python%{python3_pkgversion}-pytz
2024-02-01 10:44:07 +08:00
BuildRequires: python%{python3_pkgversion}-cffi >= 1.12
BuildRequires: python%{python3_pkgversion}-setuptools-rust >= 1.7.0
BuildRequires: python%{python3_pkgversion}-wheel
BuildRequires: python3-pip
BuildRequires: python3-pytest-subtests
BuildRequires: python3-pytest-benchmark
BuildRequires: python3-certifi
BuildRequires: python3-bcrypt
2024-02-01 10:44:07 +08:00
2019-09-30 11:14:49 -04:00
%description
2020-02-13 16:45:17 +08:00
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
2023-05-19 16:04:53 +08:00
%package -n python%{python3_pkgversion}-%{pypi_name}
2020-02-13 16:45:17 +08:00
Summary: PyCA's cryptography library
Requires: openssl-libs
2024-02-01 10:44:07 +08:00
Requires: python%{python3_pkgversion}-cffi >= 1.12
2019-09-30 11:14:49 -04:00
2023-05-19 16:04:53 +08:00
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
2019-09-30 11:14:49 -04:00
2023-05-19 16:04:53 +08:00
%description -n python%{python3_pkgversion}-%{pypi_name}
2020-02-13 16:45:17 +08:00
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
2019-09-30 11:14:49 -04:00
%package_help
%prep
2023-05-19 16:04:53 +08:00
%autosetup -n %{pypi_name}-%{version} -p1
tar xzvf %{SOURCE1} -C ./src/rust/
mkdir .cargo
cat >> .cargo/config.toml << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "src/rust/vendor"
[profile.release]
debug = true # https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo
EOF
2020-02-13 16:45:17 +08:00
2019-09-30 11:14:49 -04:00
%build
2024-02-01 10:44:07 +08:00
%pyproject_build
2019-09-30 11:14:49 -04:00
%install
2024-02-01 10:44:07 +08:00
%pyproject_install
2019-09-30 11:14:49 -04:00
%check
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest --ignore vendor
2019-09-30 11:14:49 -04:00
2023-05-19 16:04:53 +08:00
%files -n python%{python3_pkgversion}-%{pypi_name}
2020-02-13 16:45:17 +08:00
%defattr(-,root,root)
#%doc AUTHORS.rst
2020-02-13 16:45:17 +08:00
%license LICENSE LICENSE.APACHE LICENSE.BSD
2023-05-19 16:04:53 +08:00
%{python3_sitearch}/%{pypi_name}
2024-02-01 10:44:07 +08:00
%{python3_sitearch}/%{pypi_name}-%{version}.dist-info
2019-09-30 11:14:49 -04:00
%files help
2020-02-13 16:45:17 +08:00
%defattr(-,root,root)
%doc README.rst docs
2019-09-30 11:14:49 -04:00
%changelog
* Fri Jul 26 2024 shixuantong <shixuantong1@huawei.com> - 42.0.2-4
- enable check
* Thu Apr 18 2024 shixuantong <shixuantong1@huawei.com> - 42.0.2-3
- set debug is true for build debug package
- add rust to BuildRequires
2024-02-27 09:39:15 +08:00
* Tue Feb 27 2024 shixuantong <shixuantong1@huawei.com> - 42.0.2-2
- fix CVE-2024-26130
2024-02-01 10:44:07 +08:00
* Thu Feb 01 2024 shixuantong <shixuantong1@huawei.com> - 42.0.2-1
- upgrade version to 42.0.2
2023-12-23 16:56:36 +08:00
* Sat Dec 23 2023 shixuanttong <shixuantong1@huawei.com> - 40.0.2-5
- update author info for Patch6002
* Sat Dec 2 2023 liningjie <liningjie@xfusion.com> - 40.0.2-4
- raise an exception instead of returning an empty list for pkcs7 cert loading
* Wed Nov 29 2023 liningjie <liningjie@xfusion.com> - 40.0.2-3
- Fixed crash when loading a PKCS#7 bundle with no certificates
2023-07-25 20:00:00 +08:00
* Tue Jul 25 2023 shixuantong <shixuantong1@huawei.com> - 40.0.2-2
- fix CVE-2023-38325
2023-05-19 16:04:53 +08:00
* Fri May 19 2023 Dongxing Wang <dxwangk@isoftstone.com> - 40.0.2-1
- Upgrade package to 40.0.2
2023-02-14 17:10:23 +08:00
* Tue Feb 14 2023 zhuofeng<zhuofeng2@huawei.com> - 39.0.0-2
- Type:CVE
- CVE:CVE-2023-23931
- SUG:NA
- DESC:fix CVE-2023-23931
2023-02-03 11:40:27 +08:00
* Fri Feb 3 2023 huangduirong <huangduirong@huawei.com> - 39.0.0-1
- Upgrade package to 39.0.0
* Tue Jul 19 2022 huangtianhua <huangtianhua@huawei.com> - 36.0.1-1
- Upgrade package to 36.0.1
* Fri Jul 01 2022 tianwei<tianwei12@h-partners.com> -3.3.1-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: provide openssl apis related to SM for python
* Thu Jun 30 2022 tianwei<tianwei12@h-partners.com> -3.3.1-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add SM4 symmetric block cipher
2021-02-23 09:56:05 +08:00
* Tue Feb 23 2021 shixuantong <shixuantong@huawei.com> - 3.3.1-2
- fix CVE-2020-36242
2021-02-01 14:38:23 +08:00
* Mon Feb 1 2021 liudabo <liudabo1@huawei.com> - 3.3.1-1
- upgrade version to 3.3.1
2020-08-11 16:12:48 +08:00
* Tue Aug 11 2020 tianwei<tianwei12@huawei.com> -3.0-2
2020-08-08 16:27:57 +08:00
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:delete python2
2020-07-24 17:19:17 +08:00
* Thu Jul 23 2020 dingyue<dingyue5@huawei.com> -3.0-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:NA
2020-05-11 16:20:09 +08:00
* Thu Apr 16 2020 chengquan<chengquan3@huawei.com> -2.9-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:upgrade software to v2.9
2020-02-13 16:45:17 +08:00
* Thu Feb 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.6.1-1
- Update to 2.6.1
2019-11-06 19:48:59 +08:00
* Tue Oct 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-5
- Package rebuild.
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-4
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: fix build failed.
* Sat Sep 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-3
- Package init.