The package rpms/rust-urlshortener.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/rust-urlshortener.git/commit/?id=712....
Change: +ExclusiveArch: %{rust_arches}
Thanks.
Full change: ============
commit 71274692b1b4a91968173904c691b37d53a485b2 Author: Igor Gnatenko ignatenkobrain@fedoraproject.org Date: Fri Mar 15 10:59:20 2019 +0100
Initial import
Signed-off-by: Igor Gnatenko ignatenkobrain@fedoraproject.org
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9271df1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/urlshortener-0.9.0.crate diff --git a/0001-chore-Update-reqwest-to-0.9.patch b/0001-chore-Update-reqwest-to-0.9.patch new file mode 100644 index 0000000..921bb02 --- /dev/null +++ b/0001-chore-Update-reqwest-to-0.9.patch @@ -0,0 +1,43 @@ +From c89bf9dc6e46b803724abb4738f0ff64f888048b Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko i.gnatenko.brain@gmail.com +Date: Fri, 15 Mar 2019 07:36:54 +0100 +Subject: [PATCH] chore: Update reqwest to 0.9 + +Signed-off-by: Igor Gnatenko i.gnatenko.brain@gmail.com +--- + src/request.rs | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/request.rs b/src/request.rs +index b8e60d3f..213e8fe2 100644 +--- a/src/request.rs ++++ b/src/request.rs +@@ -38,20 +38,20 @@ impl Request { + }; + + if let Some(agent) = self.user_agent.clone() { +- builder.header(header::UserAgent::new(agent.0)); ++ builder = builder.header(header::USER_AGENT, agent.0); + } + + if let Some(content_type) = self.content_type.clone() { +- match content_type { +- ContentType::Json => builder.header(header::ContentType::json()), ++ builder = match content_type { ++ ContentType::Json => builder.header(header::CONTENT_TYPE, "application/json"), + ContentType::FormUrlEncoded => { +- builder.header(header::ContentType::form_url_encoded()) ++ builder.header(header::CONTENT_TYPE, "application/x-www-form-urlencoded") + } + }; + } + + if let Some(body) = self.body.clone() { +- builder.body(body); ++ builder = builder.body(body); + } + + builder.send().ok() +-- +2.21.0 + diff --git a/rust-urlshortener.spec b/rust-urlshortener.spec new file mode 100644 index 0000000..bf45e7b --- /dev/null +++ b/rust-urlshortener.spec @@ -0,0 +1,101 @@ +# Generated by rust2rpm +# * Tests requrie internet +%bcond_with check +%global debug_package %{nil} + +%global crate urlshortener + +Name: rust-%{crate} +Version: 0.9.0 +Release: 1%{?dist} +Summary: Very simple url shortener client library + +License: MIT +URL: https://crates.io/crates/urlshortener +Source: %{crates_source} +# Initial patched metadata +# * Update reqwest to 0.9, https://github.com/vityafx/urlshortener-rs/pull/13 +Patch0: urlshortener-fix-metadata.diff +# Make it work with new reqwest +Patch0001: 0001-chore-Update-reqwest-to-0.9.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) +BuildRequires: (crate(reqwest/default) >= 0.9.0 with crate(reqwest/default) < 0.10.0) +BuildRequires: (crate(url/default) >= 1.0.0 with crate(url/default) < 2.0.0) + +%global _description \ +A very simple url shortener 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 +%doc README.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}+client-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+client-devel %{_description} + +This package contains library source intended for building other packages +which use "client" feature of "%{crate}" crate. + +%files -n %{name}+client-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+reqwest-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+reqwest-devel %{_description} + +This package contains library source intended for building other packages +which use "reqwest" feature of "%{crate}" crate. + +%files -n %{name}+reqwest-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 +* Fri Mar 15 2019 Igor Gnatenko ignatenkobrain@fedoraproject.org - 0.9.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..7daaa79 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (urlshortener-0.9.0.crate) = a83e92a5871fa38488aab5f39519619b3da56b6d0745e9b8c70f25e82a718a963b99c2ff4f6f937dc6d3a98af4a57b5329bba6c193d51365661cc1e7fcab6ef6 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ee3bf32 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-urlshortener diff --git a/urlshortener-fix-metadata.diff b/urlshortener-fix-metadata.diff new file mode 100644 index 0000000..6bcdc8f --- /dev/null +++ b/urlshortener-fix-metadata.diff @@ -0,0 +1,11 @@ +--- urlshortener-0.9.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ urlshortener-0.9.0/Cargo.toml 2019-03-15T07:37:33.788669+01:00 +@@ -24,7 +24,7 @@ + version = "0.4" + + [dependencies.reqwest] +-version = "0.8" ++version = "0.9" + optional = true + + [dependencies.url]
arch-excludes@lists.fedoraproject.org