rsync appends .exe extension

View: New views
7 Messages — Rating Filter:   Alert me  

rsync appends .exe extension

by Peter-399 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I copying files from a linux station to a win32 - cygwin 1.7 station
using the current openssh server from cygwin

I run:
rsync -rpogv . -e "ssh" host:/

This works, except that for some binaries ( I could not determine any
pattern or rule )  ending with .exe .src or .sys  , cygwin  adds .exe
extensions ( yielding files  like .sys.exe ).
Is this normal behavior ? If yes, can it be disabled ?

( Note : that if this cannot be enabled, I think it renders rsync -
cygwin more or less useless for a couple of mirroring tasks )

Thanks for your ideas
Peter

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


Re: rsync appends .exe extension

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  4 21:45, Peter wrote:
> Hi
> I copying files from a linux station to a win32 - cygwin 1.7 station
> using the current openssh server from cygwin
>
> I run:
> rsync -rpogv . -e "ssh" host:/

So you're running rsync from the Linux source side.  Hmm, that's a problem
for debugging.  Can you turn this around and run rsync from the Cygwin
target side?  Does the same problem occur?  I expect it will.

> This works, except that for some binaries ( I could not determine
> any pattern or rule )  ending with .exe .src or .sys  , cygwin  adds
> .exe extensions ( yielding files  like .sys.exe ).

It should definitely not happen with files ending in .exe.  A couple
of questions:

- What kind of binaries are that?  Windows binaries?
  Can you please run the file(1) command on them?  

- Can you please run `strace -o rsync.log rsync ...' from the Cygwin
  side with just 2 or 3 selected binaries to copy, and send the strace?

- Would it be possible for you to send these two or three binaries to me
  via private email?  Please don't do it now, it's just a question.
  Especially, please check that neither you nor I will have licensing
  problems afterwards.

> Is this normal behavior ? If yes, can it be disabled ?

No.  It's a heuristic in the rename(2) API, not an overly intelligent,
apparently.  Looks like it needs to be tweaked some more...


Corinna

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

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


Re: rsync appends .exe extension

by Peter-399 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Corinna
Thanks for you kind support.

> So you're running rsync from the Linux source side.  Hmm, that's a problem
> for debugging.  Can you turn this around and run rsync from the Cygwin
> target side?  Does the same problem occur?  I expect it will.
>
>  
Its even simpler, I can run it locally on the cygwin install to
reproduce the error:

$ cd /
$ mkdir copywin
$ cd copywin
$ rsync -av ../c .   # this is my windows install
$ find . -name "*.*.exe"
./winnt/system32/mode.com.exe
...
$ find . -name "*.*.exe" -print0 | xargs -0 file
PE32 executable for MS Windows (native) Intel 80386 32-bit
...
all "renames" are of this type, but so are others that have not been
"renamed"

like :
./winnt/system32/wupdmgr.exe
which is of the same file type as the wrongly renamed

This problem does not happen, if I use the cp(1) command instead of rsync

Can you reproduce this ( its a windows professional 2000 with all
service packs applied here ) ?
If not, please let me know if not, I will provide trace and some binaries.

>> This works, except that for some binaries ( I could not determine
>> any pattern or rule )  ending with .exe .src or .sys  , cygwin  adds
>> .exe extensions ( yielding files  like .sys.exe ).
>>    
>
> It should definitely not happen with files ending in .exe.  A couple
> of questions:
>
>  
Sorry, I was inaccurate, it does not happen on .exe, only on .com  ,
.sys  and .src

Peter

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


Re: rsync appends .exe extension

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  5 12:43, Peter wrote:
> Dear Corinna
> Thanks for you kind support.
>
> >So you're running rsync from the Linux source side.  Hmm, that's a problem
> >for debugging.  Can you turn this around and run rsync from the Cygwin
> >target side?  Does the same problem occur?  I expect it will.
> >
> Its even simpler, I can run it locally on the cygwin install to
> reproduce the error:

Yeah, it's nothing to do with rsync specificially, it's a property
of the rename(2) call.

> >It should definitely not happen with files ending in .exe.  A couple
> >of questions:
> >
> Sorry, I was inaccurate, it does not happen on .exe, only on .com  ,
> .sys  and .src

That's good news at least.  I'm contemplating a change so that every
Windows binary, which is supposed to get any .suffix at all (up to three
or four characters) in rename(2) will not get the .exe suffix attached.
That should fix most scenarios in which binaries are renamed.


Corinna

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

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


Re: rsync appends .exe extension

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Peter,

On Nov  5 12:43, Peter wrote:
> Sorry, I was inaccurate, it does not happen on .exe, only on .com  ,
> .sys  and .src

can you please explain what the .src option means in terms of Win32
executable files?  I know .exe, .com, .sys, but .src is foreign to me.
Usually this only refers to source files of some sort, not to binary
files...


Corinna

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

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


Re: rsync appends .exe extension

by Fabian Cenedese :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 13:29 06.11.2009 +0100, Corinna Vinschen wrote:

>Peter,
>
>On Nov  5 12:43, Peter wrote:
>> Sorry, I was inaccurate, it does not happen on .exe, only on .com  ,
>> .sys  and .src
>
>can you please explain what the .src option means in terms of Win32
>executable files?  I know .exe, .com, .sys, but .src is foreign to me.
>Usually this only refers to source files of some sort, not to binary
>files...

That should probably be .scr for screensaver which are also exes.

bye  Fabi


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


Re: rsync appends .exe extension

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  6 13:36, Fabian Cenedese wrote:

> At 13:29 06.11.2009 +0100, Corinna Vinschen wrote:
> >Peter,
> >
> >On Nov  5 12:43, Peter wrote:
> >> Sorry, I was inaccurate, it does not happen on .exe, only on .com  ,
> >> .sys  and .src
> >
> >can you please explain what the .src option means in terms of Win32
> >executable files?  I know .exe, .com, .sys, but .src is foreign to me.
> >Usually this only refers to source files of some sort, not to binary
> >files...
>
> That should probably be .scr for screensaver which are also exes.

Uh, that would make sense.


Thanks,
Corinna

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

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