From 4a012436ce6a07dd435dca33b7ee2c41ea94c844 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Wed, 29 Dec 2021 14:34:02 +0100 Subject: doc/apt-key.8.xml: document alternatives to apt-key add (closes: #1002820) [jak@ Also document /etc/apt/keyrings] --- doc/apt-key.8.xml | 28 ++++++++++++++++++++++++++++ doc/apt.ent | 4 ++++ 2 files changed, 32 insertions(+) (limited to 'doc') diff --git a/doc/apt-key.8.xml b/doc/apt-key.8.xml index eace6a02e..6167a7826 100644 --- a/doc/apt-key.8.xml +++ b/doc/apt-key.8.xml @@ -196,6 +196,34 @@ + Deprecation + + Except for using apt-key del in maintainer scripts, the use of apt-key is deprecated. This section shows how to replace existing use of apt-key. + +If your existing use of apt-key add looks like this: +wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add - +Then you can directly replace this with: +wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.asc +Make sure to use the "asc" extension for ASCII armored +keys and the "gpg" extension for the binary OpenPGP +format (also known as "GPG key public ring"). The binary OpenPGP format works +for all apt versions, while the ASCII armored format works for apt version >= +1.4. +Instead of placing keys into the /etc/apt/trusted.gpg.d +directory, you can place them anywhere on your filesystem by using the +Signed-By option in your sources.list and +pointing to the filename of the key. See &sources-list; for details. +Since APT 2.4, /etc/apt/keyrings is provided as the recommended +location for keys not managed by packages. +When using a deb822-style sources.list, and with apt version >= 2.4, the +Signed-By option can also be used to include the full ASCII +armored keyring directly in the sources.list without an +additional file. + + + + + Files diff --git a/doc/apt.ent b/doc/apt.ent index 6a3837b95..db4cb6f38 100644 --- a/doc/apt.ent +++ b/doc/apt.ent @@ -159,6 +159,10 @@ be stored here (by other packages or the administrator). Configuration Item Dir::Etc::TrustedParts. + /etc/apt/keyrings/ + Place to store additional keyrings to be used with Signed-By. + + ">