Skip to content

Commit e730576

Browse files
cheeyangleedependabot[bot]Chee Yang Leeandy-vm
authored
toolkit golang version to go1.24.12 (#704)
* Bump golang.org/x/crypto Bumps the go_modules group with 1 update in the /toolkit/tools directory: [golang.org/x/crypto](https://github.com/golang/crypto). Updates `golang.org/x/crypto` from 0.36.0 to 0.45.0 - [Commits](golang/crypto@v0.36.0...v0.45.0) * skip vet during test as the toolkit were expected to run with golang 1.23, some of the component and dependencies does not met the 1.24 vet requirement hence skip this. these are currently reported error pkgworker/pkgworker.go:427:22: non-constant format string in call to fmt.Errorf imagegen/installutils/installutils.go:2079:21: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Warnf imagegen/installutils/installutils.go:3142:20: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Warnf graphpkgfetcher/graphpkgfetcher.go:315:79: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Debugf scheduler/schedulerutils/preparerequest.go:96:21: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Warnf scheduler/schedulerutils/preparerequest.go:189:21: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Warnf internal/packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go:920:21: non-constant format string in call to fmt.Errorf internal/packagerepo/repomanager/rpmrepomanager/rpmrepomanager.go:114:78: non-constant format string in call to fmt.Errorf Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * update prerequisites setup script and docs Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * golang bump to 1.24.12 Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * check-package-builds: to use available specs Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * switch back to words and do spec sync Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> --------- Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chee Yang Lee <Lee Chee Yang@intel.com> Co-authored-by: andy-vm <108446482+andy-vm@users.noreply.github.com>
1 parent c7af0d2 commit e730576

File tree

6 files changed

+45
-32
lines changed

6 files changed

+45
-32
lines changed

.github/workflows/check-package-builds.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ jobs:
127127
- name: Prepare the build environment
128128
if: ${{ matrix.build-prep != '' }}
129129
run: |
130+
toolkit/scripts/toolchain/toolchain_update_git_submodule.sh
130131
set -euo pipefail
131132
132133
${{ matrix.build-prep }}

toolkit/docs/building/prerequisites-ubuntu.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
# Build Requirements for Azure Linux Toolkit on Ubuntu
2+
# Build Requirements for Edge Microvisor Toolkit on Ubuntu
33

4-
This page outlines the requirements for building with the Azure Linux toolkit on Ubuntu.
4+
This page outlines the requirements for building with the Edge Microvisor toolkit on Ubuntu.
55

66
## System-Specific Requirements
77

88
### Golang Package Requirements
99

10-
The Azure Linux toolkit on Ubuntu has been validated with the following:
10+
The Edge Microvsor toolkit on Ubuntu has been validated with the following:
1111

12-
- **Ubuntu 22.04**: Validated with `golang-1.23.1` (available as `golang-1.23-go` package)
12+
- **Ubuntu 22.04**: Validated with `golang-1.24.11` from https://go.dev/
1313

1414
## Installation Methods
1515

@@ -22,9 +22,14 @@ The make targets automatically install the appropriate packages:
2222
# Installs prerequisites but doesn't modify system configuration
2323
sudo make -C toolkit install-prereqs
2424

25+
# Manually install and configure for Go
26+
wget https://go.dev/dl/go1.24.12.linux-amd64.tar.gz && echo "bddf8e653c82429aea7aec2520774e79925d4bb929fe20e67ecc00dd5af44c50 go1.24.12.linux-amd64.tar.gz" | sha256sum -c
27+
sudo rm -rf /usr/local/go
28+
sudo tar -C /usr/local -xzf go1.24.12.linux-amd64.tar.gz
29+
2530
# Manually create Go symlinks for proper PATH integration
26-
sudo ln -sf /usr/lib/go-1.23/bin/go /usr/bin/go
27-
sudo ln -sf /usr/lib/go-1.23/bin/gofmt /usr/bin/gofmt
31+
sudo ln -sf /usr/local/go/bin/go /usr/bin/go
32+
sudo ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt
2833

2934
# Manually configure Docker if needed
3035
curl -fsSL https://get.docker.com -o get-docker.sh
@@ -54,9 +59,14 @@ If you prefer running the script directly, you have several options:
5459
# Basic installation with Go
5560
sudo ./toolkit/docs/building/prerequisites-ubuntu.sh
5661

62+
# Manually install and configure for Go
63+
wget https://go.dev/dl/go1.24.12.linux-amd64.tar.gz && echo "bddf8e653c82429aea7aec2520774e79925d4bb929fe20e67ecc00dd5af44c50 go1.24.12.linux-amd64.tar.gz" | sha256sum -c
64+
sudo rm -rf /usr/local/go
65+
sudo tar -C /usr/local -xzf go1.24.12.linux-amd64.tar.gz
66+
5767
# Manually create Go symlinks for proper PATH integration
58-
sudo ln -sf /usr/lib/go-1.23/bin/go /usr/bin/go
59-
sudo ln -sf /usr/lib/go-1.23/bin/gofmt /usr/bin/gofmt
68+
sudo ln -sf /usr/local/go/bin/go /usr/bin/go
69+
sudo ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt
6070

6171
# Manually configure Docker if needed
6272
curl -fsSL https://get.docker.com -o get-docker.sh

toolkit/docs/building/prerequisites-ubuntu.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ if [ "$INSTALL_PREREQS" = true ]; then
5959
gawk \
6060
genisoimage \
6161
git \
62-
golang-1.23-go \
6362
jq \
6463
make \
6564
openssl \
@@ -78,9 +77,14 @@ fi
7877

7978
# Fix go 1.23 links if requested
8079
if [ "$FIX_GO_LINKS" = true ]; then
80+
echo "Download Go Binaries from https://go.dev/ ..."
81+
wget https://go.dev/dl/go1.24.12.linux-amd64.tar.gz && echo "bddf8e653c82429aea7aec2520774e79925d4bb929fe20e67ecc00dd5af44c50 go1.24.12.linux-amd64.tar.gz" | sha256sum -c
82+
sudo rm -rf /usr/local/go
83+
sudo tar -C /usr/local -xzf go1.24.12.linux-amd64.tar.gz
84+
8185
echo "Creating Go symlinks..."
82-
ln -vsf /usr/lib/go-1.23/bin/go /usr/bin/go
83-
ln -vsf /usr/lib/go-1.23/bin/gofmt /usr/bin/gofmt
86+
ln -vsf /usr/local/go/bin/go /usr/bin/go
87+
ln -vsf /usr/local/go/bin/gofmt /usr/bin/gofmt
8488
fi
8589

8690
# Install and configure Docker if requested

toolkit/scripts/tools.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ else
123123
# Rebuild the go tools as needed
124124
$(TOOL_BINS_DIR)/%: $(go_common_files)
125125
cd $(TOOLS_DIR)/$* && \
126-
go test -ldflags="$(go_ldflags)" -test.short -covermode=atomic -coverprofile=$(BUILD_DIR)/tools/$*.test_coverage ./... && \
126+
go test -vet=off -ldflags="$(go_ldflags)" -test.short -covermode=atomic -coverprofile=$(BUILD_DIR)/tools/$*.test_coverage ./... && \
127127
CGO_ENABLED=0 go build \
128128
-ldflags="$(go_ldflags)" \
129129
$(if $(filter y,$(BUILD_TOOLS_NONPROD)),,-tags prod) \
@@ -133,7 +133,7 @@ endif
133133
# Runs tests for common components
134134
$(BUILD_DIR)/tools/internal.test_coverage: $(go_internal_files) $(go_imagegen_files) $(STATUS_FLAGS_DIR)/got_go_deps.flag
135135
cd $(TOOLS_DIR)/$* && \
136-
go test -ldflags="$(go_ldflags)" -test.short -covermode=atomic -coverprofile=$@ ./...
136+
go test -vet=off -ldflags="$(go_ldflags)" -test.short -covermode=atomic -coverprofile=$@ ./...
137137

138138
# Downloads all the go dependencies without using sudo, so we don't break other go use cases for the user.
139139
# We can check if $SUDO_USER is set (the user who invoked sudo), and if so, use that user to run go get via sudo -u.
@@ -167,7 +167,7 @@ go-fmt-all:
167167
# Formats the test coverage for the tools
168168
.PHONY: $(BUILD_DIR)/tools/all_tools.coverage
169169
$(BUILD_DIR)/tools/all_tools.coverage: $(call shell_real_build_only, find $(TOOLS_DIR)/ -type f -name '*.go') $(STATUS_FLAGS_DIR)/got_go_deps.flag
170-
cd $(TOOLS_DIR) && go test -ldflags="$(go_ldflags)" -coverpkg=./... -test.short -covermode=atomic -coverprofile=$@ ./...
170+
cd $(TOOLS_DIR) && go test -vet=off -ldflags="$(go_ldflags)" -coverpkg=./... -test.short -covermode=atomic -coverprofile=$@ ./...
171171
$(test_coverage_report): $(BUILD_DIR)/tools/all_tools.coverage
172172
cd $(TOOLS_DIR) && go tool cover -html=$(BUILD_DIR)/tools/all_tools.coverage -o $@
173173
##help:target:go-test-coverage=Run and publish test coverage for all go tools.

toolkit/tools/go.mod

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/microsoft/azurelinux/toolkit/tools
22

3-
go 1.23.0
4-
5-
toolchain go1.23.1
3+
go 1.24.0
64

75
require (
86
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
@@ -23,7 +21,7 @@ require (
2321
github.com/sirupsen/logrus v1.9.3
2422
github.com/stretchr/testify v1.9.0
2523
github.com/ulikunitz/xz v0.5.14
26-
golang.org/x/sys v0.31.0
24+
golang.org/x/sys v0.38.0
2725
gonum.org/v1/gonum v0.16.0
2826
gopkg.in/alecthomas/kingpin.v2 v2.2.6
2927
gopkg.in/ini.v1 v1.67.0
@@ -50,8 +48,8 @@ require (
5048
github.com/pmezard/go-difflib v1.0.0 // indirect
5149
github.com/rivo/uniseg v0.1.0 // indirect
5250
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
53-
golang.org/x/crypto v0.36.0 // indirect
54-
golang.org/x/net v0.38.0 // indirect
55-
golang.org/x/sync v0.12.0 // indirect
56-
golang.org/x/text v0.23.0 // indirect
51+
golang.org/x/crypto v0.45.0 // indirect
52+
golang.org/x/net v0.47.0 // indirect
53+
golang.org/x/sync v0.18.0 // indirect
54+
golang.org/x/text v0.31.0 // indirect
5755
)

toolkit/tools/go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,25 +102,25 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
102102
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
103103
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
104104
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
105-
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
106-
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
107-
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
108-
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
109-
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
110-
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
105+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
106+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
107+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
108+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
109+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
110+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
111111
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
112112
golang.org/x/sys v0.0.0-20191018095205-727590c5006e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
113113
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
114114
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
115115
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
116116
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
117117
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
118-
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
119-
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
118+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
119+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
120120
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
121121
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
122-
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
123-
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
122+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
123+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
124124
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
125125
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
126126
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=

0 commit comments

Comments
 (0)