.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DEBREPRO 1" .TH DEBREPRO 1 "2022-06-21" "Debian Utilities" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" debrepro \- reproducibility tester for Debian packages .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdebrepro\fR [\fI\s-1OPTIONS\s0\fR] [\fI\s-1SOURCEDIR\s0\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdebrepro\fR will build a given source directory twice, with a set of variations between the first and the second build, and compare the produced binary packages. If \fBdiffoscope\fR is installed, it is used to compare non-matching binaries. If \fBdisorderfs\fR is installed, it is used during the build to inject non-determinism in filesystem listing operations. .PP \&\fI\s-1SOURCEDIR\s0\fR must be a directory containing an unpacked Debian source package. If \fI\s-1SOURCEDIR\s0\fR is omitted, the current directory is assumed. .SH "OUTPUT DIRECTORY" .IX Header "OUTPUT DIRECTORY" At the very end of a build, \fBdebrepro\fR will inform the location of the output directory where the build artifacts can be found. In that directory, you will find: .IP "\fI\f(CI$OUTPUTDIR\fI/first\fR" 4 .IX Item "$OUTPUTDIR/first" Contains the results of the first build, including a copy of the source tree, and the resulting binary packages. .IP "\fI\f(CI$OUTPUTDIR\fI/first/build.sh\fR" 4 .IX Item "$OUTPUTDIR/first/build.sh" Contains the exact build script that was used in the first build. .IP "\fI\f(CI$OUTPUTDIR\fI/second\fR" 4 .IX Item "$OUTPUTDIR/second" Contains the results of the second build, including a copy of the source tree, and the resulting binary packages. .IP "\fI\f(CI$OUTPUTDIR\fI/second/build.sh\fR" 4 .IX Item "$OUTPUTDIR/second/build.sh" Contains the exact build script that was used in the second build. .PP Taking a \fB\fBdiff\fB\|(1)\fR between \fI\f(CI$OUTPUTDIR\fI/first/build.sh\fR and \&\fI\f(CI$OUTPUTDIR\fI/second/build.sh\fR is an excellent way of figuring out exactly what changed between the two builds. .SH "SUPPORTED VARIATIONS" .IX Header "SUPPORTED VARIATIONS" .IP "\fBuser\fR" 4 .IX Item "user" The \fI\f(CI$USER\fI\fR environment variable will contain different values between the first and second builds. .IP "\fBpath\fR" 4 .IX Item "path" During the second build, a fake, non-existing directory will be appended to the \&\fI\f(CI$PATH\fI\fR environment variable. .IP "\fBumask\fR" 4 .IX Item "umask" The builds will use different umask settings. .IP "\fBlocale\fR" 4 .IX Item "locale" Both \fI\f(CI$LC_ALL\fI\fR and \fI\f(CI$LANG\fI\fR will be different across the two builds. .IP "\fBtimezone\fR" 4 .IX Item "timezone" \&\fI\f(CI$TZ\fI\fR will be different across builds. .IP "\fBfilesystem-ordering\fR" 4 .IX Item "filesystem-ordering" If \fBdisorderfs\fR is 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. .IP "\fBtime\fR" 4 .IX Item "time" The second build will be executed 213 days, 7 hours and 13 minutes in the future with regards to the current time (using \fB\fBfaketime\fB\|(1)\fR). .SH "OPTIONS" .IX Header "OPTIONS" .IP "\-s \s-1VARIATION,\s0 \-\-skip \s-1VARIATION\s0" 4 .IX Item "-s VARIATION, --skip VARIATION" Don't perform the named \s-1VARIATION.\s0 Variation names are the ones used in their description in section \fB\s-1SUPPORTED VARIATIONS\s0\fR. .IP "\-b \s-1COMMAND,\s0 \-\-before\-second\-build \s-1COMMAND\s0" 4 .IX Item "-b COMMAND, --before-second-build COMMAND" Run \s-1COMMAND\s0 before performing the second build. This can be used for example to apply a patch to a source tree for the second build, and check whether (or how) the resulting binaries are affected. .Sp Examples: .Sp .Vb 1 \& $ debrepro \-\-before\-second\-build "git checkout branch\-with\-changes" \& \& $ debrepro \-\-before\-second\-build "patch \-p1 < /path/to/patch" .Ve .IP "\-B \s-1COMMAND,\s0 \-\-build\-command \s-1COMMAND\s0" 4 .IX Item "-B COMMAND, --build-command COMMAND" Use custom build command. Default: \fIdpkg-buildpackage \-b \-us \-uc\fR. .Sp If a custom build command is specified, the restriction of only running against a Debian source tree is relaxed and you can run debrepro against any source directory. .IP "\-a \s-1PATTERN,\s0 \-\-artifact\-pattern \s-1PATTERN\s0" 4 .IX Item "-a PATTERN, --artifact-pattern PATTERN" Define a file glob pattern to determine which artifacts need to be compared across the builds. Default: \fI../*.deb\fR. .IP "\-n, \-\-no\-copy" 4 .IX Item "-n, --no-copy" Do not copy the source directory to the temporary work directory before each build. Use this to run deprepro against the source directory directly. .IP "\-t \s-1TIME,\s0 \-\-timeout \s-1TIME\s0" 4 .IX Item "-t TIME, --timeout TIME" Apply a timeout to all builds. \fI\s-1TIME\s0\fR must be a time specification compatible with \s-1GNU\s0 \fBtimeout\fR\|(1). .IP "\-h, \-\-help" 4 .IX Item "-h, --help" Display this help message and exit. .SH "EXIT STATUS" .IX Header "EXIT STATUS" .IP "0" 4 Package is reproducible. .Sp Reproducible here means that the two builds produced the exactly the same binaries, under the set of variations that \fBdebrepro\fR tests. Other sources of non-determinism in builds that are not yet tested might still affect builds in the wild. .IP "1" 4 .IX Item "1" Package is not reproducible. .IP "2" 4 .IX Item "2" The given input is not a valid Debian source package. .IP "3" 4 .IX Item "3" Required programs are missing. .SH "SEE ALSO" .IX Header "SEE ALSO" diffoscope (1), disorderfs (1), \fBtimeout\fR\|(1) .SH "AUTHOR" .IX Header "AUTHOR" Antonio Terceiro .