Bug 1343653 - Uploading binary file by rhncfg-manager doesn't work in Fedora 23
Summary: Uploading binary file by rhncfg-manager doesn't work in Fedora 23
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2016-06-07 15:12 UTC by Pavel Studeník
Modified: 2017-09-27 19:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-27 19:10:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2016-06-07 15:12:19 UTC
Description of problem:
I try to upload binary file to configuration channel by rhncfg-manager, but I receive traceback and file is not uploaded. Uploading plain text works correct.

Version-Release number of selected component (if applicable):
rhncfg-5.10.93-1.fc23.noarch

How reproducible:
always on Fedora 23+

Steps to Reproduce:
0. create configuration channel basic-channel 
1. dd if=/dev/urandom of=binary.dat bs=1 count=1K
2. rhncfg-manager add binary.dat -c basic-channel 

Actual results:
Pushing to channel basic-channel:
Traceback (most recent call last):
  File "/usr/bin/rhncfg-manager", line 46, in <module>
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 218, in main
    handler.run()
  File "/usr/share/rhn/config_management/rhncfg_add.py", line 128, in run
    selinux_ctx=selinux_ctx)
  File "/usr/share/rhn/config_management/rpc_repository.py", line 154, in put_file
    delim_start=delim_start, delim_end=delim_end)
  File "/usr/share/rhn/config_common/repository.py", line 196, in _make_file_info
    file_contents = open(local_path, "r").read()
  File "/usr/lib64/python3.4/codecs.py", line 319, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb9 in position 0: invalid start byte

Comment 1 Pavel Studeník 2016-06-07 15:29:09 UTC
fix: https://github.com/spacewalkproject/spacewalk/pull/429

Comment 2 Eric Herget 2017-09-27 19:10:30 UTC
This looks like it was fixed in previous release, but I'm closing it in this one.

Spacewalk 2.7 has been released.

https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27


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