2023-03-05 17:43:45 +03:00
|
|
|
Getting started
|
|
|
|
---------------
|
|
|
|
|
|
|
|
Build dependencies:
|
|
|
|
|
|
|
|
* libaio
|
|
|
|
* libblkid
|
2023-11-23 21:37:16 +03:00
|
|
|
* libclang
|
2023-03-05 17:43:45 +03:00
|
|
|
* libkeyutils
|
|
|
|
* liblz4
|
|
|
|
* libsodium
|
|
|
|
* liburcu
|
|
|
|
* libuuid
|
|
|
|
* libzstd
|
|
|
|
* pkg-config
|
|
|
|
* valgrind
|
|
|
|
* zlib1g
|
|
|
|
|
|
|
|
In addition a recent Rust toolchain is required (rustc, cargo), either by using
|
2024-05-28 20:25:13 +03:00
|
|
|
[rustup](https://rustup.rs/) or make sure to use a distribution where a recent
|
|
|
|
enough rustc is available. Please check `rust-version` in `Cargo.toml` to see
|
|
|
|
the minimum supported Rust version (MSRV).
|
2023-03-05 17:43:45 +03:00
|
|
|
|
2024-03-18 14:57:39 +03:00
|
|
|
``` shell
|
2024-03-18 22:34:05 +03:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
|
2024-03-18 14:57:39 +03:00
|
|
|
```
|
|
|
|
|
2023-03-05 17:43:45 +03:00
|
|
|
Debian (Bullseye or later) and Ubuntu (20.04 or later): you can install these with
|
|
|
|
|
|
|
|
``` shell
|
|
|
|
apt install -y pkg-config libaio-dev libblkid-dev libkeyutils-dev \
|
|
|
|
liblz4-dev libsodium-dev liburcu-dev libzstd-dev \
|
2023-12-06 20:20:11 +03:00
|
|
|
uuid-dev zlib1g-dev valgrind libudev-dev udev git build-essential \
|
2024-03-18 14:57:39 +03:00
|
|
|
python3 python3-docutils libclang-dev debhelper dh-python
|
2023-03-05 17:43:45 +03:00
|
|
|
```
|
|
|
|
|
2024-06-01 12:52:24 +03:00
|
|
|
Starting from Debian Trixie and Ubuntu 23.10, you will additionally need:
|
|
|
|
```shell
|
|
|
|
apt install -y systemd-dev
|
|
|
|
```
|
|
|
|
|
2023-03-05 17:43:45 +03:00
|
|
|
Fedora: install the "Development tools" group along with:
|
|
|
|
```shell
|
|
|
|
dnf install -y libaio-devel libsodium-devel \
|
|
|
|
libblkid-devel libzstd-devel zlib-devel userspace-rcu-devel \
|
|
|
|
lz4-devel libuuid-devel valgrind-devel keyutils-libs-devel \
|
2023-12-20 02:38:47 +03:00
|
|
|
findutils udev systemd-devel llvm-devel
|
2023-03-05 17:43:45 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Arch: install bcachefs-tools-git from the AUR.
|
|
|
|
Or to build from source, install build dependencies with
|
|
|
|
```shell
|
2023-12-20 02:38:47 +03:00
|
|
|
pacman -S base-devel libaio keyutils libsodium liburcu zstd valgrind llvm
|
2023-03-05 17:43:45 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Then, just `make && make install`
|
|
|
|
|
|
|
|
|
|
|
|
Experimental features
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
Experimental fuse support is currently disabled by default. Fuse support is at
|
|
|
|
an early stage and may corrupt your filesystem, so it should only be used for
|
|
|
|
testing. To enable, you'll also need to add:
|
|
|
|
|
|
|
|
* libfuse3 >= 3.7
|
|
|
|
|
|
|
|
On Debian/Ubuntu (Bullseye/20.04 or later needed for libfuse >= 3.7):
|
|
|
|
```shell
|
|
|
|
apt install -y libfuse3-dev
|
|
|
|
```
|
|
|
|
|
2023-12-06 20:20:11 +03:00
|
|
|
On Fedora (32 or later needed for libfuse >= 3.7):
|
2023-03-05 17:43:45 +03:00
|
|
|
```shell
|
|
|
|
dnf install -y fuse3-devel
|
|
|
|
```
|
|
|
|
|
|
|
|
Arch:
|
|
|
|
```shell
|
|
|
|
pacman -S fuse3
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, make using the `BCACHEFS_FUSE` environment variable (make clean first if
|
|
|
|
previously built without fuse support):
|
|
|
|
|
|
|
|
```shell
|
|
|
|
BCACHEFS_FUSE=1 make && make install
|
|
|
|
```
|