Blame doc/rpmsign.8

2ff057
.TH "RPMSIGN" "8" "Red Hat, Inc"
2ff057
.SH NAME
2ff057
rpmsign \- RPM Package Signing
2ff057
.SH SYNOPSIS
2ff057
.SS "SIGNING PACKAGES:"
2ff057
.PP
2ff057
2ff057
\fBrpm\fR \fB--addsign|--resign\fR [\fBrpmsign-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
\fBrpm\fR \fB--delsign\fR \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
.SS "rpmsign-options"
2ff057
.PP
2ff057
[\fb--fskpath \fIKEY\fb\fR] [\fB--signfiles\fR]
2ff057
2ff057
.SH DESCRIPTION
2ff057
.PP
2ff057
Both of the \fB--addsign\fR and \fB--resign\fR
2ff057
options generate and insert new signatures for each package
2ff057
\fIPACKAGE_FILE\fR given, replacing any
2ff057
existing signatures. There are two options for historical reasons,
2ff057
there is no difference in behavior currently.
2ff057
Florian Festi 3efc6e
To create a signature rpm needs to verify the package's checksum. As a result
Florian Festi 3efc6e
packages with a MD5/SHA1 checksums cannot be signed in FIPS mode.
Florian Festi 3efc6e
2ff057
\fBrpm\fR \fB--delsign\fR \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
.PP
2ff057
Delete all signatures from each package \fIPACKAGE_FILE\fR given.
2ff057
2ff057
.SS "SIGN OPTIONS"
2ff057
.PP
2ff057
.TP
2ff057
\fB--fskpath \fIKEY\fB\fR
2ff057
Used with \fB--signfiles\fR, use file signing key \fIKey\fR.
2ff057
.TP
2ff057
\fB--signfiles\fR
2ff057
Sign package files. The macro \fB%_binary_filedigest_algorithm\fR must
2ff057
be set to a supported algorithm before building the package. The
2ff057
supported algorithms are SHA1, SHA256, SHA384, and SHA512, which are
2ff057
represented as 2, 8, 9, and 10 respectively.  The file signing key (RSA
2ff057
private key) must be set before signing the package, it can be configured on the command line with \fB--fskpath\fR or the macro %_file_signing_key.
2ff057
2ff057
.SS "USING GPG TO SIGN PACKAGES"
2ff057
.PP
2ff057
In order to sign packages using GPG, \fBrpm\fR
2ff057
must be configured to run GPG and be able to find a key
2ff057
ring with the appropriate keys. By default,
2ff057
\fBrpm\fR uses the same conventions as GPG
2ff057
to find key rings, namely the \fB$GNUPGHOME\fR environment
2ff057
variable.  If your key rings are not located where GPG expects
2ff057
them to be, you will need to configure the macro
2ff057
\fB%_gpg_path\fR
2ff057
to be the location of the GPG key rings to use.
2ff057
If you want to be able to sign packages you create yourself, you
2ff057
also need to create your own public and secret key pair (see the
2ff057
GPG manual). You will also need to configure the \fBrpm\fR macros
2ff057
.TP
2ff057
\fB%_gpg_name\fR
2ff057
The name of the "user" whose key you wish to use to sign your packages.
2ff057
.PP
2ff057
For example, to be able to use GPG to sign packages as the user
2ff057
\fI"John Doe <jdoe@foo.com>"\fR
2ff057
from the key rings located in \fI/etc/rpm/.gpg\fR
2ff057
using the executable \fI/usr/bin/gpg\fR you would include
2ff057
.PP
2ff057
.nf
2ff057
%_gpg_path /etc/rpm/.gpg
2ff057
%_gpg_name John Doe <jdoe@foo.com>
2ff057
%__gpg /usr/bin/gpg
2ff057
.fi
2ff057
.PP
2ff057
in a macro configuration file. Use \fI/etc/rpm/macros\fR
2ff057
for per-system configuration and \fI~/.rpmmacros\fR
2ff057
for per-user configuration. Typically it's sufficient to set just %_gpg_name.
2ff057
.PP
2ff057
.SH "SEE ALSO"
2ff057
.nf
2ff057
\fBpopt\fR(3),
2ff057
\fBrpm\fR(8),
2ff057
\fBrpmdb\fR(8),
2ff057
\fBrpmkeys\fR(8),
2ff057
\fBrpm2cpio\fR(8),
2ff057
\fBrpmbuild\fR(8),
2ff057
\fBrpmspec\fR(8),
2ff057
.fi
2ff057
2ff057
\fBrpmsign --help\fR - as rpm supports customizing the options via popt aliases 
2ff057
it's impossible to guarantee that what's described in the manual matches 
2ff057
what's available.
2ff057
2ff057
2ff057
\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
2ff057
\fR
2ff057
.SH "AUTHORS"
2ff057
2ff057
.nf
2ff057
Marc Ewing <marc@redhat.com>
2ff057
Jeff Johnson <jbj@redhat.com>
2ff057
Erik Troan <ewt@redhat.com>
2ff057
Panu Matilainen <pmatilai@redhat.com>
2ff057
Fionnuala Gunter <fin@linux.vnet.ibm.com>
2ff057
.fi