summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/cirrus/packer/fedora_packaging.sh15
-rw-r--r--contrib/cirrus/packer/ubuntu_packaging.sh26
-rwxr-xr-xcontrib/cirrus/setup_environment.sh10
3 files changed, 24 insertions, 27 deletions
diff --git a/contrib/cirrus/packer/fedora_packaging.sh b/contrib/cirrus/packer/fedora_packaging.sh
index e5a2c68e6..4a8f62e45 100644
--- a/contrib/cirrus/packer/fedora_packaging.sh
+++ b/contrib/cirrus/packer/fedora_packaging.sh
@@ -37,14 +37,13 @@ fi
$BIGTO ooe.sh $SUDO dnf update -y
-# While both runc and crun are needed in the support of different distros
-# and environments, packaging will need to instal one and suggesting the other.
-# This can cause some ambiguity for automation, where more concrete, predictable
-# behavior is desirable. Instead of fighting with or complicating the packaging
-# itself, workaround the problem. Always removing 'runc' in Fedora since it's
-# exclusively cgroupsv2 focused as of release 31. However, ensure the runc
-# is downloaded to $PACKAGE_DOWNLOAD_DIR for the minority of use-cases where
-# automation needs to swap it in.
+# Fedora, as of 31, uses cgroups v2 by default. runc does not support
+# cgroups v2, only crun does. (As of 2020-07-30 runc support is
+# forthcoming but not even close to ready yet). To ensure a reliable
+# runtime environment, force-remove runc if it is present.
+# However, because a few other repos. which use these images still need
+# it, ensure the runc package is cached in $PACKAGE_DOWNLOAD_DIR so
+# it may be swap it in when required.
REMOVE_PACKAGES=(runc)
INSTALL_PACKAGES=(\
diff --git a/contrib/cirrus/packer/ubuntu_packaging.sh b/contrib/cirrus/packer/ubuntu_packaging.sh
index dd43ca1c1..935e81147 100644
--- a/contrib/cirrus/packer/ubuntu_packaging.sh
+++ b/contrib/cirrus/packer/ubuntu_packaging.sh
@@ -65,7 +65,7 @@ INSTALL_PACKAGES=(\
gettext
git
go-md2man
- golang
+ golang-1.14
iproute2
iptables
jq
@@ -137,6 +137,10 @@ if [[ "$OS_RELEASE_VER" -le 19 ]]; then
python-minimal
yum-utils
)
+else
+ INSTALL_PACKAGES+=(\
+ python-is-python3
+ )
fi
# Do this at the last possible moment to avoid dpkg lock conflicts
@@ -146,22 +150,26 @@ $BIGTO ooe.sh $SUDOAPTGET upgrade
echo "Installing general testing and system dependencies"
# Necessary to update cache of newly added repos
$LILTO ooe.sh $SUDOAPTGET update
-$BIGTO ooe.sh $SUDOAPTGET install ${INSTALL_PACKAGES[@]}
+$BIGTO ooe.sh $SUDOAPTGET install "${INSTALL_PACKAGES[@]}"
if [[ ${#DOWNLOAD_PACKAGES[@]} -gt 0 ]]; then
echo "Downloading packages for optional installation at runtime, as needed."
$SUDO ln -s /var/cache/apt/archives "$PACKAGE_DOWNLOAD_DIR"
- $LILTO ooe.sh $SUDOAPTGET install --download-only ${DOWNLOAD_PACKAGES[@]}
- ls -la "$PACKAGE_DOWNLOAD_DIR/"
+ $LILTO ooe.sh $SUDOAPTGET install --download-only "${DOWNLOAD_PACKAGES[@]}"
fi
-echo "Installing runtime tooling"
-# Save some runtime by having these already available
+echo "Configuring Go environment"
+# There are multiple (otherwise conflicting) versions of golang available
+# on Ubuntu. Being primarily localized by env. vars and defaults, dropping
+# a symlink is the appropriate way to "install" a specific version system-wide.
+$SUDO ln -sf /usr/lib/go-1.14/bin/go /usr/bin/go
+# Initially go was not installed
cd $GOSRC
-# Required since initially go was not installed
-source $GOSRC/$SCRIPT_BASE/lib.sh
+source $SCRIPT_BASE/lib.sh
echo "Go environment has been setup:"
go env
+
+echo "Building/Installing runtime tooling"
$SUDO hack/install_catatonit.sh
$SUDO make install.libseccomp.sudo
-$SUDO make install.tools
+$SUDO make install.tools GO_BUILD='go build' # -mod=vendor breaks this
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index e5f3168da..94169442b 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -39,16 +39,6 @@ done
cd "${GOSRC}/"
case "${OS_RELEASE_ID}" in
ubuntu)
- apt-get update
- apt-get install -y containers-common
- if [[ "$OS_RELEASE_VER" == "19" ]]; then
- apt-get purge -y --auto-remove golang*
- apt-get install -y golang-1.13
- ln -s /usr/lib/go-1.13/bin/go /usr/bin/go
- fi
- if [[ "$OS_RELEASE_VER" == "20" ]]; then
- apt-get install -y python-is-python3
- fi
;;
fedora)
# All SELinux distros need this for systemd-in-a-container