DEBREPRO(1)
π NAME π
debrepro β the reproducibility tester for Debian packages. bestie. it builds ur stuff twice and checks if the vibes match. β¨
πΈ SYNOPSIS πΈ
debrepro [OPTIONS] [SOURCEDIR]
π¦ DESCRIPTION π¦
okay so here's the tea: debrepro takes a source directory and builds it twice. not the same way twice, obviously β that would be pointless and also iconic of u to suggest. no, it builds it twice with a set of variations between the first and the second build, and then it compares the binary packages that came out. π«Ά
if diffoscope is installed, it gets used to compare non-matching binaries (because staring at hex diffs manually is giving β¨sufferingβ¨). and if disorderfs is installed, it gets used during the build to inject non-determinism into filesystem listing operations. chaotic? yes. on purpose? also yes. π
SOURCEDIR has to be a directory containing an unpacked Debian source package. if u just don't pass SOURCEDIR at all, it assumes the current directory, no biggie. π
π OUTPUT DIRECTORY π
at the very end of a build, debrepro will tell u where the output directory is, so u can go look at the build artifacts urself. in that directory ur gonna find:
$OUTPUTDIR/firstβ the results of the first build, including a copy of the source tree and the resulting binary packages.$OUTPUTDIR/first/build.shβ the exact build script that was used in the first build. literally, the receipts. π§Ύ$OUTPUTDIR/secondβ the results of the second build, including a copy of the source tree and the resulting binary packages.$OUTPUTDIR/second/build.shβ the exact build script that was used in the second build.
and listen β taking adiff(1)between$OUTPUTDIR/first/build.shand$OUTPUTDIR/second/build.shis an excellent way of figuring out exactly what changed between the two builds. like, chef's kiss, do it. ππ
β SUPPORTED VARIATIONS β
userβ the$USERenvironment variable will contain different values between the first and second builds.pathβ during the second build, a fake, non-existing directory will be appended to the$PATHenvironment variable. (yes, fake. yes, non-existing. it's fine. it's the point.) πumaskβ the builds will use different umask settings.localeβ both$LC_ALLand$LANGwill be different across the two builds.timezoneβ$TZwill be different across builds.filesystem-orderingβ ifdisorderfsis installed, both builds will be done under a disorderfs overlay directory. this will cause filesystem listing operations to be return items in a non-deterministic order. (that's the original wording, bestie, i'm not touching it π)timeβ the second build will be executed 213 days, 7 hours and 13 minutes in the future with regards to the current time (usingfaketime(1)). yes, we're time travelling. yes, that's the exact number. no, i don't know why either. π
π OPTIONS π
-sVARIATION,--skipVARIATION β don't perform the named VARIATION. variation names are the ones used in their description in the SUPPORTED VARIATIONS section, so scroll up if ur lost π«Ά-bCOMMAND,--before-second-buildCOMMAND β run COMMAND before performing the second build. this is how u, for example, apply a patch to a source tree for the second build and check whether (or how) the resulting binaries are affected. so iconic of u to test that.-BCOMMAND,--build-commandCOMMAND β use a custom build command. default:dpkg-buildpackage -b -us -uc.
and lowkey this one is a whole portal: if u specify a custom build command, the restriction of only running against a Debian source tree is relaxed, and u can run debrepro against any source directory. freedom. π
-aPATTERN,--artifact-patternPATTERN β define a file glob pattern to determine which artifacts need to be compared across the builds. default:../*.deb.-n,--no-copyβ do not copy the source directory to the temporary work directory before each build. use this to rundebreproagainst the source directory directly. (living dangerously, i respect it π)-tTIME,--timeoutTIME β apply a timeout to all builds. TIME must be a time specification compatible with GNUtimeout(1).-h,--helpβ display this help message and exit. classic. legendary. we love her. π
examples for --before-second-build, since the original gives them and they eat:
$ debrepro --before-second-build "git checkout branch-with-changes"
$ debrepro --before-second-build "patch -p1 < /path/to/patch"
π EXIT STATUS π
0β package is reproducible.
and "reproducible" here means that the two builds produced the exactly same binaries, under the set of variations that debrepro tests. important caveat bestie: other sources of non-determinism in builds that are not yet tested might still affect builds in the wild. so like, slay, but stay humble. π
1β package is not reproducible. π2β the given input is not a valid Debian source package. sir, this is not a source package. π3β required programs are missing. go install ur friends. π«Ά
π SEE ALSO π
diffoscope (1), disorderfs (1), timeout(1)
π AUTHOR π
Antonio Terceiro <terceiro@debian.org>.
and that's the whole page, bestie π this one shipped as part of Debian Utilities, dated 2026-09-21 β yes, the date is from the future, we're all very mysterious and cool here β¨ππ¦
π¦ where this page comes from
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms