[Buildroot] [git commit branch/2024.02.x] package/containerd: fix btrfs handling
Peter Korsgaard
peter at korsgaard.com
Mon Mar 25 07:28:29 UTC 2024
commit: https://git.buildroot.net/buildroot/commit/?id=4310f2747b5ceea7b9b7e7fa4808b267e4ea7c4d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2024.02.x
btrfs handling doesn't depend on btrfs-progs but on kernel >= 4.12 since
bump to version 1.7.7 in commit 79e01ef9506a6cdc4836912607dc594ae7b1999d
and
https://github.com/containerd/containerd/commit/024a748c092cbddde0918f2e93a646ce50116e11
resulting in the following build failure:
In file included from vendor/github.com/containerd/btrfs/v2/btrfs.go:21:0:
./btrfs.h:19:2: error: #error "Headers from kernel >= 4.12 are required on compilation time (not on run time)"
#error "Headers from kernel >= 4.12 are required on compilation time (not on run time)"
^~~~~
In file included from vendor/github.com/containerd/btrfs/v2/btrfs.go:21:0:
./btrfs.h:22:10: fatal error: linux/btrfs_tree.h: No such file or directory
#include <linux/btrfs_tree.h>
^~~~~~~~~~~~~~~~~~~~
Fixes: 79e01ef9506a6cdc4836912607dc594ae7b1999d
- http://autobuild.buildroot.org/results/d6afeef47daae1783dcce3e2b6a0a16e3e5d5fbd
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit 43ca417c0c883f245dde9be82d49c49adaceea2c)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/containerd/Config.in | 7 ++++---
package/containerd/containerd.mk | 4 +---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/package/containerd/Config.in b/package/containerd/Config.in
index 12a53bc111..2dd04b109c 100644
--- a/package/containerd/Config.in
+++ b/package/containerd/Config.in
@@ -20,12 +20,13 @@ if BR2_PACKAGE_CONTAINERD
config BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS
bool "btrfs snapshot driver"
- depends on BR2_USE_MMU # btrfs-progs
- depends on BR2_TOOLCHAIN_HAS_THREADS # btrfs-progs
- select BR2_PACKAGE_BTRFS_PROGS
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
help
Build the btrfs snapshot driver for containerd.
+comment "brtfs snapshot driver needs headers >= 4.12"
+ depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
+
config BR2_PACKAGE_CONTAINERD_DRIVER_DEVMAPPER
bool "devmapper snapshot driver"
depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2
diff --git a/package/containerd/containerd.mk b/package/containerd/containerd.mk
index 50c2965b87..9bf51c93ae 100644
--- a/package/containerd/containerd.mk
+++ b/package/containerd/containerd.mk
@@ -35,9 +35,7 @@ CONTAINERD_DEPENDENCIES += libseccomp host-pkgconf
CONTAINERD_TAGS += seccomp
endif
-ifeq ($(BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS),y)
-CONTAINERD_DEPENDENCIES += btrfs-progs
-else
+ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS),y)
CONTAINERD_TAGS += no_btrfs
endif
More information about the buildroot
mailing list