containerd/vendor/github.com/containerd/btrfs/v2
Akihiro Suda 52f82acb7b
btrfs: depend on kernel UAPI instead of libbtrfs
See containerd/btrfs PR 40 and moby/moby PR 44761. (Thanks to [@]neersighted.)

The containerd/btrfs library now requires headers from kernel 4.12 or newer:
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs.h
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs_tree.h

These files are licensed under the GPL-2.0 WITH Linux-syscall-note, so it should be compatible with the Apache License 2.0.
https://spdx.org/licenses/Linux-syscall-note.html

The dependency on the kernel headers only affects users building from source.
Users on older kernels may opt to not compile this library (`BUILDTAGS=no_btfs`),
or to provide headers from a newer kernel.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-10 10:07:34 +09:00
..
.gitignore btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
btrfs.c btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
btrfs.go btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
btrfs.h btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
doc.go btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
helpers.go btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
info.go btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
ioctl.go btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
LICENSE btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
Makefile btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00
README.md btrfs: depend on kernel UAPI instead of libbtrfs 2023-02-10 10:07:34 +09:00

go-btrfs

PkgGoDev Build Status Go Report Card

Native Go bindings for btrfs.

Status

These are in the early stages. We will try to maintain stability, but please vendor if you are relying on these directly.

Dependencies

v2.x

Headers from kernel 4.12 or newer. The package name is linux-libc-dev on Debian/Ubuntu, kernel-headers on Fedora and RHEL-like distros.

The headers are only required on compilation time, not on run time.

v1.x

libbtrfs headers. The package name is libbtrfs-dev on Debian/Ubuntu, btrfs-progs-devel on Fedora and CentOS 7. The package is not available for Rocky Linux and AlmaLinux.

Contribute

This package may not cover all the use cases for btrfs. If something you need is missing, please don't hesitate to submit a PR.

Note that due to struct alignment issues, this isn't yet fully native. Preferably, this could be resolved, so contributions in this direction are greatly appreciated.

Applying License Header to New Files

If you submit a contribution that adds a new file, please add the license header. You can do so manually or use the ltag tool:

$ go get github.com/kunalkushwaha/ltag
$ ltag -t ./license-templates

The above will add the appropriate licenses to Go files. New templates will need to be added if other kinds of files are added. Please consult the documentation at https://github.com/kunalkushwaha/ltag

Project details

btrfs is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the:

information in our containerd/project repository.