Kernel
Configuration
Enable the following option in the kernel configuration and
recompile the kernel:
File systems --->
<*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]
Note
CONFIG_BTRFS_FS_POSIX_ACL is required for the tests. Other Btrfs
options in the kernel are optional.
Installation of btrfs-progs
Install btrfs-progs by running the
following commands:
sed -i '1,100 s/\.gz//g' Documentation/Makefile.in &&
./configure --prefix=/usr \
--bindir=/bin \
--libdir=/lib &&
make
Before running tests, disable several that fail:
mv tests/fuzz-tests/003-multi-check-unmounted/test.sh{,.broken} &&
mv tests/fuzz-tests/004-simple-dump-tree/test.sh{,.broken} &&
mv tests/fuzz-tests/007-simple-super-recover/test.sh{,.broken} &&
mv tests/fuzz-tests/009-simple-zero-log/test.sh{,.broken} &&
mv tests/misc-tests/019-receive-clones-on-munted-subvol/test.sh{,.broken}
To test the results, issue (as the root
user):
pushd tests
./fsck-tests.sh
./mkfs-tests.sh
./convert-tests.sh
./misc-tests.sh
./cli-tests.sh
./fuzz-tests.sh
popd
Install the package as the root
user:
make install &&
ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
rm -v /lib/libbtrfs.{a,so} &&
mv -v /bin/{mkfs,fsck}.btrfs /sbin
Command Explanations
sed ...
Documentation/Makefile.in: Disables compressing man
pages to be consistent with the rest of BLFS.
--disable-documentation
: This option is
needed if the recommended dependencies are not installed.
mv tests/fuzz-tests/
...: Disables tests that fail and prevent tests
from completing.
ln -s ...
/usr/lib/libbtrfs.so: Creates a symbolic link in
the directory where it is expected.
rm
/lib/libbtrfs.{a,so}: Removes unneeded library
entries.