diff --git a/0001-Loosen-parking_lot-dependency-constraints.patch b/0001-Loosen-parking_lot-dependency-constraints.patch deleted file mode 100644 index 9460b2a..0000000 --- a/0001-Loosen-parking_lot-dependency-constraints.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 32cd3651571477dd263f454da19123a0db89ceab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= -Date: Thu, 7 Feb 2019 17:00:34 +0100 -Subject: [PATCH] Loosen parking_lot dependency constraints -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jan Staněk ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index b26e4ce..4d44080 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -23,7 +23,7 @@ categories = ["rust-patterns", "memory-management"] - license = "MIT OR Apache-2.0" - repository = "https://github.com/matklad/once_cell" - [dependencies.parking_lot] --version = "0.7.1" -+version = ">=0.6.4,<0.8.0" - optional = true - default_features = false - [dev-dependencies.crossbeam-utils] --- -2.20.1 - diff --git a/0002-Exclude-unnecessary-files.patch b/0002-Exclude-unnecessary-files.patch deleted file mode 100644 index 374bccd..0000000 --- a/0002-Exclude-unnecessary-files.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5bec30616b685f4b0dea254ea149dd352c6ad097 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Fri, 8 Feb 2019 16:19:26 +0100 -Subject: [PATCH 2/2] Exclude unnecessary files - -Signed-off-by: rpm-build ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 4d44080..7168f37 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -14,7 +14,7 @@ - name = "once_cell" - version = "0.1.8" - authors = ["Aleksey Kladov "] --exclude = ["*.png", "*.svg"] -+exclude = ["*.png", "*.svg", "/.travis.yml", "/examples/*", "/Cargo.lock.min"] - description = "Single assignment cells and lazy static values without macros." - documentation = "https://docs.rs/once_cell" - readme = "README.md" --- -2.20.1 - diff --git a/rust-once_cell.spec b/rust-once_cell.spec index fced00c..1370022 100644 --- a/rust-once_cell.spec +++ b/rust-once_cell.spec @@ -1,48 +1,76 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate once_cell Name: rust-%{crate} Version: 0.1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Single assignment cells and lazy static values without macros # Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/once_cell -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate - -# Allow F29 builds -Patch0: 0001-Loosen-parking_lot-dependency-constraints.patch -Patch1: 0002-Exclude-unnecessary-files.patch +Source: %{crates_source} +# Initial patched metadata +# * Exclude unnecessary files +Patch0: once_cell-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(parking_lot) >= 0.6.4 with crate(parking_lot) < 0.8.0) +BuildRequires: (crate(parking_lot) >= 0.7.1 with crate(parking_lot) < 0.8.0) %if %{with check} -# [dev-dependencies] BuildRequires: (crate(crossbeam-utils/default) >= 0.6.0 with crate(crossbeam-utils/default) < 0.7.0) %endif -%description -%{summary}. +%global _description \ +Single assignment cells and lazy static values without macros. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Single assignment cells and lazy static values without macros. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-APACHE LICENSE-MIT +%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}+parking_lot-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+parking_lot-devel %{_description} + +This package contains library source intended for building other packages +which use "parking_lot" feature of "%{crate}" crate. + +%files -n %{name}+parking_lot-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -56,11 +84,9 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-APACHE LICENSE-MIT -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Tue Feb 12 2019 Igor Gnatenko - 0.1.8-2 +- Adapt to new packaging + * Thu Feb 07 2019 Jan Stanek - 0.1.8-1 - Initial package 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..8cb1afa --- /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-once_cell