Red Hat Bugzilla – Bug 495778
If the text that accompanies a Solaris patch/patch cluster contains Unicode characters, rhnpush will generate an intriguing ISE
Last modified: 2009-09-10 15:41:14 EDT
Description of problem:
If a user attempts to push a custom patch or patch cluster and the text accompanying this patch or cluster contains a Unicode character (such as u'\xb7'), rhnpush will generate an ISE, containing the following Python traceback:
Exception Handler Information
Traceback (most recent call last):
File "/usr/share/rhn/server/apacheUploadServer.py", line 107, in _wrapper
ret = function(req)
File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 145, in handler
File "/usr/share/rhn/server/rhnPackageUpload.py", line 223, in push_package
File "/usr/share/rhn/server/importlib/mpmSource.py", line 215, in create_package
File "/usr/share/rhn/server/importlib/mpmSource.py", line 88, in populate
File "/usr/share/rhn/server/importlib/headerSource.py", line 135, in populate
File "/usr/share/rhn/server/importlib/headerSource.py", line 57, in populate
val = str(val)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 4: ordinal not in range(128)
Since, to the best of my knowledge, Unicode is included on modern-day Solaris machines, it seems that we're assuming we'll be receiving ASCII text from the server side, and when we don't receive it, the Unicode codec bombs.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a patch or patch cluster whose accompanying text includes a Unicode character that the ascii codec cannot encode to Unicode
2. Upload this patch or patch cluster to a Solaris box registered to a Satellite
3. rhnpush that patch or patch cluster
ISE and traceback e-mail similar to attached traceback e-mail
Steve, what happens when you install the patch cluster on the Solaris box manually, not via Satellite? Will it work as expected?
I wouldn't like use to change the behaviour of rhnpush this late in Satellite 5.3.0 release time, only to find out that the UTF-8 characters bomb in native Solaris toolchain.
I've reproduced the problem.
Fixed in Spacewalk repo, 8803cf9c8ac68f2a3146af2086d20689ab2611d6 and dd570b6d10c1e3f008c3c1e4488a402101f5ee2f.
It's probably moot by this point, but upon all supported Solaris permutations, all Unicode-laden patch clusters installed successfully when the installation was performed manually.
VERIFIED on 5/29 build.
Release Pending. Looks good on latest Stage Satellite.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.