diff --git a/.gitignore b/.gitignore index 3842fdb..6482b25 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /*.src.rpm /tokio-native-tls-0.3.0.crate +/tokio-native-tls-0.3.1.crate diff --git a/rust-tokio-native-tls.spec b/rust-tokio-native-tls.spec index 78d8355..c6d118d 100644 --- a/rust-tokio-native-tls.spec +++ b/rust-tokio-native-tls.spec @@ -1,29 +1,25 @@ -# Generated by rust2rpm 16 +# Generated by rust2rpm 23 # * tests need internet access %bcond_with check %global debug_package %{nil} %global crate tokio-native-tls -Name: rust-%{crate} -Version: 0.3.0 +Name: rust-tokio-native-tls +Version: 0.3.1 Release: %autorelease Summary: Implementation of TLS/SSL streams for Tokio using native-tls -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/tokio-native-tls Source: %{crates_source} -# Initial patched metadata -# * No windows, MacOS, iOS dependencies -Patch0: tokio-native-tls-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: tokio-native-tls-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop feature for using vendored dependencies +Patch: tokio-native-tls-fix-metadata.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Implementation of TLS/SSL streams for Tokio using native-tls giving an @@ -37,13 +33,14 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -51,11 +48,11 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index c55b5c5..9102339 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tokio-native-tls-0.3.0.crate) = a8aa7586f15a3347ba9152497db84a098e751797c06df1a75d9b108689e14d6692b4efc6e5b49b5bf8f8fdb3bfc4f1157f56b3b0c9d9e753a8b31a61e65dfc4d +SHA512 (tokio-native-tls-0.3.1.crate) = bda2e77671e030a021f628ad760b3fbdc26e7483a5f9ef6c6892ae0fc38b538d52d527805c020d578079896d50fff0bbc036a87cc91604904840d5b7dc181914 diff --git a/tokio-native-tls-fix-metadata-auto.diff b/tokio-native-tls-fix-metadata-auto.diff new file mode 100644 index 0000000..85e4027 --- /dev/null +++ b/tokio-native-tls-fix-metadata-auto.diff @@ -0,0 +1,25 @@ +--- tokio-native-tls-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ tokio-native-tls-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -74,22 +74,3 @@ + [target."cfg(all(not(target_os = \"macos\"), not(windows), not(target_os = \"ios\")))".dev-dependencies.openssl] + version = "0.10" + +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dev-dependencies.security-framework] +-version = "0.2" +- +-[target."cfg(windows)".dev-dependencies.schannel] +-version = "0.1" +- +-[target."cfg(windows)".dev-dependencies.winapi] +-version = "0.3" +-features = [ +- "lmcons", +- "basetsd", +- "minwinbase", +- "minwindef", +- "ntdef", +- "sysinfoapi", +- "timezoneapi", +- "wincrypt", +- "winerror", +-] diff --git a/tokio-native-tls-fix-metadata.diff b/tokio-native-tls-fix-metadata.diff index 428797c..44501c0 100644 --- a/tokio-native-tls-fix-metadata.diff +++ b/tokio-native-tls-fix-metadata.diff @@ -1,22 +1,12 @@ ---- tokio-native-tls-0.3.0/Cargo.toml 2020-12-24T17:24:00+00:00 -+++ tokio-native-tls-0.3.0/Cargo.toml 2021-03-06T22:43:16.388259+00:00 -@@ -21,6 +21,7 @@ - categories = ["asynchronous", "network-programming"] - license = "MIT" - repository = "https://github.com/tokio-rs/tls" -+exclude = ["/scripts"] - [package.metadata.docs.rs] - all-features = true - [dependencies.native-tls] -@@ -54,11 +55,3 @@ +--- tokio-native-tls-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ tokio-native-tls-0.3.1/Cargo.toml 2023-02-09T13:57:42.580889+00:00 +@@ -68,9 +68,6 @@ + version = "0.6.0" features = ["full"] + +-[features] +-vendored = ["native-tls/vendored"] +- [target."cfg(all(not(target_os = \"macos\"), not(windows), not(target_os = \"ios\")))".dev-dependencies.openssl] version = "0.10" --[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dev-dependencies.security-framework] --version = "0.2" --[target."cfg(windows)".dev-dependencies.schannel] --version = "0.1" -- --[target."cfg(windows)".dev-dependencies.winapi] --version = "0.3" --features = ["lmcons", "basetsd", "minwinbase", "minwindef", "ntdef", "sysinfoapi", "timezoneapi", "wincrypt", "winerror"] +