Skip to content

Commit

Permalink
chore: update Go to 1.24, update pkgs
Browse files Browse the repository at this point in the history
Also pull in usrmerged tools, so remove older hacks. Add a fixed enumer fork with Go 1.24 compatibility.

Signed-off-by: Dmitrii Sharshakov <[email protected]>
  • Loading branch information
dsseng committed Feb 17, 2025
1 parent 7f1dd26 commit 9ad4133
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 58 deletions.
32 changes: 1 addition & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ ARG STRINGER_VERSION
RUN --mount=type=cache,target=/.cache go install golang.org/x/tools/cmd/stringer@${STRINGER_VERSION} \
&& mv /root/go/bin/stringer /usr/bin/stringer
ARG ENUMER_VERSION
RUN --mount=type=cache,target=/.cache go install github.com/dmarkham/enumer@${ENUMER_VERSION} \
RUN --mount=type=cache,target=/.cache go install github.com/dsseng/enumer@${ENUMER_VERSION} \
&& mv /root/go/bin/enumer /usr/bin/enumer
ARG DEEPCOPY_GEN_VERSION
RUN --mount=type=cache,target=/.cache go install k8s.io/code-generator/cmd/deepcopy-gen@${DEEPCOPY_GEN_VERSION} \
Expand Down Expand Up @@ -712,15 +712,6 @@ COPY --link --from=pkg-kmod-amd64 /usr/lib/libkmod.* /rootfs/usr/lib/
COPY --link --from=pkg-kmod-amd64 /usr/bin/kmod /rootfs/usr/bin/modprobe
COPY --link --from=modules-amd64 /usr/lib/modules /rootfs/usr/lib/modules
COPY --link --from=machined-build-amd64 /machined /rootfs/usr/bin/init
RUN <<END
# move everything from /usr/sbin to /usr/bin and symlink
# TODO: make FHS and other packages already install everything to /usr/bin
# udevadm is a recursive symlink
rm /rootfs/usr/sbin/udevadm
mv /rootfs/usr/sbin/* /rootfs/usr/bin/
rmdir /rootfs/usr/sbin/
ln -s bin /rootfs/usr/sbin
END

# this is a no-op as it copies from a scratch image when WITH_DEBUG_SHELL is not set
COPY --link --from=pkg-debug-tools-amd64 * /rootfs/
Expand Down Expand Up @@ -798,15 +789,6 @@ COPY --link --from=pkg-kmod-arm64 /usr/lib/libkmod.* /rootfs/usr/lib/
COPY --link --from=pkg-kmod-arm64 /usr/bin/kmod /rootfs/usr/bin/modprobe
COPY --link --from=modules-arm64 /usr/lib/modules /rootfs/usr/lib/modules
COPY --link --from=machined-build-arm64 /machined /rootfs/usr/bin/init
RUN <<END
# move everything from /usr/sbin to /usr/bin and symlink
# TODO: make FHS and other packages already install everything to /usr/bin
# udevadm is a recursive symlink
rm /rootfs/usr/sbin/udevadm
mv /rootfs/usr/sbin/* /rootfs/usr/bin/
rmdir /rootfs/usr/sbin/
ln -s bin /rootfs/usr/sbin
END

# this is a no-op as it copies from a scratch image when WITH_DEBUG_SHELL is not set
COPY --link --from=pkg-debug-tools-arm64 * /rootfs/
Expand Down Expand Up @@ -1016,12 +998,6 @@ FROM --platform=${BUILDPLATFORM} iso-${TARGETARCH} AS iso

# The test target performs tests on the source code.
FROM base AS unit-tests-runner
RUN <<END
# TODO: do this in tools/pkgs
mv /usr/sbin/* /usr/bin/
rmdir /usr/sbin/
ln -s bin /usr/sbin
END
COPY --from=rootfs / /
COPY --from=pkg-ca-certificates / /
ARG TESTPKGS
Expand All @@ -1036,12 +1012,6 @@ COPY --from=unit-tests-runner /src/coverage.txt /coverage.txt
# The unit-tests-race target performs tests with race detector.

FROM base AS unit-tests-race
RUN <<END
# TODO: do this in tools/pkgs
mv /usr/sbin/* /usr/bin/
rmdir /usr/sbin/
ln -s bin /usr/sbin
END
COPY --from=rootfs / /
COPY --from=pkg-ca-certificates / /
ARG TESTPKGS
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ ZSTD_COMPRESSION_LEVEL ?= 18
CI_RELEASE_TAG := $(shell git log --oneline --format=%B -n 1 HEAD^2 -- 2>/dev/null | head -n 1 | sed -r "/^release\(.*\)/ s/^release\((.*)\):.*$$/\\1/; t; Q")

ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.10.0-alpha.0-10-g9db33dd
TOOLS ?= ghcr.io/siderolabs/tools:v1.10.0-alpha.0-14-g46be459

DEBUG_TOOLS_SOURCE := scratch
EMBED_TARGET ?= embed

PKGS_PREFIX ?= ghcr.io/siderolabs
PKGS ?= v1.10.0-alpha.0-36-g117a1d6
PKGS ?= v1.10.0-alpha.0-38-g76a0316
EXTRAS ?= v1.10.0-alpha.0-3-g4102a78

KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
Expand Down Expand Up @@ -67,7 +67,7 @@ PKG_KERNEL ?= $(PKGS_PREFIX)/kernel:$(PKGS)
PKG_TALOSCTL_CNI_BUNDLE ?= $(PKGS_PREFIX)/talosctl-cni-bundle:$(EXTRAS)

# renovate: datasource=github-tags depName=golang/go
GO_VERSION ?= 1.23
GO_VERSION ?= 1.24
# renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.28.0
# renovate: datasource=go depName=mvdan.cc/gofumpt
Expand All @@ -77,7 +77,8 @@ GOLANGCILINT_VERSION ?= v1.62.2
# renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.28.0
# renovate: datasource=go depName=github.com/dmarkham/enumer
ENUMER_VERSION ?= v1.5.10
# FIXME: https://github.com/dmarkham/enumer/issues/105
ENUMER_VERSION ?= v1.5.11-0.20250217145611-d1015c2bde3f
# renovate: datasource=go depName=k8s.io/code-generator
DEEPCOPY_GEN_VERSION ?= v0.32.0
# renovate: datasource=go depName=github.com/planetscale/vtprotobuf
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos

go 1.23.6
go 1.24.0

replace (
// see e.g. https://github.com/grpc/grpc-go/issues/6696
Expand Down Expand Up @@ -149,7 +149,7 @@ require (
github.com/siderolabs/go-circular v0.2.1
github.com/siderolabs/go-cmd v0.1.3
github.com/siderolabs/go-copy v0.1.0
github.com/siderolabs/go-debug v0.4.0
github.com/siderolabs/go-debug v0.5.0
github.com/siderolabs/go-kmsg v0.1.4
github.com/siderolabs/go-kubeconfig v0.1.0
github.com/siderolabs/go-kubernetes v0.2.17
Expand Down Expand Up @@ -182,11 +182,11 @@ require (
go.etcd.io/etcd/etcdutl/v3 v3.5.18
go.uber.org/zap v1.27.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
golang.org/x/net v0.34.0
golang.org/x/net v0.35.0
golang.org/x/oauth2 v0.25.0
golang.org/x/sync v0.11.0
golang.org/x/sys v0.30.0
golang.org/x/term v0.28.0
golang.org/x/term v0.29.0
golang.org/x/text v0.22.0
golang.org/x/time v0.10.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
Expand Down Expand Up @@ -356,7 +356,7 @@ require (
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/tools v0.29.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ github.com/siderolabs/go-cmd v0.1.3 h1:JrgZwqhJQeoec3QRON0LK+fv+0y7d0DyY7zsfkO6c
github.com/siderolabs/go-cmd v0.1.3/go.mod h1:bg7HY4mRNu4zKebAgUevSwuYNtcvPMJfuhLRkVKHZ0k=
github.com/siderolabs/go-copy v0.1.0 h1:OIWCtSg+rhOtnIZTpT31Gfpn17rv5kwJqQHG+QUEgC8=
github.com/siderolabs/go-copy v0.1.0/go.mod h1:4bF2rZOZAR/ags/U4AVSpjFE5RPGdEeSkOq6yR9YOkU=
github.com/siderolabs/go-debug v0.4.0 h1:pbFt6Rzumm90s3GvbRer7yIxFNc0gQ94I53omkqswHA=
github.com/siderolabs/go-debug v0.4.0/go.mod h1:9/dyHLRRIpqlJ0uTYyHo1XuZgoCgXzjjF+aIVTnr9Dc=
github.com/siderolabs/go-debug v0.5.0 h1:AQwFtvyFkSYTA1of4/UyDvVu8dVLoQP5sUYgmcp/u+4=
github.com/siderolabs/go-debug v0.5.0/go.mod h1:qtqaKzHrtj5ork8hhzswb3c225221aSVveehKTjBwBw=
github.com/siderolabs/go-kmsg v0.1.4 h1:RLAa90O9bWuhA3pXPAYAdrI+kzcqTshZASRA5yso/mo=
github.com/siderolabs/go-kmsg v0.1.4/go.mod h1:BLkt2N2DHT0wsFMz32lMw6vNEZL90c8ZnBjpIUoBb/M=
github.com/siderolabs/go-kubeconfig v0.1.0 h1:t/2oMWkLSdWHXglKPMz8ySXnx6ZjHckeGY79NaDcBTo=
Expand Down Expand Up @@ -836,8 +836,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc=
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
Expand Down Expand Up @@ -887,8 +887,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -977,8 +977,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.23.6
go 1.24.0

use (
.
Expand Down
2 changes: 1 addition & 1 deletion hack/cloud-image-uploader/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/cloud-image-uploader

go 1.23.6
go 1.24.0

require (
cloud.google.com/go/storage v1.49.0
Expand Down
2 changes: 1 addition & 1 deletion hack/docgen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos-hack-docgen

go 1.23.6
go 1.24.0

// forked go-yaml that introduces RawYAML interface, which can be used to populate YAML fields using bytes
// which are then encoded as a valid YAML blocks with proper indentiation
Expand Down
2 changes: 1 addition & 1 deletion hack/gotagsrewrite/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/gotagsrewrite

go 1.23.6
go 1.24.0

require (
github.com/fatih/structtag v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion hack/labeled-squashfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e
# set SELinux labels for files according to file_contexts supplied
/sbin/setfiles -r $1 -F -vv $3 $1
setfiles -r $1 -F -vv $3 $1
mksquashfs $1 $2 -all-root -noappend -comp zstd -Xcompression-level $4 -no-progress
2 changes: 1 addition & 1 deletion hack/module-sig-verify/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module module-sig-verify

go 1.23.6
go 1.24.0

require go.mozilla.org/pkcs7 v0.9.0
2 changes: 1 addition & 1 deletion hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ preface = """
* Flannel: 0.26.4
* Kubernetes: 1.32.2
Talos is built with Go 1.23.6.
Talos is built with Go 1.24.0.
"""

[notes.driver-rebind]
Expand Down
2 changes: 1 addition & 1 deletion hack/structprotogen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/structprotogen

go 1.23.6
go 1.24.0

require (
github.com/fatih/structtag v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ const (
DBusClientSocketLabel = "system_u:object_r:dbus_client_socket_t:s0"

// GoVersion is the version of Go compiler this release was built with.
GoVersion = "go1.23.6"
GoVersion = "go1.24.0"

// KubernetesTalosAPIServiceName is the name of the Kubernetes service to access Talos API.
KubernetesTalosAPIServiceName = "talos"
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos/pkg/machinery

go 1.23.6
go 1.24.0

replace (
// forked ethtool introduces missing APIs
Expand Down

0 comments on commit 9ad4133

Please sign in to comment.