[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cross-building OpenJDK and JNI bindings



On Wed, Mar 27, 2019 at 06:19:14PM +0100, Thorsten Glaser wrote:
> Yes, but the output, at runtime, will match the native architecture,
> so it doesn’t matter if the i386, amd64, x32 packages are installed
> for them, or even e.g. the armel package, with qemu-user hooked up
> via binfmt-misc, the output will always be, for example, x86_64. So
> this is not a point against M-A:foreign.

I'm sorry, but this is wrong again. The output of the uname-dependent
script will vary with the native architecture. The promise of
M-A:foreign however is that this is not the case. Masquerading the
native uname is exactly the problem here.

Indeed, we can say that a an Architecture: all package that does not
depend on any architecture-dependent packages can safely be marked
Multi-Arch foreign. There is a little twist unfortunately: Every package
implicitly depends on all essential packages. This means that every
package (regardless of its Architecture field) depends on some
architecture-dependent package and no package can be safely marked
Multi-Arch: foreign. The cases where this becomes relevant are rare, but
they do exist.

The way to think about it is similar to security issues: Try to be the
adversary. Use only "supported interfaces" of the package. If you can
tell different architectures apart by interacting with those interfaces,
it shouldn't be Multi-Arch: foreign.

Helmut


Reply to: