Skip to content
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

Upgrade to go version 1.18.2 to fix multiple CVEs #154

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Dockerfile.golang
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOVERSION=1.14
ARG GOVERSION=1.18.2
FROM golang:${GOVERSION}

# Set base env.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.riscv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE: Using 1.13 as a base to build the RISCV compiler, the resulting version is based on go1.6.
FROM golang:1.13
# NOTE: Using 1.18.2 as a base to build the RISCV compiler, the resulting version is based on go1.6.
FROM golang:1.18.2

# Clone and complie a riscv compatible version of the go compiler.
RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/creack/pty

go 1.13
go 1.18
6 changes: 3 additions & 3 deletions test_crosscompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ echo2 "Build for linux."
echo2 " - linux/riscv"
docker build -t creack-pty-test -f Dockerfile.riscv .

# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.14 on those archs.
# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.18.2 on those archs.
Copy link
Owner

Choose a reason for hiding this comment

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

FYI, I reverted the changes to that file. This point is to make sure it compiles with go < 1.15 as 1.15 dropped support for darwin/32bits.

echo2 "Build for darwin (32bits)."
echo2 " - darwin/386"
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=386 .
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.18.2 --build-arg=GOOS=darwin --build-arg=GOARCH=386 .
echo2 " - darwin/arm"
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=arm .
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.18.2 --build-arg=GOOS=darwin --build-arg=GOARCH=arm .

# Run a single test for an old go version. Would be best with go1.0, but not available on Dockerhub.
# Using 1.6 as it is the base version for the RISCV compiler.
Expand Down