Reproducible builds enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is more information about reproducible builds on the Debian wiki and on https://reproducible-builds.org. These pages explain in more depth why this is useful, what common issues exist and which workarounds and solutions are known.

Reproducible NetBSD is an effort to apply this to NetBSD. Thus each NetBSD target is build twice, with a few variations added and then the resulting files from the two builds are compared using diffoscope. Please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.

There is a weekly run jenkins job to test the master branch of netbsd.git. The jenkins job is running reproducible_netbsd.sh in a Debian environment and this script is solely responsible for creating this page. Feel invited to join #reproducible-builds (on irc.oftc.net) to request job runs whenever sensible. Patches and other feedback are very much appreciated - if you want to help, please start by looking at the ToDo list for NetBSD, you might find something easy to contribute.
Thanks to IONOS for donating the virtual machines this is running on!

33 (100.0%) out of 33 built NetBSD files were reproducible in our test setup ! These tests were last run on 2024-12-20 for rev 0b292fb15 with -P (as of @1734681501) and were compared using diffoscope 284.

variationfirst buildsecond build
hostname osuosl1-amd64 or osuosl2-amd64the other one
domainname is not yet varied between rebuilds of NetBSD.
env CAPTURE_ENVIRONMENTnot setCAPTURE_ENVIRONMENT="I capture the environment"
env TZTZ="/usr/share/zoneinfo/Etc/GMT+12"TZ="/usr/share/zoneinfo/Etc/GMT-14"
env LANGLANG="en_GB.UTF-8"LANG="et_EE.UTF-8"
env LC_ALLnot setLC_ALL="et_EE.UTF-8"
env PATHPATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:"PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path"
env USER is not yet varied between rebuilds of NetBSD.
uid is not yet varied between rebuilds of NetBSD.
gid is not yet varied between rebuilds of NetBSD.
UTS namespace is not yet varied between rebuilds of NetBSD.
Source dir $TEMPDIR/b1-$arch-$mach/ $TEMPDIR/b2-$arch-$mach/
Release dir$TEMPDIR/b1-$arch-$mach/_release_/$TEMPDIR/b2-$arch-$mach/_release_/
kernel version, modified using /usr/bin/linux64 --uname-2.6Linux 6.11.5+bpo-amd64Linux 2.6.71+bpo-amd64
umask00220002
CPU type AMD Opteron(tm) Processor 4284same for both builds
/bin/sh is not yet varied between rebuilds of NetBSD.
year, month, datetoday (2024-12-20)same for both builds (currently, work in progress)
hour, minutehour and minute will probably vary between two builds...the future system actually runs 398 days, 6 hours and 23 minutes ahead...
Filesystemtmpfssame for both builds (currently, this could be varied using disorderfs)
everything else...is likely the same. There will be more variations in the wild.

Reproducible artifacts for sparc64-sparc64
reproducible icon images/NetBSD-10.99.12-sparc64-dvd.iso (3544a215742e46c74f89b9fd06221e2fb1349648c6120cf889dbfb84ac6fb370, 644MiB) is reproducible.
reproducible icon images/NetBSD-10.99.12-sparc64-live.img.gz (0baa30f85dd09c02a4dd3320cc0ae6b306180dec003163dd1b9928eed1a76503, 328MiB) is reproducible.
reproducible icon images/NetBSD-10.99.12-sparc64.iso (b8f47da5a53b2ac56984482ab736e1ceb08bd3164c45532565e303020c26da36, 600MiB) is reproducible.
reproducible icon sparc64/INSTALL.html (f1463c0f1ad4edafbe19b320166745cbed89de27c54632ceefc2550b7876d898, 127KiB) is reproducible.
reproducible icon sparc64/INSTALL.more (b747f32a14e8888ba30152ff641e0ce6994d185efd15f84cc1494839938ecefa, 122KiB) is reproducible.
reproducible icon sparc64/INSTALL.ps (dd0f9f9c1d55159706cf4bd6ac07e2bf6d4694c9e6e5e915c416854e693d44d8, 197KiB) is reproducible.
reproducible icon sparc64/INSTALL.txt (26290b25bae553abb5efee45f280ac60a18430e2f0461ac138c0a0e5451ee7e8, 120KiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-GENERIC.UP.gz (2dccc461a520b619783395740d5f9c65121a1290867e175563dbaee4b34142c2, 6MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-GENERIC.gz (0e27e468827f7fd07be5b0053419d4eddbca9b8b60da995ee3f96dbac669e8be, 6MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-INSTALL.gz (e5d58f69f542e114f37a9bd28bfa1dd54ff4b99737968a48f394c50b591e2397, 7MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-INSTALL.symbols.gz (1285a5f262475c72915d999ff410a39c3ee3bd8b0bef8e5c1d822e958b52a7a8, 262KiB) is reproducible.
reproducible icon sparc64/binary/sets/base.tgz (e7e17279894a39a0f774c1ba884f97848da82447b5490afc2a5d6a11f4b0e5f8, 72MiB) is reproducible.
reproducible icon sparc64/binary/sets/base32.tgz (b41a1c24ad3cbd315c0d673662cc8e1bfbc9c1e1eb908d4db93d117b94b8e637, 15MiB) is reproducible.
reproducible icon sparc64/binary/sets/comp.tgz (c9801c2f6910f1740f2afb86272ca67f54916a5c289bb730d429005ee279ebb3, 175MiB) is reproducible.
reproducible icon sparc64/binary/sets/etc.tgz (8461d1548c54d0d20f994cbdb22d6b33008f660875c3e334dc86e92afb9a9c11, 682KiB) is reproducible.
reproducible icon sparc64/binary/sets/games.tgz (6db29175290d588a5d4d69f34226c9120654fb781bd12ef608c74552afd0f693, 4MiB) is reproducible.
reproducible icon sparc64/binary/sets/gpufw.tgz (d92a140eac21a26232d8867f94d770a689e5bb15ea1dee73c3a187d1c337f31e, 2KiB) is reproducible.
reproducible icon sparc64/binary/sets/kern-GENERIC.UP.tgz (5d113559206ccdaa3224a09ac999913a5bf0b633477c13262209f1471a438f80, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/kern-GENERIC.tgz (cdd2fcfb967172e15fe5344093288fcc4804e8462a761056eb85ba1779493c81, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/man.tgz (b8c3e77e87490e3603677d89ac04da44f51e20cc282fa37cfc61d72c8da5791e, 8MiB) is reproducible.
reproducible icon sparc64/binary/sets/manhtml.tgz (8acd258e4fa9f7969ccdcd77a416732b98da91143cdbef7d04639183c96faeb5, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/misc.tgz (c6d2cbc004ef656acfd183dcfc4e4639f5274df4105051e70aae7a28183e8518, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/modules.tgz (c00e1097536590f72f77290ea820334af837c5a343a1f9e3afffb91684048ab8, 4MiB) is reproducible.
reproducible icon sparc64/binary/sets/rescue.tgz (a5d919ea28cab3441785117ac23a2319e7f5e2ee674868ab3a9e6082ee6a65b9, 5MiB) is reproducible.
reproducible icon sparc64/binary/sets/tests.tgz (731357fbc1222899d08a78ead678e5d9b43cafce2a856bae8c4b0e0c5be0b40a, 24MiB) is reproducible.
reproducible icon sparc64/binary/sets/text.tgz (2ff118fea379718c5728b4175f78b55c2cf9113692d2b00a8688edbbd918161d, 3MiB) is reproducible.
reproducible icon sparc64/installation/miniroot/miniroot.fs.gz (2bb361e7dce0f0741d6a3e7523418f3e022edf96e777f12df9460969261aa8ba, 8MiB) is reproducible.
reproducible icon sparc64/installation/misc/boot.fs.gz (3ff116f5f3db180e29dfada72a1985b81842b1d931ecef1691b3b0bd28354317, 62KiB) is reproducible.
reproducible icon sparc64/installation/misc/bootblk (9b8f33a1031160240cfe3ce389abb78437e2ceb51e6449182ac65423bae65922, 8KiB) is reproducible.
reproducible icon sparc64/installation/misc/installboot (558141585e7f028cd6098a115e2fed24d5c6673409ce48af65a5b869d9df0b0c, 145KiB) is reproducible.
reproducible icon sparc64/installation/misc/instfs.tgz (e5df5b334b77e24c21bf3b8cb2bef6dadc197efe6b770ea67852870850adb777, 3MiB) is reproducible.
reproducible icon sparc64/installation/misc/ofwboot (a9decc86a905a11c89510f6e4661164ec82833c0fee5385828cf2031175a374a, 123KiB) is reproducible.
reproducible icon sparc64/installation/netboot/ofwboot.net (a9decc86a905a11c89510f6e4661164ec82833c0fee5385828cf2031175a374a, 123KiB) is reproducible.

commit 0b292fb15a927a3495927e1f976206343261b504
Author: mlelstv 
Date:   Fri Dec 20 07:58:21 2024 +0000

    Don't use flags uninitialized.