nixos has trouble with the shell script wrappers - readlink isn't
available by default!
But, there's a better approach: just get rid of them and use symlinks
instead, and have main() check what we're supposed to be.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Also, add helpers for the fuse.bcachefs filesystem type; this means we
can now test the fuse version with fstests.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
To prevent uncontrolled usage of new rust features, directly or from
dependencies, set a minimum supported Rust version and verify it builds.
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
so that libbcachefs.so builds in a reproducible way
in spite of non-deterministic filesystem readdir order.
See https://reproducible-builds.org/ for why this is good.
For systems without working rust/llvm/bindgen, add an option for
building without Rust. This will be less of an option in the future, as
more code gets rewritten in Rust.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Add a new make target to build an rpm. This uses rpmbuild --build-in-place,
so no SRPM is created.
Also clean up the specfile to remove manually-added Requires: that will
be auto-generated, add a couple new BuildRequires: and use macros for
file locations.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Rust is now required for building the bcachefs tool, and rust code is
now fully integrated with the C codebase - meaning it is possible to
call back and forth.
The mount helper is now a subcommand, 'mount.bcachefs' is now a small
shell wrapper that invokes 'bcachefs mount'.
This will make it easier to start rewriting other subcommands in rust,
and eventually the whole command line interface.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This makes it easy to generate a tarball, which should eventually
facilitate packaging: "make tarball"
Note that it's currently using the $(VERSION) from git describe
which may not be ideal once point releases are happening, but that
holds true for everywhere $(VERSION) is used.
All tar.xz files are removed via "make clean"
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Make the default "make" output look more like kbuild; this makes
errors and warnings much easier to spot. "Make V=1" will revert to
showing the full command lines.
This is done by redefining some implicit rules to add the echo and
the quiet variable. These changes are similar to those in xfsprogs.
and btrfs-progs
This patch also silences things if pytest-3 is not found.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
bcachefs-tools has both libscrypt and libsodium as build dependencies,
but libsodium already includes the same scrypt implementation as libscrypt,
originally written by Colin Percival.
Use the libsodium copy, dropping the extra libscrypt dependency.
Explicitly adopt the default scrypt N, r and p values from libscrypt to
avoid unintended changes in the default work parameters for bcachefs.
Signed-off-by: Chris Webb <chris@arachsys.com>
add pytest and rst2man lookups though command-v and which if available,
default to ENV/ARGS in the case of user specified locations and otherwise lookup via shell
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
The changes to how we integrate with rust code mean that we now need to
be emitting position indepedent code.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
update makefile to output shared library and rust build
fix default.nix to properly get the binary name for `ln`ing - move binary to main.rs
add rustfmt and gitignore files
move build.rs file into bch_bindgen for reuse between projects
add outputs to nix flake and checks
add mount.toml to makefile
- Warning message doesn't print and causes build to exit.
- .SHELLSTATUS doesn't work on some versions of Make.
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
- Replace depreciated tempfile with mktemp in smoketest.
- Remove unused pytest imports and variables.
- Make path lookup less fragile. Allows pytest to run from any cwd.
- Prevent exeptions caused by calling functions/methods on None objects.
- Disable fuse tests in smoketest. These are broken and add noise.
- Add missing travis CI dependency.
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
rst2man tend to hang when called without arguments, so a small -V is appended to print the version.
Also, make sure we found at least one rst2man executable
Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
The compiler checks where erroneously reverted in the Makefile - this reapplies them,
so GCC < 10 can still build the bcachefs tools
Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
On some distros, rst2man has a .py extension and there is no rst2man.
Fix build on such systems by detecting what is available.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Following the initial xxhash / xor checksum support patches in kernel, bcachefs-tools needs some updated libraries as well.
Unfortunately, xor functionality is deeply linked into several low-level functions, so we're adding a set of patches here to translate those into userspace
Signed-off-by: Janpieter Sollie <janpieter.sollie@edpnet.be>