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-11-25 for rev 562e6fd96 with -P (as of @1732477278) and were compared using diffoscope 283.

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-11-25)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 (e8da2cf08c5dd161905ae2cfbed498825af55b6a9e1aa8293df2120b514f2017, 644MiB) is reproducible.
reproducible icon images/NetBSD-10.99.12-sparc64-live.img.gz (5f072d778386155d0550fbd99ebe7f6fb586027f0997593e0cb9c18c394d5a9d, 328MiB) is reproducible.
reproducible icon images/NetBSD-10.99.12-sparc64.iso (05b6086dd81657f67195047e575b204f48f89de32f8394e4992306de1bd984a3, 600MiB) is reproducible.
reproducible icon sparc64/INSTALL.html (f1463c0f1ad4edafbe19b320166745cbed89de27c54632ceefc2550b7876d898, 127KiB) is reproducible.
reproducible icon sparc64/INSTALL.more (8fa01e977edf0c3572f1c8271d0c567353a0b398530e8cd5946f577d7efec1ed, 122KiB) is reproducible.
reproducible icon sparc64/INSTALL.ps (a16efa12c54a4da91f00b10975760cb204ae8660afddd975224231edbbc9d3d2, 198KiB) is reproducible.
reproducible icon sparc64/INSTALL.txt (ba5743f55c1fc09b6ef81dfaf85cbe686ab740659a6c78b14f4409ed425ca194, 120KiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-GENERIC.UP.gz (e1a5a70d05c3a49805d1803b667357ffd072dcf52f982b86ac3740d928de5916, 6MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-GENERIC.gz (58fbfadbc57614157eaae89c70e30805a77e9ff8cf2894cbcf07593617bb3547, 6MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-INSTALL.gz (9efc57c174ad0b8f62c052fcbead64a2bef2d6d7fac6a9cdd0fb587d041f34d4, 7MiB) is reproducible.
reproducible icon sparc64/binary/kernel/netbsd-INSTALL.symbols.gz (b6c951b2a2965d1bbb949e23bae4a39adb6bebdf91b297b486e734a472dd7f00, 261KiB) is reproducible.
reproducible icon sparc64/binary/sets/base.tgz (135e018fbb337d106dd3a5e9b7910357bce5849318c8d2c728238fb0eeaf835e, 72MiB) is reproducible.
reproducible icon sparc64/binary/sets/base32.tgz (48ae0dc5610fc593419669f4bd074dfdd418b1cff941bd53b549b70e87ebf12d, 15MiB) is reproducible.
reproducible icon sparc64/binary/sets/comp.tgz (f7ff3ca60994ef82f48742b2b8e3002c014c904707564499f61ddb061e488aad, 175MiB) is reproducible.
reproducible icon sparc64/binary/sets/etc.tgz (6772945e10122948d4b57b0165b39441973561f0af8776f48f08a3367f619337, 682KiB) is reproducible.
reproducible icon sparc64/binary/sets/games.tgz (1da80066356b5fa12351fc9b1ba89539ae2b280aeded2f24b5e217ee86cc9044, 4MiB) is reproducible.
reproducible icon sparc64/binary/sets/gpufw.tgz (c35288cadf70298cc8e70624e437f9d48ff9feda0f72c14d4b804dd200dece1f, 2KiB) is reproducible.
reproducible icon sparc64/binary/sets/kern-GENERIC.UP.tgz (da28c2980ffe969551e3d1de8104e86c0d5d1623cb75725705a163e2072dde68, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/kern-GENERIC.tgz (b7639b371521b9a0e3c435b622c49129ddcf36e96528ece81328ff589ee7d7c2, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/man.tgz (76196d8ab8ad288e34497b0762242930291b3e3c11c62f896cbd4a5b1d77ffb4, 8MiB) is reproducible.
reproducible icon sparc64/binary/sets/manhtml.tgz (4488f179940b2bf2c5058ab8a5976b316cba317beb8b5a3b69f6e16a4b4e1e1c, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/misc.tgz (3bdb2b6587b96964f673ef6659bf9322399b943914c668243d67640c562dac63, 6MiB) is reproducible.
reproducible icon sparc64/binary/sets/modules.tgz (8bffe8805d54230405ae92b7351983511c6614cc9f28be9a94c341a757be84f4, 4MiB) is reproducible.
reproducible icon sparc64/binary/sets/rescue.tgz (24d4111bf1eda58da2c491f318ac0c4d2300354da238fc782bf49a928993bc38, 5MiB) is reproducible.
reproducible icon sparc64/binary/sets/tests.tgz (98b5e0805d9bb9ed96b08165cb89a67a52a484ea43aa9b366f33b5f46b349bb9, 24MiB) is reproducible.
reproducible icon sparc64/binary/sets/text.tgz (f982a3ecc9d0b65bfa3dbb67f35e5e4aa831c7e23070dc3becea3d050579ca11, 3MiB) is reproducible.
reproducible icon sparc64/installation/miniroot/miniroot.fs.gz (c421fa1a57b80efd70f1a287ca95e53b1b30940529297d79505a2853bda6c69a, 8MiB) is reproducible.
reproducible icon sparc64/installation/misc/boot.fs.gz (0574531fcdceb13482c6d50c292d05a6cfdafd9707c64d35dc916359eb780a99, 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 (a42d072c6743df7ef73eb45621304f3b412bf455ecd8c45dd23d366cd55a3b7e, 3MiB) is reproducible.
reproducible icon sparc64/installation/misc/ofwboot (689fd94759b94166520061b8dd78b28f7a1cf3c3c85d1a41572fc07f95a7b1cd, 123KiB) is reproducible.
reproducible icon sparc64/installation/netboot/ofwboot.net (689fd94759b94166520061b8dd78b28f7a1cf3c3c85d1a41572fc07f95a7b1cd, 123KiB) is reproducible.

commit 562e6fd967b25c12f7a17ed1d9b57876f3a7bbec
Author: skrll 
Date:   Sun Nov 24 19:41:18 2024 +0000

    risc-v: don't KASSERT in the disassembler.