Bug 1395881

Summary: showing diff of two binary files is nonsense
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: ClientAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Ales Dujicek <adujicek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: adujicek, eherget, galtukho, ggainey, jdobes, jhutar, pstudeni, satqe-list, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1345843 Environment:
Last Closed: 2017-06-21 12:08:48 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:
Embargoed:
Bug Depends On: 1345841, 1345843    
Bug Blocks: 1397178    

Description Jan Hutař 2016-11-16 21:18:03 UTC
We have tested (or attempted to test) bug like this when Spacewalk 2.6 was to be released. This is a clone of that bug to get it re-tested on Satellite 5.8.0. In some cases bug can be completely irrelevant (in such cases I suggest to close the bug as NOTABUG), in some cases it might be wise to take the bug as a note that something changed in a given area and we might want to sanity-test that area (and mark the bug as VERIFIED with "SanityOnly" keyword) and in some cases bug might be totally relevant to Satellite.



+++ This bug was initially created as a clone of Bug #1345843 +++

+++ This bug was initially created as a clone of Bug #1345841 +++

Description of problem:
I created configuration channels and upload some plain text and some binary files (zips) to them. When I have to compare all local files then I received strings of binary file. I think that it is not good solution. We can look at behaviour bash application 'diff' and we can see:

>> diff /root/binary.dat /dev/null 
Binary files /root/binary.dat and /dev/null differ

Version-Release number of selected component (if applicable):
rhncfg-5.10.74-10.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. create configure channel with binary file
2. subscribe this channel
3. rhncfg-client diff /file.binary
   rhncfg-namager diff /file.binary -c channel

Actual results:
diff two binary files:
+k]r >W_?S-LB9l쳼Ef[lQUlˋe ?LV׊+2az7PՓnYq2Gbq&<5˂r`laT䣛S/5U^>'
                                                               4[sUO.&t[gn/Sێ;n4M=8Wg5|Jΐ(c=IHI-~=0|l(D)$>jm5}'-VY+?M
$zİ23Zo8[}3\0d>wN(nGT1oNj\4!t)u
-kl#GFe9-^Ǟ@S ?0bkVp2fBSUZ}Qo-&ƂC`JI7-jIFU*3o}R-Xy-sy2_P-XukƁx_bM O5XZV&(plR4+"y=-t3    `fq


Expected results:
something as:
Binary files /root/binary.dat and /dev/null differ

--- Additional comment from Eric Herget on 2016-07-29 09:14:05 EDT ---

spacewalk.github:
7a9d0118cd9c0b000c510db7565f9d696867998a

--- Additional comment from Jan Hutař on 2016-11-10 16:55:31 EST ---

I have tested on both SWnightly@OracleXE10@RHEL6 and SWnightly@PostgreSQL@RHEL7 (rhncfg-5.10.98-1.el6.noarch).

Output is now like this:

# rhncfg-client diff /tmp/binary
Using server name <fqdn>
Binary file content differs.
# rhncfg-manager diff /tmp/binary -c bz1358484 
Using server name <fqdn>
--- /tmp/binary	2016-11-10 22:46:59.687109	attributes: -rw-r--r-- root root 	config channel: bz1358484	revision: 1
+++ /tmp/binary	2016-11-10 22:50:15	attributes: -rw-r--r-- root root unconfined_u:object_r:rpm_tmp_t:s0	config channel: local file	revision: None
Binary file content differs

=> VERIFIED

Comment 5 Tomas Lestach 2017-10-13 15:16:02 UTC
*** Bug 1345841 has been marked as a duplicate of this bug. ***