Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
When a package had a UTF-8 encoding error in the description, or the description was encoded in a different character set, then rpmlint terminated unexpectedly with a segmentation fault. With this update, rmplint returns an error message that the description has incorrectly encoded UTF-8 data (tag-not-utf8 error), and crashes no longer occur in the described scenario.
Description of problem:
When a package has a UTF-8 encoding error in description (or description encoded in some other charset) rpmlint crashes.
Version-Release number of selected component (if applicable):
rpmlint-0.94-2.el6.noarch
How reproducible:
Always
Steps to Reproduce:
1. Create a spec file having characters from other charset in description (e.g. using "echo Łódź | iconv -f utf8 -t cp1250 >> package.spec")
2. Build a package using rpmbuild -ba
3. run "rpmlint -i package.rpm"
Actual results:
rpmlint-test-tag-not-utf8.noarch: W: spelling-error %description -l en_US utf -> fut, Ute, Utah
The value of this tag appears to be misspelled. Please double-check.
0 packages and 0 specfiles checked; 0 errors, 2 warnings.
Traceback (most recent call last):
File "/usr/share/rpmlint/rpmlint.py", line 352, in <module>
main()
File "/usr/share/rpmlint/rpmlint.py", line 158, in main
runChecks(pkg)
File "/usr/share/rpmlint/rpmlint.py", line 218, in runChecks
check.check(pkg)
File "/usr/share/rpmlint/TagsCheck.py", line 650, in check
self.check_description(pkg, lang, ignored_words)
File "/usr/share/rpmlint/TagsCheck.py", line 805, in check_description
spell_check(pkg, utf8desc, '%%description -l %s', lang, ignored_words)
File "/usr/share/rpmlint/TagsCheck.py", line 473, in spell_check
printWarning(pkg, 'spelling-error', fmt % lang, err.word, sug)
File "/usr/share/rpmlint/Filter.py", line 28, in printWarning
_print("W", pkg, reason, details)
File "/usr/share/rpmlint/Filter.py", line 63, in _print
print (s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 74: ordinal not in range(128)
Expected results:
Error message that the description has wrongly encoded utf-8 data (tag-not-utf8 error)
Additional info:
the 'rpmlint' command must be run in non unicode enabled environment:
export LC_ALL=POSIX
export LANG=POSIX
TTY="`/usr/bin/tty`"
# stop unicode
kbd_mode -a
if test -t ; then
printf '\033%%@'
fi
stty -iutf8
uid="`id -u 2>/dev/null`" ||:
if [ "$uid" = '0' ]; then
[ ! -r "$HOME/.kbd/.keymap_sv" ] ||
loadkeys "$HOME/.kbd/.keymap_sv"
fi
in regular interactive shell from Fedora/RHEL it won't crash
Created attachment 757918[details]
Proposed patch
This patch fixes the symptom.
The origin of the problem is that unicode is deactivated in the test envirnoment.
Created attachment 758065[details]
spec file that does cause crash in rpmlint
when rpmlint is run in non unicode enabled terminal, this spec file causes it to crash
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-0948.html
Description of problem: When a package has a UTF-8 encoding error in description (or description encoded in some other charset) rpmlint crashes. Version-Release number of selected component (if applicable): rpmlint-0.94-2.el6.noarch How reproducible: Always Steps to Reproduce: 1. Create a spec file having characters from other charset in description (e.g. using "echo Łódź | iconv -f utf8 -t cp1250 >> package.spec") 2. Build a package using rpmbuild -ba 3. run "rpmlint -i package.rpm" Actual results: rpmlint-test-tag-not-utf8.noarch: W: spelling-error %description -l en_US utf -> fut, Ute, Utah The value of this tag appears to be misspelled. Please double-check. 0 packages and 0 specfiles checked; 0 errors, 2 warnings. Traceback (most recent call last): File "/usr/share/rpmlint/rpmlint.py", line 352, in <module> main() File "/usr/share/rpmlint/rpmlint.py", line 158, in main runChecks(pkg) File "/usr/share/rpmlint/rpmlint.py", line 218, in runChecks check.check(pkg) File "/usr/share/rpmlint/TagsCheck.py", line 650, in check self.check_description(pkg, lang, ignored_words) File "/usr/share/rpmlint/TagsCheck.py", line 805, in check_description spell_check(pkg, utf8desc, '%%description -l %s', lang, ignored_words) File "/usr/share/rpmlint/TagsCheck.py", line 473, in spell_check printWarning(pkg, 'spelling-error', fmt % lang, err.word, sug) File "/usr/share/rpmlint/Filter.py", line 28, in printWarning _print("W", pkg, reason, details) File "/usr/share/rpmlint/Filter.py", line 63, in _print print (s) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 74: ordinal not in range(128) Expected results: Error message that the description has wrongly encoded utf-8 data (tag-not-utf8 error) Additional info: