From dc4045e5faf72f1f67593704b5cc18bf3e620bcb Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 26 Jan 2019 18:06:35 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + reqwest-fix-metadata.diff | 69 +++++++++++++++++ rust-reqwest.spec | 151 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 222 insertions(+) create mode 100644 .gitignore create mode 100644 reqwest-fix-metadata.diff create mode 100644 rust-reqwest.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca6ba74 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/reqwest-0.9.9.crate diff --git a/reqwest-fix-metadata.diff b/reqwest-fix-metadata.diff new file mode 100644 index 0000000..c6c07f6 --- /dev/null +++ b/reqwest-fix-metadata.diff @@ -0,0 +1,69 @@ +--- reqwest-0.9.9/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ reqwest-0.9.9/Cargo.toml 2019-01-26T12:15:54.127609+01:00 +@@ -41,15 +41,6 @@ + [dependencies.hyper] + version = "0.12.22" + +-[dependencies.hyper-old-types] +-version = "0.11" +-features = ["compat"] +-optional = true +- +-[dependencies.hyper-rustls] +-version = "0.16" +-optional = true +- + [dependencies.hyper-tls] + version = "0.3" + optional = true +@@ -68,11 +59,6 @@ + + [dependencies.native-tls] + version = "0.2" +-optional = true +- +-[dependencies.rustls] +-version = "0.15" +-features = ["dangerous_configuration"] + optional = true + + [dependencies.serde] +@@ -95,19 +81,11 @@ + [dependencies.tokio-io] + version = "0.1" + +-[dependencies.tokio-rustls] +-version = "0.9" +-optional = true +- + [dependencies.tokio-threadpool] + version = "0.1.8" + + [dependencies.tokio-timer] + version = "0.2.6" +- +-[dependencies.trust-dns-resolver] +-version = "0.10" +-optional = true + + [dependencies.url] + version = "1.2" +@@ -116,9 +94,6 @@ + version = "0.7" + features = ["v4"] + +-[dependencies.webpki-roots] +-version = "0.16" +-optional = true + [dev-dependencies.env_logger] + version = "0.6" + +@@ -131,8 +106,4 @@ + [features] + default = ["default-tls"] + default-tls = ["hyper-tls", "native-tls", "tls"] +-default-tls-vendored = ["default-tls", "native-tls/vendored"] +-hyper-011 = ["hyper-old-types"] +-rustls-tls = ["hyper-rustls", "tokio-rustls", "webpki-roots", "rustls", "tls"] + tls = [] +-trust-dns = ["trust-dns-resolver"] diff --git a/rust-reqwest.spec b/rust-reqwest.spec new file mode 100644 index 0000000..e92d22f --- /dev/null +++ b/rust-reqwest.spec @@ -0,0 +1,151 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate reqwest + +Name: rust-%{crate} +Version: 0.9.9 +Release: 1%{?dist} +Summary: Higher level HTTP client library + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/reqwest +Source: %{crates_source} +# Initial patched metadata +# * No rustls +# * trust-dns-resolver is not packaged +# * No vendored feature +# * hyper-old-types is not packaged +Patch0: reqwest-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(base64/default) >= 0.10.0 with crate(base64/default) < 0.11.0) +BuildRequires: (crate(bytes/default) >= 0.4.0 with crate(bytes/default) < 0.5.0) +BuildRequires: (crate(encoding_rs/default) >= 0.8.0 with crate(encoding_rs/default) < 0.9.0) +BuildRequires: (crate(futures/default) >= 0.1.23 with crate(futures/default) < 0.2.0) +BuildRequires: (crate(http/default) >= 0.1.15 with crate(http/default) < 0.2.0) +BuildRequires: (crate(hyper-tls/default) >= 0.3.0 with crate(hyper-tls/default) < 0.4.0) +BuildRequires: (crate(hyper/default) >= 0.12.22 with crate(hyper/default) < 0.13.0) +BuildRequires: (crate(libflate/default) >= 0.1.18 with crate(libflate/default) < 0.2.0) +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) +BuildRequires: (crate(mime/default) >= 0.3.7 with crate(mime/default) < 0.4.0) +BuildRequires: (crate(mime_guess/default) >= 2.0.0~alpha.6 with crate(mime_guess/default) < 3.0.0) +BuildRequires: (crate(native-tls/default) >= 0.2.0 with crate(native-tls/default) < 0.3.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) +BuildRequires: (crate(serde_urlencoded/default) >= 0.5.0 with crate(serde_urlencoded/default) < 0.6.0) +BuildRequires: (crate(tokio-executor/default) >= 0.1.4 with crate(tokio-executor/default) < 0.2.0) +BuildRequires: (crate(tokio-io/default) >= 0.1.0 with crate(tokio-io/default) < 0.2.0) +BuildRequires: (crate(tokio-threadpool/default) >= 0.1.8 with crate(tokio-threadpool/default) < 0.2.0) +BuildRequires: (crate(tokio-timer/default) >= 0.2.6 with crate(tokio-timer/default) < 0.3.0) +BuildRequires: (crate(tokio/rt-full) >= 0.1.7 with crate(tokio/rt-full) < 0.2.0) +BuildRequires: (crate(url/default) >= 1.2.0 with crate(url/default) < 2.0.0) +BuildRequires: (crate(uuid/default) >= 0.7.0 with crate(uuid/default) < 0.8.0) +BuildRequires: (crate(uuid/v4) >= 0.7.0 with crate(uuid/v4) < 0.8.0) +%if %{with check} +BuildRequires: (crate(env_logger/default) >= 0.6.0 with crate(env_logger/default) < 0.7.0) +BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0) +BuildRequires: (crate(tokio-tcp/default) >= 0.1.0 with crate(tokio-tcp/default) < 0.2.0) +%endif + +%global _description \ +Higher level HTTP client library. + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%package -n %{name}+default-devel +Summary: %{summary} +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. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+default-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-tls-devel %{_description} + +This package contains library source intended for building other packages +which use "default-tls" feature of "%{crate}" crate. + +%files -n %{name}+default-tls-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+hyper-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+hyper-tls-devel %{_description} + +This package contains library source intended for building other packages +which use "hyper-tls" feature of "%{crate}" crate. + +%files -n %{name}+hyper-tls-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+native-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+native-tls-devel %{_description} + +This package contains library source intended for building other packages +which use "native-tls" feature of "%{crate}" crate. + +%files -n %{name}+native-tls-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tls-devel %{_description} + +This package contains library source intended for building other packages +which use "tls" feature of "%{crate}" crate. + +%files -n %{name}+tls-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Sat Jan 26 2019 Igor Gnatenko - 0.9.9-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..3624704 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (reqwest-0.9.9.crate) = 0fb31d2b3bbaf368bc5c9e26310d569fac7715e2d193705aae32612ec631c87aaf743908003405640b11355ae7591f2af35731ff4e89e5e97e8c10ead02921b1