Skip to content

Commit

Permalink
app-emulation/qemu: update live ebuild
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.5, Repoman-2.3.2
  • Loading branch information
tamiko committed May 3, 2017
1 parent 68e1a06 commit 3d4dbd1
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions app-emulation/qemu/qemu-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ PYTHON_REQ_USE="ncurses,readline"

PLOCALES="bg de_DE fr_FR hu it tr zh_CN"

FIRMWARE_ABI_VERSION="2.9.0-r50"

inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo-r1 pax-utils l10n

Expand Down Expand Up @@ -149,12 +151,13 @@ SOFTMMU_TOOLS_DEPEND="
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"

X86_FIRMWARE_DEPEND="
>=sys-firmware/ipxe-1.0.0_p20130624
pin-upstream-blobs? (
~sys-firmware/seabios-1.10.1
~sys-firmware/ipxe-1.0.0_p20160620
~sys-firmware/seabios-1.10.1[binary]
~sys-firmware/sgabios-0.1_pre8
)
!pin-upstream-blobs? (
sys-firmware/ipxe
sys-firmware/seabios
sys-firmware/sgabios
)"
Expand Down Expand Up @@ -679,7 +682,7 @@ src_install() {
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
fi

# Remove vgabios since we're using the vgabios packaged one
# Remove vgabios since we're using the seavgabios packaged one
rm "${ED}/usr/share/qemu/vgabios.bin"
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
Expand Down Expand Up @@ -717,15 +720,38 @@ src_install() {
readme.gentoo_create_doc
}

pkg_postinst() {
DISABLE_AUTOFORMATTING=true
readme.gentoo_print_elog
firmware_abi_change() {
local pv
for pv in ${REPLACING_VERSIONS}; do
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
return 0
fi
done
return 1
}

pkg_postinst() {
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
udev_reload
fi

fcaps cap_net_admin /usr/libexec/qemu-bridge-helper

DISABLE_AUTOFORMATTING=true
readme.gentoo_print_elog

if use pin-upstream-blobs && firmware_abi_change; then
ewarn "This version of qemu pins new versions of firmware blobs:"
ewarn " $(best_version sys-firmware/ipxe)"
ewarn " $(best_version sys-firmware/seabios)"
ewarn " $(best_version sys-firmware/sgabios)"
ewarn "This might break resume of hibernated guests (started with a different"
ewarn "firmware version) and live migration to/from qemu versions with different"
ewarn "firmware. Please (cold) restart all running guests. For functional"
ewarn "guest migration ensure that all"
ewarn "hosts run at least"
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
fi
}

pkg_info() {
Expand Down

0 comments on commit 3d4dbd1

Please sign in to comment.