Commit 83de9abc authored by Yaroslav Halchenko's avatar Yaroslav Halchenko

BF: install gnupg and dirmngr if needed

parent 7954e7ef
......@@ -2,7 +2,11 @@
#emacs: -*- mode: shell-script; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 et:
# Depends: apt (assumed to be present), python, wget
# Depends:
# assumes to be present:
# apt
# installs if needed if NEURODEBIAN_INSTALL=1:
# python, wget, gnupg, dirmngr (when older gnupg)
# Recommends: netselect
# play safe
......@@ -545,6 +549,14 @@ fi
# Figure out if key needs to be imported (if ran within package,
# should already be there due to neurodebian-archive-keyring package)
# Ideas taken from neurodebian-docker setup to guarantee correct apt-key functioning
# gnupg needed by apt-key might not yet be installed
assure_command_from_package gpg gnupg 1
# Ubuntu includes "gnupg" (not "gnupg2", but still 2.x), but not dirmngr, and gnupg 2.x requires dirmngr
# so, if we're not running gnupg 1.x, explicitly install dirmngr too
gpg --version | grep -q '^gpg (GnuPG) 1\.' || assure_command_from_package dirmngr dirmngr 1
if LANG=C eval $ae_sudo apt-key export $nd_key_id 2>&1 1>/dev/null | grep -qe "nothing exported"; then
print_verbose 1 "Fetching the key from the server"
eval_dry apt-key adv --recv-keys --keyserver $nd_key_id
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment