mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-05 01:54:19 +08:00
23c01b3c1b
The C libbtrfsutil library isn't very useful for scripting, so we also want bindings for Python. Writing unit tests in Python is also much easier than doing so in C. Only Python 3 is supported; if someone really wants Python 2 support, they can write their own bindings. This commit is just the scaffolding. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
87 lines
2.3 KiB
Plaintext
87 lines
2.3 KiB
Plaintext
Installation instructions
|
|
=========================
|
|
|
|
The Btrfs utility programs require the following libraries/tools to build:
|
|
|
|
- libuuid - provided by util-linux, e2fsprogs/e2fslibs or libuuid
|
|
- libblkid - block device id library
|
|
- liblzo2 - LZO data compression library
|
|
- zlib - ZLIB data compression library
|
|
- libzstd - ZSTD data compression library version >= 1.0.0
|
|
|
|
For the btrfs-convert utility:
|
|
|
|
- e2fsprogs - ext2/ext3/ext4 file system libraries, or called e2fslibs
|
|
- libreiserfscore - reiserfs file system library version >= 3.6.27
|
|
|
|
Generating documentation:
|
|
|
|
- asciidoc - text document format tool
|
|
- xmlto - text document format tool
|
|
|
|
XATTR library should be provided by the standard C library or by
|
|
|
|
- libattr - extended attribute library
|
|
|
|
Please note that the package names may differ according to the distribution.
|
|
See https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories#Dependencies .
|
|
|
|
|
|
Building from sources
|
|
---------------------
|
|
|
|
To build from git sources you need to generate the configure script using the
|
|
autotools:
|
|
|
|
$ ./autogen.sh
|
|
|
|
To build from the released tarballs:
|
|
|
|
$ ./configure
|
|
$ make
|
|
$ make install
|
|
|
|
To install the libbtrfsutil Python bindings:
|
|
|
|
$ make install_python
|
|
|
|
You may disable building some parts like documentation, btrfs-convert or
|
|
backtrace support. See ./configure --help for more.
|
|
|
|
Specific CFLAGS or LDFLAGS should be set like
|
|
|
|
$ CFLAGS=... LDFLAGS=... ./configure --prefix=/usr
|
|
|
|
and not as arguments to make. You can specify additional flags to build via
|
|
variables EXTRA_CFLAGS and EXTRA_LDFLAGS that get appended to the predefined
|
|
values of the respective variables. There are further build tuning options
|
|
documented in the Makefile.
|
|
|
|
$ make EXTRA_CFLAGS=-ggdb3
|
|
|
|
The build utilizes autotools, dependencies for generating the configure
|
|
scripts are:
|
|
|
|
* autconf, autoheader
|
|
* automake, aclocal
|
|
* pkg-config
|
|
|
|
|
|
Statically built binaries
|
|
-------------------------
|
|
|
|
The makefiles are ready to let you build static binaries of the utilities. This
|
|
may be handy in rescue environments. Your system has to provide static version
|
|
of the libraries.
|
|
|
|
$ make static
|
|
$ make btrfs.static
|
|
$ make btrfs-convert.static
|
|
|
|
The resulting binaries have the '.static' suffix, the intermediate object
|
|
files do not conflict with the normal (dynamic) build.
|
|
|
|
|
|
References:
|
|
* https://btrfs.wiki.kernel.org
|