Bug 628920

Summary: rhncfg-manager diff - fails to compare two files.
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: ClientAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Jiri Kastner <jkastner>
Severity: medium Docs Contact:
Priority: high    
Version: 530CC: cperry, fdewaley, jkastner, msuchy, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhncfg-5.9.27-12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-07 09:23:32 UTC Type: ---
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:    
Bug Blocks: 646488    
Attachments:
Description Flags
How_to_reproduce none

Description Dimitar Yordanov 2010-08-31 12:18:27 UTC
Description of problem:
rhncfg-manager diff  - fails to compare two files.

Version-Release number of selected component (if applicable):
rhncfg-management-5.9.27-1.el5.noarch.rpm

How reproducible:
Always

Steps to Reproduce:
For all commands please see attachment.
#rhncfg-manager diff --channel=$CONF_CHANN  --dest-file=/tmp/tmp/file_test_one /tmp/file_test_one

Cannot diff /tmp/file_test_two; the file on the system is not a symbolic link while the file in the channel is. 
  
Actual results:
Fails

Expected results:
Success 

Additional info:
The problem apears on sat 5.3.0 and Galictica  5.4.0
See Attachment.

Comment 1 Dimitar Yordanov 2010-08-31 12:19:37 UTC
Created attachment 442171 [details]
How_to_reproduce

Comment 7 Miroslav Suchý 2011-01-06 14:33:03 UTC
cherrypickes to satellite.git as commit c1ebddde41862ed60da425154b93f529a436d6c0

Comment 10 Miroslav Suchý 2011-01-14 12:06:36 UTC
Bug in #8  is due incorrectly resolved conflict in cherrypick of 90207ae02dd33a0a07e5e08619d5556e43018a0e (other BZ in the same errata).

Fixed in commit 4936e2bbadbbfc9c62108a8bdd4774b64c7fc839

Comment 12 Miroslav Suchý 2011-01-17 12:33:46 UTC
I forgot to cherry pick one refactoring commit a71b6dfbf063022e93caed2bba62f0fcd05190fe

cherrypicked as commit 2d566a139029d826a9a8fbea02c0550f179b2cf5 to satellite.git

Comment 13 Miroslav Suchý 2011-01-17 14:12:54 UTC
err I got rejected push.. so commit from #12 is 20b724c410e6f1c07aa2b4df1d14d3d1f073fd6d

I find another refactoring commit I needed.
Cherrypicked as commit 5a9289920dee56ab546047c9d6117f575e44786b

Comment 15 Miroslav Suchý 2011-01-18 14:36:27 UTC
Sigh, yes, rhel4 does not support selinux.

Spacewalk commit: fe04ad67075c5e58a4105f797dd54a860b17b643
cherry pick to satellite.git: f390b2c0fcc98096c8792c856cef246c5832160f

Comment 16 Jiri Kastner 2011-01-19 09:11:50 UTC
###########  BEFORE  #########################
RHEL4:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd
Cannot diff /tmp/motd; the file on the system is not a symbolic link while the file in the channel is. 
RHEL5:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd 
Cannot diff /tmp/motd; the file on the system is not a symbolic link while the file in the channel is.
RHEL6:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd
Cannot diff /tmp/motd; the file on the system is not a symbolic link while the file in the channel is. 

###########   AFTER  #########################
RHEL4:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd
--- /etc/motd		attributes: -rw-r--r-- root root 	config channel: test-628920	revision: 1
--- /tmp/motd	2011-01-14 04:28:49	attributes: -rw-r--r-- root root 	config channel: local file	revision: None
@@ -1,1 +1,1 @@

RHEL5:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd 
--- /etc/motd		attributes: -rw-r--r-- root root 	config channel: test-628920	revision: 1
--- /tmp/motd	2011-01-14 04:18:25	attributes: -rw-r--r-- root root root:object_r:tmp_t	config channel: local file	revision: None
@@ -1,1 +1,1 @@
-test-628920+test-628920

RHEL6:
# rhncfg-manager diff --channel=test-628920 --dest-file=/etc/motd /tmp/motd
--- /etc/motd		attributes: -rw-r--r-- root root 	config channel: test-628920	revision: 1
--- /tmp/motd	2011-01-19 04:13:31	attributes: -rw-r--r-- root root unconfined_u:object_r:user_tmp_t:s0	config channel: local file	revision: None
@@ -1,1 +1,1 @@
-test-628920+test-628920

Comment 22 Miroslav Suchý 2011-02-07 13:32:29 UTC
fixed in spacewalk.git in commit afaee2003f50a60eac424f74880c714d9a6a8f85
cherry picked to satellite.git as commit 6017efde9e31194cac80f632be021b8bdd66a35a

Comment 23 Jiri Kastner 2011-02-14 14:09:47 UTC
[root@ibm-js22-03 ~]# ls -lZ /tmp/blabla 
-rw-r--r--. root root system_u:object_r:tmp_t:s0       /tmp/blabla
[root@ibm-js22-03 ~]# rhncfg-manager diff -c conf_chan_RHNManagerClient_TEST_2011_02_01_06_02_33 --dest-file=/tmp/blabla /tmp/blabla 
Red Hat Network username: admin
Password: 
--- /tmp/blabla		attributes: -rw-r--r-- root root 	config channel: conf_chan_RHNManagerClient_TEST_2011_02_01_06_02_33	revision: 1
--- /tmp/blabla	2011-02-14 08:17:10	attributes: -rw-r--r-- root root system_u:object_r:tmp_t:s0	config channel: local file	revision: None
@@ -1,0 +1,1 @@
+blabla

tested also with selinux disabled. on rhel4, rhel5 and rhel6 clients.

Comment 24 errata-xmlrpc 2011-03-07 09:23:32 UTC
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.

http://rhn.redhat.com/errata/RHBA-2011-0323.html