Bug 443972

Summary: gnome-packagekit freezes if package signature key is not found
Product: [Fedora] Fedora Reporter: petrosyan
Component: gnome-packagekitAssignee: Robin Norwood <robin.norwood>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: lmacken, mjw, richard, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: PackageKit-0.1.12-7.20080425.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-25 22:44:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description petrosyan 2008-04-24 13:23:14 UTC
Description of problem:
If package signature GPG key is not found gnome-packagekit freezes during upgrade.

Version-Release number of selected component (if applicable):
gnome-packagekit-0.1.12-5.20080416git.fc9.x86_64

Steps to Reproduce:
1. Install Fedora rawhide.
2. Go to "System/Administration/Update System" and start updating the system.

Actual results:
gnome-packagekit downloads all the updates and starts installing them, but
freezes during "Checking signatures" stage.

Additional info:
Running 'yum upgrade' from a terminal shows the following prompt

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Importing GPG key 0x4F2A6FD2 "Fedora Project <fedora>" from
/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]: y

After which the upgrade proceeds normally.

Comment 1 Luke Macken 2008-04-25 03:41:33 UTC
I think this may be similar to an issue that I just hit.

Installing the Adobe yum repo, and trying to `pkcon install flash-plugin`,
yields "The daemon crashed mid transaction. This is bad".

The daemon is dying with this:

 - stdout from 0x24deb00 = 'repo-signature-required
flash-plugin;9.0.124.0-release;i386;adobe-linux-i386	adobe-linux-i386
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux	Adobe Systems Incorporated
(Linux RPM Signing Key) <secure>	F6777C67	<bound method
public_key.fingerprint of <yum.pgpmsg.public_key instance at 0x395e440>>
1172681145	GPG'
TI:23:37:26	TH:0x24dc4f0	FI:pk-backend-spawn.c	FN:pk_backend_spawn_parse_stdout,321
 - invalid command 'repo-signature-required'


Comment 2 Richard Hughes 2008-04-25 11:20:50 UTC
Luke, does the daemon crash? The invalid command thing is harmless - it
certainly shouldn't make the tools crash. Could you do:

pkcon --verbose install flash-plugin

Thanks dude.


Comment 3 Mark Wielaard 2008-04-25 12:40:42 UTC
I am seeing something similar trying to upgrade from Fedora 9 Preview. The gui
just hangs display "Checking signatures". The pkcon output is as follows:

$ pkcon --verbose update-system
TI:14:22:01     TH:0x961a458    FI:pk-debug.c   FN:pk_debug_init,248
 - Verbose debugging 1 (on console 1)
TI:14:22:01     TH:0x961a458    FI:pk-connection.c     
FN:pk_connection_connection_changed_cb,129
 - emit connection-changed: 1
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_connect,3343
 - connect
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_connect,3343
 - connect
TI:14:22:01     TH:0x961a458    FI:pk-console.c FN:main,1226
 -
actions=cancel;get-depends;get-description;get-files;get-requires;what-provides;get-updates;get-update-detail;install-package;install-file;refresh-cache;remove-package;resolve;search-details;search-file;search-group;search-name;update-package;update-system;get-repo-list;repo-enable;repo-set-data
TI:14:22:01     TH:0x961a458    FI:pk-client.c 
FN:pk_client_allocate_transaction_id,1262
 - Got tid: '10;cdeeebea;data'
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_change_status,633
 - emit status-changed wait
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_change_status,633
 - emit status-changed setup
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_locked_cb,873
 - emit locked 1
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_locked_cb,873
 - emit locked 1
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_allow_cancel_cb,892
 - emit allow-cancel 1
TI:14:22:01     TH:0x961a458    FI:pk-client.c  FN:pk_client_progress_changed_cb,622
 - emit progress-changed 0, 101, 351, 0
   
[..................................................................................................................................................]
   0%          TI:14:22:01     TH:0x961a458    FI:pk-client.c 
FN:pk_client_change_status,633
 - emit status-changed running
TI:14:22:03     TH:0x961a458    FI:pk-client.c  FN:pk_client_change_status,633
 - emit status-changed dep-resolve
TI:14:22:03     TH:0x961a458    FI:pk-client.c  FN:pk_client_progress_changed_cb,622
 - emit progress-changed 101, 101, 2653, 0
   
[.................................................................................................===..............................................]
               TI:14:22:12     TH:0x961a458    FI:pk-client.c 
FN:pk_client_allow_cancel_cb,892
 - emit allow-cancel 1
TI:14:22:12     TH:0x961a458    FI:pk-client.c  FN:pk_client_progress_changed_cb,622
 - emit progress-changed 10, 101, 11309, 0
   
[==============....................................................................................................................................]
  10%          TI:14:22:12     TH:0x961a458    FI:pk-client.c 
FN:pk_client_change_status,633
 - emit status-changed download
TI:14:22:12     TH:0x961a458    FI:pk-client.c  FN:pk_client_progress_changed_cb,622
 - emit progress-changed 40, 101, 11609, 0
   
[==========================================================........................................................................................]
  40%          TI:14:22:12     TH:0x961a458    FI:pk-client.c 
FN:pk_client_change_status,633
 - emit status-changed sig-check
TI:14:22:12     TH:0x961a458    FI:pk-connection.c     
FN:pk_connection_connection_changed_cb,129
 - emit connection-changed: 0
The daemon crashed mid transaction. This is bad


yum upgrade gives:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Importing GPG key 0x4F2A6FD2 "Fedora Project <fedora>" from
/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]:


Comment 4 Richard Hughes 2008-04-25 14:56:10 UTC
Cool, thanks. I've spotted the bug, I'll build a new RPM for KOJI now.

Comment 5 Richard Hughes 2008-04-25 15:27:44 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=583037 -- please test. Thanks.

Comment 6 Luke Macken 2008-04-25 16:08:27 UTC
That fixes the daemon crash, thanks Richard!  This is now the output:

TI:12:07:04	TH:0x12b94f0	FI:pk-client.c	FN:pk_client_change_status,633
 - emit status-changed sig-check
TI:12:07:04	TH:0x12b94f0	FI:pk-client.c	FN:pk_client_error_code_cb,863
 - emit error-code 4, GPG key F6777C67 required

Error: gpg-failure : GPG key F6777C67 required
TI:12:07:04	TH:0x12b94f0	FI:pk-client.c	FN:pk_client_change_status,633
 - emit status-changed finished
TI:12:07:05	TH:0x12b94f0	FI:pk-client.c	FN:pk_client_finished_cb,587
 - emit finished failed, 6310


Comment 7 Richard Hughes 2008-04-25 17:19:27 UTC
Cool. That's pretty much what we can do for F9 - the other GPG key import stuff
relies on the new DBUS interface for multiple queued transactions that's in
head. Somepoint during F9, we'll roll out 0.2.x with the new GPG coolness and
the policykit improvements.

Comment 8 Will Woods 2008-04-25 19:41:07 UTC
The problem is: 
1) new Fedora installs do not start with GPG keys imported. 
2) GPG keys must be imported before any updates can be installed.

So unless PK can prompt you for GPG key import, you can't get any updates. Which
means that pushing an update that allows GPG key import can't fix the problem.

Comment 9 Will Woods 2008-04-25 22:44:29 UTC
Inability to import GPG keys is bug #443445.

This bug - the crash/hang when encountering signed packages for which we lack
the key - is fixed in PackageKit-0.1.12-7.20080425.fc9.