1DEBREPRO(1)                                                        DEBREPRO(1)
2
3
4

NAME

6       debrepro - reproducibility tester for Debian packages
7

SYNOPSIS

9       debrepro [OPTIONS] [SOURCEDIR]
10

DESCRIPTION

12       debrepro will build a given source directory twice, with a set of
13       variations between the first and the second build, and compare the
14       produced binary packages. If diffoscope is installed, it is used to
15       compare non-matching binaries. If disorderfs is installed, it is used
16       during the build to inject non-determinism in filesystem listing
17       operations.
18
19       SOURCEDIR must be a directory containing an unpacked Debian source
20       package. If SOURCEDIR is omitted, the current directory is assumed.
21

OUTPUT DIRECTORY

23       At the very end of a build, debrepro will inform the location of the
24       output directory where the build artifacts can be found. In that
25       directory, you will find:
26
27       $OUTPUTDIR/first
28           Contains the results of the first build, including a copy of the
29           source tree, and the resulting binary packages.
30
31       $OUTPUTDIR/first/build.sh
32           Contains the exact build script that was used in the first build.
33
34       $OUTPUTDIR/second
35           Contains the results of the second build, including a copy of the
36           source tree, and the resulting binary packages.
37
38       $OUTPUTDIR/second/build.sh
39           Contains the exact build script that was used in the second build.
40
41       Taking a diff(1) between $OUTPUTDIR/first/build.sh and
42       $OUTPUTDIR/second/build.sh is an excellent way of figuring out exactly
43       what changed between the two builds.
44

SUPPORTED VARIATIONS

46       user
47           The $USER environment variable will contain different values
48           between the first and second builds.
49
50       path
51           During the second build, a fake, non-existing directory will be
52           appended to the $PATH environment variable.
53
54       umask
55           The builds will use different umask settings.
56
57       locale
58           Both $LC_ALL and $LANG will be different across the two builds.
59
60       timezone
61           $TZ will be different across builds.
62
63       filesystem-ordering
64           If disorderfs is installed, both builds will be done under a
65           disorderfs overlay directory. This will cause filesystem listing
66           operations to be return items in a non-deterministic order.
67
68       time
69           The second build will be executed 213 days, 7 hours and 13 minutes
70           in the future with regards to the current time (using faketime(1)).
71

OPTIONS

73       -s VARIATION, --skip VARIATION
74           Don't perform the named VARIATION. Variation names are the ones
75           used in their description in section SUPPORTED VARIATIONS.
76
77       -b COMMAND, --before-second-build COMMAND
78           Run COMMAND before performing the second build. This can be used
79           for example to apply a patch to a source tree for the second build,
80           and check whether (or how) the resulting binaries are affected.
81
82           Examples:
83
84             $ debrepro --before-second-build "git checkout branch-with-changes"
85
86             $ debrepro --before-second-build "patch -p1 < /path/to/patch"
87
88       -B COMMAND, --build-command COMMAND
89           Use custom build command. Default: dpkg-buildpackage -b -us -uc.
90
91           If a custom build command is specified, the restriction of only
92           running against a Debian source tree is relaxed and you can run
93           debrepro against any source directory.
94
95       -a PATTERN, --artifact-pattern PATTERN
96           Define a file glob pattern to determine which artifacts need to be
97           compared across the builds. Default: ../*.deb.
98
99       -n, --no-copy
100           Do not copy the source directory to the temporary work directory
101           before each build. Use this to run debrepro against the source
102           directory directly.
103
104       -t TIME, --timeout TIME
105           Apply a timeout to all builds. TIME must be a time specification
106           compatible with GNU timeout(1).
107
108       -h, --help
109           Display this help message and exit.
110

EXIT STATUS

112       0   Package is reproducible.
113
114           Reproducible here means that the two builds produced the exactly
115           the same binaries, under the set of variations that debrepro tests.
116           Other sources of non-determinism in builds that are not yet tested
117           might still affect builds in the wild.
118
119       1   Package is not reproducible.
120
121       2   The given input is not a valid Debian source package.
122
123       3   Required programs are missing.
124

SEE ALSO

126       diffoscope (1), disorderfs (1), timeout(1)
127

AUTHOR

129       Antonio Terceiro <terceiro@debian.org>.
130
131
132
133Debian Utilities                  2023-07-19                       DEBREPRO(1)
Impressum