summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/docker/docker-moby_git.bb11
-rw-r--r--recipes-containers/docker/files/0001-Allow-for-xattr-copy-failure-for-vfs.patch113
2 files changed, 5 insertions, 119 deletions
diff --git a/recipes-containers/docker/docker-moby_git.bb b/recipes-containers/docker/docker-moby_git.bb
index 79105795..cebac2b2 100644
--- a/recipes-containers/docker/docker-moby_git.bb
+++ b/recipes-containers/docker/docker-moby_git.bb
@@ -44,19 +44,18 @@ DESCRIPTION = "Linux container runtime \
44# so we get that tag, and make it our SRCREVS: 44# so we get that tag, and make it our SRCREVS:
45# 45#
46 46
47SRCREV_moby = "cb3fd005d470e80eb9076e9d09c04d6784d64d91" 47SRCREV_moby = "821e4ec4c7b13c28dbb1424f024980aed4535384"
48SRCREV_libnetwork = "3f0048413d95802b9c6c836eba06bfc54f9dbd03" 48SRCREV_libnetwork = "3f0048413d95802b9c6c836eba06bfc54f9dbd03"
49SRCREV_cli = "44a7d9537f7cf45296015a1e820c7ada55d5587d" 49SRCREV_cli = "98fdcd769bcd137f7538f898b37348f919536ea4"
50SRCREV_FORMAT = "moby_libnetwork" 50SRCREV_FORMAT = "moby_libnetwork"
51SRC_URI = "\ 51SRC_URI = "\
52 git://github.com/moby/moby.git;branch=23.0;name=moby;protocol=https \ 52 git://github.com/moby/moby.git;branch=24.0;name=moby;protocol=https \
53 git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ 53 git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \
54 git://github.com/docker/cli;branch=23.0;name=cli;destsuffix=git/cli;protocol=https \ 54 git://github.com/docker/cli;branch=24.0;name=cli;destsuffix=git/cli;protocol=https \
55 file://docker.init \ 55 file://docker.init \
56 file://0001-libnetwork-use-GO-instead-of-go.patch \ 56 file://0001-libnetwork-use-GO-instead-of-go.patch \
57 file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ 57 file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \
58 file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \ 58 file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \
59 file://0001-Allow-for-xattr-copy-failure-for-vfs.patch;patchdir=src/import \
60 " 59 "
61 60
62DOCKER_COMMIT = "${SRCREV_moby}" 61DOCKER_COMMIT = "${SRCREV_moby}"
@@ -67,7 +66,7 @@ require docker.inc
67LICENSE = "Apache-2.0" 66LICENSE = "Apache-2.0"
68LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" 67LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28"
69 68
70DOCKER_VERSION = "23.0.6" 69DOCKER_VERSION = "24.0.0"
71PV = "${DOCKER_VERSION}+git${SRCREV_moby}" 70PV = "${DOCKER_VERSION}+git${SRCREV_moby}"
72 71
73CVE_PRODUCT = "docker mobyproject:moby" 72CVE_PRODUCT = "docker mobyproject:moby"
diff --git a/recipes-containers/docker/files/0001-Allow-for-xattr-copy-failure-for-vfs.patch b/recipes-containers/docker/files/0001-Allow-for-xattr-copy-failure-for-vfs.patch
deleted file mode 100644
index b657cafd..00000000
--- a/recipes-containers/docker/files/0001-Allow-for-xattr-copy-failure-for-vfs.patch
+++ /dev/null
@@ -1,113 +0,0 @@
1From f0dbd4eaf1416074bc8845063f4b6fb285bf75bd Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 27 Apr 2023 00:42:19 -0700
4Subject: [PATCH] Allow for xattr copy failure for vfs
5
6vfs is declared to work with any filesystem, but after
7https://github.com/moby/moby/commit/31f654a704f61768828d5950a13f30bb493d1239
8it's no longer working with NFS.
9
10As the extended attribute support depends on filesystem and
11if we do copy it in vfs and do not allow failure, that would
12essentially mean that vfs does NOT support all filesystems but
13only those that support xattr.
14
15So we should just try to copy security.capabilities and allow
16for failure. In this way, vfs come back to the state of
17being able to run on any filesystem as declared in
18https://docs.docker.com/storage/storagedriver/select-storage-driver/.
19
20Fixes https://github.com/moby/moby/issues/45417
21
22Upstream-Status: Submitted [https://github.com/moby/moby/pull/45420]
23
24Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
25---
26 daemon/graphdriver/copy/copy.go | 6 ++++--
27 daemon/graphdriver/copy/copy_test.go | 4 ++--
28 daemon/graphdriver/overlay/overlay.go | 4 ++--
29 daemon/graphdriver/vfs/copy_linux.go | 2 +-
30 4 files changed, 9 insertions(+), 7 deletions(-)
31
32diff --git a/daemon/graphdriver/copy/copy.go b/daemon/graphdriver/copy/copy.go
33index 0fb8a1a9d9..f6a5b74af5 100644
34--- a/daemon/graphdriver/copy/copy.go
35+++ b/daemon/graphdriver/copy/copy.go
36@@ -116,7 +116,7 @@ type dirMtimeInfo struct {
37 //
38 // The copyOpaqueXattrs controls if "trusted.overlay.opaque" xattrs are copied.
39 // Passing false disables copying "trusted.overlay.opaque" xattrs.
40-func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool) error {
41+func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool, allowXattrFailure bool) error {
42 copyWithFileRange := true
43 copyWithFileClone := true
44
45@@ -210,7 +210,9 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool) error
46 }
47
48 if err := copyXattr(srcPath, dstPath, "security.capability"); err != nil {
49- return err
50+ if !allowXattrFailure {
51+ return err
52+ }
53 }
54
55 if copyOpaqueXattrs {
56diff --git a/daemon/graphdriver/copy/copy_test.go b/daemon/graphdriver/copy/copy_test.go
57index 8dcd8d9d56..340c715f5f 100644
58--- a/daemon/graphdriver/copy/copy_test.go
59+++ b/daemon/graphdriver/copy/copy_test.go
60@@ -40,7 +40,7 @@ func TestCopyDir(t *testing.T) {
61 assert.NilError(t, err)
62 defer os.RemoveAll(dstDir)
63
64- assert.Check(t, DirCopy(srcDir, dstDir, Content, false))
65+ assert.Check(t, DirCopy(srcDir, dstDir, Content, false, true))
66 assert.NilError(t, filepath.Walk(srcDir, func(srcPath string, f os.FileInfo, err error) error {
67 if err != nil {
68 return err
69@@ -146,7 +146,7 @@ func TestCopyHardlink(t *testing.T) {
70 assert.NilError(t, os.WriteFile(srcFile1, []byte{}, 0777))
71 assert.NilError(t, os.Link(srcFile1, srcFile2))
72
73- assert.Check(t, DirCopy(srcDir, dstDir, Content, false))
74+ assert.Check(t, DirCopy(srcDir, dstDir, Content, false, true))
75
76 assert.NilError(t, unix.Stat(srcFile1, &srcFile1FileInfo))
77 assert.NilError(t, unix.Stat(srcFile2, &srcFile2FileInfo))
78diff --git a/daemon/graphdriver/overlay/overlay.go b/daemon/graphdriver/overlay/overlay.go
79index 2ed53d82e9..909478963e 100644
80--- a/daemon/graphdriver/overlay/overlay.go
81+++ b/daemon/graphdriver/overlay/overlay.go
82@@ -320,7 +320,7 @@ func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) (retErr
83 return err
84 }
85
86- return copy.DirCopy(parentUpperDir, upperDir, copy.Content, true)
87+ return copy.DirCopy(parentUpperDir, upperDir, copy.Content, true, false)
88 }
89
90 func (d *Driver) dir(id string) string {
91@@ -460,7 +460,7 @@ func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64
92 }
93 }()
94
95- if err = copy.DirCopy(parentRootDir, tmpRootDir, copy.Hardlink, true); err != nil {
96+ if err = copy.DirCopy(parentRootDir, tmpRootDir, copy.Hardlink, true, false); err != nil {
97 return 0, err
98 }
99
100diff --git a/daemon/graphdriver/vfs/copy_linux.go b/daemon/graphdriver/vfs/copy_linux.go
101index 7276b3837f..592825c1a5 100644
102--- a/daemon/graphdriver/vfs/copy_linux.go
103+++ b/daemon/graphdriver/vfs/copy_linux.go
104@@ -3,5 +3,5 @@ package vfs // import "github.com/docker/docker/daemon/graphdriver/vfs"
105 import "github.com/docker/docker/daemon/graphdriver/copy"
106
107 func dirCopy(srcDir, dstDir string) error {
108- return copy.DirCopy(srcDir, dstDir, copy.Content, false)
109+ return copy.DirCopy(srcDir, dstDir, copy.Content, false, true)
110 }
111--
1122.40.0
113