From 8db3a7702018e61e2a37edd02e1738983c0810c9 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 6 Aug 2019 08:58:46 +0200 Subject: [PATCH] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + rand_os-fix-metadata.diff | 27 ++++++++++++ rust-rand_os0.1.spec | 90 +++++++++++++++++++++++++++++++++++++++ sources | 1 + tests/.fmf/version | 1 + tests/provision.fmf | 5 +++ tests/tests.yml | 13 ++++++ 7 files changed, 138 insertions(+) create mode 100644 .gitignore create mode 100644 rand_os-fix-metadata.diff create mode 100644 rust-rand_os0.1.spec create mode 100644 sources create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4efa56b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rand_os-0.1.3.crate diff --git a/rand_os-fix-metadata.diff b/rand_os-fix-metadata.diff new file mode 100644 index 0000000..8a1f339 --- /dev/null +++ b/rand_os-fix-metadata.diff @@ -0,0 +1,27 @@ +--- rand_os-0.1.3/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ rand_os-0.1.3/Cargo.toml 2019-08-06T06:58:01.738212+00:00 +@@ -28,24 +28,8 @@ + [dependencies.rand_core] + version = "0.4" + features = ["std"] +-[target."cfg(target_env = \"sgx\")".dependencies.rdrand] +-version = "0.4.0" +-[target."cfg(target_os = \"cloudabi\")".dependencies.cloudabi] +-version = "0.0.3" +-[target."cfg(target_os = \"fuchsia\")".dependencies.fuchsia-cprng] +-version = "0.1.0" + [target."cfg(unix)".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["minwindef", "ntsecapi", "winnt"] +-[target.wasm32-unknown-unknown.dependencies.stdweb] +-version = "0.4" +-optional = true +- +-[target.wasm32-unknown-unknown.dependencies.wasm-bindgen] +-version = "0.2.12" +-optional = true + [badges.appveyor] + repository = "rust-random/rand" + diff --git a/rust-rand_os0.1.spec b/rust-rand_os0.1.spec new file mode 100644 index 0000000..daa7f4f --- /dev/null +++ b/rust-rand_os0.1.spec @@ -0,0 +1,90 @@ +# Generated by rust2rpm 10 +%bcond_with check +%global debug_package %{nil} + +%global crate rand_os + +Name: rust-%{crate}0.1 +Version: 0.1.3 +Release: 1%{?dist} +Summary: OS backed Random Number Generator + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/rand_os +Source: %{crates_source} +# Initial patched metadata +# * No non-unix deps +Patch0: rand_os-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +OS backed Random Number Generator.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE COPYRIGHT +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+log-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+log-devel %{_description} + +This package contains library source intended for building other packages +which use "log" feature of "%{crate}" crate. + +%files -n %{name}+log-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Tue Aug 06 08:58:01 CEST 2019 Igor Gnatenko - 0.1.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..dfeb629 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rand_os-0.1.3.crate) = 01e81a692b78df3b2bd65bc285e5052ccaf208c7d0ace414f251db4fcff7f9ae1502ee60ca5745c95e778d3d5efe15fa84153c17c422b6b6bfee829376c14575 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..39af157 --- /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-rand_os0.1