aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/data.rst2
-rw-r--r--src/package.lisp1
-rw-r--r--src/property/apt.lisp9
3 files changed, 11 insertions, 1 deletions
diff --git a/doc/data.rst b/doc/data.rst
index faba8a3..ea8a7d2 100644
--- a/doc/data.rst
+++ b/doc/data.rst
@@ -34,7 +34,7 @@ other purposes.
identified by ``NAME``; see ``DATA.GIT-SNAPSHOT``
- ``("--pgp-pubkey" . FINGERPRINT)`` means the/a OpenPGP public key with
- fingerprint FINGERPRINT
+ fingerprint FINGERPRINT, ASCII-armoured
- ``("--luks-passphrase" . VOLUME-LABEL)`` means a LUKS passphrase for volume
with label ``VOLUME-LABEL``.
diff --git a/src/package.lisp b/src/package.lisp
index 212b809..205f8cb 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -383,6 +383,7 @@
#:standard-sources.list
#:additional-sources
#:cache-cleaned
+ #:trusts-key
#:all-installed-p
#:none-installed-p))
diff --git a/src/property/apt.lisp b/src/property/apt.lisp
index a612a2b..b68b82b 100644
--- a/src/property/apt.lisp
+++ b/src/property/apt.lisp
@@ -224,6 +224,15 @@ after BASENAME. CONTENT is as the content argument to FILE:HAS-CONTENT."
(:hostattrs (os:required 'os:debianlike))
(:apply (apt-get "clean") :no-change))
+(defproplist trusts-key :posix
+ (fingerprint &optional (basename (remove #\Space fingerprint))
+ &aux (file #?"/etc/apt/trusted.gpg.d/${basename}.asc"))
+ "Have apt trust the PGP key identified by FINGERPRINT to sign apt archives."
+ (:desc #?"apt trusts PGP public key ${fingerprint}")
+ (with-unapply
+ (file:data-uploaded "--pgp-pubkey" (remove #\Space fingerprint) file)
+ :unapply (file:does-not-exist file)))
+
;;;; Reports on installation status