Commit Graph

148 Commits

Author SHA1 Message Date
Kent Overstreet
06611a71a3 Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on the command line
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-22 16:55:06 -05:00
Kent Overstreet
47bb2d53ce Version is now specified in the makefile
git describe doesn't work for tarball releases

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-16 15:24:22 -05:00
Alexander Fougner
26efa5cf2e downgrade rust deps to compile for MSRV
- add helper for cargo update, whilst respecting MSRV

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-11-04 20:29:28 -04:00
Kent Overstreet
6e8f2857af Create symlinks on install with ln -sf
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-26 01:05:29 -04:00
Kent Overstreet
731926b5e5 Kill shell script wrappers
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>
2023-09-22 14:09:51 -04:00
Kent Overstreet
505c326cbe Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in rebalance_work() 2023-08-17 17:11:27 -04:00
Kent Overstreet
ae23e4541f fuse: Set fsname correctly
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>
2023-08-11 18:32:23 -04:00
Alexander Fougner
caeeba5152 ci: set and verify MSRV
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>
2023-08-04 20:13:38 +02:00
Bernhard M. Wiedemann
f43c9702e0 Sort input file list
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.
2023-06-08 15:07:48 +02:00
Kent Overstreet
8642d4ae10 Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-04 18:10:29 -04:00
Kent Overstreet
6b1f79d5df Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-02 00:41:47 -04:00
Kent Overstreet
0f37f9f05f Add a NO_RUST option
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>
2023-04-20 12:36:16 -04:00
Kent Overstreet
700afe1939 Delete pytest
These tests have never been useful; drop them.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2023-04-20 12:18:59 -04:00
Kent Overstreet
d22c79d2ff Fix build dependencies
Incremental builds are fast again

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-19 15:32:43 -04:00
Eric Sandeen
3deb1e0b17 add rpm make target and fix up spec file
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>
2023-03-08 10:26:44 -05:00
Kent Overstreet
b0c9ad15f4 Update bcachefs sources to 171da96d76 bcachefs: Drop some anonymous structs, unions 2023-03-04 23:33:25 -05:00
Kent Overstreet
28f703cc25 Rust now integrated into bcachefs binary
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>
2023-02-21 01:03:08 -05:00
Kent Overstreet
a104f0407b Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing btree roots for all alloc btrees
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-09 18:36:24 -05:00
Kent Overstreet
97880a7ce4 Makefile: build with -Wno-deprecated-declarations
This fixes a ZSTD warning.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-01 16:34:14 -05:00
Daniel Hill
ccaca683b2 make: remove libbcachefs.so when cleaning.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03 16:58:55 +13:00
Eric Sandeen
d9905d97d0 bcachefs-tools: add tarball make target
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>
2022-11-15 14:54:13 -05:00
Eric Sandeen
cde2d0e2fc bcachefs-tools: Prettify make output
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>
2022-11-15 14:18:47 -05:00
Kent Overstreet
c1e4d447f6 Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspace 2022-11-13 20:07:22 -05:00
Kent Overstreet
e0a51ccce8 Update bcachefs sources to 3e93567c51 bcachefs: Switch to local_clock() for fastpath time source 2022-10-15 01:04:30 -04:00
Kent Overstreet
dded444b20 Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headers 2022-08-18 12:49:48 -04:00
Kent Overstreet
986533d8d5 Update bcachefs sources to 6ddf061e68 bcachefs: Use a genradix for reading journal entries 2022-04-08 19:26:30 -04:00
Brett Holman
74c00c643e check for libkeyutils with pkg-config 2022-03-24 11:16:35 -06:00
Daniel B. Hill
2c0d0c4b7b Makefile: We need to exclude hidden folders
Sometimes user-specific apps create .c files in hidden folders breaking make.

Signed-off-by: Daniel B. Hill <daniel@gluo.nz>
2022-01-12 17:31:04 +13:00
Kent Overstreet
b3984515eb Fix makefile for building docs
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-01-10 21:38:14 -05:00
Kent Overstreet
1388212eb8 Delete old bcachefs.5 from makefile 2021-12-20 15:24:22 -05:00
Kent Overstreet
d06f5690fa Update bcachefs sources to ff3a76e1af bcachefs: Change need_whiteout_for_snapshot() to clone iterator 2021-12-19 19:37:29 -05:00
Chris Webb
49923376d1 Use scrypt from libsodium
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>
2021-10-23 12:16:08 -04:00
Kayla Firestack
ae3d49e823 Makefile: fix rst2man lookup and add pytest lookup
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>
2021-10-20 09:30:16 -04:00
Kayla Firestack
045f7d2ba1 Makefile: prefix libbcachefs.so installation with DESTDIR
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-19 14:43:08 -04:00
Kayla Firestack
f403ef61e7 rst2man: convert which to command -v
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-19 14:28:34 -04:00
Igor Velkov
a77c35a1c4 fix "no rst2man found!" build error on debian and ubuntu 2021-10-18 17:41:11 -04:00
Kent Overstreet
4ee9ebc32e Build with -fPIC
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>
2021-10-18 16:57:08 -04:00
Kayla Firestack
1f8fc31ddc split mount into a library crate for rust reuse
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
2021-10-18 16:30:52 -04:00
Brett Holman
08420d2481 Fix errors related to rst2man warning message:
- 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>
2021-10-12 00:37:02 -04:00
Brett Holman
60a6b2882e Clean up smoketest and pytests.
- 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>
2021-10-11 20:24:12 -06:00
Kent Overstreet
f06b01e9ea Update bcachefs sources to b964c6cba8 bcachefs: Change lockrestart_do() to always call bch2_trans_begin() 2021-07-28 17:26:50 -04:00
jpsollie
cb09c48a26 fixup! rst2man detection hangs
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>
2021-07-24 17:10:10 -04:00
jpsollie
0b0b0ee234 Reapply compiler checks
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>
2021-07-24 17:10:10 -04:00
Stijn Tintel
05c9879524 Makefile: detect rst2man
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>
2021-07-24 14:18:40 -04:00
Kent Overstreet
632feaa69a Bring back debug makefile target
This seems to have been dropped by mistake

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-23 18:06:02 -04:00
Brett Holman
8e6f35cbf3 Documentation fixup: made filenames more descriptive, switched parsing utility to python 2021-07-10 13:51:03 -04:00
jpsollie
54d44fe56b add bcachefs xor / xxhash support
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>
2021-07-07 20:30:39 -04:00
Kent Overstreet
8e07f30cd7 Fix some makefile misspellings
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-06 13:41:31 -04:00
Brett Holman
b916af97dd Switched documentation from asciidoc to rst, added doc autogeneration code for options 2021-07-06 00:15:44 -06:00
Kent Overstreet
07ec713e05 Update bcachefs sources to 1a510b00b6 bcachefs: Increase BTREE_TRANS_MEM_MAX 2021-07-04 23:33:54 -04:00