From 540e218f58b65cd21966aa6d559107e648e50980 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mar 14 2019 01:10:34 +0000 Subject: Initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1d8472 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rpassword-2.1.0.crate diff --git a/rpassword-fix-metadata.diff b/rpassword-fix-metadata.diff new file mode 100644 index 0000000..636fe77 --- /dev/null +++ b/rpassword-fix-metadata.diff @@ -0,0 +1,11 @@ +--- rpassword-2.1.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ rpassword-2.1.0/Cargo.toml 2019-03-13T18:19:26.659455+01:00 +@@ -23,8 +23,3 @@ + repository = "https://github.com/conradkdotcom/rpassword" + [target."cfg(unix)".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.kernel32-sys] +-version = "0.2" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.2" diff --git a/rust-rpassword.spec b/rust-rpassword.spec new file mode 100644 index 0000000..153d402 --- /dev/null +++ b/rust-rpassword.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm +%bcond_with check +%global debug_package %{nil} + +%global crate rpassword + +Name: rust-%{crate} +Version: 2.1.0 +Release: 1%{?dist} +Summary: Read passwords in console applications + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/rpassword +Source: %{crates_source} +# Initial patched metadata +# * No windows +Patch0: rpassword-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) + +%global _description \ +Read passwords in console applications. + +%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-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_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Wed Mar 13 2019 Igor Gnatenko - 2.1.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..cc365b2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rpassword-2.1.0.crate) = 23871c81f400482ff55f4688977fd1ebafac892defa3f1ab019b121435316b93784cad730252eb385135a1a1574fb3de6e60a2f75159561184ec465162b86d85 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..65a7b8a --- /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-rpassword