Skip to content

Commit

Permalink
Update containerd-arm64-v8.patch for 0.19+
Browse files Browse the repository at this point in the history
See #900
  • Loading branch information
tianon committed Jan 15, 2025
1 parent 4473543 commit 5121050
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion buildkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV BUILDKIT_VERSION 0.18.2

COPY \
argsescaped.patch \
containerd-arm64-v8.patch \
containerd-arm64-v8-pre-0.19.patch \
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
2 changes: 1 addition & 1 deletion buildkit/Dockerfile.0.16
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY \
backport-5372-sbom-args.patch \
backport-5441-fetch-by-commit.patch \
backport-moby-48455-fix-riscv64-seccomp.patch \
containerd-arm64-v8.patch \
containerd-arm64-v8-pre-0.19.patch \
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
2 changes: 1 addition & 1 deletion buildkit/Dockerfile.rc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV BUILDKIT_VERSION 0.18.0-rc2

COPY \
argsescaped.patch \
containerd-arm64-v8.patch \
containerd-arm64-v8-pre-0.19.patch \
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
2 changes: 1 addition & 1 deletion buildkit/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY \
"backport-5372-sbom-args.patch": { until: "0.17" },
"backport-5441-fetch-by-commit.patch": { until: "0.17", older: { "0.16": "backport-5441-fetch-by-commit-0.13.patch" } },
"backport-moby-48455-fix-riscv64-seccomp.patch": { until: "0.17" },
"containerd-arm64-v8.patch": { older: { "0.15": "containerd-arm64-v8-pre-0.15.patch" } },
"containerd-arm64-v8.patch": { older: { "0.19": "containerd-arm64-v8-pre-0.19.patch", "0.15": "containerd-arm64-v8-pre-0.15.patch" } },
"git-no-submodules.patch": { },
"mips64le.patch": { older: { "0.16": "mips64le-pre-0.16.patch" } },
"noclip.patch": { },
Expand Down
18 changes: 18 additions & 0 deletions buildkit/containerd-arm64-v8-pre-0.19.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Description: normalize "linux/arm64" to "linux/arm64/v8" instead of the other direction
Forwarded: no; presumably, the direction this went was intentional (Tianon just disagrees, and the normalization allows him that)

diff --git a/vendor/github.com/containerd/platforms/database.go b/vendor/github.com/containerd/platforms/database.go
index 2e26fd3b4..5ef7d74d1 100644
--- a/vendor/github.com/containerd/platforms/database.go
+++ b/vendor/github.com/containerd/platforms/database.go
@@ -87,8 +87,8 @@ func normalizeArch(arch, variant string) (string, string) {
case "aarch64", "arm64":
arch = "arm64"
switch variant {
- case "8", "v8":
- variant = ""
+ case "", "8":
+ variant = "v8"
}
case "armhf":
arch = "arm"
10 changes: 5 additions & 5 deletions buildkit/containerd-arm64-v8.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ Description: normalize "linux/arm64" to "linux/arm64/v8" instead of the other di
Forwarded: no; presumably, the direction this went was intentional (Tianon just disagrees, and the normalization allows him that)

diff --git a/vendor/github.com/containerd/platforms/database.go b/vendor/github.com/containerd/platforms/database.go
index 2e26fd3b4..5ef7d74d1 100644
index 7a6f0d98c..dbd4e3f96 100644
--- a/vendor/github.com/containerd/platforms/database.go
+++ b/vendor/github.com/containerd/platforms/database.go
@@ -87,8 +87,8 @@ func normalizeArch(arch, variant string) (string, string) {
case "aarch64", "arm64":
arch = "arm64"
switch variant {
- case "8", "v8":
- case "8", "v8", "v8.0":
- variant = ""
+ case "", "8":
+ case "8", "", "v8.0":
+ variant = "v8"
case "9", "9.0", "v9.0":
variant = "v9"
}
case "armhf":
arch = "arm"

0 comments on commit 5121050

Please sign in to comment.