PQM

Expired GPG key for PQM user not handled gracefully

Bug #242797 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PQM
Triaged
High
Unassigned

Bug Description

If the GPG key for the user running PQM expires, all merge requests will fail with the following traceback:

gpg: no default secret key: unusable secret key
gpg: [stdin]: clearsign failed: unusable secret key
Traceback (most recent call last):
  File "/home/pqm/pqm/bin/pqm", line 435, in ?
    run(pqm_subdir, run_mode, queuedir, logger, logdir, mail_reply, mail_server, from_address, fromaddr, print_report)
  File "/home/pqm/pqm/bin/pqm", line 201, in run
    do_run_mode(queuedir, logger, logdir, mail_reply, mail_server, from_address, fromaddr, print_report)
  File "/home/pqm/pqm/bin/pqm", line 91, in do_run_mode
    run_one_script(logger, script, logdir, goodscripts, badscripts, mail_reply, mail_server, from_address, fromaddr)
  File "/home/pqm/pqm/bin/pqm", line 125, in run_one_script
    (successes, unrecognized, output) = script.run()
  File "/home/pqm/pqm/pqm/__init__.py", line 221, in run
    command_result = command.run()
  File "/home/pqm/pqm/pqm/__init__.py", line 787, in run
    line='merge %s %s' % (self.from_branch, self.to_branch))
  File "/home/pqm/pqm/pqm/__init__.py", line 547, in do_merge
    self.get_vcs().commit(sender, dir, self.commitmsg, to_repo_revision, config)
  File "/home/pqm/pqm/pqm/__init__.py", line 1395, in commit
    tree.commit(summary, verbose=False)
  File "<string>", line 4, in commit_write_locked
  File "/home/pqm/source/bzr.dev/bzrlib/workingtree_4.py", line 246, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "<string>", line 4, in commit_write_locked
  File "/home/pqm/source/bzr.dev/bzrlib/mutabletree.py", line 187, in commit
    revprops=revprops, *args, **kwargs)
  File "/home/pqm/source/bzr.dev/bzrlib/commit.py", line 373, in commit
    self.rev_id = self.builder.commit(self.message)
  File "/home/pqm/source/bzr.dev/bzrlib/repository.py", line 138, in commit
    self.new_inventory, self._config)
  File "<string>", line 4, in add_revision_write_locked
  File "/home/pqm/source/bzr.dev/bzrlib/repository.py", line 547, in add_revision
    self.store_revision_signature(
  File "<string>", line 4, in store_revision_signature_write_locked
  File "/home/pqm/source/bzr.dev/bzrlib/repository.py", line 1107, in store_revision_signature
    signature = gpg_strategy.sign(plaintext)
  File "/home/pqm/source/bzr.dev/bzrlib/gpg.py", line 98, in sign
    raise errors.SigningFailed(self._command_line())
bzrlib.errors.SigningFailed: Failed to gpg sign data with command "['gpg', '--clearsign']"

The failure message sent to the submitter will be:

Failed to gpg sign data with command "['gpg', '--clearsign']"

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 242797] [NEW] Expired GPG key for PQM user not handled gracefully

Not a bug with the pqm software

 status invalid

Changed in pqm:
status: New → Invalid
Revision history for this message
Tom Haddon (mthaddon) wrote :

I don't see why this isn't a bug. I'm not saying the bug is that it doesn't accept an expired key - the bug is that it doesn't give a sane explanation of what the problem is. This exception should be handled and it should explain to the submitter what the problem is.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 242797] Re: Expired GPG key for PQM user not handled gracefully

On Wed, 2008-06-25 at 00:04 +0000, Tom Haddon wrote:
> I don't see why this isn't a bug. I'm not saying the bug is that it
> doesn't accept an expired key - the bug is that it doesn't give a sane
> explanation of what the problem is. This exception should be handled and
> it should explain to the submitter what the problem is.

 title signingfailure exceptions are not caught
 status triaged
 importance high

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Changed in pqm:
importance: Undecided → High
status: Invalid → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

Same error shows up if you don't have your official keys present on the machine in question. (I did have some keys in .gnupg/ for a couple ppas, but not any real keys.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.