diff options
-rw-r--r-- | recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch | 38 | ||||
-rw-r--r-- | recipes-containers/buildah/buildah_git.bb | 10 |
2 files changed, 47 insertions, 1 deletions
diff --git a/recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch b/recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch new file mode 100644 index 00000000..2d64a8bc --- /dev/null +++ b/recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 246ba3062e8b551026aef2708eee747014ce5c52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rui Chen <rui@chenrui.dev> | ||
3 | Date: Wed, 28 Dec 2022 18:26:39 -0500 | ||
4 | Subject: [PATCH] fix: workaround field rename in btrfs-progs 6.1 | ||
5 | |||
6 | same as kdave/btrfs-progs@0345143 | ||
7 | |||
8 | Signed-off-by: Rui Chen <rui@chenrui.dev> | ||
9 | --- | ||
10 | drivers/btrfs/btrfs.go | 5 ++++- | ||
11 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/drivers/btrfs/btrfs.go b/drivers/btrfs/btrfs.go | ||
14 | index e8b16b858..3d9053297 100644 | ||
15 | --- a/drivers/btrfs/btrfs.go | ||
16 | +++ b/drivers/btrfs/btrfs.go | ||
17 | @@ -6,6 +6,9 @@ package btrfs | ||
18 | /* | ||
19 | #include <stdlib.h> | ||
20 | #include <dirent.h> | ||
21 | + | ||
22 | +// keep struct field name compatible with btrfs-progs < 6.1. | ||
23 | +#define max_referenced max_rfer | ||
24 | #include <btrfs/ioctl.h> | ||
25 | #include <btrfs/ctree.h> | ||
26 | |||
27 | @@ -382,7 +385,7 @@ func subvolLimitQgroup(path string, size uint64) error { | ||
28 | defer closeDir(dir) | ||
29 | |||
30 | var args C.struct_btrfs_ioctl_qgroup_limit_args | ||
31 | - args.lim.max_referenced = C.__u64(size) | ||
32 | + args.lim.max_rfer = C.__u64(size) | ||
33 | args.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER | ||
34 | _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT, | ||
35 | uintptr(unsafe.Pointer(&args))) | ||
36 | -- | ||
37 | 2.34.1 | ||
38 | |||
diff --git a/recipes-containers/buildah/buildah_git.bb b/recipes-containers/buildah/buildah_git.bb index e7803450..18985c94 100644 --- a/recipes-containers/buildah/buildah_git.bb +++ b/recipes-containers/buildah/buildah_git.bb | |||
@@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = "file://src/github.com/containers/buildah/LICENSE;md5=e3fc50a | |||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | 10 | ||
11 | BUILDAH_VERSION = "1.28" | 11 | BUILDAH_VERSION = "1.28" |
12 | SRCREV_buildah = "cfefbb64ea1fe3639c231f73e7b09bfe300744ac" | ||
13 | 12 | ||
14 | PV = "${BUILDAH_VERSION}" | 13 | PV = "${BUILDAH_VERSION}" |
15 | 14 | ||
@@ -22,9 +21,18 @@ GO_INSTALL = "${GO_IMPORT}" | |||
22 | GO_WORKDIR = "${GO_INSTALL}" | 21 | GO_WORKDIR = "${GO_INSTALL}" |
23 | GOBUILDFLAGS += "-mod vendor" | 22 | GOBUILDFLAGS += "-mod vendor" |
24 | 23 | ||
24 | SRCREV_FORMAT = "buildah_storage" | ||
25 | SRCREV_buildah = "cfefbb64ea1fe3639c231f73e7b09bfe300744ac" | ||
26 | SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52" | ||
27 | |||
25 | SRC_URI = " \ | 28 | SRC_URI = " \ |
26 | git://github.com/containers/buildah;branch=release-${BUILDAH_VERSION};name=buildah;protocol=https \ | 29 | git://github.com/containers/buildah;branch=release-${BUILDAH_VERSION};name=buildah;protocol=https \ |
27 | " | 30 | " |
31 | # Due to some other API changes, we can't directly import containers/storage at | ||
32 | # the right commit, so we instead extract a patch and apply it to the tree | ||
33 | # SRC_URI += "git://github.com/containers/storage;protocol=https;name=storage;branch=main;destsuffix=git/src/github.com/containers/buildah/vendor/github.com/containers/storage" | ||
34 | SRC_URI += "file://0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch;patchdir=src/github.com/containers/buildah/vendor/github.com/containers/storage" | ||
35 | |||
28 | 36 | ||
29 | DEPENDS = "libdevmapper btrfs-tools gpgme" | 37 | DEPENDS = "libdevmapper btrfs-tools gpgme" |
30 | RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman" | 38 | RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman" |