diff options
Diffstat (limited to 'filesystems/sandboxfs')
-rw-r--r-- | filesystems/sandboxfs/Makefile | 91 | ||||
-rw-r--r-- | filesystems/sandboxfs/distinfo | 133 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-powerpc | 62 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_lib.rs | 15 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_nodes_conv.rs | 41 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_nodes_mod.rs | 23 | ||||
-rw-r--r-- | filesystems/sandboxfs/pkg-descr | 9 | ||||
-rw-r--r-- | filesystems/sandboxfs/pkg-message | 10 |
8 files changed, 384 insertions, 0 deletions
diff --git a/filesystems/sandboxfs/Makefile b/filesystems/sandboxfs/Makefile new file mode 100644 index 000000000000..51512f949899 --- /dev/null +++ b/filesystems/sandboxfs/Makefile @@ -0,0 +1,91 @@ +PORTNAME= sandboxfs +DISTVERSIONPREFIX= sandboxfs- +DISTVERSION= 0.2.0 +PORTREVISION= 42 +CATEGORIES= filesystems +PKGNAMEPREFIX= fusefs- + +MAINTAINER= mikael@FreeBSD.org +COMMENT= Virtual file system for sandboxing +WWW= https://github.com/bazelbuild/sandboxfs + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cargo fuse +USE_GITHUB= yes +GH_ACCOUNT= bazelbuild + +CARGO_CRATES= aho-corasick-0.7.10 \ + arc-swap-0.4.5 \ + atty-0.2.14 \ + backtrace-0.3.46 \ + backtrace-sys-0.1.35 \ + bitflags-1.2.1 \ + cc-1.0.50 \ + cfg-if-0.1.10 \ + cpuprofiler-0.0.4 \ + env_logger-0.5.13 \ + error-chain-0.12.2 \ + failure-0.1.7 \ + failure_derive-0.1.7 \ + fuse-0.3.1 \ + getopts-0.2.21 \ + getrandom-0.1.14 \ + hermit-abi-0.1.11 \ + humantime-1.3.0 \ + itoa-0.4.5 \ + lazy_static-1.4.0 \ + libc-0.2.69 \ + log-0.3.9 \ + log-0.4.8 \ + memchr-2.3.3 \ + nix-0.12.1 \ + num_cpus-1.13.0 \ + pkg-config-0.3.17 \ + ppv-lite86-0.2.6 \ + proc-macro2-1.0.10 \ + quick-error-1.2.3 \ + quote-1.0.3 \ + rand-0.7.3 \ + rand_chacha-0.2.2 \ + rand_core-0.5.1 \ + rand_hc-0.2.0 \ + redox_syscall-0.1.56 \ + regex-1.3.7 \ + regex-syntax-0.6.17 \ + remove_dir_all-0.5.2 \ + rustc-demangle-0.1.16 \ + ryu-1.0.3 \ + serde-1.0.106 \ + serde_derive-1.0.106 \ + serde_json-1.0.51 \ + signal-hook-0.1.13 \ + signal-hook-registry-1.2.0 \ + syn-1.0.17 \ + synstructure-0.12.3 \ + tempfile-3.1.0 \ + termcolor-1.1.0 \ + thread-scoped-1.0.2 \ + thread_local-1.0.1 \ + threadpool-1.7.1 \ + time-0.1.43 \ + unicode-width-0.1.7 \ + unicode-xid-0.2.0 \ + users-0.9.1 \ + version_check-0.9.1 \ + void-1.0.2 \ + wasi-0.9.0+wasi-snapshot-preview1 \ + winapi-0.3.8 \ + winapi-i686-pc-windows-gnu-0.4.0 \ + winapi-util-0.1.5 \ + winapi-x86_64-pc-windows-gnu-0.4.0 \ + xattr-0.2.2 + +PLIST_FILES= bin/sandboxfs \ + share/man/man1/sandboxfs.1.gz + +post-install: + ${INSTALL_MAN} ${WRKSRC}/man/sandboxfs.1 ${STAGEDIR}${PREFIX}/share/man/man1 + +.include <bsd.port.mk> diff --git a/filesystems/sandboxfs/distinfo b/filesystems/sandboxfs/distinfo new file mode 100644 index 000000000000..42005c53f6bd --- /dev/null +++ b/filesystems/sandboxfs/distinfo @@ -0,0 +1,133 @@ +TIMESTAMP = 1587409578 +SHA256 (rust/crates/aho-corasick-0.7.10.tar.gz) = 8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada +SIZE (rust/crates/aho-corasick-0.7.10.tar.gz) = 111039 +SHA256 (rust/crates/arc-swap-0.4.5.tar.gz) = d663a8e9a99154b5fb793032533f6328da35e23aac63d5c152279aa8ba356825 +SIZE (rust/crates/arc-swap-0.4.5.tar.gz) = 48047 +SHA256 (rust/crates/atty-0.2.14.tar.gz) = d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8 +SIZE (rust/crates/atty-0.2.14.tar.gz) = 5470 +SHA256 (rust/crates/backtrace-0.3.46.tar.gz) = b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e +SIZE (rust/crates/backtrace-0.3.46.tar.gz) = 68107 +SHA256 (rust/crates/backtrace-sys-0.1.35.tar.gz) = 7de8aba10a69c8e8d7622c5710229485ec32e9d55fdad160ea559c086fdcd118 +SIZE (rust/crates/backtrace-sys-0.1.35.tar.gz) = 635446 +SHA256 (rust/crates/bitflags-1.2.1.tar.gz) = cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693 +SIZE (rust/crates/bitflags-1.2.1.tar.gz) = 16745 +SHA256 (rust/crates/cc-1.0.50.tar.gz) = 95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd +SIZE (rust/crates/cc-1.0.50.tar.gz) = 49792 +SHA256 (rust/crates/cfg-if-0.1.10.tar.gz) = 4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822 +SIZE (rust/crates/cfg-if-0.1.10.tar.gz) = 7933 +SHA256 (rust/crates/cpuprofiler-0.0.4.tar.gz) = 43f8479dbcfd2bbaa0c0c26779b913052b375981cdf533091f2127ea3d42e52b +SIZE (rust/crates/cpuprofiler-0.0.4.tar.gz) = 97586 +SHA256 (rust/crates/env_logger-0.5.13.tar.gz) = 15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38 +SIZE (rust/crates/env_logger-0.5.13.tar.gz) = 25275 +SHA256 (rust/crates/error-chain-0.12.2.tar.gz) = d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd +SIZE (rust/crates/error-chain-0.12.2.tar.gz) = 29761 +SHA256 (rust/crates/failure-0.1.7.tar.gz) = b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b +SIZE (rust/crates/failure-0.1.7.tar.gz) = 37416 +SHA256 (rust/crates/failure_derive-0.1.7.tar.gz) = 030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231 +SIZE (rust/crates/failure_derive-0.1.7.tar.gz) = 4902 +SHA256 (rust/crates/fuse-0.3.1.tar.gz) = 80e57070510966bfef93662a81cb8aa2b1c7db0964354fa9921434f04b9e8660 +SIZE (rust/crates/fuse-0.3.1.tar.gz) = 25001 +SHA256 (rust/crates/getopts-0.2.21.tar.gz) = 14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5 +SIZE (rust/crates/getopts-0.2.21.tar.gz) = 18457 +SHA256 (rust/crates/getrandom-0.1.14.tar.gz) = 7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb +SIZE (rust/crates/getrandom-0.1.14.tar.gz) = 24698 +SHA256 (rust/crates/hermit-abi-0.1.11.tar.gz) = 8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15 +SIZE (rust/crates/hermit-abi-0.1.11.tar.gz) = 9203 +SHA256 (rust/crates/humantime-1.3.0.tar.gz) = df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f +SIZE (rust/crates/humantime-1.3.0.tar.gz) = 17020 +SHA256 (rust/crates/itoa-0.4.5.tar.gz) = b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e +SIZE (rust/crates/itoa-0.4.5.tar.gz) = 11194 +SHA256 (rust/crates/lazy_static-1.4.0.tar.gz) = e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646 +SIZE (rust/crates/lazy_static-1.4.0.tar.gz) = 10443 +SHA256 (rust/crates/libc-0.2.69.tar.gz) = 99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005 +SIZE (rust/crates/libc-0.2.69.tar.gz) = 472393 +SHA256 (rust/crates/log-0.3.9.tar.gz) = e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b +SIZE (rust/crates/log-0.3.9.tar.gz) = 16686 +SHA256 (rust/crates/log-0.4.8.tar.gz) = 14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7 +SIZE (rust/crates/log-0.4.8.tar.gz) = 31297 +SHA256 (rust/crates/memchr-2.3.3.tar.gz) = 3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400 +SIZE (rust/crates/memchr-2.3.3.tar.gz) = 22566 +SHA256 (rust/crates/nix-0.12.1.tar.gz) = 319fffb13b63c0f4ff5a4e1c97566e7e741561ff5d03bf8bbf11653454bbd70b +SIZE (rust/crates/nix-0.12.1.tar.gz) = 173207 +SHA256 (rust/crates/num_cpus-1.13.0.tar.gz) = 05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3 +SIZE (rust/crates/num_cpus-1.13.0.tar.gz) = 14704 +SHA256 (rust/crates/pkg-config-0.3.17.tar.gz) = 05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677 +SIZE (rust/crates/pkg-config-0.3.17.tar.gz) = 14533 +SHA256 (rust/crates/ppv-lite86-0.2.6.tar.gz) = 74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b +SIZE (rust/crates/ppv-lite86-0.2.6.tar.gz) = 20522 +SHA256 (rust/crates/proc-macro2-1.0.10.tar.gz) = df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3 +SIZE (rust/crates/proc-macro2-1.0.10.tar.gz) = 35622 +SHA256 (rust/crates/quick-error-1.2.3.tar.gz) = a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0 +SIZE (rust/crates/quick-error-1.2.3.tar.gz) = 15066 +SHA256 (rust/crates/quote-1.0.3.tar.gz) = 2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f +SIZE (rust/crates/quote-1.0.3.tar.gz) = 22939 +SHA256 (rust/crates/rand-0.7.3.tar.gz) = 6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03 +SIZE (rust/crates/rand-0.7.3.tar.gz) = 112246 +SHA256 (rust/crates/rand_chacha-0.2.2.tar.gz) = f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402 +SIZE (rust/crates/rand_chacha-0.2.2.tar.gz) = 13267 +SHA256 (rust/crates/rand_core-0.5.1.tar.gz) = 90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19 +SIZE (rust/crates/rand_core-0.5.1.tar.gz) = 21116 +SHA256 (rust/crates/rand_hc-0.2.0.tar.gz) = ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c +SIZE (rust/crates/rand_hc-0.2.0.tar.gz) = 11670 +SHA256 (rust/crates/redox_syscall-0.1.56.tar.gz) = 2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84 +SIZE (rust/crates/redox_syscall-0.1.56.tar.gz) = 17117 +SHA256 (rust/crates/regex-1.3.7.tar.gz) = a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692 +SIZE (rust/crates/regex-1.3.7.tar.gz) = 235600 +SHA256 (rust/crates/regex-syntax-0.6.17.tar.gz) = 7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae +SIZE (rust/crates/regex-syntax-0.6.17.tar.gz) = 294004 +SHA256 (rust/crates/remove_dir_all-0.5.2.tar.gz) = 4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e +SIZE (rust/crates/remove_dir_all-0.5.2.tar.gz) = 8907 +SHA256 (rust/crates/rustc-demangle-0.1.16.tar.gz) = 4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783 +SIZE (rust/crates/rustc-demangle-0.1.16.tar.gz) = 19137 +SHA256 (rust/crates/ryu-1.0.3.tar.gz) = 535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76 +SIZE (rust/crates/ryu-1.0.3.tar.gz) = 41983 +SHA256 (rust/crates/serde-1.0.106.tar.gz) = 36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399 +SIZE (rust/crates/serde-1.0.106.tar.gz) = 73343 +SHA256 (rust/crates/serde_derive-1.0.106.tar.gz) = 9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c +SIZE (rust/crates/serde_derive-1.0.106.tar.gz) = 49719 +SHA256 (rust/crates/serde_json-1.0.51.tar.gz) = da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9 +SIZE (rust/crates/serde_json-1.0.51.tar.gz) = 72691 +SHA256 (rust/crates/signal-hook-0.1.13.tar.gz) = 10b9f3a1686a29f53cfd91ee5e3db3c12313ec02d33765f02c1a9645a1811e2c +SIZE (rust/crates/signal-hook-0.1.13.tar.gz) = 26045 +SHA256 (rust/crates/signal-hook-registry-1.2.0.tar.gz) = 94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41 +SIZE (rust/crates/signal-hook-registry-1.2.0.tar.gz) = 14490 +SHA256 (rust/crates/syn-1.0.17.tar.gz) = 0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03 +SIZE (rust/crates/syn-1.0.17.tar.gz) = 198158 +SHA256 (rust/crates/synstructure-0.12.3.tar.gz) = 67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545 +SIZE (rust/crates/synstructure-0.12.3.tar.gz) = 17788 +SHA256 (rust/crates/tempfile-3.1.0.tar.gz) = 7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9 +SIZE (rust/crates/tempfile-3.1.0.tar.gz) = 25823 +SHA256 (rust/crates/termcolor-1.1.0.tar.gz) = bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f +SIZE (rust/crates/termcolor-1.1.0.tar.gz) = 17193 +SHA256 (rust/crates/thread-scoped-1.0.2.tar.gz) = bcbb6aa301e5d3b0b5ef639c9a9c7e2f1c944f177b460c04dc24c69b1fa2bd99 +SIZE (rust/crates/thread-scoped-1.0.2.tar.gz) = 4321 +SHA256 (rust/crates/thread_local-1.0.1.tar.gz) = d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14 +SIZE (rust/crates/thread_local-1.0.1.tar.gz) = 12609 +SHA256 (rust/crates/threadpool-1.7.1.tar.gz) = e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865 +SIZE (rust/crates/threadpool-1.7.1.tar.gz) = 15756 +SHA256 (rust/crates/time-0.1.43.tar.gz) = ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438 +SIZE (rust/crates/time-0.1.43.tar.gz) = 28653 +SHA256 (rust/crates/unicode-width-0.1.7.tar.gz) = caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479 +SIZE (rust/crates/unicode-width-0.1.7.tar.gz) = 16644 +SHA256 (rust/crates/unicode-xid-0.2.0.tar.gz) = 826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c +SIZE (rust/crates/unicode-xid-0.2.0.tar.gz) = 14994 +SHA256 (rust/crates/users-0.9.1.tar.gz) = c72f4267aea0c3ec6d07eaabea6ead7c5ddacfafc5e22bcf8d186706851fb4cf +SIZE (rust/crates/users-0.9.1.tar.gz) = 20456 +SHA256 (rust/crates/version_check-0.9.1.tar.gz) = 078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce +SIZE (rust/crates/version_check-0.9.1.tar.gz) = 11459 +SHA256 (rust/crates/void-1.0.2.tar.gz) = 6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d +SIZE (rust/crates/void-1.0.2.tar.gz) = 2356 +SHA256 (rust/crates/wasi-0.9.0+wasi-snapshot-preview1.tar.gz) = cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519 +SIZE (rust/crates/wasi-0.9.0+wasi-snapshot-preview1.tar.gz) = 31521 +SHA256 (rust/crates/winapi-0.3.8.tar.gz) = 8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6 +SIZE (rust/crates/winapi-0.3.8.tar.gz) = 1128308 +SHA256 (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.tar.gz) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6 +SIZE (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.tar.gz) = 2918815 +SHA256 (rust/crates/winapi-util-0.1.5.tar.gz) = 70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178 +SIZE (rust/crates/winapi-util-0.1.5.tar.gz) = 10164 +SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f +SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz) = 2947998 +SHA256 (rust/crates/xattr-0.2.2.tar.gz) = 244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c +SIZE (rust/crates/xattr-0.2.2.tar.gz) = 11750 +SHA256 (bazelbuild-sandboxfs-sandboxfs-0.2.0_GH0.tar.gz) = bff68e7d33ae56a3f34a79a74b2576599f5ccc381a237bbc10b5a3c3ea106b60 +SIZE (bazelbuild-sandboxfs-sandboxfs-0.2.0_GH0.tar.gz) = 118702 diff --git a/filesystems/sandboxfs/files/patch-powerpc b/filesystems/sandboxfs/files/patch-powerpc new file mode 100644 index 000000000000..df525d6e5b13 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-powerpc @@ -0,0 +1,62 @@ +--- cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2020-03-17 20:35:43 UTC ++++ cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/mod.rs +@@ -1486,6 +1486,9 @@ cfg_if! { + } else if #[cfg(target_arch = "powerpc64")] { + mod powerpc64; + pub use self::powerpc64::*; ++ } else if #[cfg(target_arch = "powerpc")] { ++ mod powerpc; ++ pub use self::powerpc::*; + } else { + // Unknown target_arch + } +--- cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/powerpc.rs.orig 2021-06-23 22:40:24 UTC ++++ cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/powerpc.rs +@@ -0,0 +1,47 @@ ++pub type c_char = u8; ++pub type c_long = i32; ++pub type c_ulong = u32; ++pub type wchar_t = i32; ++pub type time_t = i64; ++pub type suseconds_t = i32; ++pub type register_t = i32; ++ ++s! { ++ pub struct stat { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ pub st_size: ::off_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_blksize: ::blksize_t, ++ pub st_flags: ::fflags_t, ++ pub st_gen: u32, ++ pub st_lspare: i32, ++ pub st_birthtime: ::time_t, ++ pub st_birthtime_nsec: ::c_long, ++ } ++} ++ ++// should be pub(crate), but that requires Rust 1.18.0 ++cfg_if! { ++ if #[cfg(libc_const_size_of)] { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; ++ } else { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = 4 - 1; ++ } ++} ++ ++pub const MAP_32BIT: ::c_int = 0x00080000; ++pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 diff --git a/filesystems/sandboxfs/files/patch-src_lib.rs b/filesystems/sandboxfs/files/patch-src_lib.rs new file mode 100644 index 000000000000..ffee85062382 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_lib.rs @@ -0,0 +1,15 @@ +--- src/lib.rs.orig 2020-04-20 18:46:46 UTC ++++ src/lib.rs +@@ -463,10 +463,10 @@ impl SandboxFS { + #[cfg(target_os = "linux")] + let code = Errno::ENODATA; + +- #[cfg(target_os = "macos")] ++ #[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "macos"))] + let code = Errno::ENOATTR; + +- #[cfg(not(any(target_os = "linux", target_os = "macos")))] ++ #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux", target_os = "macos")))] + compile_error!("Don't know what error to return on a missing getxattr"); + + Err(KernelError::from_errno(code)) diff --git a/filesystems/sandboxfs/files/patch-src_nodes_conv.rs b/filesystems/sandboxfs/files/patch-src_nodes_conv.rs new file mode 100644 index 000000000000..949974945d2c --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_nodes_conv.rs @@ -0,0 +1,41 @@ +Unbreak on i386 + +error[E0308]: mismatched types + --> src/nodes/conv.rs:72:19 + | +72 | Timespec::new(val.tv_sec() as sys::time::time_t, usec) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i64, found i32 + +--- src/nodes/conv.rs.orig 2020-04-20 18:46:46 UTC ++++ src/nodes/conv.rs +@@ -69,7 +69,7 @@ pub fn timeval_to_timespec(val: sys::time::TimeVal) -> + } 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 `sys::time::TimeVal` object into a `sys::time::TimeSpec`. +@@ -328,6 +328,10 @@ mod tests { + // modified and may not be queryable, so stub them out. + attr.ctime = BAD_TIME; + attr.crtime = BAD_TIME; ++ // Ignore rdev too ++ attr.rdev = 0; ++ // XXX: gid is always 0 when the tests run on tmpfs(5) ++ attr.gid = exp_attr.gid; + assert!(fileattrs_eq(&exp_attr, &attr)); + } + +@@ -365,6 +369,10 @@ mod tests { + // modified and may not be queryable, so stub them out. + attr.ctime = BAD_TIME; + attr.crtime = BAD_TIME; ++ // Ignore rdev too ++ attr.rdev = 0; ++ // XXX: gid is always 0 when the tests run on tmpfs(5) ++ attr.gid = exp_attr.gid; + assert!(fileattrs_eq(&exp_attr, &attr)); + } + diff --git a/filesystems/sandboxfs/files/patch-src_nodes_mod.rs b/filesystems/sandboxfs/files/patch-src_nodes_mod.rs new file mode 100644 index 000000000000..696e611469c7 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_nodes_mod.rs @@ -0,0 +1,23 @@ +libc crate defines ENOTSUP as an alias for EOPNOTSUPP. nix crate +does not re-export EOPNOTSUPP on FreeBSD but ENOTSUP is available. + +--- src/nodes/mod.rs.orig 2020-04-20 18:46:46 UTC ++++ src/nodes/mod.rs +@@ -97,7 +97,7 @@ fn setattr_mode(attr: &mut fuse::FileAttr, path: Optio + if attr.kind == fuse::FileType::Symlink { + // TODO(jmmv): Should use NoFollowSymlink to support changing the mode of a symlink if + // requested to do so, but this is not supported on Linux. +- return Err(nix::Error::from_errno(Errno::EOPNOTSUPP)); ++ return Err(nix::Error::from_errno(Errno::ENOTSUP)); + } + + let result = try_path(path, |p| +@@ -144,7 +144,7 @@ fn setattr_times(attr: &mut fuse::FileAttr, path: Opti + if attr.kind == fuse::FileType::Symlink { + eprintln!( + "utimensat not present; ignoring request to change symlink times for {:?}", path); +- Err(nix::Error::from_errno(Errno::EOPNOTSUPP)) ++ Err(nix::Error::from_errno(Errno::ENOTSUP)) + } else { + try_path(path, |p| sys::stat::utimes(p, &atime, &mtime)) + } diff --git a/filesystems/sandboxfs/pkg-descr b/filesystems/sandboxfs/pkg-descr new file mode 100644 index 000000000000..92e275c2262c --- /dev/null +++ b/filesystems/sandboxfs/pkg-descr @@ -0,0 +1,9 @@ +Sandboxfs is a FUSE file system that exposes a combination of +multiple files and directories from the host's file system in the +form of a virtual tree with an arbitrary layout. You can think of +a sandbox as an arbitrary view into the host's file system with +different access privileges per directory. + +Sandboxfs is designed to allow running commands with limited access +to the file system by using the virtual tree as their new root, and +to do so consistently across a variety of platforms. diff --git a/filesystems/sandboxfs/pkg-message b/filesystems/sandboxfs/pkg-message new file mode 100644 index 000000000000..7ec584f0028f --- /dev/null +++ b/filesystems/sandboxfs/pkg-message @@ -0,0 +1,10 @@ +[ +{ type: install + message: <<EOM +WARNING: The interaction points with sandboxfs are subject to change +at this point. In particular, the command-line interface and the +data format used to reconfigure sandboxfs while it's running will +most certainly change. +EOM +} +] |