FS#77156 - [qemu-user-binfmt, qemu-user-static-binfmt] P flag not working

Attached to Project: Arch Linux
Opened by Jennings Savery (vmuser226) - Monday, 16 January 2023, 13:41 GMT
Last edited by David Runge (dvzrv) - Saturday, 21 January 2023, 11:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Patch of https://bugs.archlinux.org/task/76384 has misused --preserve-argv0. You can see that P flag does not occur in /usr/lib/binfmt.d/*.

https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh#L188 shows we need to add a "yes" after "--preserve-argv0" in binfmt_conf_options.
This task depends upon

Closed by  David Runge (dvzrv)
Saturday, 21 January 2023, 11:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with qemu 7.2.0-3
Comment by Alex Bradbury (asb) - Friday, 20 January 2023, 10:11 GMT
I've just ran into this too - confirming that adding the P flag in /usr/lib/binfmt.d/* and restarting the systemd-binfmt service fixes it. I did initially try rebuilding the package with a modified PKGBUILD setting `--preserve-argv0 yes` but I had issues with the generated qemu-user-static and qemu-user-static-binfmt packages. It may well have been my error though, as rebuilding Arch packages isn't something I typically do.
Comment by David Runge (dvzrv) - Friday, 20 January 2023, 20:48 GMT
This should now be fixed with qemu 7.2.0-2
Comment by Stephan Eisvogel (bsdice) - Friday, 20 January 2023, 21:54 GMT
systemd-binfmt[1749]: /usr/lib/binfmt.d/qemu-aarch64-static.conf:1: Failed to add binary format 'qemu-aarch64': No such file or directory
... a dozen or two more.

When qemu-user is not installed, I get above warning from systemd and service systemd-binfmt.service fails.

Is this the same issue or a different one?
Comment by Alex Bradbury (asb) - Friday, 20 January 2023, 22:07 GMT
From a very quick look, it seems qemu-user-static-binfmt 7.2.0-2 has the same problem I encountered when trying to rebuild the package myself with `--preserve-argv0 yes`, in that the qemu-foo.conf files now specify qemu-foo rather than qemu-foo-static as the interpreter.
Comment by David Runge (dvzrv) - Friday, 20 January 2023, 22:26 GMT
Ah, seems the created files for qemu-user-static-binfmt are wrong (and have been wrong for some time now...).
Will fix them in a bump.
Comment by David Runge (dvzrv) - Saturday, 21 January 2023, 10:52 GMT
Okay, the issues with qemu-user-static-binfmt should be fixed with qemu 7.2.0-3. Please report back if otherwise.

Loading...