DPKG-SIG(7) | Debian GNU/Linux manual | DPKG-SIG(7) |
dpkg-sig - Debian package archive (.deb) signature generation and verification tool
This is the description of the source code, trying to help people to understand how dpkg-sig works.
Does everything needed to add a signature to $file:
Returns a reference to an array containing the new md5sum, the new size and the name of the signed deb.
Creates a digests.asc file with the meta-data of $file in dpkg-sig's tempdir:
Returns the name that should be used to add the file to the deb.
Signs a .dpkg-sig-hashes $file containing the digests of a deb/changes file:
Adds the signatures from a signed .dpkg-sig-hashes $file to the signed debs:
Returns the pathes of the debs that were changed.
Verifies all signatures in $deb with names matching $verify_pattern:
Returns its output. This is needed to achieve a "silent" verification when signing a deb.
Verifies if $tempdir/digests is a valid (version 4) signature for the deb described with \@digests:
Returns if the the signature is good, by an unknown key, or bad.
Verifies if $tempdir/digests is a valid (version 3) signature for the deb described with \@digests:
Returns if the the signature is good, by an unknown key, or bad.
Verifies if $tempdir/digests is a valid (version 2) signature for the deb described with \@digests:
Returns if the the signature is good, by an unknown key, or bad.
Tries to find a filename for the signature. Receives the role and constructs a name not already present in $deb.
Returns the final name or dies if it wasn't possible to construct a name.
Receives a path to a changes file $changes and a hash reference \%new_deb_info containing new sizes and md5sums of debs in that changes file. It'll parse the changes file, replace the old values by the new ones. If the file is signed, the signature will be stripped (as it would be invalid anyway).
Adds $new_data to $file as new ar archiv part, using $new_name as filename. If $file doesn't exist, a new ar archive is created. Returns the new md5sum and size of $file.
Parses $file as ar archive and returns all filenames included in the archive.
Parses $file as Debian .changes file and returns all listed debs. The dirname of $file is prepended to the debs, which means that the returned URIs should exist. If $file is signed, $changes_signed is set to "yes".
Parses $deb and returns the meta-data of the included files. The read data is piped to md5sums and sha1sums, which create the respective digests. The digests, the filename and the size are put in an anymous array looking like this: [$name, $size, $sha1sum, $md5sum]. One of these arrays is pushed to @digests for every file in $deb.
Returns the md5sum for $file.
Returns the content of $part_name in the ar archive $archive.
Returns the content of $file as array with one line per element.
Writes contents of \@data to $file. Returns new md5sum and size of $file.
Returns the result of globbing $exp as array.
Returns a true value if $file is readable.
Splits an ssh URI $uri into a $user, $host and $path part.
Opens a ssh connection to $host as user $user, directly calling dpkg-sig. It checks if the remote dpkg-sig is compatible to the current version and returns the $pid, the Read-Filehandle $readerfh and the Write-Filehandle $writerfh.
This works like debsign:
Signs $in_file with gpg and puts the detached signature in $out_file.
If $no_detach is true, $out_file is a clearsigned copy of $in_file.
dpkg-sig and this manpage were written by Andreas Barth und Marc Brockschmidt. They are Copyright (C) 2003, 2004 by them and released under the GNU General Public Licence version 2 or later; there is NO WARRANTY. See /usr/share/doc/dpkg-sig/copyright and /usr/share/common-licenses/GPL for details.
2016-12-19 | Debian Project |