Description of problem: sosreport appends a new line char (\n) after gathered command shell output. While this seems like an intention, behaviour now differs for RHEL6 and RHEL5, where line is not appended. It seems to me we can remove this additional new line char in RHEL6 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. sosreport --batch -o general 2. tar xf /tmp/sosreport-xxx.tar.xz 3. cat ./xxx/sos_commands/general/date 4. date Actual results: Tue Aug 21 16:56:21 CEST 2012\n\n Expected results: Tue Aug 21 16:56:21 CEST 2012\n Additional info:
This actually seems to be a python thing - we don't do anything to add the traling newline, it appears to just be a consequence of slurping the file up in pipe.communicate(). In RHEL5 we added a tweak to delete the last char if it is a '\n' (helpers.py::sosGetCommandOutput()). I'll do the same in 6 for consistency.
Before: [root@rhel6-vm1 tmp]# cat rhel6-vm1-2012101715141350483291/sos_commands/general/date Wed Oct 17 15:14:56 BST 2012 [root@rhel6-vm1 tmp]# After: [root@rhel6-vm1 tmp]# cat rhel6-vm1-2012101715171350483426/sos_commands/general/date Wed Oct 17 15:17:07 BST 2012 [root@rhel6-vm1 tmp]#
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-0474.html