Skip to content

Commit

Permalink
Update buildkit to 0.15.0-rc1 (and update patches accordingly for ups…
Browse files Browse the repository at this point in the history
…tream merges)
  • Loading branch information
tianon committed Jul 3, 2024
1 parent c048252 commit 7dbb171
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 15 deletions.
2 changes: 1 addition & 1 deletion buildkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV BUILDKIT_VERSION 0.14.1
COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
containerd-arm64-v8-pre-0.15.patch \
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
2 changes: 1 addition & 1 deletion buildkit/Dockerfile.0.13
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV BUILDKIT_VERSION 0.13.2
COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
containerd-arm64-v8-pre-0.15.patch \
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
4 changes: 1 addition & 3 deletions buildkit/Dockerfile.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build

# https://github.com/moby/buildkit/releases
ENV BUILDKIT_VERSION 0.14.0-rc2
ENV BUILDKIT_VERSION 0.15.0-rc1

COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
git-no-submodules.patch \
mips64le.patch \
Expand Down
6 changes: 5 additions & 1 deletion buildkit/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ ENV BUILDKIT_VERSION {{ .version }}
COPY \
{{ if env.variant != "dev" and (.version | startswith("0.13.") or startswith("0.14.")) then ( -}}
backport-5072-fetch-tags.patch \
{{ ) else "" end -}}
backport-5096-fix-umask.patch \
{{) else "" end -}}
{{ if .version | startswith("0.13.") or startswith("0.14.") then ( -}}
containerd-arm64-v8-pre-0.15.patch \
{{ ) else ( -}}
containerd-arm64-v8.patch \
{{ ) end -}}
git-no-submodules.patch \
mips64le.patch \
noclip.patch \
Expand Down
18 changes: 18 additions & 0 deletions buildkit/containerd-arm64-v8-pre-0.15.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/containerd/platforms/database.go b/vendor/github.com/containerd/containerd/platforms/database.go
index 2e26fd3b4..5ef7d74d1 100644
--- a/vendor/github.com/containerd/containerd/platforms/database.go
+++ b/vendor/github.com/containerd/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"
6 changes: 3 additions & 3 deletions buildkit/containerd-arm64-v8.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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/containerd/platforms/database.go b/vendor/github.com/containerd/containerd/platforms/database.go
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/containerd/platforms/database.go
+++ b/vendor/github.com/containerd/containerd/platforms/database.go
--- 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"
Expand Down
2 changes: 1 addition & 1 deletion buildkit/gsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ exec jq -r '
)
)
| reduce to_entries[] as $e ({};
.[$e.key] = $e.value - ([ .[][] ])
.[$e.key] = $e.value - [ .[][] ]
)
| to_entries[]
| .key as $variant
Expand Down
8 changes: 4 additions & 4 deletions buildkit/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"0.13"
],
"rc": {
"commit": "aebcc1f0eabcbaeef4be8e948641f653140fe2bf",
"ref": "refs/tags/v0.14.0-rc2",
"tag": "v0.14.0-rc2",
"version": "0.14.0-rc2",
"commit": "8ade9b239b580ff2af97b527e2484df60d6a2b6b",
"ref": "refs/tags/v0.15.0-rc1",
"tag": "v0.15.0-rc1",
"version": "0.15.0-rc1",
"go": {
"version": "1.21"
}
Expand Down
2 changes: 1 addition & 1 deletion buildkit/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for variant in "${variants[@]}"; do

commit="$(jq <<<"$bk" -r '.commit // .version')"
go="$(wget -qO- "https://github.com/moby/buildkit/raw/$commit/go.mod")"
go="$(awk <<<"$go" '$1 == "go" { print $2; exit }')"
go="$(awk <<<"$go" '$1 == "go" { if ($2 ~ /^[0-9]+[.][0-9]+[.][0-9]+$/) { sub(/[.][0-9]+$/, "", $2) } print $2; exit }')"
echo >&2 "${variant:-stable} go: $go"

json="$(jq <<<"$json" --argjson bk "$bk" --arg go "$go" '
Expand Down

0 comments on commit 7dbb171

Please sign in to comment.