Skip to content

Kicbase/ISO: Update buildroot from 2023.02.9 to 2025.2 #20720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ KVM_GO_VERSION ?= $(GO_VERSION:.0=)


INSTALL_SIZE ?= $(shell du out/minikube-windows-amd64.exe | cut -f1)
BUILDROOT_BRANCH ?= 2023.02.9
BUILDROOT_BRANCH ?= 2024.11.2
# the go version on the line below is for the ISO
GOLANG_OPTIONS = GO_VERSION=1.21.6 GO_HASH_FILE=$(PWD)/deploy/iso/minikube-iso/go.hash
GOLANG_OPTIONS = GO_VERSION=1.23.4 GO_HASH_FILE=$(PWD)/deploy/iso/minikube-iso/go.hash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 1.23.4? Latest is 1.23.8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we currently use GO_VERSION 1.24.0 in this Makefile (set above), what is the reason for overriding it here?

i also noticed that our go.mod still uses 1.23.4 though, not sure if we're blocked on bumping it as well and then have all go versions in sync

BUILDROOT_OPTIONS = BR2_EXTERNAL=../../deploy/iso/minikube-iso $(GOLANG_OPTIONS)
REGISTRY ?= gcr.io/k8s-minikube

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ CRI_DOCKERD_AARCH64_ENV = \
GO111MODULE=on \
GOPATH="$(CRI_DOCKERD_AARCH64_GOPATH)" \
PATH=$(CRI_DOCKERD_AARCH64_GOPATH)/bin:$(BR_PATH) \
GOARCH=arm64
GOARCH=arm64 \
GOPROXY="https://proxy.golang.org,direct" \
GOSUMDB='sum.golang.org'\
GOOS=linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the new options are needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For newer version of go, if we don't set those options, the build will fail.
E.g. after go 1.21 GOPROXY no longer tolerates an empty string when GOMOD111 is turned on
See golang/go#61928 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on Mills' comment in the linked issue, looks like if we're building go v1.21.0+ from source we also need to create the $GOROOT/go.env that sets GOPROXY and GOSUMDB, and we probably do not need to implicitly set the GOARCH and GOOS (those should be automatically inferred) so these additional changes would not be needed - here and in few other places/files below?

the additional reason to avoid setting these manually in several places would be easier maintenance - we'd avoid failing because we have not manually added it to all other places that might need it and the relevant default values should be taken from the go release itself


CRI_DOCKERD_AARCH64_COMPILE_SRC = $(CRI_DOCKERD_AARCH64_GOPATH)/src/github.com/Mirantis/cri-dockerd
CRI_DOCKERD_AARCH64_BUILDFLAGS = "-ldflags '-X github.com/Mirantis/cri-dockerd/version.Version=$(CRI_DOCKERD_AARCH64_VER) -X github.com/Mirantis/cri-dockerd/version.GitCommit=$(CRI_DOCKERD_AARCH64_REV)'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ DOCKER_BUILDX_AARCH64_ENV = \
GOPATH="$(DOCKER_BUILDX_AARCH64_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_AARCH64_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_AARCH64_GOPATH)/bin:$(BR_PATH) \
GOARCH=arm64
GOARCH=arm64 \
GOPROXY="https://proxy.golang.org,direct" \
GOSUMDB='sum.golang.org'\
GOOS=linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unify indent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intents here are already the same with other go envs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that Nir meant that we should have same alignment (ie, same number of blanks before these last three lines as lines above), but see my previous comment about avoiding adding it altogether


DOCKER_BUILDX_AARCH64_COMPILE_SRC = $(DOCKER_BUILDX_AARCH64_GOPATH)/src/github.com/docker/buildx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ CRI_DOCKERD_ENV = \
GO111MODULE=on \
GOPATH="$(CRI_DOCKERD_GOPATH)" \
PATH=$(CRI_DOCKERD_GOPATH)/bin:$(BR_PATH) \
GOARCH=amd64
GOARCH=amd64 \
GOPROXY="https://proxy.golang.org,direct" \
GOSUMDB='sum.golang.org'\
GOOS=linux

CRI_DOCKERD_COMPILE_SRC = $(CRI_DOCKERD_GOPATH)/src/github.com/Mirantis/cri-dockerd
CRI_DOCKERD_BUILDFLAGS = "-ldflags '-X github.com/Mirantis/cri-dockerd/version.Version=$(CRI_DOCKERD_VER) -X github.com/Mirantis/cri-dockerd/version.GitCommit=$(CRI_DOCKERD_REV)'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ DOCKER_BUILDX_ENV = \
GOPATH="$(DOCKER_BUILDX_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_GOPATH)/bin:$(BR_PATH) \
GOARCH=amd64
GOARCH=amd64 \
GOPROXY="https://proxy.golang.org,direct" \
GOSUMDB='sum.golang.org'\
GOOS=linux

DOCKER_BUILDX_COMPILE_SRC = $(DOCKER_BUILDX_GOPATH)/src/github.com/docker/buildx

Expand Down
1 change: 1 addition & 0 deletions deploy/iso/minikube-iso/go.hash
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ sha256 36930162a93df417d90bd22c6e14daff4705baac2b02418edda671cdfa9cd07f go1.23
sha256 8d6a77332487557c6afa2421131b50f83db4ae3c579c3bc72e670ee1f6968599 go1.23.3.src.tar.gz
sha256 ad345ac421e90814293a9699cca19dd5238251c3f687980bbcae28495b263531 go1.23.4.src.tar.gz
sha256 d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5 go1.24.0.src.tar.gz
sha256 6924efde5de86fe277676e929dc9917d466efa02fb934197bc2eba35d5680971 go1.23.4.linux-amd64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that the go.hash file should not be updated manually - should be managed by the updateGoHashFile func in hack/update/golang_version/update_golang_version.go

1 change: 0 additions & 1 deletion deploy/iso/minikube-iso/package/Config.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
menu "System tools"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/conmon/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/crio-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/sysdig/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/crun-latest/Config.in"
Expand Down
7 changes: 0 additions & 7 deletions deploy/iso/minikube-iso/package/conmon/Config.in

This file was deleted.

12 changes: 0 additions & 12 deletions deploy/iso/minikube-iso/package/conmon/conmon.hash

This file was deleted.

25 changes: 0 additions & 25 deletions deploy/iso/minikube-iso/package/conmon/conmon.mk

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/iso/minikube-iso/package/crio-bin/crio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ decryption_keys_path = "/etc/crio/keys/"

# Path to the conmon binary, used for monitoring the OCI runtime.
# Will be searched for using $PATH if empty.
conmon = "/usr/libexec/crio/conmon"
conmon = "/usr/bin/conmon"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path was changed?

Copy link
Member Author

@ComradeProgrammer ComradeProgrammer May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. New buildroot includes conmon by default, and the new path is this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could also update the TestDockerSystemInfo to reflect the new conmon path


# Cgroup setting for conmon
conmon_cgroup = "system.slice"
Expand Down
6 changes: 3 additions & 3 deletions deploy/iso/minikube-iso/package/falco-module/falco-module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ FALCO_MODULE_CONF_OPTS += -DUSE_BUNDLED_DEPS=ON
FALCO_MODULE_MAKE_ENV = $(LINUX_MAKE_ENV)
FALCO_MODULE_MAKE_OPTS = $(LINUX_MAKE_FLAGS) driver KERNELDIR=$(LINUX_DIR)
FALCO_MODULE_INSTALL_OPTS = install_driver
FALCO_MODULE_INSTALL_STAGING_OPTS = INSTALL_MOD_PATH=$(STAGING_DIR) install_driver
FALCO_MODULE_INSTALL_TARGET_OPTS = INSTALL_MOD_PATH=$(TARGET_DIR) install_driver
FALCO_MODULE_INSTALL_STAGING_OPTS = install_driver
FALCO_MODULE_INSTALL_TARGET_OPTS = install_driver

$(eval $(kernel-module))
$(eval $(cmake-package))

5 changes: 4 additions & 1 deletion deploy/iso/minikube-iso/package/podman/podman.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ PODMAN_BIN_ENV = \
CGO_ENABLED=1 \
GOPATH="$(PODMAN_GOPATH)" \
PATH=$(PODMAN_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(PODMAN_GOARCH)
GOARCH=$(PODMAN_GOARCH) \
GOPROXY="https://proxy.golang.org,direct" \
GOSUMDB='sum.golang.org'\
GOOS=linux

define PODMAN_USERS
- -1 podman -1 - - - - -
Expand Down