Drop Fedora-specific patches to be able to use %autosetup without -N

Resolves: RHEL-17730
This commit is contained in:
Miro Hrončok 2024-02-07 22:24:00 +01:00
parent 4aaef7c0cc
commit f0d6be6722
3 changed files with 1 additions and 72 deletions

View File

@ -1,13 +0,0 @@
diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml
index 9dd060f8b..8004c7e76 100644
--- a/src/rust/Cargo.toml
+++ b/src/rust/Cargo.toml
@@ -15,7 +15,7 @@ cryptography-cffi = { path = "cryptography-cffi" }
cryptography-x509 = { path = "cryptography-x509" }
cryptography-openssl = { path = "cryptography-openssl" }
pem = "1.1"
-ouroboros = "0.15"
+ouroboros = "0.17"
openssl = "0.10.54"
openssl-sys = "0.9.88"
foreign-types-shared = "0.1"

View File

@ -1,52 +0,0 @@
diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml
index 01fba147e..9dd060f8b 100644
--- a/src/rust/Cargo.toml
+++ b/src/rust/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.56.0"
[dependencies]
once_cell = "1"
-pyo3 = { version = "0.18", features = ["abi3-py37"] }
+pyo3 = { version = "0.19", features = ["abi3-py37"] }
asn1 = { version = "0.15.2", default-features = false }
cryptography-cffi = { path = "cryptography-cffi" }
cryptography-x509 = { path = "cryptography-x509" }
diff --git a/src/rust/cryptography-cffi/Cargo.toml b/src/rust/cryptography-cffi/Cargo.toml
index 65051c2a4..24e53991b 100644
--- a/src/rust/cryptography-cffi/Cargo.toml
+++ b/src/rust/cryptography-cffi/Cargo.toml
@@ -8,7 +8,7 @@ publish = false
rust-version = "1.56.0"
[dependencies]
-pyo3 = { version = "0.18", features = ["abi3-py37"] }
+pyo3 = { version = "0.19", features = ["abi3-py37"] }
openssl-sys = "0.9.88"
[build-dependencies]
diff --git a/src/rust/src/x509/crl.rs b/src/rust/src/x509/crl.rs
index 923015035..1380d6eb8 100644
--- a/src/rust/src/x509/crl.rs
+++ b/src/rust/src/x509/crl.rs
@@ -145,7 +145,7 @@ impl CertificateRevocationList {
revoked_certs
});
- if idx.is_instance_of::<pyo3::types::PySlice>()? {
+ if idx.is_instance_of::<pyo3::types::PySlice>() {
let indices = idx
.downcast::<pyo3::types::PySlice>()?
.indices(self.len().try_into().unwrap())?;
diff --git a/src/rust/src/x509/extensions.rs b/src/rust/src/x509/extensions.rs
index 98d1bd63b..dcf28833f 100644
--- a/src/rust/src/x509/extensions.rs
+++ b/src/rust/src/x509/extensions.rs
@@ -211,7 +211,7 @@ fn encode_certificate_policies(
let mut qualifiers = vec![];
for py_qualifier in py_policy_qualifiers.iter()? {
let py_qualifier = py_qualifier?;
- let qualifier = if py_qualifier.is_instance_of::<pyo3::types::PyString>()? {
+ let qualifier = if py_qualifier.is_instance_of::<pyo3::types::PyString>() {
let cps_uri = match asn1::IA5String::new(py_qualifier.extract()?) {
Some(s) => s,
None => {

View File

@ -78,9 +78,6 @@ Source0: https://github.com/pyca/cryptography/archive/%{version}/%{srcnam
Source1: cryptography-%{version}-vendor.tar.bz2
Source2: conftest-skipper.py
Patch1: pyo3-0.19.patch
Patch2: ouroboros-0.17.patch
ExclusiveArch: %{rust_arches}
BuildRequires: openssl-devel
@ -175,11 +172,8 @@ cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
%prep
%autosetup -p1 -N -n %{srcname}-%{version}
%autosetup -p1 -n %{srcname}-%{version}
%if 0%{?fedora}
# patch pyo3 and ouroboros depedency
%autopatch -p1 1
%autopatch -p1 2
%cargo_prep
rm src/rust/Cargo.lock
%else