| 1 |
.\" Automatically generated by Pandoc 3.1.11.1 |
| 2 |
.\" |
| 3 |
.TH "RPMSIGN" "8" "Red Hat, Inc" "" "" |
| 4 |
.SH NAME |
| 5 |
rpmsign \- RPM Package Signing |
| 6 |
.SH SYNOPSIS |
| 7 |
.SS SIGNING PACKAGES: |
| 8 |
\f[B]rpmsign\f[R] \f[B]\-\-addsign|\-\-resign\f[R] |
| 9 |
[\f[B]rpmsign\-options\f[R]] \f[I]PACKAGE_FILE ...\f[R] |
| 10 |
.PP |
| 11 |
\f[B]rpmsign\f[R] \f[B]\-\-delsign\f[R] \f[I]PACKAGE_FILE ...\f[R] |
| 12 |
.PP |
| 13 |
\f[B]rpmsign\f[R] \f[B]\-\-delfilesign\f[R] \f[I]PACKAGE_FILE ...\f[R] |
| 14 |
.SS rpmsign\-options |
| 15 |
[\f[B]\-\-rpmv3\f[R]] [\f[B]\-\-fskpath\f[R] \f[I]KEY\f[R]] |
| 16 |
[\f[B]\-\-signfiles\f[R]] |
| 17 |
.SH DESCRIPTION |
| 18 |
Both of the \f[B]\-\-addsign\f[R] and \f[B]\-\-resign\f[R] options |
| 19 |
generate and insert new signatures for each package |
| 20 |
\f[I]PACKAGE_FILE\f[R] given, replacing any existing signatures. |
| 21 |
There are two options for historical reasons, there is no difference in |
| 22 |
behavior currently. |
| 23 |
.PP |
| 24 |
To create a signature rpmsign needs to verify the package\[aq]s |
| 25 |
checksum. |
| 26 |
As a result packages with a MD5/SHA1 checksums cannot be signed in FIPS |
| 27 |
mode. |
| 28 |
.PP |
| 29 |
\f[B]rpmsign\f[R] \f[B]\-\-delsign\f[R] \f[I]PACKAGE_FILE ...\f[R] |
| 30 |
.PP |
| 31 |
Delete all signatures from each package \f[I]PACKAGE_FILE\f[R] given. |
| 32 |
.PP |
| 33 |
\f[B]rpmsign\f[R] \f[B]\-\-delfilesign\f[R] \f[I]PACKAGE_FILE ...\f[R] |
| 34 |
.PP |
| 35 |
Delete all IMA and fsverity file signatures from each package |
| 36 |
\f[I]PACKAGE_FILE\f[R] given. |
| 37 |
.SS SIGN OPTIONS |
| 38 |
.TP |
| 39 |
\f[B]\-\-rpmv3\f[R] |
| 40 |
Force RPM V3 header+payload signature addition. |
| 41 |
These are expensive and redundant baggage on packages where a separate |
| 42 |
payload digest exists (packages built with rpm >= 4.14). |
| 43 |
Rpmsign will automatically detect the need for V3 signatures, but this |
| 44 |
option can be used to force their creation if the packages must be fully |
| 45 |
signature verifiable with rpm < 4.14 or other interoperability reasons. |
| 46 |
.TP |
| 47 |
\f[B]\-\-fskpath\f[R] \f[I]KEY\f[R] |
| 48 |
Used with \f[B]\-\-signfiles\f[R], use file signing key \f[I]KEY\f[R]. |
| 49 |
.TP |
| 50 |
\f[B]\-\-certpath\f[R] \f[I]CERT\f[R] |
| 51 |
Used with \f[B]\-\-signverity\f[R], use file signing certificate |
| 52 |
\f[I]CERT\f[R]. |
| 53 |
.TP |
| 54 |
\f[B]\-\-verityalgo\f[R] \f[I]ALG\f[R] |
| 55 |
Used with \f[B]\-\-signverity\f[R], to specify the signing algorithm. |
| 56 |
sha256 and sha512 are supported, with sha256 being the default if this |
| 57 |
argument is not specified. |
| 58 |
This can also be specified with the macro \f[I]%_verity_algorithm\f[R]. |
| 59 |
.TP |
| 60 |
\f[B]\-\-signfiles\f[R] |
| 61 |
Sign package files. |
| 62 |
The macro \f[B]%_binary_filedigest_algorithm\f[R] must be set to a |
| 63 |
supported algorithm before building the package. |
| 64 |
The supported algorithms are SHA1, SHA256, SHA384, and SHA512, which are |
| 65 |
represented as 2, 8, 9, and 10 respectively. |
| 66 |
The file signing key (RSA private key) must be set before signing the |
| 67 |
package, it can be configured on the command line with |
| 68 |
\f[B]\-\-fskpath\f[R] or the macro %_file_signing_key. |
| 69 |
.TP |
| 70 |
\f[B]\-\-signverity\f[R] |
| 71 |
Sign package files with fsverity signatures. |
| 72 |
The file signing key (RSA private key) and the signing certificate must |
| 73 |
be set before signing the package. |
| 74 |
The key can be configured on the command line with \f[B]\-\-fskpath\f[R] |
| 75 |
or the macro %_file_signing_key, and the cert can be configured on the |
| 76 |
command line with \f[B]\-\-certpath\f[R] or the macro |
| 77 |
%_file_signing_cert. |
| 78 |
.SS CONFIGURING SIGNING KEYS |
| 79 |
In order to sign packages, you need to create your own public and secret |
| 80 |
key pair (see the GnuPG manual). |
| 81 |
In addition, \f[B]rpm\f[R](8) must be configured to find GnuPG and the |
| 82 |
appropriate keys with the following macros: |
| 83 |
.TP |
| 84 |
\f[B]%_gpg_name\f[R] |
| 85 |
The name of the \[dq]user\[dq] whose key you wish to use to sign your |
| 86 |
packages. |
| 87 |
Typically this is the only configuration needed. |
| 88 |
.TP |
| 89 |
\f[B]%_gpg_path\f[R] |
| 90 |
The location of your GnuPG keyring if not the default |
| 91 |
\f[B]$GNUPGHOME\f[R]. |
| 92 |
.TP |
| 93 |
\f[B]%__gpg\f[R] |
| 94 |
The path of the GnuPG executable. |
| 95 |
Normally pre\-configured. |
| 96 |
.PP |
| 97 |
For example, to be able to use GnuPG to sign packages as the user |
| 98 |
\f[I]\[dq]John Doe <jdoe\[at]foo.com>\[dq]\f[R] from the key rings |
| 99 |
located in \f[I]/etc/rpm/.gpg\f[R] using the executable |
| 100 |
\f[I]/opt/bin/gpg\f[R] you would include |
| 101 |
.IP |
| 102 |
.EX |
| 103 |
%_gpg_path /etc/rpm/.gpg |
| 104 |
%_gpg_name John Doe <jdoe\[at]foo.com> |
| 105 |
%__gpg /opt/bin/gpg |
| 106 |
.EE |
| 107 |
.PP |
| 108 |
in a macro configuration file, typically \[ti]/.config/rpm/macros. |
| 109 |
See \f[B]Macro Configuration\f[R] in \f[B]rpm\f[R](8) for more details. |
| 110 |
.SH SEE ALSO |
| 111 |
\f[B]popt\f[R](3), \f[B]rpm\f[R](8), \f[B]rpmdb\f[R](8), |
| 112 |
\f[B]rpmkeys\f[R](8), \f[B]rpm2cpio\f[R](8), \f[B]rpmbuild\f[R](8), |
| 113 |
\f[B]rpmspec\f[R](8) |
| 114 |
.PP |
| 115 |
\f[B]rpmsign \-\-help\f[R] \- as rpm supports customizing the options |
| 116 |
via popt aliases it\[aq]s impossible to guarantee that what\[aq]s |
| 117 |
described in the manual matches what\[aq]s available. |
| 118 |
.PP |
| 119 |
\f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R] |
| 120 |
.SH AUTHORS |
| 121 |
.IP |
| 122 |
.EX |
| 123 |
Marc Ewing <marc\[at]redhat.com> |
| 124 |
Jeff Johnson <jbj\[at]redhat.com> |
| 125 |
Erik Troan <ewt\[at]redhat.com> |
| 126 |
Panu Matilainen <pmatilai\[at]redhat.com> |
| 127 |
Fionnuala Gunter <fin\[at]linux.vnet.ibm.com> |
| 128 |
Jes Sorensen <jsorensen\[at]fb.com> |
| 129 |
.EE |