From f2d2247be4415970ae040bdb757c09baea92007c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 3 Nov 2018 14:22:04 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- directories-fix-metadata.diff | 4 +-- rust-directories.spec | 55 ++++++++++++++++++++++------------- tests/.fmf/version | 1 + tests/provision.fmf | 5 ++++ tests/tests.yml | 13 +++++++++ 5 files changed, 56 insertions(+), 22 deletions(-) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/directories-fix-metadata.diff b/directories-fix-metadata.diff index 895b6b6..1cda27f 100644 --- a/directories-fix-metadata.diff +++ b/directories-fix-metadata.diff @@ -1,5 +1,5 @@ ---- directories-1.0.1/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ directories-1.0.1/Cargo.toml 2018-09-03T09:09:38.486287+02:00 +--- directories-1.0.2/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ directories-1.0.2/Cargo.toml 2018-11-03T14:21:31.364214+01:00 @@ -27,6 +27,3 @@ version = "0.1.5" [target."cfg(unix)".dependencies.libc] diff --git a/rust-directories.spec b/rust-directories.spec index 24f3732..bf944cc 100644 --- a/rust-directories.spec +++ b/rust-directories.spec @@ -1,12 +1,13 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate directories Name: rust-%{crate} Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library that provides platform-specific standard locations of directories # Upstream license specification: MIT OR Apache-2.0 @@ -20,29 +21,45 @@ Patch0: directories-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(bencher) >= 0.1.5 with crate(bencher) < 0.2.0) +BuildRequires: (crate(bencher/default) >= 0.1.5 with crate(bencher/default) < 0.2.0) %endif -%description -%{summary}. +%global _description \ +A tiny mid-level library that provides platform-specific standard locations of\ +directories for config, cache and other data on Linux, Windows and macOS by\ +leveraging the mechanisms defined by the XDG base/user directory specifications\ +on Linux, the Known Folder API on Windows, and the Standard Directory\ +guidelines on macOS. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A tiny mid-level library that provides platform-specific standard locations of -directories for config, cache and other data on Linux, Windows and macOS by -leveraging the mechanisms defined by the XDG base/user directory specifications -on Linux, the Known Folder API on Windows, and the Standard Directory -guidelines on macOS. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -59,12 +76,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Nov 03 2018 Igor Gnatenko - 1.0.2-2 +- Adapt to new packaging + * Thu Sep 27 2018 Josh Stone - 1.0.2-1 - Update to 1.0.2 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..e9f31bb --- /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-directories