From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 77047139694 for ; Thu, 23 Feb 2017 20:24:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E83021C22E; Thu, 23 Feb 2017 20:24:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7B41121C22E for ; Thu, 23 Feb 2017 20:24:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 849E1341646 for ; Thu, 23 Feb 2017 20:24:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D07B3522C for ; Thu, 23 Feb 2017 20:24:28 +0000 (UTC) From: "Matthias Maier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthias Maier" Message-ID: <1487881450.34e99aae9bfdabffc0a21d1f56cf84be73f07341.tamiko@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/qemu-9999.ebuild X-VCS-Directories: app-emulation/qemu/ X-VCS-Committer: tamiko X-VCS-Committer-Name: Matthias Maier X-VCS-Revision: 34e99aae9bfdabffc0a21d1f56cf84be73f07341 X-VCS-Branch: master Date: Thu, 23 Feb 2017 20:24:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1f4e480b-95c9-47ed-9e9b-97e4a32234c0 X-Archives-Hash: b4ab1a6670b8814031336d30d677de41 commit: 34e99aae9bfdabffc0a21d1f56cf84be73f07341 Author: Matthias Maier gentoo org> AuthorDate: Thu Feb 23 19:41:13 2017 +0000 Commit: Matthias Maier gentoo org> CommitDate: Thu Feb 23 20:24:10 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e99aae 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 app-emulation/qemu/qemu-9999.ebuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild index e00707b446..3f97bbab45 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