Cygwin acts weird to / in a chroot

2009-03-23 Thread Dick
Hi Folks, I have some trouble running chrooted shell scripts: - First I've copied c:\cygwin to c:\cygwin\chroot\a - I've created a shell script test.sh: cat > /chroot/a/test.sh << @EOF #!/bin/bash echo hello @EOF - Then I try to run the shell chrooted, this works chroot /chroot/a /bin/bash - In t

Re: Cygwin acts weird to / in a chroot

2009-03-23 Thread Corinna Vinschen
On Mar 23 20:34, Dick wrote: > Hi Folks, > > I have some trouble running chrooted shell scripts: > > - First I've copied c:\cygwin to c:\cygwin\chroot\a > - I've created a shell script test.sh: > cat > /chroot/a/test.sh << @EOF > #!/bin/bash > echo hello > @EOF > - Then I try to run the shell chr

Re: Cygwin acts weird to / in a chroot

2009-03-23 Thread Dick
Wow thanks for you quick reply Corinna, I'm not interested in security, I'd like to use a chrooted build environment for building RPMS. Do you have some idea what might be happening? gr Dick -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin

Re: Cygwin acts weird to / in a chroot

2009-03-23 Thread Larry Hall (Cygwin)
Dick wrote: Wow thanks for you quick reply Corinna, I'm not interested in security, I'd like to use a chrooted build environment for building RPMS. Do you have some idea what might be happening? Type 'mount' and I think that will help you see what's happening. -- Larry Hall

Re: Cygwin acts weird to / in a chroot

2009-03-23 Thread Dick
Larry Hall (Cygwin cygwin.com> writes: > Type 'mount' and I think that will help you see what's happening. Hmm / is still mounted on /cygwin, it might only indicate a confused cygwin mount... The output from mount from a chroot in Linux is also kinda weird. It also doesn't explain why it doesn't

Re: Cygwin acts weird to / in a chroot

2009-03-23 Thread Larry Hall (Cygwin)
Dick wrote: Larry Hall (Cygwin cygwin.com> writes: Type 'mount' and I think that will help you see what's happening. Hmm / is still mounted on /cygwin, it might only indicate a confused cygwin mount... The output from mount from a chroot in Linux is also kinda weird. Cygwin is not Linux. C

Re: Cygwin acts weird to / in a chroot

2009-03-24 Thread Dick
I did some grepping through the Cygwin sources and found some FIXMEs about chroot. It seems indeed to be implemented as a very dirty hack. I'm still not sure if it's caused by a wrong mount. I hope to find some time to create a patch, it seems interesting :-) gr Dick -- Unsubscribe info:

Re: Cygwin acts weird to / in a chroot

2009-03-27 Thread Dick
Larry Hall (Cygwin cygwin.com> writes: > Type 'mount' and I think that will help you see what's happening. Hmm, that seems to be a bug in mount, cygpath -a -w . from within a chroot returns a correct (chrooted) path. It is very weird because "cat /test.sh" works from a chroot and even ". /test.