Bash 3.1.17(8) CR/LF problem

Igor Peshansky pechtcha@cs.nyu.edu
Wed Sep 27 22:47:00 GMT 2006


On Wed, 27 Sep 2006, Malcolm Nixon wrote:

> > So why isn't using a textmode mount a solution?
>
> Packages generally contain the sources, build scripts, tools binaries,
> etc in a single directory tree. For example a ./configure script located
> in the package root directory along side other project files. As such
> placing just the bash scripts in a textmode mount would be virtually
> impossible.
>
> In my case we're talking about a number of non-unix developers
> with existing Cygwin installations (with no textmode mounts) that they
> update periodically. They're going to take their functioning Cygwin
> installations, run an update at the end of the month to get the latest
> stable security patches, and have their build environment turn to goo.

I think you may be confused about what text mode mounts really do.  They
do not force every CRLF combination to be interpreted as LF (in all
files).  All they do is allow Cygwin programs (like bash) that open files
in default (non-binary) mode to understand CRLF line endings as if they
were pure LFs.

Just to reinforce what others were saying, try remounting the directory
with your source checkout in textmode (see "man mount").  It won't
actually change the contents of the files -- only how Cygwin programs
interpret them.

> The problem stems from introducing CR/LF as a feature, and then removing
> it once the feature is depended upon by members of the community.

FWIW, bash still supports CR/LF (and with the same crippled performance),
but on textmode mounts.

> My issue comes from breaking compatibility and forcing people to expend
> time and money to fix systems that used to work. I think part of my
> frustration comes from the fact that I can't even fix this by adding a
> few checks/commands to the root build script because I can't get the
> root build script to run any more.

Running one command is hardly an exorbitant expenditure of time...

> Instead I'll have to create a document and get it out PDQ before the
> next security patch that describes how to modify Cygwin from the default
> virgin configuration to one with textmode mounts or an equivalent
> modification.

It's easy enough to come up with a bash (or batch) script that your users
can run to get their mounts converted automatically.  Mind you, not all
mounts need to be converted -- only the directory tree where you keep your
Perforce checkout.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list