diff --git a/base_images/gce.yml b/base_images/gce.yml index 27032e3c..09815f2a 100644 --- a/base_images/gce.yml +++ b/base_images/gce.yml @@ -23,14 +23,14 @@ variables: # Empty value means it must be passed in on command-line # Upstream source for Ubuntu image to duplicate (prevents expiration). # Use the most recent image based on this family name. - UBUNTU_BASE_FAMILY: 'ubuntu-2110' + UBUNTU_BASE_FAMILY: 'ubuntu-2204-lts' # Latest Fedora release (qcow and CHECKSUM) download URLs # N/B: There are Fedora-Cloud...GCP.tar.gz images available, however # as of this comment, they lack the cloud-init package which is # required by GCP for startup resizing of the rootfs. - FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/36/Cloud/x86_64/images/Fedora-Cloud-36-x86_64-20220428.n.0-CHECKSUM" - FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-20220428.n.0.x86_64.qcow2" + FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images/Fedora-Cloud-36-1.5-x86_64-CHECKSUM" + FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-1.5.x86_64.qcow2" # Prior Fedora release PRIOR_FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-35-1.2-x86_64-CHECKSUM" diff --git a/base_images/ubuntu_base-setup.sh b/base_images/ubuntu_base-setup.sh index c1d6eaae..00b223c4 100644 --- a/base_images/ubuntu_base-setup.sh +++ b/base_images/ubuntu_base-setup.sh @@ -24,6 +24,7 @@ PKGS=( \ git openssh-client openssh-server + rng-tools5 software-properties-common ) @@ -47,6 +48,7 @@ install_automation_tooling if ! ((CONTAINER)); then custom_cloud_init + $SUDO systemctl enable rngd fi finalize diff --git a/cache_images/fedora_packaging.sh b/cache_images/fedora_packaging.sh index 8e42ac0b..aa049515 100644 --- a/cache_images/fedora_packaging.sh +++ b/cache_images/fedora_packaging.sh @@ -198,10 +198,5 @@ fi # It was observed in F33, dnf install doesn't always get you the latest/greatest lilto $SUDO dnf update -y -echo "Configuring Go environment" -export GOPATH=/var/tmp/go -mkdir -p "$GOPATH" -eval $(go env | tee /dev/stderr) -export PATH="$GOPATH/bin:$PATH" -# shellcheck source=./podman_tooling.sh -source $SCRIPT_DIRPATH/podman_tooling.sh +chmod +x $SCRIPT_DIRPATH/podman_tooling.sh +$SUDO $SCRIPT_DIRPATH/podman_tooling.sh diff --git a/cache_images/podman_tooling.sh b/cache_images/podman_tooling.sh index 41f248f5..6369965b 100644 --- a/cache_images/podman_tooling.sh +++ b/cache_images/podman_tooling.sh @@ -1,38 +1,50 @@ +#!/bin/bash -# This script is sourced from *_packaging.sh script to install common/shared +# This script is executed from *_packaging.sh script to install common/shared # tooling from the containers/podman repository. It expects -# a go 1.13+ environment has already been setup. The script should -# not be used for any other purpose or from any other context. +# a go 1.16+ environment has already been set up, and should be called +# as root or through sudo. The script should not be used for any other +# purpose or from any other context. + +set -e + +SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}") +SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH") +REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../") +# shellcheck source=./lib.sh +source "$REPO_DIRPATH/lib.sh" + +echo "Configuring Go environment" +export GOPATH="${GOPATH:-/var/tmp/go}" +mkdir -p "$GOPATH" +export GOSRC=${GOPATH}/src/github.com/containers/podman +export GOCACHE="${GOCACHE:-$GOPATH/cache}" +eval $(go env | tee /dev/stderr) +export PATH="$GOPATH/bin:$PATH" echo "Installing runtime tooling" -export GOPATH="${GOPATH:/var/tmp/go}" -export GOSRC=/var/tmp/go/src/github.com/containers/podman -export GOCACHE="${GOCACHE:-/root/.cache/go-build}" lilto git clone --quiet https://github.com/containers/podman.git "$GOSRC" cd "$GOSRC" || die "Podman repo. not cloned to expected directory: '$GOSRC'" # Calling script already loaded lib.sh -# shellcheck disable=SC2154 -lilto $SUDO ./hack/install_catatonit.sh -bigto $SUDO make install.tools +lilto ./hack/install_catatonit.sh +bigto make install.tools # shellcheck disable=SC2154 -if [[ "$OS_RELEASE_ID" == "ubuntu" ]]; then - lilto $SUDO make install.libseccomp.sudo -else # Fedora +if [[ "$OS_RELEASE_ID" == "fedora" ]]; then msg "Installing swagger binary" download_url=$(\ curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \ jq -r '.assets[] | select(.name | contains("linux_amd64")) | .browser_download_url') - $SUDO curl --fail -s -o /usr/local/bin/swagger -L'#' "$download_url" - $SUDO chmod +x /usr/local/bin/swagger + curl --fail -s -o /usr/local/bin/swagger -L'#' "$download_url" + chmod +x /usr/local/bin/swagger /usr/local/bin/swagger version # This is needed for rootless testing - $SUDO make install.modules-load + make install.modules-load fi # Make pristine for other runtime usage/expectations also save a bit # of space in the images. -$SUDO rm -rf "$GOPATH/src" "$GOCACHE" -$SUDO chown -R root.root /var/tmp/go +rm -rf "$GOPATH/src" "$GOCACHE" +chown -R root.root "$GOPATH" diff --git a/cache_images/ubuntu_packaging.sh b/cache_images/ubuntu_packaging.sh index 4f468a92..44d3eb7e 100644 --- a/cache_images/ubuntu_packaging.sh +++ b/cache_images/ubuntu_packaging.sh @@ -33,15 +33,15 @@ fi # automated testing. These packages are not otherwise intended for # end-user consumption. VERSION_ID=$(source /etc/os-release; echo $VERSION_ID) -# Overview: https://build.opensuse.org/project/show/devel:kubic:libcontainers:testing -REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_$VERSION_ID/" -GPG_URL="https://download.opensuse.org/repositories/devel:kubic:libcontainers:testing/xUbuntu_$VERSION_ID/Release.key" +# Overview: https://build.opensuse.org/project/show/devel:kubic:libcontainers:unstable +REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$VERSION_ID/" +GPG_URL="https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$VERSION_ID/Release.key" echo "deb $REPO_URL /" | ooe.sh $SUDO \ - tee /etc/apt/sources.list.d/devel:kubic:libcontainers:testing:ci.list + tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable:ci.list curl --fail --silent --location --url "$GPG_URL" | \ gpg --dearmor | \ - $SUDO tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_testing_ci.gpg &> /dev/null + $SUDO tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable_ci.gpg &> /dev/null # Removed golang-1.14 from install packages due to known @@ -51,7 +51,6 @@ INSTALL_PACKAGES=(\ apache2-utils apparmor apt-transport-https - aufs-tools autoconf automake bash-completion @@ -65,7 +64,6 @@ INSTALL_PACKAGES=(\ conmon containernetworking-plugins containers-common - cri-o-runc criu crun dnsmasq @@ -128,6 +126,7 @@ INSTALL_PACKAGES=(\ python3-requests python3-setuptools rsync + runc scons skopeo slirp4netns @@ -194,10 +193,5 @@ curl -s -L https://golang.org/dl/go1.17.3.linux-amd64.tar.gz | \ # Now linking to upstream golang until ubuntu performance issues are resolved $SUDO ln -sf /usr/local/go/bin/* /usr/bin/ -export GOPATH=/var/tmp/go -mkdir -p "$GOPATH" -eval $(go env | tee /dev/stderr) -export PATH="$GOPATH/bin:$PATH" - -# shellcheck source=./podman_tooling.sh -source $SCRIPT_DIRPATH/podman_tooling.sh +chmod +x $SCRIPT_DIRPATH/podman_tooling.sh +$SUDO bash $SCRIPT_DIRPATH/podman_tooling.sh diff --git a/podman/ubuntu_release b/podman/ubuntu_release index c83d3eb5..dcdf6284 100644 --- a/podman/ubuntu_release +++ b/podman/ubuntu_release @@ -1 +1 @@ -21.10 +22.04