launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25186
[Merge] ~cjwatson/launchpad:testfix-signing-client-openpgp into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:testfix-signing-client-openpgp into launchpad:master.
Commit message:
Skip OpenPGP keys in sync-signingkeys
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/389460
We'll want to do something with the OpenPGP keys that sign archives themselves fairly soon, but for this purpose they work in quite a different way from other key types.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:testfix-signing-client-openpgp into launchpad:master.
diff --git a/lib/lp/archivepublisher/scripts/sync_signingkeys.py b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
index aa7fb53..32a43de 100644
--- a/lib/lp/archivepublisher/scripts/sync_signingkeys.py
+++ b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
@@ -93,7 +93,16 @@ class SyncSigningKeysScript(LaunchpadScript):
self.options.type)
key_types = [key_type]
else:
- key_types = SigningKeyType.items
+ # While archives do have OpenPGP keys, they work in a rather
+ # different way (and are used for signing the archive itself,
+ # not its contents), so skip them for now.
+ key_types = [
+ SigningKeyType.UEFI,
+ SigningKeyType.KMOD,
+ SigningKeyType.OPAL,
+ SigningKeyType.SIPL,
+ SigningKeyType.FIT,
+ ]
return key_types
def getKeysPerType(self, dir):
diff --git a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
index d20e676..5023395 100644
--- a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
@@ -124,7 +124,14 @@ class TestSyncSigningKeysScript(TestCaseWithFactory):
def test_get_key_types(self):
script = self.makeScript([])
key_types = script.getKeyTypes()
- self.assertEqual(SigningKeyType.items, key_types)
+ expected_key_types = [
+ SigningKeyType.UEFI,
+ SigningKeyType.KMOD,
+ SigningKeyType.OPAL,
+ SigningKeyType.SIPL,
+ SigningKeyType.FIT,
+ ]
+ self.assertEqual(expected_key_types, key_types)
def test_get_key_types_with_selection(self):
script = self.makeScript(["--type", "UEFI"])