From cbbaa237e157680cb8d1e9b650c2a0b65add030a Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 28 Jan 2023 22:10:39 +0100 Subject: [PATCH] Update to version 2.1.1; Fixes RHBZ#2165033 --- .gitignore | 1 + ...-build-drop-unavailable-ECC-functions.patch | 10 +++++----- nettle-sys-fix-metadata-auto.diff | 8 ++++++++ nettle-sys-fix-metadata.diff | 18 +++++------------- rust-nettle-sys.spec | 18 +++++++----------- .rust2rpm.conf => rust2rpm.conf | 0 sources | 2 +- 7 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 nettle-sys-fix-metadata-auto.diff rename .rust2rpm.conf => rust2rpm.conf (100%) diff --git a/.gitignore b/.gitignore index f59843a..12f74d8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /nettle-sys-2.0.7.crate /nettle-sys-2.0.8.crate /nettle-sys-2.1.0.crate +/nettle-sys-2.1.1.crate diff --git a/0001-build-drop-unavailable-ECC-functions.patch b/0001-build-drop-unavailable-ECC-functions.patch index b24aa5e..26f1634 100644 --- a/0001-build-drop-unavailable-ECC-functions.patch +++ b/0001-build-drop-unavailable-ECC-functions.patch @@ -12,11 +12,11 @@ index 7a7c524..3831fed 100644 --- a/build.rs +++ b/build.rs @@ -184,6 +184,8 @@ fn real_main() -> Result<()> { - .blacklist_function("qgcvt") - .blacklist_function("qecvt_r") - .blacklist_function("qfcvt_r") -+ .blacklist_function("nettle_get_secp_192r1") -+ .blacklist_function("nettle_get_secp_224r1") + .blocklist_function("qgcvt") + .blocklist_function("qecvt_r") + .blocklist_function("qfcvt_r") ++ .blocklist_function("nettle_get_secp_192r1") ++ .blocklist_function("nettle_get_secp_224r1") .size_t_is_usize(true); if config.have_cv448 { diff --git a/nettle-sys-fix-metadata-auto.diff b/nettle-sys-fix-metadata-auto.diff new file mode 100644 index 0000000..262d42b --- /dev/null +++ b/nettle-sys-fix-metadata-auto.diff @@ -0,0 +1,8 @@ +--- nettle-sys-2.1.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ nettle-sys-2.1.1/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -55,5 +55,3 @@ + [build-dependencies.tempfile] + version = "3" + +-[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] +-version = "0.2.9" diff --git a/nettle-sys-fix-metadata.diff b/nettle-sys-fix-metadata.diff index 7d21f49..9086fd7 100644 --- a/nettle-sys-fix-metadata.diff +++ b/nettle-sys-fix-metadata.diff @@ -1,18 +1,10 @@ ---- nettle-sys-2.1.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ nettle-sys-2.1.0/Cargo.toml 2022-03-16T11:30:34.005698+00:00 -@@ -27,8 +27,7 @@ - [dependencies.libc] - version = "0.2" +--- nettle-sys-2.1.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ nettle-sys-2.1.1/Cargo.toml 2023-01-28T21:06:08.800191+00:00 +@@ -43,7 +43,6 @@ + [build-dependencies.bindgen] --version = ">= 0.53.1, < 0.58.0" + version = ">= 0.58.0, < 0.64.0" -features = ["runtime"] -+version = ">= 0.53.1, < 0.60.0" default-features = false [build-dependencies.cc] -@@ -39,5 +38,3 @@ - - [build-dependencies.tempfile] - version = "3" --[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] --version = "0.2.9" diff --git a/rust-nettle-sys.spec b/rust-nettle-sys.spec index 5867a62..a6214ae 100644 --- a/rust-nettle-sys.spec +++ b/rust-nettle-sys.spec @@ -1,28 +1,24 @@ -# Generated by rust2rpm 21 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate nettle-sys -Name: rust-%{crate} -Version: 2.1.0 +Name: rust-nettle-sys +Version: 2.1.1 Release: %autorelease Summary: Low-level Rust bindings for the Nettle cryptographic library -# Upstream license specification: LGPL-3.0 OR GPL-2.0 OR GPL-3.0 -License: LGPLv3 or GPLv2 or GPLv3 +License: LGPL-3.0 OR GPL-2.0 OR GPL-3.0 URL: https://crates.io/crates/nettle-sys Source: %{crates_source} -# Initial patched metadata +# Automatically generated patch to strip foreign dependencies # * drop runtime bindgen feature -# * bump bindgen to 0.59.0 -Patch0: nettle-sys-fix-metadata.diff +Patch: nettle-sys-fix-metadata-auto.diff # * drop two elliptic curves that are disabled in nettle in Fedora: # - nettle_get_secp_192r1 # - nettle_get_secp_224r1 -Patch1: 0001-build-drop-unavailable-ECC-functions.patch - -ExclusiveArch: %{rust_arches} +Patch: 0001-build-drop-unavailable-ECC-functions.patch BuildRequires: rust-packaging >= 21 diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 100% rename from .rust2rpm.conf rename to rust2rpm.conf diff --git a/sources b/sources index aef57be..2f942cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nettle-sys-2.1.0.crate) = 499f6f8d08ac4853816db3e3323695d065ee5d7e8588c3b7725e722f92875940a212945b0af71956e1846a1064c0afac74c54021fbf06d0c5f2d2704d32e9797 +SHA512 (nettle-sys-2.1.1.crate) = a9a299ae3e55d54603430fdd46c0b26d07ce21ebd94c759e76407ac97f5b9568808bdcf43d4981b550f6a416860e703314867a25939d985418bde922644bc288