summaryrefslogtreecommitdiff
path: root/contrib/cirrus/packer
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-03-02 09:40:27 -0500
committerChris Evich <cevich@redhat.com>2020-03-19 12:28:24 -0400
commit7cbdd48f78c7a47ade3e1324346734c20fb57769 (patch)
tree829dfef8fb6d57b3da33baecf8f4ae46e3dcceba /contrib/cirrus/packer
parent49a7856f2efc0f301bd88b1f3ed6a8fe5d9d0dec (diff)
downloadpodman-7cbdd48f78c7a47ade3e1324346734c20fb57769.tar.gz
podman-7cbdd48f78c7a47ade3e1324346734c20fb57769.tar.bz2
podman-7cbdd48f78c7a47ade3e1324346734c20fb57769.zip
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>
Diffstat (limited to 'contrib/cirrus/packer')
-rw-r--r--contrib/cirrus/packer/ubuntu_setup.sh183
1 files changed, 100 insertions, 83 deletions
diff --git a/contrib/cirrus/packer/ubuntu_setup.sh b/contrib/cirrus/packer/ubuntu_setup.sh
index 7c39a76f8..1299fd464 100644
--- a/contrib/cirrus/packer/ubuntu_setup.sh
+++ b/contrib/cirrus/packer/ubuntu_setup.sh
@@ -15,9 +15,6 @@ install_ooe
export GOPATH="$(mktemp -d)"
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
echo "Disabling all packaging activity on boot"
# Don't let sed process sed's temporary files
@@ -32,98 +29,109 @@ $BIGTO $SUDOAPTGET update
echo "Upgrading all packages"
$BIGTO $SUDOAPTGET upgrade
-echo "Adding PPAs"
+echo "Adding third-party repositories and PPAs"
$LILTO $SUDOAPTGET install software-properties-common
-$LILTO $SUDOAPTADD ppa:projectatomic/ppa
$LILTO $SUDOAPTADD ppa:criu/ppa
if [[ "$OS_RELEASE_VER" -eq "18" ]]
then
$LILTO $SUDOAPTADD ppa:longsleep/golang-backports
fi
-$LILTO $SUDOAPTGET update
-
-echo "Installing general testing and system dependencies"
-$BIGTO $SUDOAPTGET install \
- apparmor \
- aufs-tools \
- autoconf \
- automake \
- bash-completion \
- bats \
- bison \
- btrfs-tools \
- build-essential \
- containernetworking-plugins \
- containers-common \
- cri-o-runc \
- criu \
- curl \
- conmon \
- dnsmasq \
- e2fslibs-dev \
- emacs-nox \
- file \
- gawk \
- gcc \
- gettext \
- go-md2man \
- golang \
- iproute2 \
- iptables \
- jq \
- libaio-dev \
- libapparmor-dev \
- libcap-dev \
- libdevmapper-dev \
- libdevmapper1.02.1 \
- libfuse-dev \
- libfuse2 \
- libglib2.0-dev \
- libgpgme11-dev \
- liblzma-dev \
- libnet1 \
- libnet1-dev \
- libnl-3-dev \
- libvarlink \
- libprotobuf-c-dev \
- libprotobuf-dev \
- libseccomp-dev \
- libseccomp2 \
- libsystemd-dev \
- libtool \
- libudev-dev \
- lsof \
- make \
- netcat \
- pkg-config \
- podman \
- protobuf-c-compiler \
- protobuf-compiler \
- python-future \
- python-minimal \
- python-protobuf \
- python3-dateutil \
- python3-pip \
- python3-psutil \
- python3-pytoml \
- python3-setuptools \
- skopeo \
- slirp4netns \
- socat \
- unzip \
- vim \
- xz-utils \
+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
+
+INSTALL_PACKAGES=(\
+ apparmor
+ aufs-tools
+ autoconf
+ automake
+ bash-completion
+ bison
+ btrfs-tools
+ build-essential
+ containernetworking-plugins
+ containers-common
+ cri-o-runc
+ criu
+ curl
+ conmon
+ dnsmasq
+ e2fslibs-dev
+ emacs-nox
+ file
+ gawk
+ gcc
+ gettext
+ go-md2man
+ golang
+ iproute2
+ iptables
+ jq
+ libaio-dev
+ libapparmor-dev
+ libcap-dev
+ libdevmapper-dev
+ libdevmapper1.02.1
+ libfuse-dev
+ libfuse2
+ libglib2.0-dev
+ libgpgme11-dev
+ liblzma-dev
+ libnet1
+ libnet1-dev
+ libnl-3-dev
+ libvarlink
+ libprotobuf-c-dev
+ libprotobuf-dev
+ libseccomp-dev
+ libseccomp2
+ libsystemd-dev
+ libtool
+ libudev-dev
+ lsof
+ make
+ netcat
+ pkg-config
+ podman
+ protobuf-c-compiler
+ protobuf-compiler
+ python-future
+ python-minimal
+ python-protobuf
+ python3-dateutil
+ python3-pip
+ python3-psutil
+ python3-pytoml
+ python3-setuptools
+ skopeo
+ slirp4netns
+ socat
+ unzip
+ vim
+ xz-utils
zip
+)
if [[ "$OS_RELEASE_VER" -ge "19" ]]
then
- echo "Installing Ubuntu > 18 packages"
- $LILTO $SUDOAPTGET install fuse3 libfuse3-dev libbtrfs-dev
-fi
+ INSTALL_PACKAGES+=(\
+ bats
+ 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."
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/*
@@ -131,9 +139,18 @@ then
ooe.sh sudo update-grub
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 make -C /tmp/libpod install.libseccomp.sudo
+# Ensure there are no disruptive periodic services enabled by default in image
+systemd_banish
+
ubuntu_finalize
echo "SUCCESS!"