Bug 535151 - (RHQ-1877) Should clean (or generate uniformly) .xml files with regards to CRLF
Should clean (or generate uniformly) .xml files with regards to CRLF
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Build System (Show other bugs)
unspecified
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Corey Welton
http://jira.rhq-project.org/browse/RH...
: FutureFeature, Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-28 01:30 EDT by Corey Welton
Modified: 2011-05-23 21:17 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ctrlm.txt (19.13 KB, text/plain)
2009-03-28 01:35 EDT, Corey Welton
no flags Details

  None (edit)
Description Corey Welton 2009-03-28 01:30:00 EDT
I'm putting this under "Build System" because this is probably something that can be done as a release engineering task.  

The vast majority of our xml files are generated with a standard 'CR'.  However, a small subset of these have the full, dos/window style CRLF in them.  This is a slight annoyance when having to edit one of these xml files on a unix system.   I am not sure if the inverse is noticeable in Windows.

One example is $SERVERROOT/jbossas/server/default/deploy/rhq.ear/rhq-portal.war/WEB-INF/web.xml.  

In either case, our xml should probably be clean/uniform in one style or the other.  This can probably be done on the build system, by piping every xml file through `dos2unix` (or unix2dos, should such be the desire...)


I'm attaching a text file containing the results, against a recent build, of the following cmd sequence:

for i in `find -name *\.xml`; do echo "$i:"; grep -c "^M" $i; done

(The ^M is generated in *nix by typing "Ctrl-V Ctrl-M")

The output is a list of all xml files as they exist on my build, with a number 'n', where 'n' equals the total number of CRLFs in that xml document.

Comment 1 Corey Welton 2009-04-28 17:03:24 EDT
proposed addition:

(from within $ROOT on the build tree):

for i in `find -name *\.xml`; do dos2unix $i; done;
Comment 2 Red Hat Bugzilla 2009-11-10 15:48:37 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1877
Imported an attachment (id=368681)
Comment 3 wes hayutin 2010-02-16 12:10:17 EST
mass add of key word FutureFeature to help track
Comment 4 John Mazzitelli 2011-03-25 15:04:19 EDT
we are all now working with LF EOL characters in the code base. I just ran that script from the root of my git repo and found no ^M chars in any .xml.

From the distro, there is only one file that has this now, that's:

./jbossas/server/default/deploy/rhq.ear/jboss-remoting-servlet-invoker-2x.r3040.jon.war/WEB-INF/web.xml:

which is a separately packaged WAR (its the JBoss/Remoting WAR that we had patched to fix a particular bug in JBoss/Remoting). Customers/users will never want to look in the war, let alone mess with that .xml file, so this is OK.

All other xml files have LF EOLs.
Comment 5 Mike Foley 2011-04-19 08:50:56 EDT
spot checked .xml files in the 04/29/2011 release.  verified.
Comment 6 Corey Welton 2011-05-23 21:17:25 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 7 Corey Welton 2011-05-23 21:17:25 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 8 Corey Welton 2011-05-23 21:17:25 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 9 Corey Welton 2011-05-23 21:17:28 EDT
Bookkeeping - closing bug - fixed in recent release.

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