launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00841
[Merge] lp:~wgrant/launchpad/ppa-key-name into lp:launchpad/devel
William Grant has proposed merging lp:~wgrant/launchpad/ppa-key-name into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#628768 PPA signing keys should be named after the person, not the PPA
https://bugs.launchpad.net/bugs/628768
While PPA signing keys are shared between all of a person's PPAs, their name is derived from the PPA for which they are initially generated. This results in confusingly-named keys.
This branch switches the naming template from 'Launchpad <archive.displayname>' to 'Launchpad PPA for <archive.owner.displayname>', fixing bug #628768.
There is no lint.
--
https://code.launchpad.net/~wgrant/launchpad/ppa-key-name/+merge/34408
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/ppa-key-name into lp:launchpad/devel.
=== modified file 'lib/lp/archivepublisher/archivesigningkey.py'
--- lib/lp/archivepublisher/archivesigningkey.py 2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/archivesigningkey.py 2010-09-02 12:12:54 +0000
@@ -74,7 +74,8 @@
self.archive.signing_key = default_ppa.signing_key
return
- key_displayname = "Launchpad %s" % self.archive.displayname
+ key_displayname = (
+ "Launchpad PPA for %s" % self.archive.owner.displayname)
secret_key = getUtility(IGPGHandler).generateKey(key_displayname)
self._setupSigningKey(secret_key)
=== modified file 'lib/lp/archivepublisher/tests/archive-signing.txt'
--- lib/lp/archivepublisher/tests/archive-signing.txt 2010-08-23 16:51:11 +0000
+++ lib/lp/archivepublisher/tests/archive-signing.txt 2010-09-02 12:12:54 +0000
@@ -1,4 +1,5 @@
-= Archive signing =
+Archive signing
+===============
`IArchive ` objects may be signed using its a IGPGKey pointed by its
'signing_key' attribute.
@@ -25,7 +26,8 @@
>>> z.setUp()
-== Querying 'pending signing key' PPAs ==
+Querying 'pending signing key' PPAs
+-----------------------------------
`IArchiveSet.getPPAsPendingSigningKey` allows call-sites to query for
PPA pending signing key generation.
@@ -112,7 +114,8 @@
PPA for Celso Providelo
-== Generating a PPA signing key ==
+Generating a PPA signing key
+----------------------------
As mentioned above, generated signing_keys will be stored in a
location defined by the system configuration.
@@ -220,7 +223,8 @@
>>> print signing_key.can_encrypt
False
-The generated key UID follows "Launchpad %(ppa.displayname)s" format.
+The generated key UID follows the "Launchpad PPA for %(person.displayname)s"
+format.
>>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
>>> gpghandler = getUtility(IGPGHandler)
@@ -331,11 +335,13 @@
>>> naked_gpghandler.generateKey = mock_key_generator
When the signing key for the named-ppa is requested, it is generated
-in the default PPA context then propagated to the named-ppa.
+in the default PPA context then propagated to the named-ppa. The key is
+named after the user, even if the default PPA name is something different.
+ >>> cprov.displayname = "Not Celso Providelo"
>>> named_ppa_signing_key = IArchiveSigningKey(named_ppa)
>>> named_ppa_signing_key.generateSigningKey()
- Generating: Launchpad PPA for Celso Providelo
+ Generating: Launchpad PPA for Not Celso Providelo
>>> print cprov.archive.signing_key.fingerprint
447DBF38C4F9C4ED752246B77D88913717B05A8F
@@ -348,7 +354,8 @@
>>> naked_gpghandler.generateKey = real_key_generator
-== Signing PPA repository ==
+Signing PPA repository
+----------------------
`IArchiveSigningKey.signRepository` can be user to sign repositories
for archive which already contains a 'signing_key'.