From ad80129723e7e7afc347a411eda651c47bdaf0a8 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 12 Nov 2018 14:44:50 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- h2-fix-metadata.diff | 11 +++++ rust-h2.spec | 96 ++++++++++++++++++++++++++++---------------- tests/.fmf/version | 1 + tests/provision.fmf | 5 +++ tests/tests.yml | 13 ++++++ 5 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 h2-fix-metadata.diff create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/h2-fix-metadata.diff b/h2-fix-metadata.diff new file mode 100644 index 0000000..bcaa918 --- /dev/null +++ b/h2-fix-metadata.diff @@ -0,0 +1,11 @@ +--- h2-0.1.13/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ h2-0.1.13/Cargo.toml 2018-11-12T14:43:14.435125+01:00 +@@ -85,7 +85,7 @@ + version = "1.0.0" + + [dev-dependencies.webpki] +-version = "0.18.0-alpha" ++version = "0.18" + + [dev-dependencies.webpki-roots] + version = "0.14" diff --git a/rust-h2.spec b/rust-h2.spec index e4cfcbc..9f13dc2 100644 --- a/rust-h2.spec +++ b/rust-h2.spec @@ -7,55 +7,86 @@ Name: rust-%{crate} Version: 0.1.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: HTTP/2.0 client and server License: MIT URL: https://crates.io/crates/h2 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/carllerche/h2/pull/331 +Patch0: h2-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0) -BuildRequires: (crate(bytes) >= 0.4.7 with crate(bytes) < 0.5.0) -BuildRequires: (crate(fnv) >= 1.0.5 with crate(fnv) < 2.0.0) -BuildRequires: (crate(futures) >= 0.1.0 with crate(futures) < 0.2.0) -BuildRequires: (crate(http) >= 0.1.8 with crate(http) < 0.2.0) -BuildRequires: (crate(indexmap) >= 1.0.0 with crate(indexmap) < 2.0.0) -BuildRequires: (crate(log) >= 0.4.1 with crate(log) < 0.5.0) -BuildRequires: (crate(slab) >= 0.4.0 with crate(slab) < 0.5.0) -BuildRequires: (crate(string) >= 0.1.0 with crate(string) < 0.2.0) -BuildRequires: (crate(tokio-io) >= 0.1.4 with crate(tokio-io) < 0.2.0) +BuildRequires: (crate(byteorder/default) >= 1.0.0 with crate(byteorder/default) < 2.0.0) +BuildRequires: (crate(bytes/default) >= 0.4.7 with crate(bytes/default) < 0.5.0) +BuildRequires: (crate(fnv/default) >= 1.0.5 with crate(fnv/default) < 2.0.0) +BuildRequires: (crate(futures/default) >= 0.1.0 with crate(futures/default) < 0.2.0) +BuildRequires: (crate(http/default) >= 0.1.8 with crate(http/default) < 0.2.0) +BuildRequires: (crate(indexmap/default) >= 1.0.0 with crate(indexmap/default) < 2.0.0) +BuildRequires: (crate(log/default) >= 0.4.1 with crate(log/default) < 0.5.0) +BuildRequires: (crate(slab/default) >= 0.4.0 with crate(slab/default) < 0.5.0) +BuildRequires: (crate(string/default) >= 0.1.0 with crate(string/default) < 0.2.0) +BuildRequires: (crate(tokio-io/default) >= 0.1.4 with crate(tokio-io/default) < 0.2.0) %if %{with check} -# [dev-dependencies] BuildRequires: (crate(env_logger) >= 0.5.3 with crate(env_logger) < 0.6.0) -BuildRequires: (crate(hex) >= 0.2.0 with crate(hex) < 0.3.0) +BuildRequires: (crate(hex/default) >= 0.2.0 with crate(hex/default) < 0.3.0) BuildRequires: (crate(quickcheck) >= 0.4.1 with crate(quickcheck) < 0.5.0) -BuildRequires: (crate(rand) >= 0.3.15 with crate(rand) < 0.4.0) -BuildRequires: (crate(rustls) >= 0.12.0 with crate(rustls) < 0.13.0) -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) -BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) -BuildRequires: (crate(tokio) >= 0.1.8 with crate(tokio) < 0.2.0) -BuildRequires: (crate(tokio-rustls) >= 0.5.0 with crate(tokio-rustls) < 0.6.0) -BuildRequires: (crate(walkdir) >= 1.0.0 with crate(walkdir) < 2.0.0) -BuildRequires: (crate(webpki) >= 0.18.0~alpha with crate(webpki) < 0.18.0) -BuildRequires: (crate(webpki-roots) >= 0.14.0 with crate(webpki-roots) < 0.15.0) +BuildRequires: (crate(rand/default) >= 0.3.15 with crate(rand/default) < 0.4.0) +BuildRequires: (crate(rustls/default) >= 0.12.0 with crate(rustls/default) < 0.13.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(tokio-rustls/default) >= 0.5.0 with crate(tokio-rustls/default) < 0.6.0) +BuildRequires: (crate(tokio/default) >= 0.1.8 with crate(tokio/default) < 0.2.0) +BuildRequires: (crate(walkdir/default) >= 1.0.0 with crate(walkdir/default) < 2.0.0) +BuildRequires: (crate(webpki-roots/default) >= 0.14.0 with crate(webpki-roots/default) < 0.15.0) +BuildRequires: (crate(webpki/default) >= 0.18.0 with crate(webpki/default) < 0.19.0) %endif -%description -%{summary}. +%global _description \ +An HTTP/2.0 client and server. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -An HTTP/2.0 client and server. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%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 %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+unstable-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-devel %{_description} + +This package contains library source intended for building other packages +which use "unstable" feature of "%{crate}" crate. + +%files -n %{name}+unstable-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -72,13 +103,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/ci - %changelog +* Mon Nov 12 2018 Igor Gnatenko - 0.1.13-2 +- Adapt to new packaging + * Mon Oct 22 2018 Josh Stone - 0.1.13-1 - Update to 0.1.13 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..3c95067 --- /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-h2