Opened 4 years ago
Last modified 3 weeks ago
#62162 assigned enhancement
qemu: incompatible mktemp usage
Reported by: | Ionic (Mihai Moldovan) | Owned by: | raimue (Rainer Müller) |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | ports | Version: | |
Keywords: | legacy-os | Cc: | cooljeanius (Eric Gallager) |
Port: | qemu |
Description
Apple's version of mktemp
is different enough from the GNU coreutils one to potentially cause issues.
Most importantly, it does not support the -p
/--tmpdir
flags. This is also true for the most recent version in macOS 11.0.1.
Some scripts within qemu use them, but, luckily, these scripts are either part of tests we don't run currently xor are not executed as part of the build process, but rather meant to be executed manually by upstream project maintainers.
So... fixing this would strictly speaking be redundant. On the other hand, we might still want to do this in case we're enabling tests (or the like) later on. The downside of that is dragging a patch along changing 7 files, not currently using any functionality it changes and having to rebase and update it potentially with every qemu version update.
What's your take on it? Do you want it? Or should we rather keep it as-is and maybe deal with that issue whenever (if it ever) bites us?
Suggested patch attached.
I'd like to apply the other patch for old systems/older mktemp
versions that don't support being called without an argument unconditionally, since the affected scripts might be executed in variants. Since this is for older systems only, though, you don't need to care.
Attachments (1)
Change History (5)
Changed 4 years ago by Ionic (Mihai Moldovan)
Attachment: | qemu.patch added |
---|
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
You have reported this problem to the developers of qemu? What is the URL?
comment:2 Changed 3 years ago by Ionic (Mihai Moldovan)
I haven't reported this upstream because:
- the incompatible usage (i.e.,
mktemp
not supporting-p
/--tmpdir
) doesn't affect a normal build process but mostly test cases or binaries that are only executed by qemu maintainers as part of a release - upstream won't care about old OS X/macOS versions that have an even more incompatible
mktemp
implementation that doesn't support being called with parameters.
I could take the first part to upstream to not use the -p
/--tmpdir
option or emulate it in general without relying on it. It wouldn't fix build failures on older macOS versions, though, which upstream obviously doesn't care about and requires switching to the GNU tools anyway.
comment:3 Changed 3 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
comment:4 Changed 13 months ago by raimue (Rainer Müller)
Keywords: | legacy-os added |
---|
mktemp
patches forqemu
.