Comment 4 for bug 1835839

Revision history for this message
Laurent Vivier (laurent-vivier) wrote : Re: [Qemu-devel] [Bug 1835839] Re: qemu-user: $0 incorrectly always reports absolute path

Le 09/07/2019 à 14:12, John Paul Adrian Glaubitz a écrit :
> On 7/9/19 1:54 PM, Laurent Vivier wrote:
>> ** Patch added: "Enable binfmt-misc preserve-arg[0] flag"
>> https://bugs.launchpad.net/qemu/+bug/1835839/+attachment/5275869/+files/0001-linux-user-manage-binfmt-misc-preserve-arg-0-flags.patch
>
> Thanks! I just tried the patch and ran the setup script with:
>
> ./scripts/qemu-binfmt-conf.sh --debian --qemu-path=/usr/bin --qemu-
> suffix=-static --preserve-arg0 yes
>
> and:
>
> root@nofan:~/qemu> systemctl restart binfmt-support.service
> root@nofan:~/qemu>

if you use systemctl, the parameter of "./scripts/qemu-binfmt-conf.sh"
must be "--systemd m68k" rather than "--debian".

>
> But still don't get the correct path:
>
> (sid-m68k-sbuild)root@nofan:/# sh -c 'echo $0'
> /bin/sh
> (sid-m68k-sbuild)root@nofan:/#

Well, I've tested that, and it should work...

Thanks,
LAurent