From 9d60ee1427add6a8307cd69698ba2142cafb1723 Mon Sep 17 00:00:00 2001 From: Alex Childs Date: Tue, 18 Jun 2019 10:40:34 -0500 Subject: [PATCH] New package: sandboxfs-0.1.0 Closes #12481 --- srcpkgs/sandboxfs/patches/32bit.patch | 28 +++++++++++++++++++++++++++ srcpkgs/sandboxfs/template | 18 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 srcpkgs/sandboxfs/patches/32bit.patch create mode 100644 srcpkgs/sandboxfs/template diff --git a/srcpkgs/sandboxfs/patches/32bit.patch b/srcpkgs/sandboxfs/patches/32bit.patch new file mode 100644 index 0000000000..5951ffd381 --- /dev/null +++ b/srcpkgs/sandboxfs/patches/32bit.patch @@ -0,0 +1,28 @@ +--- src/nodes/mod.rs.orig ++++ src/nodes/mod.rs +@@ -173,11 +173,11 @@ + } + let size = size.unwrap(); + +- let result = if size > ::std::i64::MAX as u64 { +- warn!("truncate request got size {}, which is too large (exceeds i64's MAX)", size); ++ let result = if size > ::nix::libc::off_t::max_value() as u64 { ++ warn!("truncate request got size {}, which is too large (exceeds off_t's MAX)", size); + Err(nix::Error::invalid_argument()) + } else { +- try_path(path, |p| unistd::truncate(p, size as i64)) ++ try_path(path, |p| unistd::truncate(p, size as nix::libc::off_t)) + }; + if result.is_ok() { + attr.size = size; +--- src/nodes/conv.rs.orig ++++ src/nodes/conv.rs +@@ -69,7 +69,7 @@ + } else { + val.tv_usec() as i32 + }; +- Timespec::new(val.tv_sec() as sys::time::time_t, usec) ++ Timespec::new((val.tv_sec() as sys::time::time_t).into(), usec) + } + + /// Converts a file type as returned by the file system to a FUSE file type. diff --git a/srcpkgs/sandboxfs/template b/srcpkgs/sandboxfs/template new file mode 100644 index 0000000000..0d72233758 --- /dev/null +++ b/srcpkgs/sandboxfs/template @@ -0,0 +1,18 @@ +# Template file for 'sandboxfs' +pkgname=sandboxfs +version=0.1.0 +revision=1 +wrksrc="sandboxfs-sandboxfs-${version}" +build_style=cargo +hostmakedepends="pkg-config" +makedepends="fuse-devel" +short_desc="Virtual filesystem for sandboxing" +maintainer="Alex Childs " +license="Apache-2.0" +homepage="https://github.com/bazelbuild/sandboxfs" +distfiles="https://github.com/bazelbuild/sandboxfs/archive/sandboxfs-${version}.tar.gz" +checksum=3ecead7fb1587f3c59a47d00980217c4fb1d5cc81b8ee7b6cdd86e98dec5ec8f + +post_install() { + vman man/sandboxfs.1 +}