[Reproducible-builds] Cross-building across architectures (reproducibly?)
Steven Chamberlain
steven at pyro.eu.org
Sat Jan 2 21:03:21 UTC 2016
Steven Chamberlain wrote:
> using Helmut's tool, I've been able to rebootstrap a minimal Debian
> linux-i386 chroot (445 binary packages[3]). These were cross-compiled
> from source, by only running kfreebsd-amd64 binaries on a FreeBSD
> kernel, and having some Arch:all packages installed.
I've begun to analyze this now, using diffoscope to compare a stage1
debootstrapped chroot of linux-i386, from official Debian packages vs.
my cross-built ones from kfreebsd-amd64.
Unfortunately all the ELF binaries have differences, but most other
files' contents are reproducible.
The biggest problem was that the cross toolchain's linker used a
different target ABI:
│ │ │ - OS: Linux, ABI: 3.2.0
│ │ │ + OS: Linux, ABI: 2.6.32
and that leads to huge differences in the output binaries, such as not
using .init_array/.fini_array sections.
That may have consequences, such as if reproducible.debian.net jobs
ever override uname to 2.6.x (Bug #806911), we may run into this problem
there.
umasks are applied to symlinks differently on kfreebsd than on linux:
│ │ -lrwxrwxrwx root/root 0 2015-10-28 22:29:08 ./etc/os-release -> ../usr/lib/os-release
│ │ +lrwxr-xr-x root/root 0 2015-10-28 22:29:08 ./etc/os-release -> ../usr/lib/os-release
base-files seems to look at uname of the build architecture, rather than
host arch it is building for:
│ ├── ./usr/lib/os-release
│ │ @@ -1,6 +1,6 @@
│ │ -PRETTY_NAME="Debian GNU/Linux stretch/sid"
│ │ -NAME="Debian GNU/Linux"
│ │ +PRETTY_NAME="Debian GNU/kFreeBSD stretch/sid"
│ │ +NAME="Debian GNU/kFreeBSD"
gzip embeds the version of a build-dependency, makeinfo. That's
slightly annoying; it creates differences where there needn't have
been otherwise:
│ ├── ./usr/share/info/gzip.info.gz
│ │ ├── gzip.info
│ │ │ @@ -1,2827 +1,2827 @@
│ │ │ 00000000: 5468 6973 2069 7320 677a 6970 2e69 6e66 This is gzip.inf
│ │ │ 00000010: 6f2c 2070 726f 6475 6365 6420 6279 206d o, produced by m
│ │ │ 00000020: 616b 6569 6e66 6f20 7665 7273 696f 6e20 akeinfo version
│ │ │ -00000030: 352e 3220 6672 6f6d 2067 7a69 702e 7465 5.2 from gzip.te
│ │ │ +00000030: 362e 3020 6672 6f6d 2067 7a69 702e 7465 6.0 from gzip.te
│ │ │ 00000040: 7869 2e0a 0a54 6869 7320 6d61 6e75 616c xi
Then I saw some some reproducibility issues that are already known
(#774425 in dash, #806328 in xz-utils).
Here are my chroots and diffoscope output, in case anyone is curious:
http://kfreebsd.eu/rebootstrap/2016010100/native.tar.xz (12MiB)
http://kfreebsd.eu/rebootstrap/2016010100/rebootstrap.tar.xz (12MiB)
http://kfreebsd.eu/rebootstrap/2016010100/diff.xz (6MiB)
Regards,
--
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160102/c2fcf375/attachment.sig>
More information about the Reproducible-builds
mailing list