From nobody Mon Feb 9 19:44:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530133634539475.79036054370204; Wed, 27 Jun 2018 14:07:14 -0700 (PDT) Received: from localhost ([::1]:33245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHej-0004kO-Hn for importer@patchew.org; Wed, 27 Jun 2018 17:07:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHRl-0004GD-Ca for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYHRi-0003Zf-8j for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:53:49 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:42760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYHRh-0003XC-U0 for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:53:46 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Loeg3-1g4I8p20qJ-00gp7a; Wed, 27 Jun 2018 22:53:36 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2018 22:53:15 +0200 Message-Id: <20180627205317.10343-2-laurent@vivier.eu> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180627205317.10343-1-laurent@vivier.eu> References: <20180627205317.10343-1-laurent@vivier.eu> X-Provags-ID: V03:K1:sCFZ6nJYl+w6oTJ/hPyLuySISH9UBmMkbgFDbw676Fb6R3xvWMC RXzvqJ/JdaJg3bul0mY56Sv7W+Yybt2YPPg44idLnNiQxmF7neHrmRlApeJkPz4tMgHnr+D or+GA5UbwJfzLBYv9XHam2zc3tINe3+RHrn41TO4XUZ0YNPFwraD6YSOFb8twM0Wyz/VujN wthtXpr3kNqzFhry7nsTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:TPeeklcJ+Mw=:3UgThmunDWSrzIs9oZAK27 tC5r6C//uxzF61SD5wlmrsGlbeaYf4QWGovadiubywKl26fZBaDomBRHfrzgX3rNMmdgV68ZX 2TQu+8znnA7O9XwTdgMviiF81MXLo/hrw6BNSiwfi6zxbW+bzIYTQp7KZ8bRxOu81XPiUxQsc wpi6NprRGHR0NK1+sLOYcFXOolDNe5hOKZy/UAcgqwarzQHoxLkCQPVin8QTr9diBV3IYF0/+ 8doT2kw2GOxUGnhptWmaLJCSi2FR5fvKb1r0PstKQQ2Z7sDJBeVfDQqNqMLBl2CKiCY52RxVM D597MQT7V/c12ucsspHkaym4d6zAE6KpeWQABgTw6/t1mah7oY7r4TGqhNvGjjTdK9P63tJkm N0uie/V9h0gr3iKTgSmiTQUbo86jLBSnU1MV4kG3aamu4R2B2o9Dmru9iC29vrqKR3kdgyRwM qBlFr0M3MlyFioZ7+fAiKzdOiQp/H6pPIUelMPZlGLiHeRdqKL7rUK5vGgqR7gKIfngbZaw79 EXKwix72HW59vwdi4uvlbqhifw1ci+3vguvMrbfURC4patlOFByzFYJpRBT+v6Icn9D8UEo+B UTCpbr2Mm+7yDFurGCeDVKwwak5Ux7rBeW/+u5OLzAiu1MUJOKj6D2G1776Vcit8xANAdmum+ 5IAUPmv4UZm+mS6oujNCpRHAlQ9xJbgBQ0YaKdj3asIqG5mkpKT5WV1RoOjLzN2DHDxw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PATCH 1/3] qemu-binfmt-conf.sh: cleanup --credential X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" move credential value to its own variable to be able to manage more flags Signed-off-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index d7eefda0b8..9900554608 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -241,7 +241,12 @@ qemu_check_systemd() { } =20 qemu_generate_register() { - echo ":qemu-$cpu:M::$magic:$mask:$qemu:$FLAGS" + flags=3D"" + if [ "$CREDENTIAL" =3D "yes" ] ; then + flags=3D"OC" + fi + + echo ":qemu-$cpu:M::$magic:$mask:$qemu:$flags" } =20 qemu_register_interpreter() { @@ -260,10 +265,8 @@ package qemu-$cpu interpreter $qemu magic $magic mask $mask +credential $CREDENTIAL EOF - if [ "$FLAGS" =3D "OC" ] ; then - echo "credentials yes" >> "$EXPORTDIR/qemu-$cpu" - fi } =20 qemu_set_binfmts() { @@ -300,7 +303,7 @@ SYSTEMDDIR=3D"/etc/binfmt.d" DEBIANDIR=3D"/usr/share/binfmts" =20 QEMU_PATH=3D/usr/local/bin -FLAGS=3D"" +CREDENTIAL=3Dno =20 options=3D$(getopt -o ds:Q:e:hc: -l debian,systemd:,qemu-path:,exportdir:,= help,credential: -- "$@") eval set -- "$options" @@ -348,11 +351,7 @@ while true ; do ;; -c|--credential) shift - if [ "$1" =3D "yes" ] ; then - FLAGS=3D"OC" - else - FLAGS=3D"" - fi + CREDENTIAL=3D"$1" ;; *) break --=20 2.14.4 From nobody Mon Feb 9 19:44:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530132991309992.1505874830692; Wed, 27 Jun 2018 13:56:31 -0700 (PDT) Received: from localhost ([::1]:33176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHUH-0005nK-Ed for importer@patchew.org; Wed, 27 Jun 2018 16:56:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHSC-0004bt-4m for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYHS9-0004B6-3Z for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:16 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:46744) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYHS8-00049j-QF for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:13 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0ME84Z-1fNV9C0Sml-00HLk6; Wed, 27 Jun 2018 22:53:37 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2018 22:53:16 +0200 Message-Id: <20180627205317.10343-3-laurent@vivier.eu> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180627205317.10343-1-laurent@vivier.eu> References: <20180627205317.10343-1-laurent@vivier.eu> X-Provags-ID: V03:K1:sHGL4UtcTIej4qTI+87ngOGA4FX6Cm1CR8M47MylXr6dJQtHHRX mJ7yHS5Ckh/GNhyr+pa9IfEBTwBOV+qanqXMBOQFYI4wdK46Y3Cg7djYv8lFhNIxHrBlpFg V3qrDup6iJoBjvw6WP8vmrYuD4RY5EicP1fiD/wcc6fW7xct+cEKR0WR5bythfHMC7rd9+V Y8oIYuqlWuW2G1kfI57Og== X-UI-Out-Filterresults: notjunk:1;V01:K0:jN1X7PxMVDY=:RqQunpNS9AWOn+IRKE3rJL q4nuH4BnaVOJDiJPjF3yN7lBKDITGCwqwOZfxVG7KyqSAj4lrW0axg0GC8LrbvyMFhG9u84dE W2k9RDhTfwd9/0c1OL61O8zIAad6bTYysso7d3DFvkTRC882jtvqx5qapwCgJFfOFeTKYWlJK /ASsK1nTsXfojEOpo8TdNrkR+ghpT1bNkAsewbpOCFCl8vLY5KnH1tNed9BHpdTrXinhZ27qc FmaZshGFdM8aYVgYz96occFZCBCNhWaRLi20TZOHnpR76GGz3fqiPGcl3+JYMURQCdOxQhpI3 8vq0inadDIi8uaGIX2FUpHzWQ7CidytYHege1fcwEFNZU++IcxqKoUXxP5puf8wqfXokjwtYB GcP63D62tmSpZ0FUknyxCcpnPMtZVlqfnLt39A6pDWiWWJSuy4yZPxAXu6peFbSc/eoV5L6aO UbeDX2oVrMAVopBNL2nKZiRBS/U3D0m2T0JZUKVESndfRkRZO7qptWLehXjQInLL6+GtbeIbm 80eOI+5qvILTUHviIEnEpWNMywVlyrK3RDMQ0KADBrs5ckDCc/fjMRCpxAsWU2JQVbyTFoxxh KjOs+pbHSiG7GyudYu+BNYCVTuHL389tIdj6VkmP83ft4LZQg8bxPZvGYIJlBrnEw73OOm6/+ wKom/GE8sKLCbRoX+XyPBMDOINcG6E2tJUCJUBbZ+v9PVIrhcLUZ+tiG8GIocYF+RvTk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PATCH 2/3] qemu-binfmt-conf.sh: add persistent (F) flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since kernel commit 948b701a607f (binfmt_misc: add persistent opened binary handler for containers) kernel allows to load the interpreter at the configuration time. In case of chroot, it allows to have the interpreter in the host root filesystem and not to copy it to the chroot filesystem. Signed-off-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 9900554608..00c9c3aa16 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -161,6 +161,7 @@ usage() { cat < Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530133288352176.3193597921496; Wed, 27 Jun 2018 14:01:28 -0700 (PDT) Received: from localhost ([::1]:33202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHZ1-00017W-E1 for importer@patchew.org; Wed, 27 Jun 2018 17:01:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHSC-0004bo-2e for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYHS9-0004Aq-0I for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:16 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:42028) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYHS8-00049Y-Kd for qemu-devel@nongnu.org; Wed, 27 Jun 2018 16:54:12 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LjPsy-1g9X4b3EpE-00baK1; Wed, 27 Jun 2018 22:53:38 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2018 22:53:17 +0200 Message-Id: <20180627205317.10343-4-laurent@vivier.eu> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180627205317.10343-1-laurent@vivier.eu> References: <20180627205317.10343-1-laurent@vivier.eu> X-Provags-ID: V03:K1:h/N+liOJteyC+ggRh8QvTGglGRQPFlJMO9nN1XPpQlcNCkcLN2+ NnDPwQd+iSzd+FxITsaeGtSt3BOmfz1ItEZmAT9l09W5HtQKv5S88fWLMnWXsb7xRydx/F4 eROc5vlt7kfYguX5lrrHWUgBHeDfkGXu3Fs/XVskv8BZne0MDyWttR85lBkz9oXD16L6xvd 9iZY1P3ixr/ypqH4zwMIg== X-UI-Out-Filterresults: notjunk:1;V01:K0:zRKVY0phjuA=:TpJ4CEum5GGi5QsTPeWwo1 +Z1q8Do8zxp+qlqGQFPyg0vY9iJcbiJI/1KhV/op4iIqUZQ4qUomwlie6mmpKuKmDPmh3FYKV HJEW7BmGkLQtj2pjad2YJqf4MlUcxGayIHWvLQrLedEXjpYTbSeeGJZaCh5n1bwew8TVD1uFs 5h8qCsp1wWx3cDCAuojWQk/QEPou6l5UEtlSdM8DpsppCv95Uv02+tZH/u1wjxJEBqU2goeth CD2Mlr+l53cSCfAoBG/v7dmiRwpmCeFkbmNiZ07nN9t8Lj5XXgOxbQw6K29sO6iDYXcr4X5gd VYqyoKy6FuMoy3CMznB2tSwLh3yXYYoQIrha9eudcMZ2YNSN2DRhjN0sDvvueYbyJKI9RxmhC HJu+aXWih/sdrWcru9Fnacn0mNuLub8bbLY7Idmq7pwOib8QKtkOQWB8VK45RhwB1lR1Chkgu yTcN6xPVDuzNFTiqQjyvW3/PFNX6glF16PVQZzU8rug5MQHf0X8eNH/tums2bBPXyFK3cOO0c lMMjzHmK6Ttc6dnuVRkBA6CtJ/dEiJqnaxx5ubPZ3IS+i8elrLHzOsnB4rkdH7X8AKmK3VH3+ /Xj49Og2DJ+bMoaQhE6dQnpPxxBG89EkvrqB/+GkaRkk275xa+Ethk9VxKuz4Ap/zsYk89Oh6 wndabp/Ys+HMQahkWPFu+DNfF6BmyVJtNumwwgwXO2EEyA52JMtQTYcLvIOIbKVGZro4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PATCH 3/3] qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" some distros provide a qemu-CPU-static binary beside the qemu-CPU one. This change allows to use it by providing "--qemu-suffix -static" to the script. Signed-off-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 00c9c3aa16..23df00ae30 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -161,25 +161,26 @@ usage() { cat <