summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/skopeo/files/0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch38
-rw-r--r--recipes-containers/skopeo/skopeo_git.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/recipes-containers/skopeo/files/0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch b/recipes-containers/skopeo/files/0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch
new file mode 100644
index 00000000..cd3c70f4
--- /dev/null
+++ b/recipes-containers/skopeo/files/0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch
@@ -0,0 +1,38 @@
1From 246ba3062e8b551026aef2708eee747014ce5c52 Mon Sep 17 00:00:00 2001
2From: Rui Chen <rui@chenrui.dev>
3Date: Wed, 28 Dec 2022 18:26:39 -0500
4Subject: [PATCH] fix: workaround field rename in btrfs-progs 6.1
5
6same as kdave/btrfs-progs@0345143
7
8Signed-off-by: Rui Chen <rui@chenrui.dev>
9
10Upstream-Status: Backport [https://github.com/containers/storage/commit/246ba3062e8b551026aef2708eee747014ce5c52]
11Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
12---
13 drivers/btrfs/btrfs.go | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
15
16diff --git a/drivers/btrfs/btrfs.go b/drivers/btrfs/btrfs.go
17index e8b16b858e..3d9053297b 100644
18--- a/drivers/btrfs/btrfs.go
19+++ b/drivers/btrfs/btrfs.go
20@@ -6,6 +6,9 @@ package btrfs
21 /*
22 #include <stdlib.h>
23 #include <dirent.h>
24+
25+// keep struct field name compatible with btrfs-progs < 6.1.
26+#define max_referenced max_rfer
27 #include <btrfs/ioctl.h>
28 #include <btrfs/ctree.h>
29
30@@ -382,7 +385,7 @@ func subvolLimitQgroup(path string, size uint64) error {
31 defer closeDir(dir)
32
33 var args C.struct_btrfs_ioctl_qgroup_limit_args
34- args.lim.max_referenced = C.__u64(size)
35+ args.lim.max_rfer = C.__u64(size)
36 args.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER
37 _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT,
38 uintptr(unsafe.Pointer(&args)))
diff --git a/recipes-containers/skopeo/skopeo_git.bb b/recipes-containers/skopeo/skopeo_git.bb
index 88206f3f..1dfce24b 100644
--- a/recipes-containers/skopeo/skopeo_git.bb
+++ b/recipes-containers/skopeo/skopeo_git.bb
@@ -24,6 +24,7 @@ SRC_URI = " \
24 file://storage.conf \ 24 file://storage.conf \
25 file://registries.conf \ 25 file://registries.conf \
26 file://0001-makefile-add-GOBUILDFLAGS-to-go-build-call.patch \ 26 file://0001-makefile-add-GOBUILDFLAGS-to-go-build-call.patch \
27 file://0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch;patchdir=src/import/vendor/github.com/containers/storage \
27" 28"
28 29
29SRCREV = "4517ea0b7be6a6743d854e05cd24f7354a487b60" 30SRCREV = "4517ea0b7be6a6743d854e05cd24f7354a487b60"