DEBSIGN(1)

๐Ÿ“ฆ
version 2.26.11ubuntu1 ยท 2 versions
, in debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– DEBSIGN(1) ๐Ÿ’–

okay bestie, welcome to the General Commands Manual glow-up of debsign โ€” the little utility that signs your Debian stuff so you don't have to cry about it. โœจ


๐ŸŽ€ NAME ๐ŸŽ€

debsign โ€” sign a Debian .changes and .dsc file pair using GPG. periodt. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

debsign [options] [changes-file|dsc-file|commands-file ...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So here's the tea โ˜•: debsign mimics the signing aspects (and the bugs, yes, the bugs, we're keeping that honest) of dpkg-buildpackage(1).

It takes a .dsc, .buildinfo, or .changes file and signs it โ€” plus any child .dsc, .buildinfo, or .changes files that are directly or indirectly referenced by it โ€” using the GNU Privacy Guard. And it's not lazy about it either: it's careful to calculate the size and checksums of any newly signed child files and replace the original values in the parent file. no cap, it does the math. ๐Ÿงฎโœจ

If you don't specify a file, debian/changelog gets parsed to figure out the name of the .changes file to look for in the parent directory. sneaky but iconic. ๐Ÿ‘‘

If you hand it a .commands file, it gets validated first (the deets live at ftp://ftp.upload.debian.org/pub/UploadQueue/README), and then the name specified in the Uploader field is what gets used for signing.

Why would you even want this? Great question, bestie. This utility is useful if a developer must build a package on one machine where it is unsafe to sign it. In that case they only need to transfer the small .dsc, .buildinfo and .changes files over to a safe machine, run debsign on them there, and transfer them back. ๐Ÿซถ

This process can be automated in two ways:

  • If the files to be signed live on the remote machine, use the -r option to copy them to the local machine and back again after signing.
  • If the files live on the local machine, they may be transferred to the remote machine for signing using debrsign(1).
โš ๏ธ heads up though: 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. like, direction matters here, trust. ๐Ÿ”

This program can take default settings from the devscripts configuration files, as described below. ๐Ÿ‘‡


โœจ OPTIONS โœจ

  • -r [username@]remotehost โ€” 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. ๐Ÿ›ฐ๏ธ
  • -pprogname โ€” when debsign needs to execute GPG to sign, it will run progname (searching the PATH if necessary), instead of gpg.
  • -mmaintainer โ€” specify the maintainer name to be used for signing. (See dpkg-buildpackage(1) 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 behave as expected when called by debuild(1).) ๐Ÿซก
  • -emaintainer โ€” same as -m but takes precedence over it.
  • -kkeyid โ€” specify the key ID to be used for signing; overrides any -m and -e options. ๐Ÿ”‘
  • -S โ€” look for a source-only .changes file instead of a binary-build .changes file.
  • -adebian-architecture, -tGNU-system-type โ€” see dpkg-architecture(1) 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 the 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. โš ๏ธ (yes, first. it said what it said.)
  • --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 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 always use pbuilder or svn-buildpackage to build your packages. Note that it also affects debrelease(1) in the same way, hence the strange name of the option. ๐Ÿ˜ญ (the name is giving "we ran out of ideas" but we respect it.)

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

debrsign(1), debuild(1), dpkg-architecture(1), dpkg-buildpackage(1), gpg(1), md5sum(1), sha1sum(1), sha256sum(1), scp(1), devscripts.conf(5)


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

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


and that's the whole page, bestie ๐Ÿซถ this one came out of the Debian Utilities corner of the world, filed under the manual section for DEBSIGN(1) โ€” shoutout to the DEBIAN crew for keeping it cute and shipping it. go sign something and slay ๐Ÿ’…โœจ