1
0
forked from ports/contrib

docker: added a patch for btrfs-progs 6.1 field rename

This commit is contained in:
Matt Housh 2022-12-29 17:49:55 -06:00
parent bf528c031f
commit a1e06d9593
3 changed files with 43 additions and 3 deletions

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3/zZANvEC1fbUjaTx6ZeeKHD6skFkKeuE+5LwAKuRqHFsPzFclegFBbjJxgVr/FzpUcRZ4J6xXtm3xFOYmLJlAI=
SHA256 (Pkgfile) = a17749207183a4a8f45f7dfad4c9895b4fe1cadfcdab5d12d9c93d98080d92c8
RWSagIOpLGJF3wtZ8CGyaqNn7ZU4mPNcRaJJXL0z7NPuxo+Qal1UByAlY8R+eqcYQXzKZBxjFeUfLNjgYhscMr2CGW3TfaCB3wI=
SHA256 (Pkgfile) = ae8ff0dc22c9d799a5db84b032aa95f431fd47e44403fb6b7326c6d551a68b3e
SHA256 (.footprint) = ef891bf504df63f9b4413ecccd3a0ce6e4a71b1a42f22e9bb9c36a6a87a2c3fe
SHA256 (moby-20.10.22.tar.gz) = ee0e2168e27ec87f1b0650e86af5d3e167a07fd2ff8c1ce3bb588f0b4f9a4658
SHA256 (cli-20.10.22.tar.gz) = 84d71ac2b508b54e8df9f3ea425aa33e254fd3645fe9bad5619b98eaffb33408
@ -8,3 +8,4 @@ SHA256 (docker-man-pages-20.10.22.tar.xz) = 7b4ca06c18e06f33dc25e00ad5b52f7aba55
SHA256 (libnetwork-dcdf8f1.tar.xz) = c31606b3ab192208cf284b68ea978ca303e8d30afef5af91d227c1bb8aaaa96a
SHA256 (docker.rc) = 258ff4d10d199b2b847df07d22eac04bb8bd749a10af29d67111e53a8b81a46c
SHA256 (docker.conf) = 51f264d548d6d3871d07670e7e5ba6414c3b4317dcc6d59cd7cc45dc1045659e
SHA256 (btrfs-graphdriver.patch) = f3beff60e8dbdc768a2d632f3c861f4829e02b2695d085f66f423b2395cb3f90

View File

@ -12,9 +12,12 @@ source=(https://github.com/moby/moby/archive/v${version}/moby-${version}.tar.gz
https://github.com/docker/cli/archive/v${version}/cli-${version}.tar.gz \
http://jaeger.morpheus.net/linux/crux/files/$name-man-pages-$version.tar.xz \
http://jaeger.morpheus.net/linux/crux/files/libnetwork-dcdf8f1.tar.xz \
$name.rc $name.conf)
$name.rc $name.conf
btrfs-graphdriver.patch)
build() {
patch -p1 -d $SRC/moby-$version -i $SRC/btrfs-graphdriver.patch
export GO111MODULE=auto
export GOPATH=$SRC
export DOCKER_GITCOMMIT=42c8b31

View File

@ -0,0 +1,36 @@
From ffbbe3d103b045c3f8ec5f74aa71b7a314fd57fe Mon Sep 17 00:00:00 2001
From: Shengjing Zhu <zhsj@debian.org>
Date: Thu, 29 Dec 2022 02:37:39 +0800
Subject: [PATCH] daemon/graphdriver/btrfs: workaround field rename in
btrfs-progs 6.1
Closes: #44698
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
---
daemon/graphdriver/btrfs/btrfs.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/daemon/graphdriver/btrfs/btrfs.go b/daemon/graphdriver/btrfs/btrfs.go
index 720f1ab0cd43..f2f6bf9e975b 100644
--- a/daemon/graphdriver/btrfs/btrfs.go
+++ b/daemon/graphdriver/btrfs/btrfs.go
@@ -6,6 +6,9 @@ package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs"
/*
#include <stdlib.h>
#include <dirent.h>
+
+// keep struct field name compatible with btrfs-progs < 6.1.
+#define max_referenced max_rfer
#include <btrfs/ioctl.h>
#include <btrfs/ctree.h>
@@ -395,7 +398,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)))