Bug 628920 - rhncfg-manager diff - fails to compare two files.
rhncfg-manager diff - fails to compare two files.
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
530
All Linux
high Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Jiri Kastner
:
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2010-08-31 08:18 EDT by Dimitar Yordanov
Modified: 2011-03-07 04:23 EST (History)
5 users (show)

See Also:
Fixed In Version: rhncfg-5.9.27-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-07 04:23:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
How_to_reproduce (1.64 KB, application/x-sh)
2010-08-31 08:19 EDT, Dimitar Yordanov
no flags Details

  None (edit)
Description Dimitar Yordanov 2010-08-31 08:18:27 EDT
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 08:19:37 EDT
Created attachment 442171 [details]
How_to_reproduce
Comment 7 Miroslav Suchý 2011-01-06 09:33:03 EST
cherrypickes to satellite.git as commit c1ebddde41862ed60da425154b93f529a436d6c0
Comment 10 Miroslav Suchý 2011-01-14 07:06:36 EST
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 07:33:46 EST
I forgot to cherry pick one refactoring commit a71b6dfbf063022e93caed2bba62f0fcd05190fe

cherrypicked as commit 2d566a139029d826a9a8fbea02c0550f179b2cf5 to satellite.git
Comment 13 Miroslav Suchý 2011-01-17 09:12:54 EST
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 09:36:27 EST
Sigh, yes, rhel4 does not support selinux.

Spacewalk commit: fe04ad67075c5e58a4105f797dd54a860b17b643
cherry pick to satellite.git: f390b2c0fcc98096c8792c856cef246c5832160f
Comment 16 Jiri Kastner 2011-01-19 04:11:50 EST
###########  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 08:32:29 EST
fixed in spacewalk.git in commit afaee2003f50a60eac424f74880c714d9a6a8f85
cherry picked to satellite.git as commit 6017efde9e31194cac80f632be021b8bdd66a35a
Comment 23 Jiri Kastner 2011-02-14 09:09:47 EST
[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 04:23:32 EST
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

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