cvs over ssh with tcsh

Jay Abel jabel@flex.com
Thu Apr 6 02:21:00 GMT 2006


see below
----- Original Message ----- 
From: "Igor Peshansky" <pechtcha@cs.nyu.edu>
To: "Jay Abel" <jabel@flex.com>
Cc: <cygwin@cygwin.com>
Sent: Wednesday, April 05, 2006 8:46 AM
Subject: Re: cvs over ssh with tcsh


> Ugh, top-posting...  Reformatted.
>
> On Wed, 5 Apr 2006, Jay Abel wrote:
>
>> ----- Original Message -----
>> From: "Igor Peshansky" <pechtcha@XX.XXX.XXX>
>> To: "Jay Abel" <jabel@XXXX.XXX>
>> Cc: <cygwin@XXXXXX.XXX>
>
> <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.
>
>> Sent: Wednesday, April 05, 2006 3:18 AM
>> Subject: Re: cvs over ssh with tcsh
>>
>> > On Tue, 4 Apr 2006, Jay Abel wrote:
>> >
>> > > This is just a ping to see if anyone has noticed problems running
>> > > cvs in command line server mode over ssh with tcsh installed as the
>> > > login shell (in /etc/passwd).  After a lot of testing (thanks Rene
>> > > Berber) is seems that the problem only occurs when tcsh is my login
>> > > shell.  If I change my login shell to /bin/bash, the problem goes
>> > > away.
>> > >
>> > > versions are as follows:
>> > > [snip]
>> > > I googled 'ssh tcsh' and found that some programs (sftp) don't like
>> > > noisy rc scripts, but
>> >
>> > cvs also doesn't like noisy scripts.
>> >
>> > > tcsh -C /bin/true
>> > >
>> > > produces no output.
>> >
>> > I take it you meant "tcsh -c /bin/true" (lowercase "c").  Your test
>> > above only tests tcsh in non-login mode.  Try 'tcsh -l' or '(exec -l
>> > tcsh)' from bash instead.
>> >
>> > > The symptoms of failure that I obsererve fall into two categories:
>> > >
>> > > 1. cvs client reports 'unrecognized command' along with a piece of
>> > > one of the files uploaded displayed as the offending command, or
>> > >
>> > > 2. cvs trace stops dead, with both client and server processes in an
>> > > O state by ps.
>> >
>> > Both of these seem to indicate extra output from somewhere.
>> >
>> > > [snip]
>> > > At this point I'm mostly interested in whether anyone else has ever
>> > > seen this behavior.  If not, I'll continue to try to acertain what
>> > > it is about my tcsh configuration which is causing the problem.
>> >
>> > I'd say you have a noisy .login (or /etc/csh.login)...  If you rule
>> > that out, we can look for other causes.
>> >
>> > FWIW, simply "ssh user@host cvs server" should show you all of the
>> > output your cvs client sees (and complains about)...
>>
>> Test Number 1: Is tcsh login noisy?
>>
>> [jabel@jabelxp][home/jabel] % tcsh -l < /dev/null | od -ab
>> tcsh -l < /dev/null | od -ab
>> 0000000
>> [jabel@jabelxp][home/jabel] %
>
> Ok, fair enough.  FWIW, I was actually wrong -- "ssh u@h command" doesn't
> use a login shell.  In fact, even though cvs doesn't *like* the noise, it
> doesn't complain about it in the same way (i.e., putting an "echo Hi" into
> .tcshrc, I get back "cvs update: warning: unrecognized response `Hi' from
> cvs server").  Also, I get this as essentially the first thing after
> "Starting server:", whereas you get this in the middle of updating...
>
>> Test Number 2: does problem exist with CVS?
>>
>> [jabel@jabelxp][jabel/cvstemp] % cvs -t up
>> cvs -t up
>> -> main loop with CVSROOT=:ext:jayabel.com:/home/spring2006
>> -> Starting server: /bin/ssh jayabel.com cvs server
>> -> Sending file `report.pdf' to server
>> -> Sending file `report.tex' to server
>> unrecognized request `OF'
>> -> Lock_Cleanup()
>> -> Lock_Cleanup()
>> [jabel@jabelxp][jabel/cvstemp] %
>>
>> Am I missing something here?  If cvs uses a plain old login shell, isn't
>> it subject to the vagaries of things like CTRL-z suspending the job,
>> CTRL-s suspending output, and certain other control and escape sequences
>> sending back all kinds of chatter?
>
> It doesn't -- that was a red herring.  However, you didn't try the last
> test I proposed, i.e., "ssh jayabel.com cvs server".

When I run the test, I get:

[jabel@jabelxp][jabel/cvstemp] % ssh jayabel.com cvs server
ssh jayabel.com cvs server
[jabel@jabelxp][jabel/cvstemp] %

Maybe that's right, but I'm a little bit surprised to see the command 
echoed.  Maybe there is a command to disable echo that is missing from the 
startup script, but I don't believe I've molested those.


>
>> Is there something obvious I'm supposed to have in my startup scripts
>> that turns all that stuff off if the connection is supposed to be
>> binary, and how does CVS tell ssh it wants a binary shell?
>>
>> I'm currently using /bin/ssh as my CVS_RSH variable, but at least
>> according to the trace output cvs isn't sending any special options.
>> Do I need a wrapper script to create a silent connection?
>
> Nah, I think we're barking up the wrong tree here.
>
> One other observation is that, when I put something in the .rc script, my
> cvs complained about "unrecognized response", whereas yours complains
> about "unrecognized request".  This makes me think that it's not the
> server sending something bad, it's the client.  You could write a cvs
> wrapper script that does something like
>
> tee CVS_OUT | /bin/cvs "$@"

When I do this, cvs works fine, regardless of whether I execute tee under 
tcsh or bash.  Here is something interesting:

I rename /bin/cvs to /bin/cvs2, and secretly replace it with one of two 
scripts:

#!/bin/bash
cvs2 "$@"

fails as above, but

#!/bin/bash
cat | /bin/cvs2 "$@"

does not fail. (note, I must manually send a ^D on the client because cat is 
waiting for input, even though cvs isn't).  Notwithstanding, the process 
runs correctly without getting stuck or confused.  Changing the compression 
from -z5 (current setting) to none, only changes when the failure occurs, 
not whether.  Before anyone gets excited, yes the client and server are on 
the same machine, but the link is over ssh.  The reason for this odd 
business is that my work directory is on a removable drive.  I want to be 
able to update and commit to cvs regardless of whether I am on the local 
machine or a remote one.

Regarding the other test, if I now try to manually activate the server with 
the 'cat' script, I get different results from before:

[jabel@jabelxp][cvstemp/phys274] % ssh jayabel.com cvs server
[jabel@jabelxp][cvstemp/phys274] %

Note that now there is no echo.
>
> stick it in the PATH before /bin, and examine ~/CVS_OUT for commands sent
> from the client.
> HTH,
> 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/
> 


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