Bug 2040673 - keychecker is broken on systems that use dnf
Summary: keychecker is broken on systems that use dnf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: keychecker
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-14 12:57 UTC by Trevor Hemsley
Modified: 2022-02-09 02:07 UTC (History)
2 users (show)

Fixed In Version: keychecker-1.0-13.fc36 keychecker-1.0-13.fc35 keychecker-1.0-13.fc34
Clone Of:
Environment:
Last Closed: 2022-01-31 02:20:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trevor Hemsley 2022-01-14 12:57:19 UTC
Description of problem:
keychecker is totally broken on operating systems that use dnf instead of yum. It depends on rpmUtils which was a python library bundled as part of yum and no longer exists with the dnf rewrite.

Version-Release number of selected component (if applicable):
Fedora 34 copy is keychecker-1.0-10.fc34.noarch

How reproducible:
Always

Steps to Reproduce:
1. dnf install keychecker
2. run keychcker
3.

Actual results:
Traceback (most recent call last):
  File "/usr/bin/keychecker", line 197, in <module>
    buildKeyList()
  File "/usr/bin/keychecker", line 61, in buildKeyList
    pubkeys[hdr[rpm.RPMTAG_VERSION].decode()] = hdr[rpm.RPMTAG_SUMMARY].decode()[4:-1]


Expected results:
should produce a list of packages grouped by GPG key.

Additional info: 
I don't think this is fixable and the package should probably be retired. It still works on RHEL7 but on everything subsequent to the replacement of yum by dnf, it will fail.

Comment 1 Carl George 🤠 2022-01-30 23:48:34 UTC
The error message above is missing the last line.

AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

This is a result of a change in rpm 4.15 [0] (which was also backported to EL8 [1]).  I've submitted the fix upstream [2], and will add the fix as a patch to the Fedora package.

[0] https://github.com/rpm-software-management/rpm/commit/84920f898315d09a57a3f1067433eaeb7de5e830
[1] https://access.redhat.com/errata/RHBA-2019:3584
[2] https://github.com/jds2001/keychecker/pull/2

Comment 2 Fedora Update System 2022-01-31 02:19:34 UTC
FEDORA-2022-e5f9d4b0ac has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e5f9d4b0ac

Comment 3 Fedora Update System 2022-01-31 02:20:30 UTC
FEDORA-2022-e5f9d4b0ac has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2022-01-31 02:33:19 UTC
FEDORA-2022-85b2e203bc has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-85b2e203bc

Comment 5 Fedora Update System 2022-01-31 02:33:20 UTC
FEDORA-2022-5c1dfb40e7 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5c1dfb40e7

Comment 6 Fedora Update System 2022-02-01 01:05:59 UTC
FEDORA-2022-5c1dfb40e7 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5c1dfb40e7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5c1dfb40e7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-02-01 01:59:46 UTC
FEDORA-2022-85b2e203bc has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-85b2e203bc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-85b2e203bc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-02-09 01:17:30 UTC
FEDORA-2022-85b2e203bc has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2022-02-09 02:07:18 UTC
FEDORA-2022-5c1dfb40e7 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.