mirror of
https://github.com/containers/podman.git
synced 2025-06-26 12:56:45 +08:00
Cirrus: Install golang 1.14 on Ubuntu
This more/less reverts efd142214 + updates to 1.13 on all Ubuntus for all `containers` projects. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -37,14 +37,13 @@ fi
|
|||||||
|
|
||||||
$BIGTO ooe.sh $SUDO dnf update -y
|
$BIGTO ooe.sh $SUDO dnf update -y
|
||||||
|
|
||||||
# While both runc and crun are needed in the support of different distros
|
# Fedora, as of 31, uses cgroups v2 by default. runc does not support
|
||||||
# and environments, packaging will need to instal one and suggesting the other.
|
# cgroups v2, only crun does. (As of 2020-07-30 runc support is
|
||||||
# This can cause some ambiguity for automation, where more concrete, predictable
|
# forthcoming but not even close to ready yet). To ensure a reliable
|
||||||
# behavior is desirable. Instead of fighting with or complicating the packaging
|
# runtime environment, force-remove runc if it is present.
|
||||||
# itself, workaround the problem. Always removing 'runc' in Fedora since it's
|
# However, because a few other repos. which use these images still need
|
||||||
# exclusively cgroupsv2 focused as of release 31. However, ensure the runc
|
# it, ensure the runc package is cached in $PACKAGE_DOWNLOAD_DIR so
|
||||||
# is downloaded to $PACKAGE_DOWNLOAD_DIR for the minority of use-cases where
|
# it may be swap it in when required.
|
||||||
# automation needs to swap it in.
|
|
||||||
REMOVE_PACKAGES=(runc)
|
REMOVE_PACKAGES=(runc)
|
||||||
|
|
||||||
INSTALL_PACKAGES=(\
|
INSTALL_PACKAGES=(\
|
||||||
|
@ -65,7 +65,7 @@ INSTALL_PACKAGES=(\
|
|||||||
gettext
|
gettext
|
||||||
git
|
git
|
||||||
go-md2man
|
go-md2man
|
||||||
golang
|
golang-1.14
|
||||||
iproute2
|
iproute2
|
||||||
iptables
|
iptables
|
||||||
jq
|
jq
|
||||||
@ -137,6 +137,10 @@ if [[ "$OS_RELEASE_VER" -le 19 ]]; then
|
|||||||
python-minimal
|
python-minimal
|
||||||
yum-utils
|
yum-utils
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
INSTALL_PACKAGES+=(\
|
||||||
|
python-is-python3
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do this at the last possible moment to avoid dpkg lock conflicts
|
# 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"
|
echo "Installing general testing and system dependencies"
|
||||||
# Necessary to update cache of newly added repos
|
# Necessary to update cache of newly added repos
|
||||||
$LILTO ooe.sh $SUDOAPTGET update
|
$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
|
if [[ ${#DOWNLOAD_PACKAGES[@]} -gt 0 ]]; then
|
||||||
echo "Downloading packages for optional installation at runtime, as needed."
|
echo "Downloading packages for optional installation at runtime, as needed."
|
||||||
$SUDO ln -s /var/cache/apt/archives "$PACKAGE_DOWNLOAD_DIR"
|
$SUDO ln -s /var/cache/apt/archives "$PACKAGE_DOWNLOAD_DIR"
|
||||||
$LILTO ooe.sh $SUDOAPTGET install --download-only ${DOWNLOAD_PACKAGES[@]}
|
$LILTO ooe.sh $SUDOAPTGET install --download-only "${DOWNLOAD_PACKAGES[@]}"
|
||||||
ls -la "$PACKAGE_DOWNLOAD_DIR/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing runtime tooling"
|
echo "Configuring Go environment"
|
||||||
# Save some runtime by having these already available
|
# 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
|
cd $GOSRC
|
||||||
# Required since initially go was not installed
|
source $SCRIPT_BASE/lib.sh
|
||||||
source $GOSRC/$SCRIPT_BASE/lib.sh
|
|
||||||
echo "Go environment has been setup:"
|
echo "Go environment has been setup:"
|
||||||
go env
|
go env
|
||||||
|
|
||||||
|
echo "Building/Installing runtime tooling"
|
||||||
$SUDO hack/install_catatonit.sh
|
$SUDO hack/install_catatonit.sh
|
||||||
$SUDO make install.libseccomp.sudo
|
$SUDO make install.libseccomp.sudo
|
||||||
$SUDO make install.tools
|
$SUDO make install.tools GO_BUILD='go build' # -mod=vendor breaks this
|
||||||
|
@ -39,16 +39,6 @@ done
|
|||||||
cd "${GOSRC}/"
|
cd "${GOSRC}/"
|
||||||
case "${OS_RELEASE_ID}" in
|
case "${OS_RELEASE_ID}" in
|
||||||
ubuntu)
|
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)
|
fedora)
|
||||||
# All SELinux distros need this for systemd-in-a-container
|
# All SELinux distros need this for systemd-in-a-container
|
||||||
|
Reference in New Issue
Block a user