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 4983A139083 for ; Wed, 6 Dec 2017 12:42:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83D36E0FA0; Wed, 6 Dec 2017 12:42:04 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 559EDE0FA0 for ; Wed, 6 Dec 2017 12:42:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DDB0B33BF0B for ; Wed, 6 Dec 2017 12:42:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 68829AE73 for ; Wed, 6 Dec 2017 12:42:01 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1512564112.b4f56dd13d25045c4e6fdb245c41e0858e770a3c.kensington@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/files/qemu-binfmt.initd-r1 X-VCS-Directories: app-emulation/qemu/files/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: b4f56dd13d25045c4e6fdb245c41e0858e770a3c X-VCS-Branch: master Date: Wed, 6 Dec 2017 12:42:01 +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: 533167de-af44-4b7c-82fe-1baca68fffc0 X-Archives-Hash: 935f592ff176545e45436e5de4819b2f commit: b4f56dd13d25045c4e6fdb245c41e0858e770a3c Author: Michael Mair-Keimberger gmail com> AuthorDate: Sun Dec 3 12:35:00 2017 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Wed Dec 6 12:41:52 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4f56dd1 app-emulation/qemu: remove unused file Closes: https://github.com/gentoo/gentoo/pull/6419 app-emulation/qemu/files/qemu-binfmt.initd-r1 | 138 -------------------------- 1 file changed, 138 deletions(-) diff --git a/app-emulation/qemu/files/qemu-binfmt.initd-r1 b/app-emulation/qemu/files/qemu-binfmt.initd-r1 deleted file mode 100644 index fe62a2a211e..00000000000 --- a/app-emulation/qemu/files/qemu-binfmt.initd-r1 +++ /dev/null @@ -1,138 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel - -# Defaulting to OC should be safe because it comes down to: -# - do we trust the interp itself to not be malicious? yes; we built it. -# - do we trust the programs we're running? ish; same permission as native -# binaries apply. so if user can do bad stuff natively, cross isn't worse. -: ${QEMU_BINFMT_FLAGS:=OC} - -depend() { - after procfs -} - -start() { - ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})" - - if [ ! -d /proc/sys/fs/binfmt_misc ] ; then - modprobe -q binfmt_misc - fi - - if [ ! -d /proc/sys/fs/binfmt_misc ] ; then - eend $? "You need support for 'misc binaries' in your kernel!" || return - fi - - if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1 - eend $? || return - fi - - # probe cpu type - cpu=`uname -m` - case "$cpu" in - i386|i486|i586|i686|i86pc|BePC|x86_64) - cpu="i386" - ;; - m68k) - cpu="m68k" - ;; - mips*) - cpu="mips" - ;; - "Power Macintosh"|ppc|ppc64) - cpu="ppc" - ;; - armv[4-9]*) - cpu="arm" - ;; - sparc*) - cpu="sparc" - ;; - esac - - # register the interpreter for each cpu except for the native one - if [ $cpu != "i386" -a -x "/usr/bin/qemu-i386" ] ; then - echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "alpha" -a -x "/usr/bin/qemu-alpha" ] ; then - echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "arm" -a -x "/usr/bin/qemu-arm" ] ; then - echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "arm" -a -x "/usr/bin/qemu-armeb" ] ; then - echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "aarch64" -a -x "/usr/bin/qemu-aarch64" ] ; then - echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sparc" -a -x "/usr/bin/qemu-sparc" ] ; then - echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "ppc" -a -x "/usr/bin/qemu-ppc" ] ; then - echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "m68k" -a -x "/usr/bin/qemu-m68k" ] ; then - #echo 'Please check cpu value and header information for m68k!' - echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips" ] ; then - # FIXME: We could use the other endianness on a MIPS host. - echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsel" ] ; then - echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32" ] ; then - echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32el" ] ; then - echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64" ] ; then - echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64el" ] ; then - echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4" ] ; then - echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4eb" ] ; then - echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "s390x" -a -x "/usr/bin/qemu-s390x" ] ; then - echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register - fi - eend $? -} - -stop() { - ebegin "Unregistering qemu-user binaries" - local arches - - arches="${arches} i386 i486" - arches="${arches} alpha" - arches="${arches} arm armeb" - arches="${arches} aarch64" - arches="${arches} sparc" - arches="${arches} ppc" - arches="${arches} m68k" - arches="${arches} mips mipsel mipsn32 mipsn32el mips64 mips64el" - arches="${arches} sh4 sh4eb" - arches="${arches} s390x" - - for a in ${arches}; do - if [ -f /proc/sys/fs/binfmt_misc/$a ] ; then - echo '-1' > /proc/sys/fs/binfmt_misc/$a - fi - done - - eend $? -} - -# vim: ts=4 :