Bug 1384615

Summary: Use "F" flag in binfmt for qemu-user-static
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-25 14:19:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bastien Nocera 2016-10-13 16:38:59 UTC
qemu-user-static-2.7.0-3.fc25.x86_64

Using the "F" flag[1] in the binfmt configuration would allow the static qemu-user instances to stay available in containers, such as the one used when doing Flatpak builds.

This would make cross-compilation of Flatpak targets work out-of-the-box on Fedora:
http://www.hadess.net/2016/08/flatpak-cross-compilation-support.html

(Note, I can patch, test and upload the fix if necessary)

[1]: https://lwn.net/Articles/682286/

Comment 1 Cole Robinson 2016-10-14 15:47:04 UTC
Patch + test + upload sounds good to me, thanks! I'll scoop it up in the next build

Comment 2 Bastien Nocera 2016-10-17 10:29:03 UTC
A scratch build has been building since Friday (it's Monday now):
http://koji.fedoraproject.org/koji/taskinfo?taskID=16087957

Comment 3 Richard W.M. Jones 2016-10-17 10:47:01 UTC
It looks as if the armv7 build has hung/broken somehow
and is not progressing.  I would cancel that and try again.

Comment 4 Bastien Nocera 2016-10-17 11:37:10 UTC
I cancelled it already, as I added the flag in the wrong place...

There's another build running at:
http://koji.fedoraproject.org/koji/taskinfo?taskID=16105688

Comment 5 Cole Robinson 2016-10-17 20:54:43 UTC
Yeah my builds are hanging too, maybe some transient rawhide breakage. I'll try again in a few days

Comment 6 Bastien Nocera 2016-10-18 10:18:11 UTC
Note that the builds are still broken. It's pretty complicated, as the packages take a long while to build, and I keep hitting problems with the binfmt configuration files.

I think I might have found some problems in that (recently added) code, and sent a mail to danpb.

Comment 7 Bastien Nocera 2016-10-19 17:21:44 UTC
Pushed to master:

* Wed Oct 19 2016 Bastien Nocera <bnocera> - 2:2.7.0-6
- Add "F" flag to static user emulators' binfmt, to make them
  available in containers (#1384615)
- Also fixes the path of those emulators in the binfmt configurations

Can you please pick this up for F25 as well?

As mentioned in the last line, the binfmt files in qemu-user-static weren't working properly, as the perl line changed the binfmt name, not the binary's path.

Comment 8 Cole Robinson 2016-10-25 14:19:57 UTC
Changes are in the latest F25 build, but rawhide is only building now.