From c293ce331e5b9b28f2ec2cc645317fb5ada40f29 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Feb 10 2019 08:19:55 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/mio-fix-metadata.diff b/mio-fix-metadata.diff index 79c9fe2..b3acd64 100644 --- a/mio-fix-metadata.diff +++ b/mio-fix-metadata.diff @@ -1,5 +1,5 @@ ---- mio-0.6.16/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ mio-0.6.16/Cargo.toml 2018-09-07T17:33:40.272371-07:00 +--- mio-0.6.16/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ mio-0.6.16/Cargo.toml 2019-02-10T09:18:06.012625+01:00 @@ -54,18 +54,5 @@ [features] default = ["with-deprecated"] diff --git a/rust-mio.spec b/rust-mio.spec index daa9657..f4454fb 100644 --- a/rust-mio.spec +++ b/rust-mio.spec @@ -1,18 +1,17 @@ # Generated by rust2rpm -# Doctests require networking -%bcond_without check +%bcond_with check %global debug_package %{nil} %global crate mio Name: rust-%{crate} Version: 0.6.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight non-blocking IO License: MIT URL: https://crates.io/crates/mio -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata # * No windows or fuchsia Patch0: mio-fix-metadata.diff @@ -20,35 +19,64 @@ Patch0: mio-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(iovec) >= 0.1.1 with crate(iovec) < 0.2.0) -BuildRequires: (crate(lazycell) >= 1.0.0 with crate(lazycell) < 2.0.0) -BuildRequires: (crate(libc) >= 0.2.42 with crate(libc) < 0.3.0) -BuildRequires: (crate(log) >= 0.4.0 with crate(log) < 0.5.0) -BuildRequires: (crate(net2) >= 0.2.29 with crate(net2) < 0.3.0) -BuildRequires: (crate(slab) >= 0.4.0 with crate(slab) < 0.5.0) +BuildRequires: (crate(iovec/default) >= 0.1.1 with crate(iovec/default) < 0.2.0) +BuildRequires: (crate(lazycell/default) >= 1.0.0 with crate(lazycell/default) < 2.0.0) +BuildRequires: (crate(libc/default) >= 0.2.42 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) +BuildRequires: (crate(net2/default) >= 0.2.29 with crate(net2/default) < 0.3.0) +BuildRequires: (crate(slab/default) >= 0.4.0 with crate(slab/default) < 0.5.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(bytes) >= 0.3.0 with crate(bytes) < 0.4.0) +BuildRequires: (crate(bytes/default) >= 0.3.0 with crate(bytes/default) < 0.4.0) BuildRequires: (crate(env_logger) >= 0.4.0 with crate(env_logger) < 0.5.0) -BuildRequires: (crate(tempdir) >= 0.3.4 with crate(tempdir) < 0.4.0) +BuildRequires: (crate(tempdir/default) >= 0.3.4 with crate(tempdir/default) < 0.4.0) %endif -%description -%{summary}. +%global _description \ +Lightweight non-blocking IO. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Lightweight non-blocking IO. +%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}/ +%exclude %{cargo_registry}/%{crate}-%{version}/{appveyor.yml,ci} + +%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}+with-deprecated-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+with-deprecated-devel %{_description} + +This package contains library source intended for building other packages +which use "with-deprecated" feature of "%{crate}" crate. + +%files -n %{name}+with-deprecated-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -62,13 +90,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}/{appveyor.yml,ci} - %changelog +* Sun Feb 10 2019 Igor Gnatenko - 0.6.16-3 +- Adapt to new packaging + * Sat Feb 02 2019 Fedora Release Engineering - 0.6.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild 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..52b72d9 --- /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-mio