yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91884
[Bug 1005975] Re: using two keys for one apt source fails
Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/2261
** Bug watch added: github.com/canonical/cloud-init/issues #2261
https://github.com/canonical/cloud-init/issues/2261
** Changed in: cloud-init
Status: Confirmed => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1005975
Title:
using two keys for one apt source fails
Status in cloud-init:
Expired
Bug description:
My use case is the Apache built Cassandra repos which require two keys
to be added to apt-key.
the utils.getkeybyid function doesn't use quotes around the key for this command:
$ gpg --keyserver ${ks} --recv $k >/dev/null &&
which works just fine for adding two keys from the same key server, using Cassandra as the example:
$ gpg --keyserver pgp.mit.edu --recv F758CE318D77295D 2B5C1B00
The function then switches to using quotes for the rest of the commands:
$ armour=$(gpg --export --armour "${k}") &&
$ gpg --batch --yes --delete-keys "${k}"
As these commands are in the utils.getkeybyid function they only
delete and then return the public key block for the first key. The
second one gets ignored by the delete and the export, so I end up with
it not in my apt-key and still in gpg.
Remove the quotes around the ${k} and these commands complete correctly and return the correct public key block, which then results in both keys getting added to the apt-key.
So, unless there's a good reason to quote the ${k} it seems to be more flexible without them.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1005975/+subscriptions