mbox series

[0/3] linux-user: manage binfmt F flag

Message ID 20180627205317.10343-1-laurent@vivier.eu
Headers show
Series linux-user: manage binfmt F flag | expand

Message

Laurent Vivier June 27, 2018, 8:53 p.m. UTC
The binfmt F flag ("Fix binaries") allows to
load the interpreter binary at configuration time
and all future users are cloned from this memory copy.

This avoids to have to copy the interpreter to
the filesystem of the target we want to use.

This series introduces this new flag in qemu-binfmt-conf.sh
and another new parameter to provide a suffix to the default
qemu-CPU name to be able to use static version of qemu linux-user
provided by distros:

  qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static \
                      --systemd m68k --credential yes --persistent yes

configures binfmt to use /usr/bin/qemu-m68k-static from the root filesystem
to interpret m68k binaries in unmodified chroots or containers/dockers.

With systemd, the interpreter is loaded when you restart the systemd-binfmt
service:

  systemctl restart systemd-binfmt.service

With that, you can execute directly a debootstrap without the --foreign
parameter.

  debootstrap --arch=m68k --variant=minbase \
              --no-check-gpg etch-m68k chroot-m68k \
              http://archive.debian.org/debian
  chroot chroot-m68k
  localhost:/# ls
  bin   dev  home    lib    mnt  proc  sbin  sys   usr
  boot  etc  initrd  media  opt  root  srv   tmp   var

Laurent Vivier (3):
  qemu-binfmt-conf.sh: cleanup --credential
  qemu-binfmt-conf.sh: add persistent (F) flags
  qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name

 scripts/qemu-binfmt-conf.sh | 64 +++++++++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 23 deletions(-)

Comments

no-reply@patchew.org July 2, 2018, 2:37 a.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180627205317.10343-1-laurent@vivier.eu
Subject: [Qemu-devel] [PATCH 0/3] linux-user: manage binfmt F flag

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
38edb2d27d qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name
9a994aeb9f qemu-binfmt-conf.sh: add persistent (F) flags
9bd3bbabfb qemu-binfmt-conf.sh: cleanup --credential

=== OUTPUT BEGIN ===
Checking PATCH 1/3: qemu-binfmt-conf.sh: cleanup --credential...
Checking PATCH 2/3: qemu-binfmt-conf.sh: add persistent (F) flags...
ERROR: line over 90 characters
#55: FILE: scripts/qemu-binfmt-conf.sh:316:
+options=$(getopt -o ds:Q:e:hc:p: -l debian,systemd:,qemu-path:,exportdir:,help,credential:,persistent: -- "$@")

total: 1 errors, 0 warnings, 45 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/3: qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name...
ERROR: line over 90 characters
#76: FILE: scripts/qemu-binfmt-conf.sh:319:
+options=$(getopt -o ds:Q:S:e:hc:p: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent: -- "$@")

total: 1 errors, 0 warnings, 69 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com