diff options
-rw-r--r-- | recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch | 40 | ||||
-rw-r--r-- | recipes-containers/buildah/buildah_git.bb | 21 |
2 files changed, 5 insertions, 56 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 deleted file mode 100644 index 9b895c53..00000000 --- a/recipes-containers/buildah/buildah/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
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 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | |||
10 | Signed-off-by: Rui Chen <rui@chenrui.dev> | ||
11 | --- | ||
12 | drivers/btrfs/btrfs.go | 5 ++++- | ||
13 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/drivers/btrfs/btrfs.go b/drivers/btrfs/btrfs.go | ||
16 | index e8b16b858..3d9053297 100644 | ||
17 | --- a/drivers/btrfs/btrfs.go | ||
18 | +++ b/drivers/btrfs/btrfs.go | ||
19 | @@ -6,6 +6,9 @@ package btrfs | ||
20 | /* | ||
21 | #include <stdlib.h> | ||
22 | #include <dirent.h> | ||
23 | + | ||
24 | +// keep struct field name compatible with btrfs-progs < 6.1. | ||
25 | +#define max_referenced max_rfer | ||
26 | #include <btrfs/ioctl.h> | ||
27 | #include <btrfs/ctree.h> | ||
28 | |||
29 | @@ -382,7 +385,7 @@ func subvolLimitQgroup(path string, size uint64) error { | ||
30 | defer closeDir(dir) | ||
31 | |||
32 | var args C.struct_btrfs_ioctl_qgroup_limit_args | ||
33 | - args.lim.max_referenced = C.__u64(size) | ||
34 | + args.lim.max_rfer = C.__u64(size) | ||
35 | args.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER | ||
36 | _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT, | ||
37 | uintptr(unsafe.Pointer(&args))) | ||
38 | -- | ||
39 | 2.34.1 | ||
40 | |||
diff --git a/recipes-containers/buildah/buildah_git.bb b/recipes-containers/buildah/buildah_git.bb index 18985c94..3c17c98c 100644 --- a/recipes-containers/buildah/buildah_git.bb +++ b/recipes-containers/buildah/buildah_git.bb | |||
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://src/github.com/containers/buildah/LICENSE;md5=e3fc50a | |||
8 | 8 | ||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | 10 | ||
11 | BUILDAH_VERSION = "1.28" | 11 | BUILDAH_VERSION = "1.29" |
12 | 12 | ||
13 | PV = "${BUILDAH_VERSION}" | 13 | PV = "${BUILDAH_VERSION}" |
14 | 14 | ||
@@ -22,17 +22,12 @@ GO_WORKDIR = "${GO_INSTALL}" | |||
22 | GOBUILDFLAGS += "-mod vendor" | 22 | GOBUILDFLAGS += "-mod vendor" |
23 | 23 | ||
24 | SRCREV_FORMAT = "buildah_storage" | 24 | SRCREV_FORMAT = "buildah_storage" |
25 | SRCREV_buildah = "cfefbb64ea1fe3639c231f73e7b09bfe300744ac" | 25 | SRCREV_buildah = "7fa17a8428727eb3ecaca088bda1ebec590eeb8c" |
26 | SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52" | 26 | SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52" |
27 | 27 | ||
28 | SRC_URI = " \ | 28 | SRC_URI = " \ |
29 | 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 \ |
30 | " | 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 | |||
36 | 31 | ||
37 | DEPENDS = "libdevmapper btrfs-tools gpgme" | 32 | DEPENDS = "libdevmapper btrfs-tools gpgme" |
38 | RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman" | 33 | RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman" |
@@ -45,15 +40,9 @@ do_compile:prepend() { | |||
45 | go_do_compile() { | 40 | go_do_compile() { |
46 | export TMPDIR="${GOTMPDIR}" | 41 | export TMPDIR="${GOTMPDIR}" |
47 | if [ -n "${GO_INSTALL}" ]; then | 42 | if [ -n "${GO_INSTALL}" ]; then |
48 | if [ -n "${GO_LINKSHARED}" ]; then | 43 | ${GO} install ${GOBUILDFLAGS} ./cmd/buildah |
49 | ${GO} install ${GOBUILDFLAGS} ./cmd/buildah | 44 | ${GO} install ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go |
50 | ${GO} install ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go | 45 | ${GO} install ${GOBUILDFLAGS} ./tests/copy/copy.go |
51 | ${GO} install ${GOBUILDFLAGS} ./tests/copy/copy.go | ||
52 | rm -rf ${B}/bin | ||
53 | fi | ||
54 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./cmd/buildah | ||
55 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go | ||
56 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/copy/copy.go | ||
57 | fi | 46 | fi |
58 | } | 47 | } |
59 | 48 | ||