Reproducible NetBSD ?

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 #debian-reproducible (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 Profitbricks for donating the virtual machines this is running on!

53 (98.1%) out of 54 built NetBSD files were reproducible in our test setup
.
These tests were last run on 2017-09-20 for version be04bbea3 with MKREPRO=yes and MKREPRO_TIMESTAMP=1499433091 and were compared using diffoscope 86.

variation

first build

second build

hostname

is not yet varied between rebuilds of NetBSD.

domainname

is not yet varied between rebuilds of NetBSD.

env CAPTURE_ENVIRONMENT

not set

CAPTURE_ENVIRONMENT="I capture the environment"

env TZ

TZ="/usr/share/zoneinfo/Etc/GMT+12"

TZ="/usr/share/zoneinfo/Etc/GMT-14"

env LANG

LANG="en_GB.UTF-8"

LANG="fr_CH.UTF-8"

env LC_ALL

not set

LC_ALL="fr_CH.UTF-8"

env PATH

PATH="/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.

kernel version, modified using /usr/bin/linux64 --uname-2.6

Linux 4.9.0-3-amd64

Linux 2.6.69-3-amd64

umask

0022

0002

CPU type

AMD Opteron 62xx class CPU

same for both builds

/bin/sh

is not yet varied between rebuilds of NetBSD.

year, month, date

today (2017-09-20)

same for both builds (currently, work in progress)

hour, minute

hour and minute will probably vary between two builds...

but this is not enforced systematically... (currently, work in progress)

Filesystem

tmpfs

same for both builds (currently, this could be varied using disorderfs)