xref: /freebsd/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps.sh (revision ee3960cba1068e12fb032a68c46d74841d9edab3)
1######################################################################
2# 3) Wait for VM to boot from previous step and launch dependencies
3#    script on it.
4#
5# $1: OS name (like 'fedora41')
6# $2: (optional) Experimental kernel version to install on fedora,
7#     like "6.14".
8######################################################################
9
10.github/workflows/scripts/qemu-wait-for-vm.sh vm0
11
12# SPECIAL CASE:
13#
14# If the user passed in an experimental kernel version to test on Fedora,
15# we need to update the kernel version in zfs's META file to allow the
16# build to happen.  We update our local copy of META here, since we know
17# it will be rsync'd up in the next step.
18if [ -n "${2:-}" ] ; then
19  sed -i -E 's/Linux-Maximum: .+/Linux-Maximum: 99.99/g' META
20fi
21
22scp .github/workflows/scripts/qemu-3-deps-vm.sh zfs@vm0:qemu-3-deps-vm.sh
23PID=`pidof /usr/bin/qemu-system-x86_64`
24ssh zfs@vm0 '$HOME/qemu-3-deps-vm.sh' "$@"
25# wait for poweroff to succeed
26tail --pid=$PID -f /dev/null
27sleep 5 # avoid this: "error: Domain is already active"
28rm -f $HOME/.ssh/known_hosts
29