From 2ee05a1705c25e0500bfb8a68ea32ed978bf5156 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 23 Nov 2022 11:41:26 +0100 Subject: [PATCH] Update to version 1.11.0; Fixes RHBZ#2143959 --- .gitignore | 1 + rust-sequoia-openpgp.spec | 23 +++++---- .rust2rpm.conf => rust2rpm.conf | 0 sequoia-openpgp-fix-metadata-auto.diff | 49 +++++++++++++++++++ sequoia-openpgp-fix-metadata.diff | 65 +++++++++++--------------- sources | 2 +- 6 files changed, 91 insertions(+), 49 deletions(-) rename .rust2rpm.conf => rust2rpm.conf (100%) create mode 100644 sequoia-openpgp-fix-metadata-auto.diff diff --git a/.gitignore b/.gitignore index c9aaf45..219bcc8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /sequoia-openpgp-1.7.0.crate /sequoia-openpgp-1.8.0.crate /sequoia-openpgp-1.10.0.crate +/sequoia-openpgp-1.11.0.crate diff --git a/rust-sequoia-openpgp.spec b/rust-sequoia-openpgp.spec index 8bd2f70..32423a6 100644 --- a/rust-sequoia-openpgp.spec +++ b/rust-sequoia-openpgp.spec @@ -1,23 +1,24 @@ -# Generated by rust2rpm 21 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate sequoia-openpgp -Name: rust-%{crate} -Version: 1.10.0 +Name: rust-sequoia-openpgp +Version: 1.11.0 Release: %autorelease Summary: OpenPGP data types and associated machinery -# Upstream license specification: LGPL-2.0-or-later -License: LGPLv2+ +License: LGPL-2.0-or-later URL: https://crates.io/crates/sequoia-openpgp Source: %{crates_source} -# Initial patched metadata -# * drop windows- and WASM-specific dependencies -Patch0: sequoia-openpgp-fix-metadata.diff - -ExclusiveArch: %{rust_arches} +# Automatically generated patch to strip foreign dependencies +Patch: sequoia-openpgp-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop feature for Windows-specific crypto backend +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +# * drop example-only rpassword dev-dependency (currently too old in Fedora) +Patch: sequoia-openpgp-fix-metadata.diff BuildRequires: rust-packaging >= 21 @@ -162,6 +163,8 @@ use the "nettle" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 +# remove examples which depend on rpassword +rm examples/{notarize.rs,sign.rs,sign-detached.rs} %cargo_prep %generate_buildrequires diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 100% rename from .rust2rpm.conf rename to rust2rpm.conf diff --git a/sequoia-openpgp-fix-metadata-auto.diff b/sequoia-openpgp-fix-metadata-auto.diff new file mode 100644 index 0000000..28da1eb --- /dev/null +++ b/sequoia-openpgp-fix-metadata-auto.diff @@ -0,0 +1,49 @@ +--- sequoia-openpgp-1.11.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sequoia-openpgp-1.11.0/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -264,8 +264,6 @@ + ] + crypto-cng = [ + "eax", +- "winapi", +- "win-crypto-ng", + "ed25519-dalek", + "num-bigint-dig", + ] +@@ -303,37 +301,6 @@ + "crypto-nettle", + ] + +-[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.chrono] +-version = "0.4.10" +-features = [ +- "std", +- "wasmbind", +-] +-default-features = false +- +-[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.getrandom] +-version = "0.2" +-features = ["js"] +- +-[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.rand07] +-version = "0.7" +-features = ["wasm-bindgen"] +-package = "rand" +- +-[target."cfg(windows)".dependencies.win-crypto-ng] +-version = "0.4" +-features = [ +- "rand", +- "block-cipher", +-] +-optional = true +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.8" +-features = ["bcrypt"] +-optional = true +-default-features = false +- + [badges.gitlab] + repository = "sequoia-pgp/sequoia" + diff --git a/sequoia-openpgp-fix-metadata.diff b/sequoia-openpgp-fix-metadata.diff index b337eb8..48d5a7f 100644 --- a/sequoia-openpgp-fix-metadata.diff +++ b/sequoia-openpgp-fix-metadata.diff @@ -1,56 +1,45 @@ ---- sequoia-openpgp-1.10.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ sequoia-openpgp-1.10.0/Cargo.toml 2022-07-08T14:36:57.589355+00:00 -@@ -33,9 +33,6 @@ +--- sequoia-openpgp-1.11.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sequoia-openpgp-1.11.0/Cargo.toml 2022-11-23T10:33:00.673143+00:00 +@@ -50,10 +50,6 @@ name = "pad" required-features = ["compression-deflate"] -[[bench]] -name = "run_benchmarks" -harness = false +- [dependencies.aes] version = "0.6.0" optional = true -@@ -201,9 +198,6 @@ - [dependencies.xxhash-rust] +@@ -229,19 +225,12 @@ version = "0.8" features = ["xxh3"] + -[dev-dependencies.criterion] -version = "0.3.4" -features = ["html_reports"] - +- [dev-dependencies.quickcheck] version = "1" -@@ -224,33 +218,9 @@ - compression = ["compression-deflate", "compression-bzip2"] - compression-bzip2 = ["bzip2", "buffered-reader/compression-bzip2"] - compression-deflate = ["flate2", "buffered-reader/compression-deflate"] --crypto-cng = ["eax", "winapi", "win-crypto-ng", "ed25519-dalek", "num-bigint-dig"] - crypto-nettle = ["nettle"] - crypto-rust = ["aes", "block-modes", "block-padding", "blowfish", "cast5", "cipher", "des", "digest", "eax", "ed25519-dalek", "generic-array", "idea", "md-5", "num-bigint-dig", "rand07", "ripemd160", "rsa", "sha-1", "sha2", "twofish", "typenum", "x25519-dalek", "p256", "rand_core", "rand_core/getrandom", "ecdsa"] - default = ["compression", "crypto-nettle"] --[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.chrono] --version = "0.4.10" --features = ["std", "wasmbind"] --default-features = false -- --[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.getrandom] --version = "0.2" --features = ["js"] -- --[target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.rand07] --version = "0.7" --features = ["wasm-bindgen"] --package = "rand" --[target."cfg(windows)".dependencies.win-crypto-ng] --version = "0.4" --features = ["rand", "block-cipher"] --optional = true + default-features = false + + [dev-dependencies.rand] + version = "0.8" - --[target."cfg(windows)".dependencies.winapi] --version = "0.3.8" --features = ["bcrypt"] --optional = true --default-features = false - [badges.gitlab] - repository = "sequoia-pgp/sequoia" +-[dev-dependencies.rpassword] +-version = "6.0" + [build-dependencies.lalrpop] + version = ">=0.17" +@@ -261,11 +250,6 @@ + compression-deflate = [ + "flate2", + "buffered-reader/compression-deflate", +-] +-crypto-cng = [ +- "eax", +- "ed25519-dalek", +- "num-bigint-dig", + ] + crypto-nettle = ["nettle"] + crypto-rust = [ diff --git a/sources b/sources index 45181ae..7bdcf23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sequoia-openpgp-1.10.0.crate) = c99a1381f4a9c4206081502d26cb5b50077a66c984bf8285ca31f34a8c04b61c0963aff2b27237e1aced82a637e5e9b9822e334c8a7b18226430294e74b3864b +SHA512 (sequoia-openpgp-1.11.0.crate) = 46204f357783459b07d52ea13ff82f0fb1bae2e17247dd5716fbdc47ba4f90f1b31889462f3d8b78cc9d77b50058650ee8afc0d67785cfe3298e6ee597935414