1DEBDIFF(1) General Commands Manual DEBDIFF(1)
2
3
4
6 debdiff - compare file lists in two Debian packages
7
9 debdiff [options]
10 debdiff [options] ... deb1 deb2
11 debdiff [options] ... changes1 changes2
12 debdiff [options] ... --from deb1a deb1b ... --to deb2a deb2b ...
13 debdiff [options] ... dsc1 dsc2
14
16 debdiff takes the names of two Debian package files (.debs or .udebs)
17 on the command line and compares their contents (considering only the
18 files in the main package, not the maintenance scripts). It shows
19 which files have been introduced and which removed between the two
20 package files, and is therefore useful for spotting files which may
21 have been inadvertently lost between revisions of the package. It also
22 checks the file owners and permissions, and compares the control files
23 of the two packages using the wdiff program. If you want a deeper com‐
24 parison of two Debian package files you can use the diffoscope tool.
25
26 If no arguments are given, debdiff tries to compare the content of the
27 current source directory with the last version of the package.
28
29 debdiff can also handle changes between groups of .deb files in two
30 ways. The first is to specify two .changes files. In this case, the
31 .deb files listed in the .changes file will be compared, by taking the
32 contents of all of the listed .deb files together. (The .deb files
33 listed are assumed to be in the same directory as the .changes file.)
34 The second way is to list the .deb files of interest specifically using
35 the --from ... --to syntax. These both help if a package is broken up
36 into smaller packages and one wishes to ensure that nothing is lost in
37 the interim.
38
39 debdiff examines the devscripts configuration files as described below.
40 Command line options override the configuration file settings, though.
41
42 If debdiff is passed two source packages (.dsc files) it will compare
43 the contents of the source packages. If the source packages differ
44 only in Debian revision number (that is, the .orig.tar.gz files are the
45 same in the two .dsc files), then interdiff(1) will be used to compare
46 the two patch files if this program is available on the system, other‐
47 wise a diff will be performed between the two source trees.
48
50 --dirs, -d
51 The default mode of operation is to ignore directory names which
52 appear in the file list, but they, too, will be considered if
53 this option is given.
54
55 --nodirs
56 Ignore directory names which appear in the file list. This is
57 the default and it can be used to override a configuration file
58 setting.
59
60 --move FROM TO, -m FROM TO
61 It sometimes occurs that various files or directories are moved
62 around between revisions. This can be handled using this op‐
63 tion. There are two arguments, the first giving the location of
64 the directory or file in the first package, and the second in
65 the second. Any files in the first listing whose names begin
66 with the first argument are treated as having that substituted
67 for the second argument when the file lists are compared. Any
68 number of --move arguments may be given; they are processed in
69 the order in which they appear. This only affects comparing bi‐
70 nary packages, not source packages.
71
72 --move-regex FROM TO
73 This is the same as --move, except that FROM is treated as a
74 regular expression and the perl substitution command s/^FROM/TO/
75 is applied to the files. In particular, TO can make use of
76 backreferences such as $1.
77
78 --nocontrol
79 debdiff will usually compare the respective control files of the
80 packages using wdiff(1). This option suppresses this part of
81 the processing.
82
83 --control
84 Compare the respective control files; this is the default, and
85 it can be used to override a configuration file setting.
86
87 --controlfiles FILE[,FILE ...]
88 Specify which control files to compare; by default this is just
89 control, but could include postinst, config and so on. Files
90 will only be compared if they are present in both .debs being
91 compared. The special value ALL compares all control files
92 present in both packages, except for md5sums. This option can
93 be used to override a configuration file setting.
94
95 --wdiff-source-control
96 When processing source packages, compare control files using wd‐
97 iff. Equivalent to the --control option for binary packages.
98
99 --no-wdiff-source-control
100 Do not compare control files in source packages using wdiff.
101 This is the default.
102
103 --wp, --wl, --wt
104 Pass a -p, -l or -t option to wdiff respectively. (This yields
105 the whole wdiff output rather than just the lines with any
106 changes.)
107
108 --show-moved
109 If multiple .deb files are specified on the command line, either
110 using .changes files or the --from/--to syntax, then this option
111 will also show which files (if any) have moved between packages.
112 (The package names are simply determined from the names of the
113 .deb files.)
114
115 --noshow-moved
116 The default behaviour; can be used to override a configuration
117 file setting.
118
119 --renamed FROM TO
120 If --show-moved is being used and a package has been renamed in
121 the process, this command instructs debdiff to treat the package
122 in the first list called FROM as if it were called TO. Multiple
123 uses of this option are permitted.
124
125 --exclude PATTERN
126 Exclude files whose basenames match PATTERN. Multiple uses of
127 this option are permitted. Note that this option is passed on
128 to diff and has the same behaviour, so only the basename of the
129 file is considered: in particular, --exclude='*.patch' will
130 work, but --exclude='debian/patches/*' will have no practical
131 effect.
132
133 --diffstat
134 Include the result of diffstat before the generated diff.
135
136 --no-diffstat
137 The default behaviour; can be used to override a configuration
138 file setting.
139
140 --auto-ver-sort
141 When comparing source packages, do so in version order.
142
143 --no-auto-ver-sort
144 Compare source packages in the order they were passed on the
145 command-line, even if that means comparing a package with a
146 higher version against one with a lower version. This is the
147 default behaviour.
148
149 --unpack-tarballs
150 When comparing source packages, also unpack tarballs found in
151 the top level source directory to compare their contents along
152 with the other files. This is the default behaviour.
153
154 --no-unpack-tarballs
155 Do not unpack tarballs inside source packages.
156
157 --apply-patches
158 If the old and/or new package is in 3.0 (quilt) format, apply
159 the quilt patches (and remove .pc/) before comparison.
160
161 --no-apply-patches, --noapply-patches
162 If the old and/or new package is in 3.0 (quilt) format, do not
163 apply the quilt patches before comparison. This is the default
164 behaviour.
165
166 --no-conf, --noconf
167 Do not read any configuration files. This can only be used as
168 the first option given on the command-line.
169
170 --debs-dir directory
171 Look for the .dsc files in directory instead of the parent of
172 the source directory. This should either be an absolute path or
173 relative to the top of the source directory.
174
175 --help, -h
176 Show a summary of options.
177
178 --version, -v
179 Show version and copyright information.
180
181 --quiet, -q
182 Be quiet if no differences were found.
183
184 --ignore-space, -w
185 Ignore whitespace in diffs.
186
188 The two configuration files /etc/devscripts.conf and ~/.devscripts are
189 sourced by a shell in that order to set configuration variables. Com‐
190 mand line options can be used to override configuration file settings.
191 Environment variable settings are ignored for this purpose. The cur‐
192 rently recognised variables are:
193
194 DEBDIFF_DIRS
195 If this is set to yes, then it is the same as the --dirs command
196 line parameter being used.
197
198 DEBDIFF_CONTROL
199 If this is set to no, then it is the same as the --nocontrol
200 command line parameter being used. The default is yes.
201
202 DEBDIFF_CONTROLFILES
203 Which control files to compare, corresponding to the --con‐
204 trolfiles command line option. The default is control.
205
206 DEBDIFF_SHOW_MOVED
207 If this is set to yes, then it is the same as the --show-moved
208 command line parameter being used.
209
210 DEBDIFF_WDIFF_OPT
211 This option will be passed to wdiff; it should be one of -p, -l
212 or -t.
213
214 DEBDIFF_SHOW_DIFFSTAT
215 If this is set to yes, then it is the same as the --diffstat
216 command line parameter being used.
217
218 DEBDIFF_WDIFF_SOURCE_CONTROL
219 If this is set to yes, then it is the same as the --wd‐
220 iff-source-control command line parameter being used.
221
222 DEBDIFF_AUTO_VER_SORT
223 If this is set to yes, then it is the same as the
224 --auto-ver-sort command line parameter being used.
225
226 DEBDIFF_UNPACK_TARBALLS
227 If this is set to no, then it is the same as the --no-un‐
228 pack-tarballs command line parameter being used.
229
230 DEBDIFF_APPLY_PATCHES
231 If this is set to yes, then it is the same as the --ap‐
232 ply-patches command line parameter being used. The default is
233 no.
234
235 DEBRELEASE_DEBS_DIR
236 This specifies the directory in which to look for the .dsc and
237 files, and is either an absolute path or relative to the top of
238 the source tree. This corresponds to the --debs-dir command
239 line option. This directive could be used, for example, if you
240 always use pbuilder or svn-buildpackage to build your packages.
241 Note that it also affects debrelease(1) in the same way, hence
242 the strange name of the option.
243
245 Normally the exit value will be 0 if no differences are reported and 1
246 if any are reported. If there is some fatal error, the exit code will
247 be 255.
248
250 debdiff-apply(1), diffstat(1), dpkg-deb(1), interdiff(1), wdiff(1), de‐
251 vscripts.conf(5), diffoscope(1)
252
254 debdiff was originally written as a shell script by Yann Dirson <dir‐
255 son@debian.org> and rewritten in Perl with many more features by Julian
256 Gilbey <jdg@debian.org>. The software may be freely redistributed un‐
257 der the terms and conditions of the GNU General Public License, version
258 2.
259
260
261
262DEBIAN Debian Utilities DEBDIFF(1)