mirror of
https://github.com/containers/podman.git
synced 2025-06-17 23:20:59 +08:00
Cirrus: Include packages for buildah CI
Also, move some setup steps at VM image build time to save runtime. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -26,7 +26,6 @@ else
|
|||||||
warn "NOT enabling updates-testing repository for image based on $PRIOR_FEDORA_BASE_IMAGE"
|
warn "NOT enabling updates-testing repository for image based on $PRIOR_FEDORA_BASE_IMAGE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing general build/test dependencies for Fedora '$OS_RELEASE_VER'"
|
|
||||||
REMOVE_PACKAGES=()
|
REMOVE_PACKAGES=()
|
||||||
INSTALL_PACKAGES=(\
|
INSTALL_PACKAGES=(\
|
||||||
autoconf
|
autoconf
|
||||||
@ -74,6 +73,7 @@ INSTALL_PACKAGES=(\
|
|||||||
make
|
make
|
||||||
msitools
|
msitools
|
||||||
nmap-ncat
|
nmap-ncat
|
||||||
|
ostree-devel
|
||||||
pandoc
|
pandoc
|
||||||
podman
|
podman
|
||||||
procps-ng
|
procps-ng
|
||||||
@ -86,11 +86,15 @@ INSTALL_PACKAGES=(\
|
|||||||
python3-dateutil
|
python3-dateutil
|
||||||
python3-psutil
|
python3-psutil
|
||||||
python3-pytoml
|
python3-pytoml
|
||||||
|
rsync
|
||||||
|
runc
|
||||||
selinux-policy-devel
|
selinux-policy-devel
|
||||||
skopeo
|
skopeo
|
||||||
|
skopeo-containers
|
||||||
slirp4netns
|
slirp4netns
|
||||||
unzip
|
unzip
|
||||||
vim
|
vim
|
||||||
|
wget
|
||||||
which
|
which
|
||||||
xz
|
xz
|
||||||
zip
|
zip
|
||||||
@ -112,16 +116,21 @@ case "$OS_RELEASE_VER" in
|
|||||||
*)
|
*)
|
||||||
bad_os_id_ver ;;
|
bad_os_id_ver ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
echo "Installing general build/test dependencies for Fedora '$OS_RELEASE_VER'"
|
||||||
$BIGTO ooe.sh sudo dnf install -y ${INSTALL_PACKAGES[@]}
|
$BIGTO ooe.sh sudo dnf install -y ${INSTALL_PACKAGES[@]}
|
||||||
|
|
||||||
[[ "${#REMOVE_PACKAGES[@]}" -eq "0" ]] || \
|
[[ "${#REMOVE_PACKAGES[@]}" -eq "0" ]] || \
|
||||||
$LILTO ooe.sh sudo dnf erase -y ${REMOVE_PACKAGES[@]}
|
$LILTO ooe.sh sudo dnf erase -y ${REMOVE_PACKAGES[@]}
|
||||||
|
|
||||||
# Ensure there are no disruptive periodic services enabled by default in image
|
echo "Enabling cgroup management from containers"
|
||||||
systemd_banish
|
ooe.sh sudo setsebool container_manage_cgroup true
|
||||||
|
|
||||||
ooe.sh sudo /tmp/libpod/hack/install_catatonit.sh
|
ooe.sh sudo /tmp/libpod/hack/install_catatonit.sh
|
||||||
|
|
||||||
|
# Ensure there are no disruptive periodic services enabled by default in image
|
||||||
|
systemd_banish
|
||||||
|
|
||||||
rh_finalize
|
rh_finalize
|
||||||
|
|
||||||
echo "SUCCESS!"
|
echo "SUCCESS!"
|
||||||
|
@ -40,9 +40,9 @@ fi
|
|||||||
echo "Configuring/Instaling deps from Open build server"
|
echo "Configuring/Instaling deps from Open build server"
|
||||||
VERSION_ID=$(source /etc/os-release; echo $VERSION_ID)
|
VERSION_ID=$(source /etc/os-release; echo $VERSION_ID)
|
||||||
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$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
|
| ooe.sh sudo tee /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"
|
ooe.sh 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
|
ooe.sh sudo apt-key add - < /tmp/Release.key
|
||||||
|
|
||||||
INSTALL_PACKAGES=(\
|
INSTALL_PACKAGES=(\
|
||||||
apparmor
|
apparmor
|
||||||
@ -51,14 +51,15 @@ INSTALL_PACKAGES=(\
|
|||||||
automake
|
automake
|
||||||
bash-completion
|
bash-completion
|
||||||
bison
|
bison
|
||||||
btrfs-tools
|
|
||||||
build-essential
|
build-essential
|
||||||
|
bzip2
|
||||||
|
conmon
|
||||||
containernetworking-plugins
|
containernetworking-plugins
|
||||||
containers-common
|
containers-common
|
||||||
|
coreutils
|
||||||
cri-o-runc
|
cri-o-runc
|
||||||
criu
|
criu
|
||||||
curl
|
curl
|
||||||
conmon
|
|
||||||
dnsmasq
|
dnsmasq
|
||||||
e2fslibs-dev
|
e2fslibs-dev
|
||||||
emacs-nox
|
emacs-nox
|
||||||
@ -66,6 +67,7 @@ INSTALL_PACKAGES=(\
|
|||||||
gawk
|
gawk
|
||||||
gcc
|
gcc
|
||||||
gettext
|
gettext
|
||||||
|
git
|
||||||
go-md2man
|
go-md2man
|
||||||
golang
|
golang
|
||||||
iproute2
|
iproute2
|
||||||
@ -84,17 +86,19 @@ INSTALL_PACKAGES=(\
|
|||||||
libnet1
|
libnet1
|
||||||
libnet1-dev
|
libnet1-dev
|
||||||
libnl-3-dev
|
libnl-3-dev
|
||||||
libvarlink
|
|
||||||
libprotobuf-c-dev
|
libprotobuf-c-dev
|
||||||
libprotobuf-dev
|
libprotobuf-dev
|
||||||
libseccomp-dev
|
libseccomp-dev
|
||||||
libseccomp2
|
libseccomp2
|
||||||
|
libselinux-dev
|
||||||
libsystemd-dev
|
libsystemd-dev
|
||||||
libtool
|
libtool
|
||||||
libudev-dev
|
libudev-dev
|
||||||
|
libvarlink
|
||||||
lsof
|
lsof
|
||||||
make
|
make
|
||||||
netcat
|
netcat
|
||||||
|
openssl
|
||||||
pkg-config
|
pkg-config
|
||||||
podman
|
podman
|
||||||
protobuf-c-compiler
|
protobuf-c-compiler
|
||||||
@ -107,19 +111,26 @@ INSTALL_PACKAGES=(\
|
|||||||
python3-psutil
|
python3-psutil
|
||||||
python3-pytoml
|
python3-pytoml
|
||||||
python3-setuptools
|
python3-setuptools
|
||||||
|
rsync
|
||||||
|
runc
|
||||||
|
scons
|
||||||
skopeo
|
skopeo
|
||||||
slirp4netns
|
slirp4netns
|
||||||
socat
|
socat
|
||||||
unzip
|
unzip
|
||||||
vim
|
vim
|
||||||
|
wget
|
||||||
xz-utils
|
xz-utils
|
||||||
|
yum-utils
|
||||||
zip
|
zip
|
||||||
|
zlib1g-dev
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ "$OS_RELEASE_VER" -ge "19" ]]
|
if [[ "$OS_RELEASE_VER" -ge "19" ]]
|
||||||
then
|
then
|
||||||
INSTALL_PACKAGES+=(\
|
INSTALL_PACKAGES+=(\
|
||||||
bats
|
bats
|
||||||
|
btrfs-progs
|
||||||
fuse3
|
fuse3
|
||||||
libbtrfs-dev
|
libbtrfs-dev
|
||||||
libfuse3-dev
|
libfuse3-dev
|
||||||
@ -130,7 +141,10 @@ else
|
|||||||
BATS_URL='http://launchpadlibrarian.net/438140887/bats_1.1.0+git104-g1c83a1b-1_all.deb'
|
BATS_URL='http://launchpadlibrarian.net/438140887/bats_1.1.0+git104-g1c83a1b-1_all.deb'
|
||||||
curl -L -O "$BATS_URL"
|
curl -L -O "$BATS_URL"
|
||||||
cd -
|
cd -
|
||||||
INSTALL_PACKAGES+=(/tmp/$(basename $BATS_URL))
|
INSTALL_PACKAGES+=(\
|
||||||
|
/tmp/$(basename $BATS_URL)
|
||||||
|
btrfs-tools
|
||||||
|
)
|
||||||
|
|
||||||
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'
|
||||||
@ -151,6 +165,13 @@ ooe.sh sudo make -C /tmp/libpod install.libseccomp.sudo
|
|||||||
# Ensure there are no disruptive periodic services enabled by default in image
|
# Ensure there are no disruptive periodic services enabled by default in image
|
||||||
systemd_banish
|
systemd_banish
|
||||||
|
|
||||||
|
CRIO_RUNC_PATH="/usr/lib/cri-o-runc/sbin/runc"
|
||||||
|
if sudo dpkg -L cri-o-runc | grep -m 1 -q "$CRIO_RUNC_PATH"
|
||||||
|
then
|
||||||
|
echo "Linking $CRIO_RUNC_PATH to /usr/bin/runc for ease of testing."
|
||||||
|
sudo ln -f "$CRIO_RUNC_PATH" "/usr/bin/runc"
|
||||||
|
fi
|
||||||
|
|
||||||
ubuntu_finalize
|
ubuntu_finalize
|
||||||
|
|
||||||
echo "SUCCESS!"
|
echo "SUCCESS!"
|
||||||
|
@ -39,23 +39,8 @@ done
|
|||||||
cd "${GOSRC}/"
|
cd "${GOSRC}/"
|
||||||
case "${OS_RELEASE_ID}" in
|
case "${OS_RELEASE_ID}" in
|
||||||
ubuntu)
|
ubuntu)
|
||||||
CRIO_RUNC_PATH="/usr/lib/cri-o-runc/sbin/runc"
|
|
||||||
if dpkg -L cri-o-runc | grep -m 1 -q "$CRIO_RUNC_PATH"
|
|
||||||
then
|
|
||||||
echo "Linking $CRIO_RUNC_PATH to /usr/bin/runc for ease of testing."
|
|
||||||
ln -f "$CRIO_RUNC_PATH" "/usr/bin/runc"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
# This is temporary and should be removed once conmon is in stable
|
|
||||||
# and the images can be rebuilt properly.
|
|
||||||
if [[ "$OS_RELEASE_VER" -eq "30" ]]; then
|
|
||||||
dnf -y install https://kojipkgs.fedoraproject.org//packages/conmon/2.0.13/1.fc30/x86_64/conmon-2.0.13-1.fc30.x86_64.rpm
|
|
||||||
else
|
|
||||||
dnf -y install https://kojipkgs.fedoraproject.org//packages/conmon/2.0.13/1.fc31/x86_64/conmon-2.0.13-1.fc31.x86_64.rpm
|
|
||||||
fi
|
|
||||||
# End of temporary patch
|
|
||||||
|
|
||||||
# All SELinux distros need this for systemd-in-a-container
|
# All SELinux distros need this for systemd-in-a-container
|
||||||
setsebool container_manage_cgroup true
|
setsebool container_manage_cgroup true
|
||||||
if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then
|
if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then
|
||||||
@ -67,6 +52,10 @@ case "${OS_RELEASE_ID}" in
|
|||||||
echo "mq-deadline" > /sys/block/sda/queue/scheduler
|
echo "mq-deadline" > /sys/block/sda/queue/scheduler
|
||||||
cat /sys/block/sda/queue/scheduler
|
cat /sys/block/sda/queue/scheduler
|
||||||
|
|
||||||
|
if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then
|
||||||
|
bash "$SCRIPT_BASE/add_second_partition.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
warn "Forcing systemd cgroup manager"
|
warn "Forcing systemd cgroup manager"
|
||||||
X=$(echo "export CGROUP_MANAGER=systemd" | \
|
X=$(echo "export CGROUP_MANAGER=systemd" | \
|
||||||
tee -a /etc/environment) && eval "$X" && echo "$X"
|
tee -a /etc/environment) && eval "$X" && echo "$X"
|
||||||
|
Reference in New Issue
Block a user