mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #1998 from adrianreber/with-criu-again
Use existing CRIU packages for testing instead of building from git
This commit is contained in:
@ -248,10 +248,37 @@ install_conmon(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_criu(){
|
install_criu(){
|
||||||
|
OS_RELEASE_ID=$(os_release_id)
|
||||||
|
OS_RELEASE_VER=$(os_release_ver)
|
||||||
|
echo "Installing CRIU"
|
||||||
echo "Installing CRIU from commit $CRIU_COMMIT"
|
echo "Installing CRIU from commit $CRIU_COMMIT"
|
||||||
|
echo "Platform is $OS_RELEASE_ID"
|
||||||
req_env_var "
|
req_env_var "
|
||||||
CRIU_COMMIT $CRIU_COMMIT
|
CRIU_COMMIT $CRIU_COMMIT
|
||||||
"
|
"
|
||||||
|
|
||||||
|
if [[ "$OS_RELEASE_ID" =~ "ubuntu" ]]; then
|
||||||
|
ooe.sh sudo add-apt-repository ppa:criu/ppa
|
||||||
|
ooe.sh sudo apt-get update
|
||||||
|
ooe.sh sudo apt-get -y install criu
|
||||||
|
elif [[ ( "$OS_RELEASE_ID" =~ "centos" || "$OS_RELEASE_ID" =~ "rhel" ) && "$OS_RELEASE_VER" =~ "7"* ]]; then
|
||||||
|
echo "Configuring Repositories for latest CRIU"
|
||||||
|
ooe.sh sudo tee /etc/yum.repos.d/adrian-criu-el7.repo <<EOF
|
||||||
|
[adrian-criu-el7]
|
||||||
|
name=Copr repo for criu-el7 owned by adrian
|
||||||
|
baseurl=https://copr-be.cloud.fedoraproject.org/results/adrian/criu-el7/epel-7-$basearch/
|
||||||
|
type=rpm-md
|
||||||
|
skip_if_unavailable=True
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=https://copr-be.cloud.fedoraproject.org/results/adrian/criu-el7/pubkey.gpg
|
||||||
|
repo_gpgcheck=0
|
||||||
|
enabled=1
|
||||||
|
enabled_metadata=1
|
||||||
|
EOF
|
||||||
|
ooe.sh sudo yum -y install criu
|
||||||
|
elif [[ "$OS_RELEASE_ID" =~ "fedora" ]]; then
|
||||||
|
echo "Using CRIU from distribution"
|
||||||
|
else
|
||||||
DEST="/tmp/criu"
|
DEST="/tmp/criu"
|
||||||
rm -rf "$DEST"
|
rm -rf "$DEST"
|
||||||
ooe.sh git clone https://github.com/checkpoint-restore/criu.git "$DEST"
|
ooe.sh git clone https://github.com/checkpoint-restore/criu.git "$DEST"
|
||||||
@ -260,6 +287,7 @@ install_criu(){
|
|||||||
ooe.sh git checkout -q "$CRIU_COMMIT"
|
ooe.sh git checkout -q "$CRIU_COMMIT"
|
||||||
ooe.sh make
|
ooe.sh make
|
||||||
sudo install -D -m 755 criu/criu /usr/sbin/
|
sudo install -D -m 755 criu/criu /usr/sbin/
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Runs in testing VM, not image building
|
# Runs in testing VM, not image building
|
||||||
|
Reference in New Issue
Block a user