# man > debsign(1)

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

## NAME
       debsign - sign a Debian .changes and .dsc file pair using GPG

## SYNOPSIS
       **debsign **[_options_] [_changes-file_|_dsc-file_|_commands-file_ ...]

## DESCRIPTION
       **debsign  **mimics  the  signing  aspects  (and bugs) of [**dpkg-buildpackage**(1)](https://www.chedong.com/phpMan.php/man/dpkg-buildpackage/1/markdown).  It takes a _.dsc_,
       _.buildinfo_, or _.changes_ file and signs it, and any child _.dsc_, _.buildinfo_, or _.changes_  files
       directly or indirectly referenced by it, using the GNU Privacy Guard. It is careful to calcu‐
       late  the  size and checksums of any newly signed child files and replace the original values
       in the parent file.

       If no file is specified, _debian/changelog_ is parsed to determine the  name  of  the  _.changes_
       file to look for in the parent directory.

       If  a  _.commands_  file  is  specified it is first validated (see the details at _ftp://ftp.up‐_
       _load.debian.org/pub/UploadQueue/README_), and the name specified in the Uploader field is used
       for signing.

       This utility is useful if a developer must build a package on one machine where it is  unsafe
       to  sign  it; they need then only transfer the small _.dsc_, _.buildinfo_ and _.changes_ files to a
       safe machine and then use the **debsign **program to sign them  before  transferring  them  back.
       This  process can be automated in two ways.  If the files to be signed live on the **remote **ma‐
       chine, the **-r **option may be used to copy them to the local machine and back again after sign‐
       ing.  If the files live on the **local **machine, then they may be transferred to the remote  ma‐
       chine  for  signing  using  [**debrsign**(1)](https://www.chedong.com/phpMan.php/man/debrsign/1/markdown).  However note that it is probably safer to have your
       trusted signing machine use **debsign **to connect to the untrusted non-signing  machine,  rather
       than using **debrsign **to make the connection in the reverse direction.

       This  program can take default settings from the **devscripts **configuration files, as described
       below.

## OPTIONS
### -r 
              The files to be signed live on the specified remote  host.   In  this  case,  a  _.dsc_,
              _.buildinfo_  or  _.changes_  file must be explicitly named, with an absolute directory or
              one relative to the remote home directory.  **scp **will be used  for  the  copying.   The
              [_username_**@**]_remotehost_**:_**filename_  syntax  is  permitted as an alternative.  Wildcards (*****
              etc.) are allowed.

### -p_
              When **debsign **needs to execute GPG to sign it will run _progname_ (searching the **PATH  **if
              necessary), instead of **gpg**.

### -m_
              Specify  the  maintainer  name  to be used for signing.  (See [**dpkg-buildpackage**(1)](https://www.chedong.com/phpMan.php/man/dpkg-buildpackage/1/markdown) for
              more information about the differences between **-m**, **-e **and **-k **when  building  packages;
              **debsign  **makes  no  use of these distinctions except with respect to the precedence of
              the various options.  These multiple options are provided so that the program will be‐
              have as expected when called by [**debuild**(1)](https://www.chedong.com/phpMan.php/man/debuild/1/markdown).)

### -e_
              Same as **-m **but takes precedence over it.

### -k_
              Specify the key ID to be used for signing; overrides any **-m **and **-e **options.

### -S     

### -a_ -t_
              See [**dpkg-architecture**(1)](https://www.chedong.com/phpMan.php/man/dpkg-architecture/1/markdown) for a description of these options.  They affect  the  search
              for  the _.changes_ file.  They are provided to mimic the behaviour of **dpkg-buildpackage**
              when determining the name of the _.changes_ file.

### --multi
              Multiarch _.changes_ mode: This signifies that **debsign **should use the most  recent  file
              with  the  name pattern _package_version_*+*.changes_ as the _.changes_ file, allowing for
              the _.changes_ files produced by **dpkg-cross**.

       **--re-sign**, **--no-re-sign**
              Recreate signature, respectively use the existing signature,  if  the  file  has  been
              signed  already.   If  neither option is given and an already signed file is found the
              user is asked if he or she likes to use the current signature.

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

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

       **--help**, **-h**
              Display a help message and exit successfully.

### --version
              Display version and copyright information and exit successfully.

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

       **DEBSIGN_PROGRAM**
              Setting this is equivalent to giving a **-p **option.

       **DEBSIGN_MAINT**
              This is the **-m **option.

       **DEBSIGN_KEYID**
              And this is the **-k **option.

       **DEBSIGN_ALWAYS_RESIGN**
              Always re-sign files even if they are already signed, without prompting.

       **DEBRELEASE_DEBS_DIR**
              This specifies the directory in which to look for the files to be signed, and  is  ei‐
              ther  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
              always 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.

## SEE ALSO
       [**debrsign**(1)](https://www.chedong.com/phpMan.php/man/debrsign/1/markdown),  [**debuild**(1)](https://www.chedong.com/phpMan.php/man/debuild/1/markdown),  [**dpkg-architecture**(1)](https://www.chedong.com/phpMan.php/man/dpkg-architecture/1/markdown),   [**dpkg-buildpackage**(1)](https://www.chedong.com/phpMan.php/man/dpkg-buildpackage/1/markdown),   [**gpg**(1)](https://www.chedong.com/phpMan.php/man/gpg/1/markdown),   [**gpg2**(1)](https://www.chedong.com/phpMan.php/man/gpg2/1/markdown),
       [**md5sum**(1)](https://www.chedong.com/phpMan.php/man/md5sum/1/markdown), [**sha1sum**(1)](https://www.chedong.com/phpMan.php/man/sha1sum/1/markdown), [**sha256sum**(1)](https://www.chedong.com/phpMan.php/man/sha256sum/1/markdown), [**scp**(1)](https://www.chedong.com/phpMan.php/man/scp/1/markdown), [**devscripts.conf**(5)](https://www.chedong.com/phpMan.php/man/devscripts.conf/5/markdown)

## AUTHOR
       This  program  was  written by Julian Gilbey <<jdg@debian.org>> and is copyright under the GPL,
       version 2 or later.

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