Bug 1392452

Summary: Importing RPM with non-UTF8 chars in description fails
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.4CC: bbuckingham, jcallaha, mhrivnak, pmoravec
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-21 18:58:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavel Moravec 2016-11-07 14:23:54 UTC
Description of problem:
Importing RPM with non-UTF8 chars in description fails with "pulp_rpm.plugins.importers.yum.upload:ERROR: (22882-39584) unexpected error occurred importing uploaded file: strings in documents must be valid UTF-8:" error.


Version-Release number of selected component (if applicable):
pulp-rpm-plugins-2.8.7.3-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. Have a RPM with non-UTF8 chars in %description. (to get thatm have whatever SRPM, replace %description by e.g. http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt and rpmbuild)
2. Have a custom product and a repo in it
3. Try to upload that RPM to it:

hammer -u admin -p redhat repository upload-content --organization-id=1 --id=14 --product-id=164 --path=nonUTF8.rpm 


Actual results:
Failed to upload file 'nonUTF8.rpm' to repository. Please check the file and try again.

/var/log/messages having backtrace like in https://pulp.plan.io/issues/1903


Expected results:
Upload passes


Additional info:
Simply backport https://pulp.plan.io/issues/1903 to Satellite's pulp. I have verified it works well :)

Comment 8 pulp-infra@redhat.com 2016-11-21 18:54:34 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2016-11-21 18:54:37 UTC
The Pulp upstream bug priority is at Low. Updating the external tracker on this bug.

Comment 10 Brian Bouterse 2016-11-21 18:58:15 UTC
Closing as duplicate of 1333110. Both issues are associated with the same upstream Pulp bug.

*** This bug has been marked as a duplicate of bug 1333110 ***