From 5b1e03f3148fee7818201a61b615f37f06e41825 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 10 Jan 2023 13:32:59 -0500 Subject: 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 --- ...orkaround-field-rename-in-btrfs-progs-6.1.patch | 38 ++++++++++++++++++++++ recipes-containers/podman-tui/podman-tui_git.bb | 11 +++++-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 recipes-containers/podman-tui/podman-tui/0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch (limited to 'recipes-containers') 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 @@ +From 246ba3062e8b551026aef2708eee747014ce5c52 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Wed, 28 Dec 2022 18:26:39 -0500 +Subject: [PATCH] fix: workaround field rename in btrfs-progs 6.1 + +same as kdave/btrfs-progs@0345143 + +Signed-off-by: Rui Chen +--- + drivers/btrfs/btrfs.go | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/btrfs/btrfs.go b/drivers/btrfs/btrfs.go +index e8b16b858..3d9053297 100644 +--- a/drivers/btrfs/btrfs.go ++++ b/drivers/btrfs/btrfs.go +@@ -6,6 +6,9 @@ package btrfs + /* + #include + #include ++ ++// keep struct field name compatible with btrfs-progs < 6.1. ++#define max_referenced max_rfer + #include + #include + +@@ -382,7 +385,7 @@ func subvolLimitQgroup(path string, size uint64) error { + defer closeDir(dir) + + var args C.struct_btrfs_ioctl_qgroup_limit_args +- args.lim.max_referenced = C.__u64(size) ++ args.lim.max_rfer = C.__u64(size) + args.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER + _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT, + uintptr(unsafe.Pointer(&args))) +-- +2.34.1 + 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 = " \ libgpg-error \ " -SRCREV = "ab303cba7acabe340c5aa784ffb2a5dc3ab857d4" +SRCREV_FORMAT = "podmantui_storage" +SRCREV_podmantui = "ab303cba7acabe340c5aa784ffb2a5dc3ab857d4" +SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52" SRC_URI = " \ - git://github.com/containers/podman-tui;protocol=https;branch=main \ + git://github.com/containers/podman-tui;protocol=https;name=podmantui;branch=main \ " +# Due to some other API changes, we can't directly import containers/storage at +# the right commit, so we instead extract a patch and apply it to the tree +#SRC_URI += "git://github.com/containers/storage;protocol=https;name=storage;branch=main;destsuffix=git/src/import/vendor/github.com/containers/storage" + +SRC_URI += "file://0001-fix-workaround-field-rename-in-btrfs-progs-6.1.patch;patchdir=src/import/vendor/github.com/containers/storage" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -- cgit v1.2.3-54-g00ecf