Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358484 - rhncfg-manager diff output uses "---" to prefix both files in diff, one should be "+++"
Summary: rhncfg-manager diff output uses "---" to prefix both files in diff, one shoul...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Herget
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: 1395890 space27
TreeView+ depends on / blocked
 
Reported: 2016-07-20 19:54 UTC by Eric Herget
Modified: 2017-09-27 19:15 UTC (History)
2 users (show)

Fixed In Version: rhncfg-5.10.96-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1395890 (view as bug list)
Environment:
Last Closed: 2017-09-27 19:15:44 UTC


Attachments (Terms of Use)

Description Eric Herget 2016-07-20 19:54:42 UTC
Description of problem:
While working on providing sane output when diff'ing binary configuration files, I notice that the diff output for rhncfg-manager uses "---" to prefix both the source and destination files.  It should be prefixing the second file with "+++".

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

How reproducible:
easily

Steps to Reproduce:
1. Have a client system subscribed to a configuration channel
2. Have one text configuration file being managed that differs on the client
3. Run the command `rhncfg-manager diff <configfile> -c <configchannel>`

Actual results:
diff output looks like this...
--- /tmp/hosts  2016-07-19 14:57:20     attributes: -rw-r--r-- [line truncated]
--- /tmp/hosts  2016-07-20 15:16:48     attributes: -rw-r--r-- [line truncated]
[rest of output truncated]

Expected results:
--- /tmp/hosts  2016-07-19 14:57:20     attributes: -rw-r--r-- [line truncated]
+++ /tmp/hosts  2016-07-20 15:16:48     attributes: -rw-r--r-- [line truncated]
[rest of output truncated]


Additional info:

Comment 1 Eric Herget 2016-07-29 13:14:48 UTC
spacewalk.github:
aaecc727439e8077baf08294d6ce744b09e0b6e1

Comment 2 Jan Hutař 2016-11-10 21:45:14 UTC
Note that during testing this I have filed bug 1394045.

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

1. Create config channel and file in it with something in it
2. Subscribe system to it and enable deploy actions on it:
   # rhn-actions-control --enable-all
3. Schedule deploy of all files on the system in webUI and make sure it happens:
   # rhn_check -vv
4. Alter deployed file:
   # date > /tmp/bz1358484
5. Run diff:
   # rhncfg-manager diff /tmp/bz1358484 -c bz1358484

Output is now correctly showing "+++" for second file:

# rhncfg-manager diff /tmp/bz1358484 -c bz1358484
Using server name <fqdn>
--- /tmp/bz1358484	2016-11-10 22:29:50.843000+01:00	attributes: -rw-r--r-- root root 	config channel: bz1358484	revision: 1
+++ /tmp/bz1358484	2016-11-10 22:33:09	attributes: -rw-r--r-- root root unconfined_u:object_r:user_tmp_t:s0	config channel: local file	revision: None
[...]

=> VERIFIED

Comment 3 Eric Herget 2017-09-27 19:15:44 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.