When using --rpmv6 on v4 packages (or --rpmv4 on v6 packages) using a OpenPGP v6 key of a v4 compatible algorithm (RSA/ECDSA/EDDSA), rpmsign will make a compatibility copy the signature into one of RPMSIGTAG_DSA or RPMSIGTAG_RSA but rpm 4.x can NOT verify such a signature.
Commit ad114b0 was a related fix, but just looking at the algorithm is not enough, we need to also check the signature version and only make a compatibility signature copy if the signature version is 3 or 4 and using a compatible algorithm.
When using --rpmv6 on v4 packages (or --rpmv4 on v6 packages) using a OpenPGP v6 key of a v4 compatible algorithm (RSA/ECDSA/EDDSA), rpmsign will make a compatibility copy the signature into one of RPMSIGTAG_DSA or RPMSIGTAG_RSA but rpm 4.x can NOT verify such a signature.
Commit ad114b0 was a related fix, but just looking at the algorithm is not enough, we need to also check the signature version and only make a compatibility signature copy if the signature version is 3 or 4 and using a compatible algorithm.