# debdiff(1) - man - phpman

[DEBDIFF(1)](https://www.chedong.com/phpMan.php/man/DEBDIFF/1/markdown)                             General Commands Manual                            [DEBDIFF(1)](https://www.chedong.com/phpMan.php/man/DEBDIFF/1/markdown)



## NAME
       debdiff - compare file lists in two Debian packages

## SYNOPSIS
       **debdiff** [_options_]
       **debdiff** [_options_] ... _deb1_ _deb2_
       **debdiff** [_options_] ... _changes1_ _changes2_
       **debdiff** [_options_] ... **--from** _deb1a_ _deb1b_ _..._  **--to** _deb2a_ _deb2b_ _..._
       **debdiff** [_options_] ... _dsc1_ _dsc2_

## DESCRIPTION
       **debdiff** takes the names of two Debian package files (_.deb_s or _.udeb_s) on the command line and
       compares their contents (considering only the files in the main package, not the  maintenance
       scripts).   It shows which files have been introduced and which removed between the two pack‐
       age files, and is therefore useful for spotting files which may have been inadvertently  lost
       between  revisions  of the package.  It also checks the file owners and permissions, and com‐
       pares the control files of the two packages using the **wdiff** program.  If you  want  a  deeper
       comparison of two Debian package files you can use the **diffoscope** tool.

       If  no arguments are given, **debdiff** tries to compare the content of the current source direc‐
       tory with the last version of the package.

       **debdiff** can also handle changes between groups of _.deb_ files in two ways.  The  first  is  to
       specify two _.changes_ files.  In this case, the _.deb_ files listed in the _.changes_ file will be
       compared, by taking the contents of all of the listed _.deb_ files together.  (The  _.deb_  files
       listed  are  assumed to be in the same directory as the _.changes_ file.)  The second way is to
       list the _.deb_ files of interest specifically using the **--from** ... **--to**  syntax.   These  both
       help if a package is broken up into smaller packages and one wishes to ensure that nothing is
       lost in the interim.

       **debdiff** examines the **devscripts** configuration files as described below.  Command line options
       override the configuration file settings, though.

       If  **debdiff**  is  passed  two source packages (_.dsc_ files) it will compare the contents of the
       source packages.  If the source packages differ only in Debian revision number (that is,  the
       _.orig.tar.gz_  files  are  the  same in the two _.dsc_ files), then [**interdiff**(1)](https://www.chedong.com/phpMan.php/man/interdiff/1/markdown) will be used to
       compare the two patch files if this program is available on the system, otherwise a **diff** will
       be performed between the two source trees.

## OPTIONS
       **--dirs**, **-d**
              The  default  mode  of operation is to ignore directory names which appear in the file
              list, but they, too, will be considered if this option is given.

### --nodirs
              Ignore directory names which appear in the file list.  This is the default and it  can
              be used to override a configuration file setting.

       **--move** _FROM_ _TO_, **-m** _FROM_ _TO_
              It  sometimes  occurs that various files or directories are moved around between revi‐
              sions.  This can be handled using this option.  There are  two  arguments,  the  first
              giving  the  location of the directory or file in the first package, and the second in
              the second.  Any files in the first listing whose names begin with the first  argument
              are treated as having that substituted for the second argument when the file lists are
              compared.  Any number of **--move** arguments may be given; they are processed in the  or‐
              der  in  which  they  appear.  This only affects comparing binary packages, not source
              packages.

       **--move-regex** _FROM_ _TO_
              This is the same as **--move**, except that _FROM_ is treated as a  regular  expression  and
              the  **perl** substitution command _s/^FROM/TO/_ is applied to the files.  In particular, TO
              can make use of backreferences such as $1.

### --nocontrol
              **debdiff** will usually compare the respective control files of the  packages  using  **wd**‐‐
              [**iff**(1)](https://www.chedong.com/phpMan.php/man/iff/1/markdown).  This option suppresses this part of the processing.

### --control
              Compare the respective control files; this is the default, and it can be used to over‐
              ride a configuration file setting.

       **--controlfiles** _FILE_[**,**_FILE_ ...]
              Specify which control files to compare; by default this is just _control_, but could in‐
              clude  _postinst_, _config_ and so on.  Files will only be compared if they are present in
              both _.debs_ being compared.  The special value _ALL_ compares all control  files  present
              in  both packages, except for md5sums.  This option can be used to override a configu‐
              ration file setting.

### --wdiff-source-control
              When processing source packages, compare control files using **wdiff**.  Equivalent to the
              **--control** option for binary packages.

### --no-wdiff-source-control
              Do not compare control files in source packages using **wdiff**.  This is the default.

       **--wp**, **--wl**, **--wt**
              Pass a **-p**, **-l** or **-t** option to **wdiff** respectively.  (This yields the whole **wdiff** output
              rather than just the lines with any changes.)

### --show-moved
              If multiple _.deb_ files are specified on the command line, either using _.changes_  files
              or  the  **--from**/**--to** syntax, then this option will also show which files (if any) have
              moved between packages.  (The package names are simply determined from  the  names  of
              the _.deb_ files.)

### --noshow-moved
              The default behaviour; can be used to override a configuration file setting.

       **--renamed** _FROM_ _TO_
              If **--show-moved** is being used and a package has been renamed in the process, this com‐
              mand instructs **debdiff** to treat the package in the first list called  _FROM_  as  if  it
              were called _TO_.  Multiple uses of this option are permitted.

       **--exclude** _PATTERN_
              Exclude files whose basenames match _PATTERN_.  Multiple uses of this option are permit‐
              ted.  Note that this option is passed on to **diff** and has the same behaviour,  so  only
              the  basename of the file is considered: in particular, **--exclude='*.patch'** will work,
              but **--exclude='debian/patches/*'** will have no practical effect.

### --diffstat
              Include the result of **diffstat** before the generated diff.

### --no-diffstat
              The default behaviour; can be used to override a configuration file setting.

### --auto-ver-sort
              When comparing source packages, do so in version order.

### --no-auto-ver-sort
              Compare source packages in the order they were passed on  the  command-line,  even  if
              that means comparing a package with a higher version against one with a lower version.
              This is the default behaviour.

### --unpack-tarballs
              When comparing source packages, also unpack tarballs found in the top level source di‐
              rectory to compare their contents along with the other files.  This is the default be‐
              haviour.

### --no-unpack-tarballs
              Do not unpack tarballs inside source packages.

### --apply-patches
              If the old and/or new package is in 3.0 (quilt) format, apply the quilt  patches  (and
              remove **.pc/**) before comparison.

### --no-apply-patches, --noapply-patches
              If the old and/or new package is in 3.0 (quilt) format, do not apply the quilt patches
              before comparison. This is the default behaviour.

       **--no-conf**, **--noconf**
              Do not read any configuration files.  This can only be used as the first option  given
              on the command-line.

       **--debs-dir** _directory_
              Look  for  the  _.dsc_ files in _directory_ instead of the parent of the source directory.
              This should either be an absolute path or relative to the top of the source directory.

       **--help**, **-h**
              Show a summary of options.

       **--version**, **-v**
              Show version and copyright information.

       **--quiet**, **-q**
              Be quiet if no differences were found.

       **--ignore-space**, **-w**
              Ignore whitespace in diffs.

## CONFIGURATION VARIABLES
       The two configuration files _/etc/devscripts.conf_ and _~/.devscripts_ are sourced by a shell  in
       that order to set configuration variables.  Command line options can be used to override con‐
       figuration file settings.  Environment variable settings are ignored for this  purpose.   The
       currently recognised variables are:

       **DEBDIFF**___**DIRS**
              If  this is set to _yes_, then it is the same as the **--dirs** command line parameter being
              used.

       **DEBDIFF**___**CONTROL**
              If this is set to _no_, then it is the same as the **--nocontrol**  command  line  parameter
              being used.  The default is _yes_.

       **DEBDIFF**___**CONTROLFILES**
              Which  control  files to compare, corresponding to the **--controlfiles** command line op‐
              tion.  The default is _control_.

       **DEBDIFF**___**SHOW**___**MOVED**
              If this is set to _yes_, then it is the same as the **--show-moved** command line  parameter
              being used.

       **DEBDIFF**___**WDIFF**___**OPT**
              This option will be passed to **wdiff**; it should be one of **-p**, **-l** or **-t**.

       **DEBDIFF**___**SHOW**___**DIFFSTAT**
              If  this  is  set to _yes_, then it is the same as the **--diffstat** command line parameter
              being used.

       **DEBDIFF**___**WDIFF**___**SOURCE**___**CONTROL**
              If this is set to _yes_, then it is the same as the **--wdiff-source-control** command  line
              parameter being used.

       **DEBDIFF**___**AUTO**___**VER**___**SORT**
              If this is set to _yes_, then it is the same as the **--auto-ver-sort** command line parame‐
              ter being used.

       **DEBDIFF**___**UNPACK**___**TARBALLS**
              If this is set to _no_, then it is the same as the **--no-unpack-tarballs** command line pa‐
              rameter being used.

       **DEBDIFF**___**APPLY**___**PATCHES**
              If this is set to _yes_, then it is the same as the **--apply-patches** command line parame‐
              ter being used.  The default is _no_.

       **DEBRELEASE**___**DEBS**___**DIR**
              This specifies the directory in which to look for the _.dsc_ and files, and is either an
              absolute  path  or  relative  to  the top of the source tree.  This corresponds to the
              **--debs-dir** command line option.  This directive could be used, for example, if you al‐
              ways  use  **pbuilder** or **svn-buildpackage** to build your packages.  Note that it also af‐
              fects [**debrelease**(1)](https://www.chedong.com/phpMan.php/man/debrelease/1/markdown) in the same way, hence the strange name of the option.

## EXIT VALUES
       Normally the exit value will be 0 if no differences are reported and 1 if any  are  reported.
       If there is some fatal error, the exit code will be 255.

## SEE ALSO
       [**debdiff-apply**(1)](https://www.chedong.com/phpMan.php/man/debdiff-apply/1/markdown),  [**diffstat**(1)](https://www.chedong.com/phpMan.php/man/diffstat/1/markdown), [**dpkg-deb**(1)](https://www.chedong.com/phpMan.php/man/dpkg-deb/1/markdown), [**interdiff**(1)](https://www.chedong.com/phpMan.php/man/interdiff/1/markdown), [**wdiff**(1)](https://www.chedong.com/phpMan.php/man/wdiff/1/markdown), [**devscripts.conf**(5)](https://www.chedong.com/phpMan.php/man/devscripts.conf/5/markdown), **dif**‐‐
       [**foscope**(1)](https://www.chedong.com/phpMan.php/man/foscope/1/markdown)

## AUTHOR
       **debdiff** was originally written as a shell  script  by  Yann  Dirson  <<dirson@debian.org>>  and
       rewritten  in  Perl  with many more features by Julian Gilbey <<jdg@debian.org>>.  The software
       may be freely redistributed under the terms and conditions of the GNU General Public License,
       version 2.



DEBIAN                                    Debian Utilities                                [DEBDIFF(1)](https://www.chedong.com/phpMan.php/man/DEBDIFF/1/markdown)
