qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Bug 1835839 <1835839@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1835839] Re: qemu-user: $0 incorrectly always reports absolute path
Date: Tue, 9 Jul 2019 16:01:32 +0200	[thread overview]
Message-ID: <30e7b9fe-a99d-a83c-e4b6-7021a076332d@vivier.eu> (raw)
In-Reply-To: <b88a6279-8e7a-32b6-4fc1-98be496aaaf0@physik.fu-berlin.de>

Le 09/07/2019 à 15:07, John Paul Adrian Glaubitz a écrit :
> On 7/9/19 2:51 PM, Laurent Vivier wrote:
>> if you use systemctl, the parameter of "./scripts/qemu-binfmt-conf.sh"
>> must be "--systemd m68k" rather than "--debian".
> 
> I tried that and I now get:
> 
> root@nofan:/local_scratch/sid-m68k-sbuild> chroot .
> chroot: failed to run command ‘/bin/bash’: No such file or directory
> root@nofan:/local_scratch/sid-m68k-sbuild>

What is the content of:

/etc/binfmt.d/qemu-m68k.conf
/proc/sys/fs/binfmt_misc/qemu-m68k

what is the result of "file sid-m68k-sbuild/usr/bin/qemu-m68k-static"?

Bonus: if you don't want to copy qemu-m68k-static into the chroot, you
can use "--persistent" with qemu-binfmt-conf.sh.

Thanks,
Laurent


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Vivier <Laurent@vivier.eu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1835839] Re: qemu-user: $0 incorrectly always reports absolute path
Date: Tue, 09 Jul 2019 14:01:32 -0000	[thread overview]
Message-ID: <30e7b9fe-a99d-a83c-e4b6-7021a076332d@vivier.eu> (raw)
Message-ID: <20190709140132.908DSkwgz_jg-tQJGpcaVxoKFhilQkA8aecz8WEml4c@z> (raw)
In-Reply-To: b88a6279-8e7a-32b6-4fc1-98be496aaaf0@physik.fu-berlin.de

Le 09/07/2019 à 15:07, John Paul Adrian Glaubitz a écrit :
> On 7/9/19 2:51 PM, Laurent Vivier wrote:
>> if you use systemctl, the parameter of "./scripts/qemu-binfmt-conf.sh"
>> must be "--systemd m68k" rather than "--debian".
> 
> I tried that and I now get:
> 
> root@nofan:/local_scratch/sid-m68k-sbuild> chroot .
> chroot: failed to run command ‘/bin/bash’: No such file or directory
> root@nofan:/local_scratch/sid-m68k-sbuild>

What is the content of:

/etc/binfmt.d/qemu-m68k.conf
/proc/sys/fs/binfmt_misc/qemu-m68k

what is the result of "file sid-m68k-sbuild/usr/bin/qemu-m68k-static"?

Bonus: if you don't want to copy qemu-m68k-static into the chroot, you
can use "--persistent" with qemu-binfmt-conf.sh.

Thanks,
Laurent

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1835839

Title:
  qemu-user: $0 incorrectly always reports absolute path

Status in QEMU:
  New

Bug description:
  We just ran into an issue with the Perl package on Debian/m68k when
  being built with qemu-user [1].

  The problem can be boiled down to qemu-user always reporting absolute
  paths for the shell variable $0 no matter on how the command was
  invoked.

  A simple reproducer is this:

  On normal system (no emulation):

  root@nofan:~> sh -c 'echo $0'
  sh
  root@nofan:~>

  On qemu-user:

  (sid-m68k-sbuild)root@nofan:/# sh -c 'echo $0'
  /bin/sh
  (sid-m68k-sbuild)root@nofan:/#

  > [1] https://lists.debian.org/debian-68k/2019/07/msg00007.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1835839/+subscriptions


  reply	other threads:[~2019-07-09 14:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 22:43 [Qemu-devel] [Bug 1835839] [NEW] qemu-user: $0 incorrectly always reports absolute path John Paul Adrian Glaubitz
2019-07-09 11:54 ` [Qemu-devel] [Bug 1835839] " Laurent Vivier
2019-07-09 12:12   ` John Paul Adrian Glaubitz
2019-07-09 12:51     ` Laurent Vivier
2019-07-09 12:51       ` Laurent Vivier
2019-07-09 13:07       ` John Paul Adrian Glaubitz
2019-07-09 14:01         ` Laurent Vivier [this message]
2019-07-09 14:01           ` Laurent Vivier
2019-07-09 15:09           ` John Paul Adrian Glaubitz
2019-07-09 15:11             ` John Paul Adrian Glaubitz
2019-07-09 15:25             ` Laurent Vivier
2019-07-09 15:25               ` Laurent Vivier
2019-07-09 12:16 ` Peter Maydell
2019-07-09 13:00   ` Laurent Vivier
2019-07-09 13:47   ` Laurent Vivier
2021-04-22  7:05 ` Thomas Huth
2021-06-17  7:07 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30e7b9fe-a99d-a83c-e4b6-7021a076332d@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=1835839@bugs.launchpad.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).