yadm-dev / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
5.14k stars 177 forks source link

RPM: PGP check for package failed #504

Closed bram-pkg closed 1 week ago

bram-pkg commented 1 week ago

This issue is about

Describe the issue

When installing 3.3.0 on Fedora 41, I get the following error:

PGP check for package "yadm-3.3.0-75.1.noarch" (/var/cache/libdnf5/home_TheLocehiliosan_yadm-07fb60fbd84f8c69/packages/yadm-3.3.0-75.1.noarch.rpm) from repo "home_TheLocehiliosan_yadm" has failed: Problem occurred when opening the package.

I already tried cleaning my cache using

sudo dnf clean all

But that did not solve the issue.

TheLocehiliosan commented 1 week ago

Which distro did this occur for?

bram-pkg commented 1 week ago

Sorry, I forgot to mention. This is Fedora 41.

TheLocehiliosan commented 1 week ago

I attempted installation in a fedora41 container, and I'm not running into any signature problem.

What's the contents of your /etc/yum.repos.d/home:TheLocehiliosan:yadm.repo? Did you accept the key when prompted the first time installing?

What's the output of rpm -qa gpg-pubkey*? I would expect "gpg-pubkey-88ebfc54-59ae0a32" to be one of the installed keys. If not, does rpm -qi gpg-pubkey-* | grep Summary show "home:TheLocehiliosan OBS Project" in any of the output?

avano commented 1 week ago

just for the record, I faced the same issue on fedora 40 and removing and reimporting the key seemed to help:

sudo rpm -e gpg-pubkey-88ebfc54
sudo rpm --import https://download.opensuse.org/repositories/home:/TheLocehiliosan:/yadm/Fedora_40/repodata/repomd.xml.key
bram-pkg commented 1 week ago

My repo file is:

❯ cat /etc/yum.repos.d/home:TheLocehiliosan:yadm.repo

[home_TheLocehiliosan_yadm]
name=Yet Another Dotfiles Manager (Fedora_41)
type=rpm-md
baseurl=https://download.opensuse.org/repositories/home:/TheLocehiliosan:/yadm/Fedora_41/
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/home:/TheLocehiliosan:/yadm/Fedora_41/repodata/repomd.xml.key
enabled=1

It seems the key you mentioned is in fact listed:

❯ rpm -qa 'gpg-pubkey*' | grep 88eb

gpg-pubkey-88ebfc54-59ae0a32

And yes it is listed:

Summary     : home:TheLocehiliosan OBS Project <home:TheLocehiliosan@build.opensuse.org> public key
bram-pkg commented 1 week ago

I adjusted @avano's script to delete and re-import the Fedora 41 key, and it seems to be working fine now.

sudo rpm -e gpg-pubkey-88ebfc54-59ae0a32
sudo rpm --import https://download.opensuse.org/repositories/home:/TheLocehiliosan:/yadm/Fedora_41/repodata/repomd.xml.key
TheLocehiliosan commented 1 week ago

OK, I'm glad it is working. I'm not sure what might be the reason behind this.

bram-pkg commented 1 week ago

I'm not sure either, sorry for bothering you, and thank you @avano!