2024-12-23 22:12:26 -06:00
|
|
|
# Build
|
2024-12-21 16:36:07 +01:00
|
|
|
|
|
|
|
|
**NOTE:** Prebuilt packages can be found at and recommended for most
|
|
|
|
|
users: https://github.com/trapexit/mergerfs/releases
|
|
|
|
|
|
|
|
|
|
**NOTE:** Only tagged releases are supported. `master` and other
|
|
|
|
|
branches should be considered works in progress.
|
|
|
|
|
|
|
|
|
|
First, get the code from [github](https://github.com/trapexit/mergerfs).
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ git clone https://github.com/trapexit/mergerfs.git
|
|
|
|
|
$ # or
|
|
|
|
|
$ wget https://github.com/trapexit/mergerfs/releases/download/<ver>/mergerfs-<ver>.tar.gz
|
|
|
|
|
```
|
|
|
|
|
|
2024-12-23 22:12:26 -06:00
|
|
|
## Debian / Ubuntu
|
2024-12-21 16:36:07 +01:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ cd mergerfs
|
2025-04-28 12:00:20 -07:00
|
|
|
$ sudo buildtools/install-build-pkgs
|
2024-12-21 16:36:07 +01:00
|
|
|
$ make deb
|
|
|
|
|
$ sudo dpkg -i ../mergerfs_<version>_<arch>.deb
|
|
|
|
|
```
|
|
|
|
|
|
2026-11-05 14:14:03 -06:00
|
|
|
Debian package compilation uses the available CPUs by default. To limit
|
|
|
|
|
parallelism, set `DEB_BUILD_OPTIONS`:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ DEB_BUILD_OPTIONS=parallel=4 make deb
|
|
|
|
|
```
|
|
|
|
|
|
2024-12-23 22:12:26 -06:00
|
|
|
## RHEL / CentOS / Rocky / Fedora
|
2024-12-21 16:36:07 +01:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ su -
|
2024-12-23 22:12:26 -06:00
|
|
|
# cd mergerfs
|
2025-04-28 12:00:20 -07:00
|
|
|
# buildtools/install-build-pkgs
|
2024-12-23 22:12:26 -06:00
|
|
|
# make rpm
|
|
|
|
|
# rpm -i rpmbuild/RPMS/<arch>/mergerfs-<version>.<arch>.rpm
|
|
|
|
|
```
|
|
|
|
|
|
2026-11-02 18:57:58 -06:00
|
|
|
Fedora 45 rejects unsigned RPMs by default. When installing a locally
|
|
|
|
|
built RPM that you trust, pass `--nosignature` to `rpm` to allow that
|
|
|
|
|
unsigned package.
|
|
|
|
|
|
2026-11-05 14:14:03 -06:00
|
|
|
Rocky Linux container builds activate newer GCC Toolsets when available.
|
|
|
|
|
Both the Rocky 10 `/usr/lib/gcc-toolset/<version>-env.source` activation
|
|
|
|
|
script and the older `/opt/rh/gcc-toolset-<version>/enable` layout are
|
|
|
|
|
supported.
|
|
|
|
|
|
2026-11-02 18:57:58 -06:00
|
|
|
## Container packages
|
|
|
|
|
|
|
|
|
|
Package build targets are defined in `buildtools/containerfiles/`, with
|
|
|
|
|
the standard distro targets listed in `buildtools/target-containers.txt`.
|
2026-11-05 14:14:03 -06:00
|
|
|
Debian release builds target Debian 12 and 13. Other targets include
|
|
|
|
|
Fedora 45 on `amd64` and `arm64`, and Ubuntu 26.10 on `amd64`, `arm64`,
|
|
|
|
|
`armhf`, and `riscv64`. Foreign-architecture builds require QEMU/binfmt
|
|
|
|
|
support.
|
2026-11-02 18:57:58 -06:00
|
|
|
|
2025-01-12 14:55:04 -06:00
|
|
|
## Generic Linux
|
2024-12-23 22:12:26 -06:00
|
|
|
|
2025-01-12 14:55:04 -06:00
|
|
|
Have git, g++ or clang, make, python installed.
|
2024-12-23 22:12:26 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ cd mergerfs
|
|
|
|
|
$ make
|
|
|
|
|
$ sudo make install
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-12 14:55:04 -06:00
|
|
|
## FreeBSD
|
|
|
|
|
|
|
|
|
|
Have git, g++ or clang, gmake, python installed.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ cd mergerfs
|
|
|
|
|
$ gmake
|
|
|
|
|
$ gmake install # as root
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2024-12-23 22:12:26 -06:00
|
|
|
## Build options
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ make help
|
|
|
|
|
usage: make
|
|
|
|
|
|
|
|
|
|
make USE_XATTR=0 - build program without xattrs functionality
|
|
|
|
|
make STATIC=1 - build static binary
|
|
|
|
|
make LTO=1 - build with link time optimization
|
2024-12-21 16:36:07 +01:00
|
|
|
```
|