diff --git a/rust-rustc-test.spec b/rust-rustc-test.spec index ae1b78b..54d7afc 100644 --- a/rust-rustc-test.spec +++ b/rust-rustc-test.spec @@ -7,44 +7,83 @@ Name: rust-%{crate} Version: 0.3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Fork of Rust’s `test` crate that doesn’t require unstable language features +# Upstream license specification: MIT OR Apache-2.0 # https://github.com/servo/rustc-test/issues/5 License: MIT or ASL 2.0 URL: https://crates.io/crates/rustc-test -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata # * Bump term to 0.5, https://github.com/servo/rustc-test/pull/9 -Patch0: rustc-test-0.3.0-fix-metadata.diff +Patch0: rustc-test-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0) -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0) -BuildRequires: (crate(term) >= 0.5.0 with crate(term) < 0.6.0) -BuildRequires: (crate(time) >= 0.1.0 with crate(time) < 0.2.0) -# [build-dependencies] -BuildRequires: (crate(rustc_version) >= 0.2.1 with crate(rustc_version) < 0.3.0) - -%description -%{summary}. +BuildRequires: (crate(getopts/default) >= 0.2.0 with crate(getopts/default) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(rustc-serialize/default) >= 0.3.0 with crate(rustc-serialize/default) < 0.4.0) +BuildRequires: (crate(rustc_version/default) >= 0.2.1 with crate(rustc_version/default) < 0.3.0) +BuildRequires: (crate(term/default) >= 0.5.0 with crate(term/default) < 0.6.0) +BuildRequires: (crate(time/default) >= 0.1.0 with crate(time/default) < 0.2.0) + +%global _description \ +A fork of Rust’s `test` crate that doesn’t require unstable language features. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A fork of Rust’s `test` crate that doesn’t require unstable language features. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%{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}+asm_black_box-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+asm_black_box-devel %{_description} + +This package contains library source intended for building other packages +which use "asm_black_box" feature of "%{crate}" crate. + +%files -n %{name}+asm_black_box-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+capture-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+capture-devel %{_description} + +This package contains library source intended for building other packages +which use "capture" feature of "%{crate}" crate. + +%files -n %{name}+capture-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -58,10 +97,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sun Feb 17 2019 Igor Gnatenko - 0.3.0-5 +- Adapt to new packaging + * Sat Feb 02 2019 Fedora Release Engineering - 0.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/rustc-test-0.3.0-fix-metadata.diff b/rustc-test-fix-metadata.diff similarity index 74% rename from rustc-test-0.3.0-fix-metadata.diff rename to rustc-test-fix-metadata.diff index 6ea6589..7f39537 100644 --- a/rustc-test-0.3.0-fix-metadata.diff +++ b/rustc-test-fix-metadata.diff @@ -1,5 +1,5 @@ --- rustc-test-0.3.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ rustc-test-0.3.0/Cargo.toml 2018-05-10T11:30:14.308164+02:00 ++++ rustc-test-0.3.0/Cargo.toml 2019-02-17T17:56:47.830648+01:00 @@ -27,7 +27,7 @@ version = "0.3" 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..77aee26 --- /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-rustc-test