Cirrus: Use opensuse open build Ubuntu packages

This is necessary as the projectatomic PPA is no longer maintained.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2020-03-02 09:40:27 -05:00
parent 49a7856f2e
commit 7cbdd48f78
No known key found for this signature in database
GPG Key ID: 03EDC70FD578067F
1 changed files with 99 additions and 82 deletions

View File

@ -15,9 +15,6 @@ install_ooe
export GOPATH="$(mktemp -d)" export GOPATH="$(mktemp -d)"
trap "sudo rm -rf $GOPATH" EXIT trap "sudo rm -rf $GOPATH" EXIT
# Ensure there are no disruptive periodic services enabled by default in image
systemd_banish
# Stop disruption upon boot ASAP after booting # Stop disruption upon boot ASAP after booting
echo "Disabling all packaging activity on boot" echo "Disabling all packaging activity on boot"
# Don't let sed process sed's temporary files # Don't let sed process sed's temporary files
@ -32,98 +29,109 @@ $BIGTO $SUDOAPTGET update
echo "Upgrading all packages" echo "Upgrading all packages"
$BIGTO $SUDOAPTGET upgrade $BIGTO $SUDOAPTGET upgrade
echo "Adding PPAs" echo "Adding third-party repositories and PPAs"
$LILTO $SUDOAPTGET install software-properties-common $LILTO $SUDOAPTGET install software-properties-common
$LILTO $SUDOAPTADD ppa:projectatomic/ppa
$LILTO $SUDOAPTADD ppa:criu/ppa $LILTO $SUDOAPTADD ppa:criu/ppa
if [[ "$OS_RELEASE_VER" -eq "18" ]] if [[ "$OS_RELEASE_VER" -eq "18" ]]
then then
$LILTO $SUDOAPTADD ppa:longsleep/golang-backports $LILTO $SUDOAPTADD ppa:longsleep/golang-backports
fi fi
$LILTO $SUDOAPTGET update echo "Configuring/Instaling deps from Open build server"
VERSION_ID=$(source /etc/os-release; echo $VERSION_ID)
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$VERSION_ID/ /" \
> /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L -o /tmp/Release.key "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key"
apt-key add - < /tmp/Release.key
echo "Installing general testing and system dependencies" INSTALL_PACKAGES=(\
$BIGTO $SUDOAPTGET install \ apparmor
apparmor \ aufs-tools
aufs-tools \ autoconf
autoconf \ automake
automake \ bash-completion
bash-completion \ bison
bats \ btrfs-tools
bison \ build-essential
btrfs-tools \ containernetworking-plugins
build-essential \ containers-common
containernetworking-plugins \ cri-o-runc
containers-common \ criu
cri-o-runc \ curl
criu \ conmon
curl \ dnsmasq
conmon \ e2fslibs-dev
dnsmasq \ emacs-nox
e2fslibs-dev \ file
emacs-nox \ gawk
file \ gcc
gawk \ gettext
gcc \ go-md2man
gettext \ golang
go-md2man \ iproute2
golang \ iptables
iproute2 \ jq
iptables \ libaio-dev
jq \ libapparmor-dev
libaio-dev \ libcap-dev
libapparmor-dev \ libdevmapper-dev
libcap-dev \ libdevmapper1.02.1
libdevmapper-dev \ libfuse-dev
libdevmapper1.02.1 \ libfuse2
libfuse-dev \ libglib2.0-dev
libfuse2 \ libgpgme11-dev
libglib2.0-dev \ liblzma-dev
libgpgme11-dev \ libnet1
liblzma-dev \ libnet1-dev
libnet1 \ libnl-3-dev
libnet1-dev \ libvarlink
libnl-3-dev \ libprotobuf-c-dev
libvarlink \ libprotobuf-dev
libprotobuf-c-dev \ libseccomp-dev
libprotobuf-dev \ libseccomp2
libseccomp-dev \ libsystemd-dev
libseccomp2 \ libtool
libsystemd-dev \ libudev-dev
libtool \ lsof
libudev-dev \ make
lsof \ netcat
make \ pkg-config
netcat \ podman
pkg-config \ protobuf-c-compiler
podman \ protobuf-compiler
protobuf-c-compiler \ python-future
protobuf-compiler \ python-minimal
python-future \ python-protobuf
python-minimal \ python3-dateutil
python-protobuf \ python3-pip
python3-dateutil \ python3-psutil
python3-pip \ python3-pytoml
python3-psutil \ python3-setuptools
python3-pytoml \ skopeo
python3-setuptools \ slirp4netns
skopeo \ socat
slirp4netns \ unzip
socat \ vim
unzip \ xz-utils
vim \
xz-utils \
zip zip
)
if [[ "$OS_RELEASE_VER" -ge "19" ]] if [[ "$OS_RELEASE_VER" -ge "19" ]]
then then
echo "Installing Ubuntu > 18 packages" INSTALL_PACKAGES+=(\
$LILTO $SUDOAPTGET install fuse3 libfuse3-dev libbtrfs-dev bats
fi fuse3
libbtrfs-dev
libfuse3-dev
)
else
echo "Downloading version of bats with fix for a \$IFS related bug in 'run' command"
cd /tmp
BATS_URL='http://launchpadlibrarian.net/438140887/bats_1.1.0+git104-g1c83a1b-1_all.deb'
curl -L -O "$BATS_URL"
cd -
INSTALL_PACKAGES+=(/tmp/$(basename $BATS_URL))
if [[ "$OS_RELEASE_VER" -eq "18" ]]
then
echo "Forced Ubuntu 18 kernel to enable cgroup swap accounting." echo "Forced Ubuntu 18 kernel to enable cgroup swap accounting."
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1"/g' SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1"/g'
ooe.sh sudo sed -re "$SEDCMD" -i /etc/default/grub.d/* ooe.sh sudo sed -re "$SEDCMD" -i /etc/default/grub.d/*
@ -131,9 +139,18 @@ then
ooe.sh sudo update-grub ooe.sh sudo update-grub
fi fi
echo "Installing general testing and system dependencies"
# Necessary to update cache of newly added repos
$LILTO $SUDOAPTGET update
$BIGTO $SUDOAPTGET install ${INSTALL_PACKAGES[@]}
echo "Installing cataonit and libseccomp.sudo"
ooe.sh sudo /tmp/libpod/hack/install_catatonit.sh ooe.sh sudo /tmp/libpod/hack/install_catatonit.sh
ooe.sh sudo make -C /tmp/libpod install.libseccomp.sudo ooe.sh sudo make -C /tmp/libpod install.libseccomp.sudo
# Ensure there are no disruptive periodic services enabled by default in image
systemd_banish
ubuntu_finalize ubuntu_finalize
echo "SUCCESS!" echo "SUCCESS!"