Admitedly, this one is a bit ugly since it involves making qemu be setuid root, but with this fix, fakeroot will work inside of a chroot of another architecture. With this, I can use sbuild on top of a chroot of another architecture to build packages for that architecture (ie arm on x86_64). This setup is similar to http://wiki.debian.org/QemuUserEmulation, but does not need the dpkg-cross stuff.
[Replying to an old bugreport] 14.03.2007 01:02, Stuart R. Anderson wrote: This is ugly indeed. Not just ugly, but actually unacceptable, because qemu is not designed to run as setuid-root, and it is a rather complex piece of software with a ton of it own bugs, so making it setuid-root effectively makes the target system 0wned. I'm marking this as wontfix due to this reason. However, see #707626 which is apparently the same issue, but reported differently. Apparently there's a prob with using fakeroot under qemu-user, but it looks like the actual bug should be found and fixed, instead of working around it by making qemu to be setuid. Do you know _why_ it fails in the first place? Thanks, /mjt
Been a while 8-), but IIRC, this was a follow-on to bug #412032. If qemu
was made setuid root, then the env needed to be restored to get the right
behavior. If there is now another way of accomplishing setuid capability
via binfmt, and is suggested in #412032, then this part of the fix is
most likely not needed, so closing it is fine.
Stuart
Stuart R. Anderson anderson@netsweng.com
Network & Software Engineering http://www.netsweng.com/
1024D/37A79149: 0791 D3B8 9A4C 2CDC A31F
BD03 0A62 E534 37A7 9149
On Fri, 29 Nov 2013 10:51:38 -0500 (EST) Stuart Anderson <anderson@netsweng.com> wrote:
This has been fixed quite long time ago, in version 0.11.1-1, when
qemu package in debian registered with binfmt_misc subsystem:
qemu (0.11.1-1) unstable; urgency=low
[ Aurelien Jarno ]
* qemu-user-static: register QEMU with binfmt mecanism. Closes:
#306637.