RE: file not working on executables?

2005-09-10 Thread Gary R. Van Sickle
[snip]
  Again, I 100% share the notion that text mounts should not 
 be necessary.
  But when even such basic apps as tar get this wrong, I simply don't 
  see how anybody can realistically entertain the idea that 
 eliminating 
  them will somehow solve any problems.
 
 You're a lucky guy that you don't have problems with textmode 
 mounts

Well, yeah I guess, but again, what are these problems of which you speak?

 but from my point of view, CRLF lineendings are just 
 insane and dealing with them in libraries and applications is 
 a real PITA.
 

There's an old saying where I come from: People in Hell want icewater.
Sure it's a PITA; welcome to Computer Science.

 Dunno how you work, but I for one use native Win apps only if 
 it's totally unavoidable.  I certainly don't use a native 
 Win32 editor as long as I have vim and I certainly don't 
 create textfiles with CRLF lineendings in them.  If I get 
 those files, my first action is to convert them to LF.
 
 However, that's getting cygwin-talk fodder.  So please move 
 any further discussion there.  Reply-To set accordingly.


(Oops, apparently not! ;-))

Well, any LF/CRLF religious debate perhaps belongs there.  But religious
issues aside, the change you're proposing is a major change to long-standing
Cygwin functionality that would affect a large number of users.  Such
discussion most certainly belongs on [EMAIL PROTECTED]
 
 
 Corinna

-- 
Gary R. Van Sickle


--
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/



Re: file not working on executables?

2005-09-09 Thread Corinna Vinschen
On Sep  8 23:12, Gary R. Van Sickle wrote:
  From: Corinna Vinschen
 [snip]
  You should not mount the whole Cygwin tree in textmode, it 
  will always give trouble when you expect it the least.
 
 I've had everything mounted as text for years, and the only trouble I've
 ever had is not related to the existence of textmode mounts, but to programs
 that erroneously assume all text files are '\n' xor '\r\n', as I've stated
 in my previous post on this subject.  Text mounts have *saved* me untold
 amounts of trouble; that's why they exist at all in the first place!  I
 can't begin to understand where you're coming from there; I am certainly a
 counterexample to the statement, and I doubt I'm the only one.
 
   Just 
  mount home dirs or something as textmode, but even then 
  refrain from it as much as possible.
 
 Why?  Certainly mixing the two mount modes is going to result in problems
 when you forget things work differently in one mount than in another.
 
  There are tools out there to convert line endings, for 
  instance d2u and u2d.  I bet, if you count the cases where 
  the conversion is necessary, you will be surprised how 
  _seldom_ it's necessary.
 
 Any program that doesn't open all files, except text files, with rb, is a
 counterexample to this.
 
 Again, I 100% share the notion that text mounts should not be necessary.
 But when even such basic apps as tar get this wrong, I simply don't see how
 anybody can realistically entertain the idea that eliminating them will
 somehow solve any problems.

You're a lucky guy that you don't have problems with textmode mounts
but from my point of view, CRLF lineendings are just insane and dealing
with them in libraries and applications is a real PITA.

Dunno how you work, but I for one use native Win apps only if it's
totally unavoidable.  I certainly don't use a native Win32 editor
as long as I have vim and I certainly don't create textfiles with
CRLF lineendings in them.  If I get those files, my first action is
to convert them to LF.

However, that's getting cygwin-talk fodder.  So please move any further
discussion there.  Reply-To set accordingly.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/



Re: file not working on executables?

2005-09-08 Thread Corinna Vinschen
On Sep  8 10:00, Luke Kendall wrote:
 On  7 Sep, Corinna Vinschen wrote:
   Oh well, why are you still using textmode?  We should drop this choice 
  from 
   setup.exe entirely. 
 
 The logic went:
 
 1) Under Windows, most of the programs we use are native Windows ones, 
so we choose DOS style line endings during Cygwin install.
 2) I assume that Unix text processing programs like sed, awk, troff,
etc. prefer to see LF rather than CR-LF.
 
 I've just now re-read
 http://cygwin.com/cygwin-ug-net/using-textbinary.html.  (I can't begin
 to imagine how much pain this CR/LF issue must cause you guys!)
 
 Did you give the advice above because basically all the Cygwin programs
 that treat lines as records, now open the file in text mode; and all
 other Cygwin programs open files in binary mode?  (Including file.exe,
 now, thank you!)

You should not mount the whole Cygwin tree in textmode, it will always
give trouble when you expect it the least.  Just mount home dirs or
something as textmode, but even then refrain from it as much as possible.
There are tools out there to convert line endings, for instance d2u and
u2d.  I bet, if you count the cases where the conversion is necessary,
you will be surprised how _seldom_ it's necessary.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/



Re: file not working on executables?

2005-09-08 Thread Shankar Unni

Corinna Vinschen wrote:


You should not mount the whole Cygwin tree in textmode


Totally agree. But we need to do a text mode install from setup.exe 
because so many of the tools we use are non-Cygwin tools, and cvs does 
nasty (or at least unattractive) things if the mount is binmode, and the 
text file contains ^Ms. But this really applies only to the cygdrive 
mounts (since that's where the affected files live).


What would be nice is if setup *always* mounted / and /usr/lib in 
binmode, and /usr/bin in mount -x mode, and only honored the text 
mode in the installer screen for the cygdrive mounts.



--
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/



RE: file not working on executables?

2005-09-08 Thread Gary R. Van Sickle
 From: Corinna Vinschen
[snip]
 You should not mount the whole Cygwin tree in textmode, it 
 will always give trouble when you expect it the least.

I've had everything mounted as text for years, and the only trouble I've
ever had is not related to the existence of textmode mounts, but to programs
that erroneously assume all text files are '\n' xor '\r\n', as I've stated
in my previous post on this subject.  Text mounts have *saved* me untold
amounts of trouble; that's why they exist at all in the first place!  I
can't begin to understand where you're coming from there; I am certainly a
counterexample to the statement, and I doubt I'm the only one.

  Just 
 mount home dirs or something as textmode, but even then 
 refrain from it as much as possible.

Why?  Certainly mixing the two mount modes is going to result in problems
when you forget things work differently in one mount than in another.

 There are tools out there to convert line endings, for 
 instance d2u and u2d.  I bet, if you count the cases where 
 the conversion is necessary, you will be surprised how 
 _seldom_ it's necessary.

Any program that doesn't open all files, except text files, with rb, is a
counterexample to this.

Again, I 100% share the notion that text mounts should not be necessary.
But when even such basic apps as tar get this wrong, I simply don't see how
anybody can realistically entertain the idea that eliminating them will
somehow solve any problems.

-- 
Gary R. Van Sickle
 


--
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/



Re: file not working on executables?

2005-09-07 Thread Corinna Vinschen
On Sep  7 15:05, Luke Kendall wrote:
 I installed the latest Cygwin a couple of days ago.  file now
 produces no information for binary executables.  Anyone else seeing
 this problem?  (I checked that file is /usr/bin/file.)
 
 $ file /usr/bin/ls.exe
 /usr/bin/ls.exe: 
 $ file /cygdrive/c/WINDOWS/system32/net.exe
 /cygdrive/c/WINDOWS/system32/net.exe: 
 $ file /etc/profile
 /etc/profile: ASCII English text
 $ file ~/.profile
 /home/luke/.profile: Bourne shell script text executable

Content-Description: cygcheck.txt
 C:\cygwin  /  system  textmode
 D:\home/home  system  textmode
 d:\home/u system  binmode
 C:\cygwin/bin  /usr/bin   system  textmode
 C:\cygwin/lib  /usr/lib   system  textmode
 ..  /cygdrive  system  textmode,cygdrive

Oh well, why are you still using textmode?  We should drop this choice from
setup.exe entirely.

file doesn't cope with textmode right now.  I'll fix it to use always binmode.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/



Re: file not working on executables?

2005-09-07 Thread Luke Kendall
On  7 Sep, Corinna Vinschen wrote:
  Oh well, why are you still using textmode?  We should drop this choice from 
  setup.exe entirely. 

The logic went:

1) Under Windows, most of the programs we use are native Windows ones, 
   so we choose DOS style line endings during Cygwin install.
2) I assume that Unix text processing programs like sed, awk, troff,
   etc. prefer to see LF rather than CR-LF.

I've just now re-read
http://cygwin.com/cygwin-ug-net/using-textbinary.html.  (I can't begin
to imagine how much pain this CR/LF issue must cause you guys!)

Did you give the advice above because basically all the Cygwin programs
that treat lines as records, now open the file in text mode; and all
other Cygwin programs open files in binary mode?  (Including file.exe,
now, thank you!)

The URL above may need an update, then?  (BTW, there's a reference in
the URL to points a-e which should be points 1-5 to agree with the
rest of the text).
 
  file doesn't cope with textmode right now.  I'll fix it to use always 
 binmode. 

Thanks very much for that, Corinna.

Regards,

luke


--
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/



file not working on executables?

2005-09-06 Thread Luke Kendall
I installed the latest Cygwin a couple of days ago.  file now
produces no information for binary executables.  Anyone else seeing
this problem?  (I checked that file is /usr/bin/file.)

$ file /usr/bin/ls.exe
/usr/bin/ls.exe: 
$ file /cygdrive/c/WINDOWS/system32/net.exe
/cygdrive/c/WINDOWS/system32/net.exe: 
$ file /etc/profile
/etc/profile: ASCII English text
$ file ~/.profile
/home/luke/.profile: Bourne shell script text executable

A bit odd that it got /etc/profile wrong, too.

cygcheck -s is attached.  I think my magic files are okay.  Here's part
of an strace of ls /usr/bin/ls.exe

   52  294897 [main] file 2168 __set_errno: int stat_worker(const char*, 
__stat64*, int):1040 val 2
   65  294962 [main] file 2168 stat_worker: -1 = (/home/luke/.magic, 0x22EE60)
128276  423238 [main] file 2168 open: open (/usr/share/file/magic.mgc, 0x0)
   89  423327 [main] file 2168 normalize_posix_path: src 
/usr/share/file/magic.mgc
   50  423377 [main] file 2168 normalize_posix_path: /usr/share/file/magic.mgc 
= normalize_posix_path (/usr/share/file/magic.mgc)
   51  423428 [main] file 2168 mount_info::conv_to_win32_path: 
conv_to_win32_path (/usr/share/file/magic.mgc)
   57  423485 [main] file 2168 set_flags: flags: text (0x200)
   51  423536 [main] file 2168 mount_info::conv_to_win32_path: src_path 
/usr/share/file/magic.mgc, dst C:\cygwin\usr\share\file\magic.mgc, flags 
0x208, rc 0
  313  423849 [main] file 2168 symlink_info::check: not a symlink
   50  423899 [main] file 2168 symlink_info::check: 0 = symlink.check 
(C:\cygwin\usr\share\file\magic.mgc, 0x22E360) (0x208)
   57  423956 [main] file 2168 path_conv::check: 
this-path(C:\cygwin\usr\share\file\magic.mgc), has_acls(1)
   57  424013 [main] file 2168 build_fh_pc: fh 0x61155E50
  237  424250 [main] file 2168 fhandler_base::open: 
(C:\cygwin\usr\share\file\magic.mgc, 0x10)
  166  424416 [main] file 2168 fhandler_base::set_flags: flags 0x10, 
supplied_bin 0x2
   53  424469 [main] file 2168 fhandler_base::set_flags: filemode set to text
   48  424517 [main] file 2168 fhandler_base::open: 0 = NtCreateFile (0x728, 
8010, C:\cygwin\usr\share\file\magic.mgc, io, NULL, 0, 7, 1, 20, NULL, 0)
   55  424572 [main] file 2168 fhandler_base::open: 1 = fhandler_base::open 
(C:\cygwin\usr\share\file\magic.mgc, 0x10)
   53  424625 [main] file 2168 fhandler_base::open_fs: 1 = 
fhandler_disk_file::open (C:\cygwin\usr\share\file\magic.mgc, 0x0)
   60  424685 [main] file 2168 open: 3 = open (/usr/share/file/magic.mgc, 0x0)
  122  424807 [main] file 2168 get_file_attribute: file: 
C:\cygwin\usr\share\file\magic.mgc
  156  424963 [main] file 2168 cygpsid::debug_print: get_sids_info: owner SID = 
S-1-5-32-544
   51  425014 [main] file 2168 cygpsid::debug_print: get_sids_info: group SID = 
S-1-5-18
   74  425088 [main] file 2168 get_info_from_sd: ACL 1E8, uid 544, gid 18
   90  425178 [main] file 2168 fhandler_base::fstat_helper: 0 = fstat (, 
0x22EB30) st_atime=4317C819 st_size=902784, st_mode=0x81E8, st_ino=34923, 
sizeof=96
   57  425235 [main] file 2168 fstat64: 0 = fstat (3, 0x22EB30)
   64  425299 [main] file 2168 mmap64: addr 0, len 902784, prot 3, flags 2, fd 
3, off 0
  148  425447 [main] file 2168 fhandler_disk_file::mmap: BA = 
MapViewOfFileEx (h:704, access:1, 0, off:0, len:902784, addr:0)
   75  425522 [main] file 2168 mmap64: BA = mmap() succeeded
   50  425572 [main] file 2168 close: close (3)
   52  425624 [main] file 2168 fhandler_base::close: closing 
/usr/share/file/magic.mgc handle 0x728

$ ls -l /usr/share/file/magic*
-rwxr-x---  1 Administrators SYSTEM 419946 Aug 27 08:51 /usr/share/file/magic
-rwxr-x---  1 Administrators SYSTEM 902784 Aug 27 08:51 
/usr/share/file/magic.mgc
-rwxr-x---  1 Administrators SYSTEM  30955 Aug 27 08:51 
/usr/share/file/magic.mime
-rwxr-x---  1 Administrators SYSTEM  43904 Aug 27 08:51 
/usr/share/file/magic.mime.mgc

luke

Cygwin Configuration Diagnostics
Current System Time: Wed Sep 07 14:35:30 2005

Windows XP Professional Ver 5.1 Build 2600 Service Pack 1

Path:   \\samba\syncopt\microsoft.x86.win\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\Tcl\bin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\nsr\bin
C:\cygwin\bin
x:\bin
c:\mysql\bin
c:\jdk1.3.1_01\jre\bin\hotspot
D:\home\MediaPortal\mp\build\win32\bin
c:\Program Files\Common Files\Adaptec Shared\System
c:\Program Files\Canon\MediaPortal\bin
c:\Program Files\Rational\common
c:\Program Files\Adobe\Illustrator CS\Plug-ins\CAT
c:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT
c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
c:\Program Files\Microsoft Visual Studio\Common\Tools
c:\Program Files\Microsoft Visual Studio\VC98\bin
\\handel\d\cygnus\cisra
\\samba\script