Bug 57508
Summary: | dos2unix erroneously strips \r | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tom Tromey <tromey> | ||||||||
Component: | dos2unix | Assignee: | Tim Waugh <twaugh> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Aaron Brown <abrown> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | rawhide | CC: | patrickm, riel | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2005-05-20 00:35:31 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: | 123268, 133398, 183629 | ||||||||||
Attachments: |
|
Description
Tom Tromey
2001-12-14 17:32:10 UTC
Created attachment 104332 [details]
a patch
Created attachment 104333 [details]
patch (with uneeded lines dropped)
My post to fedora-patch-list bounced, and when I looked at the message, I've
noticed lines in the patch which I should have deleted earlier.
The patch makes sense. I haven't been able to test it because I have no mac files here, but the code looks sane. Mike, want to rebuild the package or should I rebuild it ? cat unixfile | tr \\n \\r > macfile Created attachment 104335 [details]
final patch
While the unneeded lines in the first patch did no harm (a cut'n'rename
mistake), the second patch lost the line delimiter of the last line when
running mac2unix on a Mac file. A minor detail, easily overlooked when running
tests.
$ cd /tmp
$ cat /etc/services | tr \\n \\r > macfile
$ ls -la macfile
-rw------- 1 misc2 misc2 19936 Sep 26 21:05 macfile
$ dos2unix -c Mac macfile
dos2unix: converting file macfile to UNIX format ...
$ ls -la macfile
-rw------- 1 misc2 misc2 19936 Sep 26 21:06 macfile
$ cat macfile | tr \\r \\n > unixfile
$ md5sum unixfile /etc/services
485eacadb2a1d18fcf66483f81829f02 unixfile
485eacadb2a1d18fcf66483f81829f02 /etc/services
[size and checksum stay the same]
Patch applied in dos2unix-3.1-19 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 the 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-2005-195.html |