summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2017-02-23 13:41:13 -0600
committerMatthias Maier <tamiko@gentoo.org>2017-02-23 14:24:10 -0600
commit34e99aae9bfdabffc0a21d1f56cf84be73f07341 (patch)
tree848e83c73c1223618fe0449edb43755a4eaa1c71 /app-emulation/qemu
parentdev-python/python-augeas: switching python-augeas to pypi from fedora-hosted (diff)
downloadgentoo-34e99aae9bfdabffc0a21d1f56cf84be73f07341.tar.gz
gentoo-34e99aae9bfdabffc0a21d1f56cf84be73f07341.tar.bz2
gentoo-34e99aae9bfdabffc0a21d1f56cf84be73f07341.zip
app-emulation/qemu: Dynamically create binfmt.d/qemu.conf
This file is stored in /usr/share/qemu/binfmt.d/qemu.conf and can be symlinked to /etc/binfmt.d Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-emulation/qemu')
-rw-r--r--app-emulation/qemu/qemu-9999.ebuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild
index e00707b446be..3f97bbab457c 100644
--- a/app-emulation/qemu/qemu-9999.ebuild
+++ b/app-emulation/qemu/qemu-9999.ebuild
@@ -563,12 +563,15 @@ qemu_python_install() {
python_doscript "${S}/scripts/qmp/qemu-ga-client"
}
-# Generate the /etc/init.d/qemu-binfmt script which registers the user handlers.
+# Generate binfmt support files.
+# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
+# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
generate_initd() {
local out="${T}/qemu-binfmt"
+ local out_systemd="${T}/qemu.conf"
local d="${T}/binfmt.d"
- einfo "Generating qemu init.d script"
+ einfo "Generating qemu binfmt scripts and configuration files"
# Generate the debian fragments first.
mkdir -p "${d}"
@@ -604,6 +607,9 @@ generate_initd() {
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
fi
EOF
+
+ echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
+
done
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
}
@@ -616,6 +622,10 @@ src_install() {
# Install binfmt handler init script for user targets.
generate_initd
doinitd "${T}/qemu-binfmt"
+
+ # Install binfmt/qemu.conf.
+ insinto "/usr/share/qemu/binfmt.d"
+ doins "${T}/qemu.conf"
fi
if [[ -n ${softmmu_targets} ]]; then