From 3d3fcf7ecb1300e436d07a59ed78279ac89f5985 Mon Sep 17 00:00:00 2001 From: Andrew Phelps Date: Thu, 12 Oct 2023 20:12:58 -0700 Subject: [PATCH] Updated Ubuntu requirements doc with better Golang instructions. (#6348) (#6419) * Updating Ubuntu requirements doc. * Adding missed Go version update. Co-authored-by: Pawel Winogrodzki --- toolkit/docs/building/prerequisites-ubuntu.md | 13 ++++++------- toolkit/tools/go.mod | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/toolkit/docs/building/prerequisites-ubuntu.md b/toolkit/docs/building/prerequisites-ubuntu.md index a509dd6516e..8f794445e05 100644 --- a/toolkit/docs/building/prerequisites-ubuntu.md +++ b/toolkit/docs/building/prerequisites-ubuntu.md @@ -1,13 +1,11 @@ # Build Requirements on `Ubuntu` -## Requirements were validated on `Ubuntu 18.04` +## Requirements were validated on `Ubuntu 22.04` -This page lists host machine requirements for building with the CBL-Mariner toolkit. They cover building the toolchain, packages, and images on an Ubuntu 18.04 host. +This page lists host machine requirements for building with the CBL-Mariner toolkit. They cover building the toolchain, packages, and images on an Ubuntu 22.04 host. ```bash -# Add a backports repo in order to install the latest version of Go. -sudo add-apt-repository ppa:longsleep/golang-backports sudo apt-get update # Install required dependencies. @@ -18,7 +16,7 @@ sudo apt -y install \ gawk \ genisoimage \ git \ - golang-1.19-go \ + golang-1.20-go \ make \ parted \ pigz \ @@ -28,8 +26,9 @@ sudo apt -y install \ wget \ xfsprogs -# Fix go 1.19 link -sudo ln -vsf /usr/lib/go-1.19/bin/go /usr/bin/go +# Fix go 1.20 link +sudo ln -vsf /usr/lib/go-1.20/bin/go /usr/bin/go +sudo ln -vsf /usr/lib/go-1.20/bin/gofmt /usr/bin/gofmt # Install and configure Docker. curl -fsSL https://get.docker.com -o get-docker.sh diff --git a/toolkit/tools/go.mod b/toolkit/tools/go.mod index d5c674cf824..0ad2ad10069 100644 --- a/toolkit/tools/go.mod +++ b/toolkit/tools/go.mod @@ -1,6 +1,6 @@ module github.com/microsoft/CBL-Mariner/toolkit/tools -go 1.19 +go 1.20 require ( github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d