Description of problem: After last night's Rawhide compose, rpmlint is now completely broken. All invocations of it result in only this output: Traceback (most recent call last): File "/usr/bin/rpmlint", line 381, in <module> main() File "/usr/bin/rpmlint", line 169, in main runChecks(pkg) File "/usr/bin/rpmlint", line 226, in runChecks check.check(pkg) File "/usr/share/rpmlint/TagsCheck.py", line 695, in check self.check_summary(pkg, lang, ignored_words) File "/usr/share/rpmlint/TagsCheck.py", line 903, in check_summary if not Pkg.is_utf8_bytestr(summary): File "/usr/share/rpmlint/Pkg.py", line 168, in is_utf8_bytestr s.decode('UTF-8') AttributeError: 'str' object has no attribute 'decode' Version-Release number of selected component (if applicable): rpmlint-1.10-22.fc31.noarch How reproducible: Always Steps to Reproduce: 1. Run rpmlint on anything 2. 3. Actual results: An AttributeError is thrown. Expected results: Useful output. Additional info:
This is the definition of is_utf8_bytestr, at line 166 of /usr/share/rpmlint/Pkg.py: def is_utf8_bytestr(s): try: s.decode('UTF-8') except UnicodeError: return False return True This crude change to the function is probably not the right fix for the issue, but does allow me to do useful work with rpmlint again: def is_utf8_bytestr(s): try: s.decode('UTF-8') except AttributeError: pass except UnicodeError: return False return True
The fix is a bit more complicated than that, see the upstream bug I attached to this bz.
*** Bug 1693760 has been marked as a duplicate of this bug. ***
This should fix it: https://src.fedoraproject.org/rpms/rpmlint/pull-request/8
Try rpmlint-1.11-1.fc31. However note that we are figuring more and more problematic places in the codebase that fail. Trying to lint an RPM with non-UTF-8 data in headers will most likely crash it.
I confirm rpmlint-1.11-1.fc31.noarch works for me. How could a Fedora's RPM package contain non-UTF-8 data when guidelines state the UTF-8 is mandatory :)
(In reply to Petr Pisar from comment #6) > How could a Fedora's RPM package contain non-UTF-8 data when guidelines > state the UTF-8 is mandatory :) Exactly!
Ahhh, much better; rpmlint-1.11-2.fc31.noarch works for me. Thank you!
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.