Bug 1310891

Summary: system upgrade from Fedora 23 to Rawhide fails due to rpm-gpg key missing
Product: [Fedora] Fedora Reporter: George R. Goffe <grgoffe>
Component: dnf-plugins-extrasAssignee: rpm-software-management
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: budkin, ignatenko, jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, rpm-software-management, taw, vmukhame, wwoods, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1438503 (view as bug list) Environment:
Last Closed: 2016-02-29 12:46:08 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:

Description George R. Goffe 2016-02-22 22:37:51 UTC
Description of problem:
I was attempting to upgrade my Fedora 23 system to Fedora rawhide and got these messages:

dnf -y system-upgrade download --allowerasing --releasever=rawhide

warning: /var/lib/dnf/system-upgrade/389-ds-base-1.3.4.7-1.fc24.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 81b46521: NOKEY
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64]

The procedure is at: http://www.unixmen.com/fedora-23-is-out-upgrade-to-fedora-23-from-fedora-22/

Version-Release number of selected component (if applicable):

dnf-1.1.6-2.fc23.noarch
How reproducible:
always

Steps to Reproduce:
1.follow the directions but substitute "23" with "rawhide"
2.pray a lot
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jaroslav Mracek 2016-02-29 12:46:08 UTC
Please, according to fedora wiki (https://fedoraproject.org/wiki/DNF_system_upgrade), it is recommended to use dnf -y system-upgrade download --allowerasing --releasever=24, but at the present time it is --releasever=25. Also you can install fedora-repos-rawhide package to get their gpg-key. Please if it doesn't help, please reopen this bug report.

Comment 2 Todd Warner 2017-02-11 21:09:57 UTC
Note. "fedora-repos-rawhide" fails to be installed if you follow these instructions. https://fedoraproject.org/wiki/DNF_system_upgrade and choose rawhide as your target.

Fedora 25 to Rawhide...

```
sudo dnf install dnf-plugin-system-upgrade

# Systemtap got in the way, so needed --allowerasing
sudo dnf system-upgrade download --refresh --releasever=rawhide --allowerasing
```

And... selected "Y" to install everything, but...

```
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64]
```

So, either the existing process needs to do that for you because --releasever=rawhide -- or the process instruction needs to be fixed to add that step.

Thanks. -t

Comment 3 Todd Warner 2017-02-11 21:41:54 UTC
I spoke too soon. That didn't work either.


That did not populate /etc/pki/rpm-gpg with a rawhide key. And... I can't find one anywhere on the Fedora site or anywhere else for that matter.

I had to resort to --nogpg

Comment 4 Evgeny Badin 2017-09-17 23:09:38 UTC
Same problem here, can't upgrade to Rawhide. I have installed fedora-repos-rawhide


...
(1607/1611): zenity-3.24.0-3.fc27.x86_64.rpm     573 kB/s | 756 kB     00:01    
(1608/1611): zip-3.0-20.fc27.x86_64.rpm          371 kB/s | 270 kB     00:00    
(1609/1611): zlib-1.2.11-4.fc27.x86_64.rpm       130 kB/s |  99 kB     00:00    
(1610/1611): zsh-5.4.2-1.fc28.x86_64.rpm         1.2 MB/s | 2.8 MB     00:02    
(1611/1611): zfs-fuse-0.7.2.2-6.fc27.x86_64.rpm  399 kB/s | 1.7 MB     00:04    
---------------------------------------------------------------------------------
Total                                            1.1 MB/s | 1.2 GB     17:50     
warning: /var/cache/dnf/updates-f2bc174df9355ab8/packages/gdb-8.0-25.fc28.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 9db62fb1: NOKEY
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64]
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
sudo dnf system-upgrade download --releasever=rawhide  155.83s user 16.82s system 14% cpu 19:39.06 total

Comment 5 Jaroslav Mracek 2017-09-18 18:19:21 UTC
The problem with gpg-keys is because distro "rawhide" works well for repos url, but it doesn't work at all for location of gpg keys. 

The file file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-rawhide-x86_64 doesn't exist. But proper location would be at the present time:
"/etc/pki/rpm-gpg/RPM-GPG-KEY-28-rawhide-x86_64"

Also I would like to point out that for packages with fc27, the correct location could be "/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-x86_64".

The file originate from fedora-repos in version 27 or 28. 

Additionally there was a bug in dnf-1.1 that disable import gpg-keys for system-upgrade command, but it was solved in dnf-2.6.3-1. Or try to install some package from new distro that doesn't have any complicate dependency. You will import gpg-keys by that operation.


I think that proper solution should be provided by maintainers of fedora-repos package.