diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2023-01-10 15:14:32 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-01-10 13:58:07 -0500 |
commit | 67e8b34d99f70a553b93d09498772ac633661ccf (patch) | |
tree | 5aaf7352d523b8557768a2d858d6ff8d6978e45e | |
parent | a49eaf45a4436a926ea5a70dd4d2395c37f51bb8 (diff) | |
download | meta-virtualization-67e8b34d99f70a553b93d09498772ac633661ccf.tar.gz |
skopeo: fix build with btrfs-progs 6.1
| # github.com/containers/storage/drivers/btrfs
| vendor/github.com/containers/storage/drivers/btrfs/btrfs.go:387:11: args.lim.max_referenced undefined (type _Ctype_struct_btrfs_qgroup_limit has no field or method max_referenced)
| recipe skopeo-v1.8.0+gitAUTOINC+b95e081162-r0: task do_compile: Failed
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/skopeo/files/0002-fix_workaround_field_rename_in_btrfs-progs_6_1.patch | 38 | ||||
-rw-r--r-- | recipes-containers/skopeo/skopeo_git.bb | 1 |
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 @@ | |||
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 | Upstream-Status: Backport [https://github.com/containers/storage/commit/246ba3062e8b551026aef2708eee747014ce5c52] | ||
11 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
12 | --- | ||
13 | drivers/btrfs/btrfs.go | 5 ++++- | ||
14 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/drivers/btrfs/btrfs.go b/drivers/btrfs/btrfs.go | ||
17 | index 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 | ||
29 | SRCREV = "4517ea0b7be6a6743d854e05cd24f7354a487b60" | 30 | SRCREV = "4517ea0b7be6a6743d854e05cd24f7354a487b60" |