Bug 1182090

Summary: gnome-software is stuck in a loop when trying to install an app without having repo gpg keys imported
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: gnome-softwareAssignee: Richard Hughes <rhughes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: kalevlember, rhughes, roger.k.wells, samuel-rhbugs, shawn.starr
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libhif-0.1.7-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-17 05:37:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rpm -qa output
none
Packagekitd debug output none

Description Kamil Páral 2015-01-14 12:26:23 UTC
Description of problem:
Due to bug 748320, DVD/netinst installations don't have yum repo gpg keys imported by default, and the user needs to confirm them by hand during their first usage (at least that's how yum works, and how packagekit gui worked).

Unfortunately, gnome-software can't handle this properly at the moment. If you install F21 Workstation from netinst, run gnome-software and try to install some app, it it stuck in a loop, the spinner spins eternally, and I see thousands of the following messages in the logs:

pkmon output (repeated 250 times per minute):
Transactions:
 1	/20_edadbacb
/20_edadbacb	allow_cancel 1
/20_edadbacb	percentage   -1
/20_edadbacb	role         install-packages
/20_edadbacb	status       setup
/20_edadbacb	status       query
/20_edadbacb	percentage   0
/20_edadbacb	percentage   3
/20_edadbacb	percentage   4
/20_edadbacb	percentage   5
/20_edadbacb	percentage   9
/20_edadbacb	status       finished
/20_edadbacb	exit code: need-untrusted
/20_edadbacb	error code: bad-gpg-signature, failed to lookup digest in keyring

journal output (repeated 250 times per minute):
Jan 14 12:53:19 localhost.localdomain polkitd[672]: Operator of unix-session:1 successfully authenticated as unix-user:kparal to gain ONE-SHOT authorization for action org.freedesktop.packagekit.package-install-untrusted for system-bus-name::1.57 [/usr/bin/gnome-software --gapplication-service] (owned by unix-user:kparal)
Jan 14 12:53:19 localhost.localdomain PackageKit[1264]: new install-packages transaction /20_edadbacb scheduled from uid 1000
Jan 14 12:53:19 localhost.localdomain PackageKit[1264]: uid 1000 obtained auth for org.freedesktop.packagekit.package-install-untrusted
Jan 14 12:53:19 localhost.localdomain PackageKit[1264]: install-packages transaction /20_edadbacb from uid 1000 finished with need-untrusted after 95ms
Jan 14 12:53:19 localhost.localdomain PackageKit[1264]: uid 1000 is trying to obtain org.freedesktop.packagekit.package-install-untrusted auth (only_trusted:0)

Closing gnome-software does not help, the window hides but the process continues in the background. Poor user. killall gnome-software helps.


Version-Release number of selected component (if applicable):
gnome-software-3.14.2-2.fc21.x86_64
fedora-repos-21-2.noarch
F21 Server netinst (Workstation installed)

How reproducible:
always

Steps to Reproduce:
1. use F21 Server netinst to install Workstation
2. boot the system
3. run gnome-software
4. try to install any app
5. see that it spins and spins and spins
6. look into pkmon and journalctl output, look at `top`
7. try to close gnome-software
8. look again into logs and `top`
9. killall gnome-software

Actual results:
gnome-software gets stuck and the app is not installed

Expected results:
gnome-software asks for key confirmation and installs the app

Comment 1 Kamil Páral 2015-01-14 13:43:07 UTC
The problem can be "worked around" by importing the key using yum, e.g.:
$ sudo yum install htop -y
and then restarting packagekit service:
$ sudo systemctl restart packagekit.service

gnome-software then successfully installed an app for me. (However, I had issues with subsequent app installations, maybe a reboot would be safer than just restarting the service).

Comment 2 Kamil Páral 2015-01-14 14:12:42 UTC
Forgot to mention packagekit versions:
gnome-packagekit-3.14.2-1.fc21.x86_64
PackageKit-1.0.3-4.fc21.x86_64
PackageKit-cached-metadata-1.0.3-4.fc21.x86_64
PackageKit-command-not-found-1.0.3-4.fc21.x86_64
PackageKit-glib-1.0.3-4.fc21.x86_64
PackageKit-gstreamer-plugin-1.0.3-4.fc21.x86_64
PackageKit-gtk3-module-1.0.3-4.fc21.x86_64

Comment 3 Kamil Páral 2015-01-14 14:26:36 UTC
Offline upgrades are also broken - see bug 1182156.

Comment 4 Kamil Páral 2015-01-14 14:33:15 UTC
Created attachment 980041 [details]
rpm -qa output

libhif-0.1.7-1.fc21.x86_64
rpm-4.12.0.1-4.fc21.x86_64

Comment 5 Kamil Páral 2015-01-14 14:48:42 UTC
According to Richard, the problem might have been fixed recently:
https://github.com/hughsie/libhif/issues/13

And here's a test build:
http://people.freedesktop.org/~hughsient/fedora/21/x86_64/libhif-0.1.8-0.98.20150114git.fc21.x86_64.rpm

Comment 6 Fedora Update System 2015-01-15 09:00:00 UTC
libhif-0.1.7-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libhif-0.1.7-2.fc21

Comment 7 Kamil Páral 2015-01-15 09:41:44 UTC
I tested with https://admin.fedoraproject.org/updates/libhif-0.1.7-2.fc21, that update solves this problem.

Comment 8 Fedora Update System 2015-01-17 05:37:51 UTC
libhif-0.1.7-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Shawn Starr 2015-06-06 03:40:47 UTC
I seem to have broken this in Fedora 21 --> 22 upgrade Says PackageKit:

23:37:47        PackageKit          1 are running                                                                                                                                       
23:37:47        Hif                 Goal has 26 packages                                                                                                                                
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-core-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...  
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-devel-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists... 
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-modules-extra-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...                                                                                                                                                                                 
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-modules-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...                                                                                                                                                                                       
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...       
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/augeas-libs-1.4.0-1.fc22.x86_64.rpm already exists...                           
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-devel-2.11.94-1.fc22.x86_64.rpm already exists...                    
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-2.11.94-1.fc22.i686.rpm already exists...                            
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-2.11.94-1.fc22.x86_64.rpm already exists...                          
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/google-chrome/packages/google-chrome-unstable-45.0.2421.0-1.x86_64.rpm already exists...                 
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/kde-cli-tools-5.3.1-2.fc22.x86_64.rpm already exists...                         
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/kdesu-5.3.1-2.fc22.x86_64.rpm already exists...                                 
23:37:47        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-headers-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...                                                                                                                                                                                       
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-tools-libs-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists...                                                                                                                                                                                    
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/fedora-rawhide-kernel-nodebug/packages/kernel-tools-4.1.0-0.rc6.git2.1.fc23.x86_64.rpm already exists... 
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/kmenuedit-5.3.1-2.fc22.x86_64.rpm already exists...                             
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/kwin-libs-5.3.1-2.fc22.x86_64.rpm already exists...                             
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/kwin-5.3.1-2.fc22.x86_64.rpm already exists...                                  
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/libinput-0.16.0-4.fc22.x86_64.rpm already exists...                             
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/libunwind-1.1-8.fc22.x86_64.rpm already exists...                               
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/libwmf-lite-0.2.8.4-42.fc22.x86_64.rpm already exists...                        
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/libwmf-0.2.8.4-42.fc22.x86_64.rpm already exists...                             
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/numad-0.5-19.20150602git.fc22.x86_64.rpm already exists...                      
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/perl-Getopt-Long-2.46-1.fc22.noarch.rpm already exists...                       
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/perl-Locale-Codes-3.35-1.fc22.noarch.rpm already exists...                      
23:37:48        Hif                 checking if /var/cache/PackageKit/metadata/updates-testing/packages/perl-Module-CoreList-5.20150520-1.fc22.noarch.rpm already exists...             
23:37:48        Hif                 adding lock 2                                                                                                                                       
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-24-primary to rpmdb                                                     
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-23-primary to rpmdb                                                     
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-secondary to rpmdb                                                                  
23:37:48        Hif                 /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-22-primary is already added                                                                      
23:37:48        Hif                 /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux is already added                                                                                           
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-23-primary to rpmdb                                                  
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-primary to rpmdb                                                                    
23:37:48        Hif                 /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-22-primary is already added                                                                   
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-24-primary to rpmdb                                                  
23:37:48        Hif                 /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-22-primary is already added                                                                                     
23:37:48        Hif                 added missing public key /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-22-secondary to rpmdb
23:37:48        Hif                 ignoring as allow-untrusted: package is not signed
23:37:48        Hif                 ignoring as allow-untrusted: package is not signed
23:37:48        Hif                 ignoring as allow-untrusted: package is not signed
23:37:48        Hif                 ignoring as allow-untrusted: package is not signed
23:37:48        Hif                 ignoring as allow-untrusted: package is not signed
23:37:48        Hif                 /var/cache/PackageKit/metadata/updates-testing/packages/augeas-libs-1.4.0-1.fc22.x86_64.rpm has been verified as trusted
23:37:48        Hif                 /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-devel-2.11.94-1.fc22.x86_64.rpm has been verified as trusted
23:37:48        Hif                 /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-2.11.94-1.fc22.i686.rpm has been verified as trusted
23:37:48        Hif                 /var/cache/PackageKit/metadata/updates-testing/packages/fontconfig-2.11.94-1.fc22.x86_64.rpm has been verified as trusted
23:37:48        Hif                 releasing lock 2
23:37:48        PackageKit          emitting error-code bad-gpg-signature, 'failed to lookup digest in keyring'
23:37:48        PackageKit          backend was running for 1215 ms
23:37:48        PackageKit          emitting finished 'need-untrusted', 1215
23:37:48        PackageKit          transaction now finished
23:37:48        PackageKit          1 transactions in list, 0 committed but not finished
23:37:48        PackageKit          CreateTransaction method called
23:37:48        PackageKit          job count now 1899
23:37:48        PackageKit          trying to open database '/var/lib/PackageKit/transactions.db'
23:37:48        PackageKit          job count is now at 1898
23:37:48        PackageKit          transaction now new
23:37:48        PackageKit          setting sender to :1.127
23:37:48        PackageKit          adding transaction 0x55b4a7b1b150
23:37:48        PackageKit          sending object path: '/1899_deecddcc'
23:37:48        PackageKit          UpdatePackages method called: augeas-libs;1.4.0-1.fc22;x86_64;updates-testing&fontconfig-devel;2.11.94-1.fc22;x86_64;updates-testing&fontconfig;2.11.94-1.fc22;i686;updates-testing&fontconfig;2.11.94-1.fc22;x86_64;updates-testing&google-chrome-unstable;45.0.2421.0-1;x86_64;google-chrome&kde-cli-tools;5.3.1-2.fc22;x86_64;updates-testing&kdesu;1:5.3.1-2.fc22;x86_64;updates-testing&kernel-core;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-devel;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-headers;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-modules-extra;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-modules;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-tools-libs;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel-tools;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kernel;4.1.0-0.rc6.git2.1.fc23;x86_64;fedora-rawhide-kernel-nodebug&kmenuedit;5.3.1-2.fc22;x86_64;updates-testing&kwin-libs;5.3.1-2.fc22;x86_64;updates-testing&kwin;5.3.1-2.fc22;x86_64;updates-testing&libinput;0.16.0-4.fc22;x86_64;updates-testing&libunwind;1.1-8.fc22;x86_64;updates-testing&libwmf-lite;0.2.8.4-42.fc22;x86_64;updates-testing&libwmf;0.2.8.4-42.fc22;x86_64;updates-testing&numad;0.5-19.20150602git.fc22;x86_64;updates-testing&perl-Getopt-Long;2.46-1.fc22;noarch;updates-testing&perl-Locale-Codes;3.35-1.fc22;noarch;updates-testing&perl-Module-CoreList;1:5.20150520-1.fc22;noarch;updates-testing (transaction_flags: none)
23:37:48        PackageKit          changing transaction to exclusive mode
23:37:48        PackageKit          transaction now waiting-for-auth
23:37:48        PackageKit          authorizing action org.freedesktop.packagekit.package-install-untrusted
23:37:52        PackageKit          transaction /1898_aeaeebbe completed, removing
23:37:52        PackageKit          emitting destroy /1898_aeaeebbe

Comment 10 Shawn Starr 2015-06-06 03:41:34 UTC
Created attachment 1035537 [details]
Packagekitd debug output

Comment 11 Shawn Starr 2015-06-06 03:45:30 UTC
I note this with Plasma 5.x/KDE and PackageKit interaction not gnome-software. So spinning a new BZ off