From 68950aa697d27ca3020f1e3f3096f8f58e79d120 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 26 2018 22:30:53 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02a8320 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fuse-0.3.1.crate diff --git a/0001-upgrade-the-env_logger-dependency.patch b/0001-upgrade-the-env_logger-dependency.patch new file mode 100644 index 0000000..a71d5db --- /dev/null +++ b/0001-upgrade-the-env_logger-dependency.patch @@ -0,0 +1,41 @@ +From e320b6eff05455ef553041e7944d963f94009e44 Mon Sep 17 00:00:00 2001 +From: Jack O'Connor +Date: Sun, 25 Feb 2018 13:23:22 -0500 +Subject: [PATCH] upgrade the env_logger dependency + +The latest version no longer returns a result from init(), so the +examples needed to be tweaked. +--- + examples/hello.rs | 2 +- + examples/null.rs | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/hello.rs b/examples/hello.rs +index 75d6dcb..a330f22 100644 +--- a/examples/hello.rs ++++ b/examples/hello.rs +@@ -91,7 +91,7 @@ impl Filesystem for HelloFS { + } + + fn main() { +- env_logger::init().unwrap(); ++ env_logger::init(); + let mountpoint = env::args_os().nth(1).unwrap(); + fuse::mount(HelloFS, &mountpoint, &[]).unwrap(); + } +diff --git a/examples/null.rs b/examples/null.rs +index d155cb5..efce27a 100644 +--- a/examples/null.rs ++++ b/examples/null.rs +@@ -9,7 +9,7 @@ struct NullFS; + impl Filesystem for NullFS {} + + fn main() { +- env_logger::init().unwrap(); ++ env_logger::init(); + let mountpoint = env::args_os().nth(1).unwrap(); + fuse::mount(NullFS, &mountpoint, &[]).unwrap(); + } +-- +2.18.0 + diff --git a/fuse-0.3.1-fix-metadata.diff b/fuse-0.3.1-fix-metadata.diff new file mode 100644 index 0000000..a54cb76 --- /dev/null +++ b/fuse-0.3.1-fix-metadata.diff @@ -0,0 +1,11 @@ +--- fuse-0.3.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ fuse-0.3.1/Cargo.toml 2018-07-26T08:56:12.189790+02:00 +@@ -39,7 +39,7 @@ + [dependencies.libc] + version = "0.2" + [dev-dependencies.env_logger] +-version = "0.3" ++version = "0.5" + [build-dependencies.pkg-config] + version = "0.3" + [badges.travis-ci] diff --git a/rust-fuse.spec b/rust-fuse.spec new file mode 100644 index 0000000..cc6ce8a --- /dev/null +++ b/rust-fuse.spec @@ -0,0 +1,72 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate fuse + +Name: rust-%{crate} +Version: 0.3.1 +Release: 1%{?dist} +Summary: Rust library for filesystems in userspace (FUSE) + +License: MIT +URL: https://crates.io/crates/fuse +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump env_logger to 0.5, https://github.com/zargony/rust-fuse/commit/e320b6eff05455ef553041e7944d963f94009e44 +Patch0: fuse-0.3.1-fix-metadata.diff +Patch0001: 0001-upgrade-the-env_logger-dependency.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) +BuildRequires: (crate(thread-scoped) >= 1.0.0 with crate(thread-scoped) < 2.0.0) +BuildRequires: (crate(time) >= 0.1.0 with crate(time) < 0.2.0) +# [build-dependencies] +BuildRequires: (crate(pkg-config) >= 0.3.0 with crate(pkg-config) < 0.4.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(env_logger) >= 0.5.0 with crate(env_logger) < 0.6.0) +%endif +BuildRequires: pkgconfig(fuse) >= 2.6.0 + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch +Requires: pkgconfig(fuse) >= 2.6.0 + +%description devel +Rust library for filesystems in userspace (FUSE). + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE.md +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Thu Jul 26 2018 Igor Gnatenko - 0.3.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..6f8f372 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fuse-0.3.1.crate) = bffebbffd400f417911f7c7b271abf9091cfa53e0562c08dcc9b7c7132fde4be57615cd79ece1b7978382b7f62c75ac38f08a8e0e7ff513e2b1183b846c48655