diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-01-10 13:32:59 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-01-10 13:58:07 -0500 |
commit | 5b1e03f3148fee7818201a61b615f37f06e41825 (patch) | |
tree | 58348995594a90ad431b11fed8dbd1d306ff49ce /recipes-containers/podman-tui | |
parent | 0b9260ade57d271b6846c6b3f434eec594594308 (diff) | |
download | meta-virtualization-5b1e03f3148fee7818201a61b615f37f06e41825.tar.gz |
podman-tui: fix build with btrfs-tools 6.1
We'd really prefer to bump the vendor SRCREV and allow the fetcher
to bring in the pending change without needing a patch, but there
are other API changes that trickle through the code.
So we extract just the patch we need, and leave the SRCREV info
in the recipe, to document the source. When the upstream updates
its vendor/ directory, we can drop this (as the patch will no
longer apply)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/podman-tui')
-rw-r--r-- | recipes-containers/podman-tui/podman-tui/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch | 38 | ||||
-rw-r--r-- | recipes-containers/podman-tui/podman-tui_git.bb | 11 |
2 files changed, 47 insertions, 2 deletions
diff --git a/recipes-containers/podman-tui/podman-tui/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch b/recipes-containers/podman-tui/podman-tui/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch new file mode 100644 index 00000000..2d64a8bc --- /dev/null +++ b/recipes-containers/podman-tui/podman-tui/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/podman-tui/podman-tui_git.bb b/recipes-containers/podman-tui/podman-tui_git.bb index 143c683f..5bcd0208 100644 --- a/recipes-containers/podman-tui/podman-tui_git.bb +++ b/recipes-containers/podman-tui/podman-tui_git.bb | |||
@@ -17,10 +17,17 @@ DEPENDS = " \ | |||
17 | libgpg-error \ | 17 | libgpg-error \ |
18 | " | 18 | " |
19 | 19 | ||
20 | SRCREV = "ab303cba7acabe340c5aa784ffb2a5dc3ab857d4" | 20 | SRCREV_FORMAT = "podmantui_storage" |
21 | SRCREV_podmantui = "ab303cba7acabe340c5aa784ffb2a5dc3ab857d4" | ||
22 | SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52" | ||
21 | SRC_URI = " \ | 23 | SRC_URI = " \ |
22 | git://github.com/containers/podman-tui;protocol=https;branch=main \ | 24 | git://github.com/containers/podman-tui;protocol=https;name=podmantui;branch=main \ |
23 | " | 25 | " |
26 | # Due to some other API changes, we can't directly import containers/storage at | ||
27 | # the right commit, so we instead extract a patch and apply it to the tree | ||
28 | #SRC_URI += "git://github.com/containers/storage;protocol=https;name=storage;branch=main;destsuffix=git/src/import/vendor/github.com/containers/storage" | ||
29 | |||
30 | SRC_URI += "file://0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch;patchdir=src/import/vendor/github.com/containers/storage" | ||
24 | 31 | ||
25 | LICENSE = "Apache-2.0" | 32 | LICENSE = "Apache-2.0" |
26 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" | 33 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" |