From dfe1566571794f26080531b5572323f7b84319e4 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 11 2018 12:45:26 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/net2-0.2.33-fix-metadata.diff b/net2-0.2.33-fix-metadata.diff deleted file mode 100644 index 6bb1707..0000000 --- a/net2-0.2.33-fix-metadata.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- net2-0.2.33/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ net2-0.2.33/Cargo.toml 2018-06-29T00:21:26.955021+02:00 -@@ -26,9 +26,5 @@ - [features] - default = ["duration"] - duration = [] --nightly = [] - [target."cfg(any(target_os=\"redox\", unix))".dependencies.libc] - version = "0.2.42" --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["handleapi", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] diff --git a/net2-fix-metadata.diff b/net2-fix-metadata.diff new file mode 100644 index 0000000..d8ed5e1 --- /dev/null +++ b/net2-fix-metadata.diff @@ -0,0 +1,9 @@ +--- net2-0.2.33/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ net2-0.2.33/Cargo.toml 2018-11-11T13:44:38.254464+01:00 +@@ -29,6 +29,3 @@ + nightly = [] + [target."cfg(any(target_os=\"redox\", unix))".dependencies.libc] + version = "0.2.42" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["handleapi", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] diff --git a/rust-net2.spec b/rust-net2.spec index e36d681..9841a18 100644 --- a/rust-net2.spec +++ b/rust-net2.spec @@ -6,36 +6,65 @@ Name: rust-%{crate} Version: 0.2.33 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Extensions to the standard library's networking types as proposed in RFC 1158 +# Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/net2 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No windows -# * No nightly -Patch0: net2-0.2.33-fix-metadata.diff +Patch0: net2-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(cfg-if) >= 0.1.0 with crate(cfg-if) < 0.2.0) -BuildRequires: (crate(libc) >= 0.2.42 with crate(libc) < 0.3.0) +BuildRequires: (crate(cfg-if/default) >= 0.1.0 with crate(cfg-if/default) < 0.2.0) +BuildRequires: (crate(libc/default) >= 0.2.42 with crate(libc/default) < 0.3.0) -%description -%{summary}. +%global _description \ +Extensions to the standard library's networking types as proposed in RFC 1158. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Extensions to the standard library's networking types as proposed in RFC 1158. +%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 +%{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}+duration-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+duration-devel %{_description} + +This package contains library source intended for building other packages +which use "duration" feature of "%{crate}" crate. + +%files -n %{name}+duration-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -52,13 +81,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sun Nov 11 2018 Igor Gnatenko - 0.2.33-3 +- Adapt to new packaging + * Sat Jul 14 2018 Fedora Release Engineering - 0.2.33-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_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..739cf05 --- /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-net2