From 957210b27b48f72245b97098ff13789b0bf0fd8d Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 30 Mar 2023 17:47:44 -0400 Subject: [PATCH] Merge pull request #1584 from ggiguash/devenv_use_rhel92 Start using RHEL 9.2 in the devenv and edge --- docs/devenv_setup.md | 15 +------- packaging/rpm/microshift.spec | 5 ++- scripts/devenv-builder/configure-vm.sh | 13 ------- scripts/image-builder/configure.sh | 49 ++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 28 deletions(-) diff --git a/docs/devenv_setup.md b/docs/devenv_setup.md index bca661febd..dfbc0ff0d5 100644 --- a/docs/devenv_setup.md +++ b/docs/devenv_setup.md @@ -4,7 +4,7 @@ It is recommended to review the current document and use the automation instruct ## Create Development Virtual Machine Start by downloading one of the supported boot images for the `x86_64` or `aarch64` architecture: -* RHEL 9.1 from https://developers.redhat.com/products/rhel/download +* RHEL 9.2 from https://developers.redhat.com/products/rhel/download * CentOS 9 Stream from https://www.centos.org/download ### Creating VM @@ -66,19 +66,6 @@ sudo dnf clean all -y sudo dnf update -y sudo dnf install -y git cockpit make golang selinux-policy-devel rpm-build jq bash-completion sudo systemctl enable --now cockpit.socket - -# Install go1.19 -# This is installed into different location (/usr/local/bin/go) from dnf installed Go (/usr/bin/go) so it doesn't conflict -# /usr/local/bin is before /usr/bin in $PATH so newer one is picked up -GO_VER=1.19.4 -GO_ARCH=$([ "$(uname -i)" == "x86_64" ] && echo "amd64" || echo "arm64") -curl -L -o "go${GO_VER}.linux-${GO_ARCH}.tar.gz" "https://go.dev/dl/go${GO_VER}.linux-${GO_ARCH}.tar.gz" && - sudo rm -rf "/usr/local/go${GO_VER}" && \ - sudo mkdir -p "/usr/local/go${GO_VER}" && \ - sudo tar -C "/usr/local/go${GO_VER}" -xzf "go${GO_VER}.linux-${GO_ARCH}.tar.gz" --strip-components 1 && \ - sudo rm -rfv /usr/local/bin/{go,gofmt} && \ - sudo ln --symbolic /usr/local/go${GO_VER}/bin/{go,gofmt} /usr/local/bin/ && \ - rm -rfv "go${GO_VER}.linux-${GO_ARCH}.tar.gz" ``` You should now be able to access the VM Cockpit console using `https://:9090` URL. diff --git a/packaging/rpm/microshift.spec b/packaging/rpm/microshift.spec index 1664bd10ad..aadce55a1b 100644 --- a/packaging/rpm/microshift.spec +++ b/packaging/rpm/microshift.spec @@ -9,7 +9,7 @@ } # golang specifics -%global golang_version 1.18 +%global golang_version 1.19 #debuginfo not supported with Go %global debug_package %{nil} # modifying the Go binaries breaks the DWARF debugging @@ -296,6 +296,9 @@ systemctl enable --now --quiet openvswitch || true # Use Git command to generate the log and replace the VERSION string # LANG=C git log --date="format:%a %b %d %Y" --pretty="tformat:* %cd %an <%ae> VERSION%n- %s%n" packaging/rpm/microshift.spec %changelog +* Wed Mar 29 2023 Gregory Giguashvili 4.13.0 +- Upgrade golang build-time dependency to 1.19 version + * Wed Mar 01 2023 Gregory Giguashvili 4.13.0 - Add lvmd.yaml and ovn.yaml default configuration files diff --git a/scripts/devenv-builder/configure-vm.sh b/scripts/devenv-builder/configure-vm.sh index e68d7808c6..3aadcd47a0 100755 --- a/scripts/devenv-builder/configure-vm.sh +++ b/scripts/devenv-builder/configure-vm.sh @@ -55,19 +55,6 @@ sudo dnf update -y sudo dnf install -y git cockpit make golang jq selinux-policy-devel rpm-build jq bash-completion sudo systemctl enable --now cockpit.socket -# Install go1.19 -# This is installed into different location (/usr/local/bin/go) from dnf installed Go (/usr/bin/go) so it doesn't conflict -# /usr/local/bin is before /usr/bin in $PATH so newer one is picked up -GO_VER=1.19.4 -GO_ARCH=$([ "$(uname -i)" == "x86_64" ] && echo "amd64" || echo "arm64") -curl -L -o "go${GO_VER}.linux-${GO_ARCH}.tar.gz" "https://go.dev/dl/go${GO_VER}.linux-${GO_ARCH}.tar.gz" && - sudo rm -rf "/usr/local/go${GO_VER}" && \ - sudo mkdir -p "/usr/local/go${GO_VER}" && \ - sudo tar -C "/usr/local/go${GO_VER}" -xzf "go${GO_VER}.linux-${GO_ARCH}.tar.gz" --strip-components 1 && \ - sudo rm -rfv /usr/local/bin/{go,gofmt} && \ - sudo ln --symbolic /usr/local/go${GO_VER}/bin/{go,gofmt} /usr/local/bin/ && \ - rm -rfv "go${GO_VER}.linux-${GO_ARCH}.tar.gz" - if [ $BUILD_AND_INSTALL = true ] ; then # Build MicroShift # https://github.com/openshift/microshift/blob/main/docs/devenv_setup.md#build-microshift diff --git a/scripts/image-builder/configure.sh b/scripts/image-builder/configure.sh index e987c24125..97292a7c29 100755 --- a/scripts/image-builder/configure.sh +++ b/scripts/image-builder/configure.sh @@ -3,10 +3,59 @@ set -exo pipefail OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe) +function osbuild_rhel9_beta() { + local json_file=$1 + sudo mkdir -p $(dirname ${json_file}) + sudo tee ${json_file} >/dev/null <