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>
Sadly, some people are still running distributions too old to properly
support rust :( In the long term we'd like to use Rust for more of
userspace (and potentially in the kernel); this is just a stopgap
measure.
This tool currently has most of the fundmental features implemented.
It can mount a filesystem specified by uuid, it can ask password for an
encrypted filesystem.
There may be some work that needs to be done to make it behave more like
a "mount.*" tool.
Related: #1
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The experimental fuse3 support is not complete yet, and fuse3 is new and
still difficult to install on some platforms.
Make it optional at compile time, and default to off.
Signed-off-by: Justin Husted <sigstop@gmail.com>
So far, these tests just test basic format, fsck, and list functions
under valgrind, as well as a few self-validation tests.
Signed-off-by: Justin Husted <sigstop@gmail.com>
* Only run the pkg-config --cflags command once (instead of every .c file)
* Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
* Removed tabs in the middle of commands to make it easier to manually re-run
commands manually (e.g. if a compilation fails)
* Replaced `cd dir; git command` in favor of $(shell git -C dir command)
* Minor version format change: dirty trees just append "+" instead of "-dirty"
and if git describe fails, it now sets the version to "v0.1-nogit"
Also, don't ignore .gitignore files.
* Compat level 10 allows parallel builds by default.
* Also changed debuild to use short arguments.
* Long arguments weren't supported until dpkg-dev 1.18.8.
This removes the implicit `-I libbcachefs` argument to $(CC), which in turn
requires a set of minor changes throughout the tools. There are two advantages
to this setup:
1) It is (arguably) easier to read, since the location of bcachefs includes
are easier to understand at a glance ("where does util.h live?")
2) It removes the need for a hack to include glibc's copy of
dirent.h explicitly via '/usr/include/dirent.h', because libbcachefs/
*also* has a dirent.h file and the compiler cannot disambiguate them.
This has some ramifications on systems where /usr/include may not
exist, such as NixOS.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
We will not always have .git available in some cases. For example, if someone
simply downloaded a tarball of the tree, or if we're building with something
like Nix and want to exclude the .git folder, we need to cope and build the
source anyway.
Signed-off-by: Austin Seipp <aseipp@pobox.com>