chiark / gitweb /
devscripts (2.10.69+squeeze4) stable-security; urgency=high
[devscripts.git] / scripts / debdiff.1
1 .TH DEBDIFF 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
2 .SH NAME
3 debdiff \- compare file lists in two Debian packages
4 .SH SYNOPSIS
5 \fBdebdiff\fR [\fIoptions\fR] \fR
6 .br
7 \fBdebdiff\fR [\fIoptions\fR] ... \fIdeb1 deb2\fR
8 .br
9 \fBdebdiff\fR [\fIoptions\fR] ... \fIchanges1 changes2\fR
10 .br
11 \fBdebdiff\fR [\fIoptions\fR] ... \fB\-\-from \fIdeb1a deb1b ...
12 \fB\-\-to \fIdeb2a deb2b ...\fR
13 .br
14 \fBdebdiff\fR [\fIoptions\fR] ... \fIdsc1 dsc2\fR
15 .SH DESCRIPTION
16 \fBdebdiff\fR takes the names of two Debian package files (\fI.deb\fRs
17 or \fI.udeb\fRs) on the command line and compares their contents
18 (considering only the files in the main package, not the maintenance
19 scripts).  It shows which files have been introduced and which removed
20 between the two package files, and is therefore useful for spotting
21 files which may have been inadvertently lost between revisions of the
22 package.  It also checks the file owners and permissions, and compares
23 the control files of the two packages using the \fBwdiff\fR program.
24 .PP
25 If no arguments are given, \fBdebdiff\fR tries to compare the content
26 of the current source directory with the last version of the package.
27 .PP
28 \fBdebdiff\fR can also handle changes between groups of \fI.deb\fR
29 files in two ways.  The first is to specify two \fI.changes\fR files.
30 In this case, the \fI.deb\fR files listed in the \fI.changes\fR file
31 will be compared, by taking the contents of all of the
32 listed \fI.deb\fR files together.  (The \fI.deb\fR files listed are
33 assumed to be in the same directory as the \fI.changes\fR file.)  The
34 second way is to list the \fI.deb\fR files of interest specifically
35 using the \fB\-\-from\fR ... \fB\-\-to\fR syntax.  These both help if
36 a package is broken up into smaller packages and one wishes to ensure
37 that nothing is lost in the interim.
38 .PP
39 \fBdebdiff\fR examines the \fBdevscripts\fR configuration files as
40 described below.  Command line options override the configuration file
41 settings, though.
42 .PP
43 If \fBdebdiff\fR is passed two source packages (\fI.dsc\fR files) it
44 will compare the contents of the source packages.  If the source
45 packages differ only in Debian revision number (that is,
46 the \fI.orig.tar.gz\fR files are the same in the two \fI.dsc\fR
47 files), then \fBinterdiff\fR(1) will be used to compare the two patch
48 files if this program is available on the system, otherwise a
49 \fBdiff\fR will be performed between the two source trees.
50 .SH OPTIONS
51 .TP
52 .BR \-\-dirs ", " \-d
53 The default mode of operation is to ignore directory names which
54 appear in the file list, but they, too, will be considered if this
55 option is given.
56 .TP
57 .B \-\-nodirs
58 Ignore directory names which appear in the file list.  This is the
59 default and it can be used to override a configuration file setting.
60 .TP
61 .BI \-\-move " FROM TO" "\fR,\fP \-m" " FROM TO"
62 It sometimes occurs that various files or directories are moved around
63 between revisions.  This can be handled using this option.  There are
64 two arguments, the first giving the location of the directory or file
65 in the first package, and the second in the second.  Any files in the
66 first listing whose names begin with the first argument are treated as
67 having that substituted for the second argument when the file lists
68 are compared.  Any number of \fB\-\-move\fR arguments may be given;
69 they are processed in the order in which they appear.
70 .TP
71 .BI \-\-move\-regex " FROM TO"
72 This is the same as \fB\-\-move\fR, except that \fIFROM\fR is treated
73 as a regular expression and the \fBperl\fR substitution command
74 \fIs/^FROM/TO/\fR is applied to the files.  In particular, TO can make
75 use of backreferences such as $1.
76 .TP
77 .B \-\-nocontrol
78 \fBdebdiff\fR will usually compare the respective control files of the
79 packages using \fBwdiff\fR(1).  This option suppresses this part of
80 the processing.
81 .TP
82 .B \-\-control
83 Compare the respective control files; this is the default, and it can
84 be used to override a configuration file setting.
85 .TP
86 .BI \-\-controlfiles " FILE,FILE,..."
87 Specify which control files to compare; by default this is just
88 \fIcontrol\fR, but could include \fIpostinst\fR, \fIconfig\fR and so
89 on.  Files will only be compared if they are present in both
90 \fI.debs\fR being compared.  The special value \fIALL\fR compares all
91 control files present in both packages, except for md5sums.  This
92 option can be used to override a configuration file setting.
93 .TP
94 .B \-\-wdiff\-source\-control
95 When processing source packages, compare control files using \fBwdiff\fR.
96 Equivalent to the \fB\-\-control\fR option for binary packages.
97 .TP
98 .B \-\-no\-wdiff\-source\-control
99 Do not compare control files in source packages using \fBwdfiff\fR.  This
100 is the default.
101 .TP
102 .BR \-\-wp ", " \-\-wl ", " \-\-wt
103 Pass a \fB\-p\fR, \fB\-l\fR or \fB\-t\fR option to \fBwdiff\fR
104 respectively.  (This yields the whole \fBwdiff\fR output rather than
105 just the lines with any changes.)
106 .TP
107 .B \-\-show-moved
108 If multiple \fI.deb\fR files are specified on the command line, either
109 using \fI.changes\fR files or the \fB\-\-from\fR/\fB\-\-to\fR syntax,
110 then this option will also show which files (if any) have moved
111 between packages.  (The package names are simply determined from the
112 names of the \fI.deb\fR files.)
113 .TP
114 .B \-\-noshow-moved
115 The default behaviour; can be used to override a configuration file
116 setting.
117 .TP
118 .BI \-\-renamed " FROM TO"
119 If \fB\-\-show-moved\fR is being used and a package has been renamed
120 in the process, this command instructs \fBdebdiff\fR to treat the
121 package in the first list called \fIFROM\fR as if it were called
122 \fITO\fR.  Multiple uses of this option are permitted.
123 .TP
124 .BI \-\-exclude " PATTERN"
125 Exclude files that match \fIPATTERN\fR.  Multiple uses of this option
126 are permitted.
127 .TP
128 .B \-\-diffstat
129 Include the result of \fBdiffstat\fR before the generated diff.
130 .TP
131 .B \-\-no\-diffstat
132 The default behaviour; can be used to override a configuration file
133 setting.
134 .TP
135 .B \-\-auto\-ver\-sort
136 When comparing source packages, do so in version order.
137 .TP
138 .B \-\-no\-auto\-ver\-sort
139 Compare source packages in the order they were passed on the
140 command-line, even if that means comparing a package with a higher
141 version against one with a lower version.  This is the default
142 behaviour.
143 .TP
144 .B \-\-unpack\-tarballs
145 When comparing source packages, also unpack tarballs found in the top level
146 source directory to compare their contents along with the other files.
147 This is the default behaviour.
148 .TP
149 .B \-\-no\-unpack\-tarballs
150 Do not unpack tarballs inside source packages.
151 .TP
152 \fB\-\-no-conf\fR, \fB\-\-noconf\fR
153 Do not read any configuration files.  This can only be used as the
154 first option given on the command-line.
155 .TP
156 .BR \-\-help ", " \-h
157 Show a summary of options.
158 .TP
159 .BR \-\-version ", " \-v
160 Show version and copyright information.
161 .TP
162 .BR \-\-quiet ", " \-q
163 Be quiet if no differences were found.
164 .TP
165 .BR \-\-ignore\-space ", " \-w
166 Ignore whitespace in diffs.
167 .SH "CONFIGURATION VARIABLES"
168 The two configuration files \fI/etc/devscripts.conf\fR and
169 \fI~/.devscripts\fR are sourced by a shell in that order to set
170 configuration variables.  Command line options can be used to override
171 configuration file settings.  Environment variable settings are
172 ignored for this purpose.  The currently recognised variables are:
173 .TP
174 .B DEBDIFF_DIRS
175 If this is set to \fIyes\fR, then it is the same as the
176 \fB\-\-dirs\fR command line parameter being used.
177 .TP
178 .B DEBDIFF_CONTROL
179 If this is set to \fIno\fR, then it is the same as the
180 \fB\-\-nocontrol\fR command line parameter being used.  The default is
181 \fIyes\fR.
182 .TP
183 .B DEBDIFF_CONTROLFILES
184 Which control files to compare, corresponding to the
185 \fB\-\-controlfiles\fR command line option.  The default is
186 \fIcontrol\fR.
187 .TP
188 .B DEBDIFF_SHOW_MOVED
189 If this is set to \fIyes\fR, then it is the same as the
190 \fB\-\-show\-moved\fR command line parameter being used.
191 .TP
192 .B DEBDIFF_WDIFF_OPT
193 This option will be passed to \fBwdiff\fR; it should be one of
194 \fB\-p\fR, \fB\-l\fR or \fB\-t\fR.
195 .TP
196 .B DEBDIFF_SHOW_DIFFSTAT
197 If this is set to \fIyes\fR, then it is the same as the
198 \fB\-\-diffstat\fR command line parameter being used.
199 .TP
200 .B DEBDIFF_WDIFF_SOURCE_CONTROL
201 If this is set to \fIyes\fR, then it is the same as the
202 \fB\-\-wdiff\-source\-control\fR command line parameter being used.
203 .TP
204 .B DEBDIFF_AUTO_VER_SORT
205 If this is set to \fIyes\fR, then it is the same as the
206 \fB\-\-auto\-ver\-sort\fR command line parameter being used.
207 .TP
208 .B DEBDIFF_UNPACK_TARBALLS
209 If this is set to \fIno\fR, then it is the same as the
210 \fB\-\-no\-unpack\-tarballs\fR command line parameter being used.
211 .SH "EXIT VALUES"
212 Normally the exit value will be 0 if no differences are reported and 1
213 if any are reported.  If there is some fatal error, the exit code will
214 be 255.
215 .SH "SEE ALSO"
216 .BR dpkg-deb (1),
217 .BR wdiff (1),
218 .BR interdiff (1),
219 .BR diffstat (1)
220 and
221 .BR devscripts.conf (5).
222 .SH AUTHOR
223 \fBdebdiff\fR was originally written as a shell script by Yann Dirson
224 <dirson@debian.org> and rewritten in Perl with many more features by
225 Julian Gilbey <jdg@debian.org>.  The software may be freely
226 redistributed under the terms and conditions of the GNU General Public
227 License, version 2.