Properly compensate mtype size differences running cross-chroot
This is the second attempt to make fakeroot work properly in the following scebario:
- The
faked-*
daemon is running on 'host' machine - The
libfakeroot-*
library is preloaded inside chroot of same or different architecture - The target architecture can be executed on 'host' machine
The first attempt introduced a regression (Bug #971928) so I identified the root cause of
an issue and separated fake_msg
structure from SysV IPC message buffer and implemented the
magic-header search to compensate differing sizeof(struct fake_msg.mtype)
. The fact that
modern fakeroot uses 64-bit fixed-width members except of mtype allows doing things like:
fakeroot env ARCH=x32 DIST=unstable pbuilder login
on amd64 host machine.
The current change has been tested on the following systems:
- amd64 - package tests pass, plain fakeroot call works,
fakeroot env pbuilder
also works foramd64
,i386
andx32
base tarballs. - i386 - package tests pass, plain fakeroot call works
- mips64el, mipsel - package tests pass, plain fakeroot call works, mipsel
faked-sysv
daemon correctly builds fakeroot package withlibfakeroot-sysv.so
preloaded inside mips64el chroot. - s390x - package tests pass, plain fakeroot call works
- x32 - package tests pass, plain fakeroot call works