warning: Unsupported version of key: V3, packet search not working

During install and whenever I use the zypper command I get “warning: Unsupported version of key: V3” what does this mean and how can I fix this?
Secondly I use programmes on my computer which are not in the standard repositories. Some of them require more than one repo, e.g. when special programming languages (e.g. python) are involved. To check whether these are updated I used the packet search site (https://software.opensuse.org/search) and when I type in e.g. firejail, jitsi, etc I get no results, even though when I check manually e.g. the home:tiwai repo I find that the repo for Leap15 which includes firejail is available. At the moment it seems that the packet search site includes only the main repos and therefore it is useless if I look for other software.

Maybe you have the same problem as just solved through your bug 1096142. First, try:

lsattr /etc | sort

If the “i” flag shows up on any of the listed files, you may need to chattr -i as you did from the bug. If it doesn’t, you may need to find one or more in one of the subdirectories in /etc/. If you

journalctl | grep -A4 -B4 V3

you may spot a clue where one might be.

I am guessing here.

I think that is about version 3 pgp (or gpg) keys. Those are keys that date back to the era of pgp 2.6.x. They are no longer supported by gpg-2.2.x as is used with Leap 15.0.

I guess you have one of those older keys in your rpm database. You can list keys by clicking on “GPG Keys” in Yast Software Repositories. I’m not sure how you tell which ones are version 3, except that those will be fairly old (probably from 2000 or earlier).

re mrmazda: there were no more immutable attributes in the /etc directory and the journalctl file only showed:

Jun 10 09:28:44 linux-tl1r.site packagekitd[3322]: warning: Unsupported version of key: V3
....
Jun 10 09:36:12 linux-tl1r.site PackageKit[3322]: get-updates transaction /7_ddbcaaee from uid 1000 finished with success after 5304ms

re nrickert: I had several expired keys which I deleted now but I still get warning: Unsupported version of key: V3
Thank you both for your help but no success yet.

I am seeing an expired key, but that does not seem to cause problems.

Maybe check logs to see if there is something there that identifies the bad key.

I had a look at zypper.log and there is a repetitionof those lines:

2018-06-10 10:29:33 <1> linux-tl1r.site(8662) [zypp++] librpmDb.cc(DbDirInfo):519   V3:     /var/lib/rpm/packages.rpm{[2-No such file or directory]}
2018-06-10 10:29:33 <1> linux-tl1r.site(8662) [zypp++] librpmDb.cc(DbDirInfo):519   V3ToV4: /var/lib/rpm/packages.rpm3{[2-No such file or directory]}
2018-06-10 10:29:33 <1> linux-tl1r.site(8662) [zypp++] RpmDb.cc(internal_initDatabase):474 Initial state: V4(X--)V3(---): '(/)/var/lib/rpm'[librpmDb CLOSED '(/)/var/lib/rpm']
2018-06-10 10:29:33 <1> linux-tl1r.site(8662) [zypp++] RpmDb.cc(internal_initDatabase):493 Access state: V4(X--)V3(---): '(/)/var/lib/rpm'[ReferenceCounted(@0x5613e5291490<=1){NULL(/)/var/lib/rpm}]
2018-06-10 10:29:34 <1> linux-tl1r.site(8662) [zypp] RpmDb.cc(initDatabase):424 InitDatabase: RpmDb[V4(X--)V3(---): '(/)/var/lib/rpm']
2018-06-10 10:29:34 <1> linux-tl1r.site(8662) [zypp] RpmDb.cc(closeDatabase):720 Calling closeDatabase: RpmDb[V4(X--)V3(---): '(/)/var/lib/rpm']
2018-06-10 10:29:52 <1> linux-tl1r.site(8688) [zypp++] librpmDb.cc(DbDirInfo):519   V3:     /var/lib/rpm/packages.rpm{[2-No such file or directory]}
2018-06-10 10:29:52 <1> linux-tl1r.site(8688) [zypp++] librpmDb.cc(DbDirInfo):519   V3ToV4: /var/lib/rpm/packages.rpm3{[2-No such file or directory]}
2018-06-10 10:29:52 <1> linux-tl1r.site(8688) [zypp++] RpmDb.cc(internal_initDatabase):474 Initial state: V4(X--)V3(---): '(/)/var/lib/rpm'[librpmDb CLOSED '(/)/var/lib/rpm']

Maybe you understand more - I looked for the V3 key in there.

I’m not seeing any useful hints there.

I see “V3ToV4” which makes me wonder whether this is something other than the gpg version being referenced.
Or perhaps that is unrelated.

I can only add that this warning appears with the rpm command as well. But that is only to be expected… I was filtering (grep) the zypper.log file for V3 - may be I should try to add e.g. key…

How about?:

rpm --rebuilddb

I tried that as well without result - by the way the command is rpmdb --rebuilddb.

Interesting. Somehow, rpm --rebuilddb, which does not exist in the rpm man page, manages to call rpmdb, which I’ve been doing many many moons, not knowing that /usr/bin/rpmdb existed.

You can add a key with “rpmkeys”. I’m doubting that will help.

I had the same problem and found this, which seems to have helped.

I found it too, but when running the command I get more than a hundred errors


 # rpm -vv -qf /etc |more

.....

D:  read h#    6342 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6343 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6344 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6345 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6346 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6347 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6348 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6349 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6350 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6351 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6352 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6353 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6354 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6355 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6356 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6357 Header sanity check: OK
advertencia:Unsupported version of key: V3
D:  read h#    6358 Header sanity check: OK
......


Is there a way to delete all old keys at once?

regards

I din, but it didn’t work


#lsattr /etc | sort

....
--------------e---- /etc/zypp
-----------I--e---- /etc/brltty
-----------I--e---- /etc/xdg
-----------I--e---- /etc/xscreensaver



after


chattr -i /etc/xscreensaver


I get again the same output of #lsattr /etc | sort

Still trying to solve the problem

I did


rpm -vv -qf /etc   2>error-rpm.txt

it gave me a very big file, so I use kwrite and find&replace and grep from clean it and have a file with just the code numbers (more than 1000) in one line: 692 2698 2863 4071 4077 4078 4079 4080 4081 …

then I create a script


#!/bin/bash

for key in  692    2698    2863    4071   ..........
do
  rpm -q --querybynumber $key
done

runing it returned this


fernando@andromeda:~/tmp> ./limpiarpm.sh             
crossover-18.1.0-1.i386
gpg-pubkey-23312922-5bbbcc32
gpg-pubkey-0d210a40-5c1e990d
gpg-pubkey-d6d11ce4-5c41a29b
fernando@andromeda:~/tmp>




and each one of them reports the same errors

aldebaran:~ # rpm -qi gpg-pubkey-23312922-5bbbcc32
warning: Unsupported version of key: V3
warning: Unsupported version of key: V3
warning: Unsupported version of key: V3

.......  a lot of ........

warning: Unsupported version of key: V3
warning: Unsupported version of key: V3
warning: Unsupported version of key: V3
package gpg-pubkey-23312922-5bbbcc32 is not installed

So the problem seems to be not something that is there but something there isn’t.