Hi Mark,
> This is to advise you that I have committed the patches which should
> help Eclipse users of cvs 1.11.23 (at such time as it is released).
>
> cvs -z3 -d:pserver:[EMAIL PROTECTED]:/sources/cvs \
> checkout -rcvs1-11-x-branch ccvs
Thank you. It is better: Features #1 (extssh in the enumeration) and #2
(:extssh: is recognized when it occurs in CVS/Root) are now implemented.
And when I have CVS_RSH set to "ssh", it works. But when I have CVS_RSH not
set, "cvs log" just hangs. "pstree" and "ps" show that it's waiting on an
rsh command:
│ ├─xterm───bash─┬─cvs-1.11.xx───cvs-1.11.xx───rsh
haible 7946 0.0 0.0 5592 784 pts/3 S+ 15:02 0:00 cvs-1.11.xx
log plugin.xml
haible 7947 0.0 0.0 5584 284 pts/3 S+ 15:02 0:00 cvs-1.11.xx
log plugin.xml
root 7948 0.0 0.0 11348 888 pts/3 S+ 15:02 0:00 rsh -l bhaible
dev.eclipse.org cvs server
This is for cvs 1.11.xx branch.
For cvs 1.12.xx it hangs the same way, if I set CVS_RSH=rsh:
│ ├─xterm───bash─┬─cvs-1.12.xx───cvs-1.12.xx───rsh
> If you use the default configure, RSH_DFLT will be "ssh" which should
> mean that :extssh: would use ssh as the transport.
Only in cvs 1.12.xx. In cvs 1.11.xx, apparently not:
$ grep RSH_DFLT config.h
#define RSH_DFLT "rsh"
And the :extssh: should also work if someone has configured it with
--with-rsh=rsh
or if CVS_RSH is set to "rsh".
> --- src/client.c 19 Dec 2007 20:44:15 -0000 1.318.4.46
> +++ src/client.c 24 Jan 2008 18:36:05 -0000
> @@ -4795,7 +4795,7 @@ start_rsh_server (root, to_server, from_
> int child_pid;
>
> if (!cvs_rsh)
> - cvs_rsh = "rsh";
> + cvs_rsh = RSH_DFLT;
> if (!cvs_server)
> cvs_server = "cvs";
That was just a consistency fix; it did not change the behaviour in the
default case.
So, what's still missing, is part #3: Use "ssh" as remote shell,
regardless of the CVS_RSH environment variable. This is the point of
"extssh", as I explained in
http://lists.gnu.org/archive/html/bug-cvs/2008-01/msg00007.html
This attached patches do it (both tested).
Bruno
2008-01-25 Bruno Haible <[EMAIL PROTECTED]>
* src/client.c (start_rsh_server): Add a 'force_use_ssh' argument.
(start_server): Pass force_use_ssh as 1 when the method is extssh.
Index: src/client.c
===================================================================
RCS file: /sources/cvs/ccvs/src/client.c,v
retrieving revision 1.318.4.47
diff -c -3 -r1.318.4.47 client.c
*** src/client.c 25 Jan 2008 00:11:28 -0000 1.318.4.47
--- src/client.c 25 Jan 2008 14:22:57 -0000
***************
*** 3555,3561 ****
}
#ifndef NO_EXT_METHOD
! static void start_rsh_server PROTO((cvsroot_t *, struct buffer **, struct buffer **));
#endif
int
--- 3555,3561 ----
}
#ifndef NO_EXT_METHOD
! static void start_rsh_server PROTO((cvsroot_t *, struct buffer **, struct buffer **, int));
#endif
int
***************
*** 4349,4360 ****
#endif /* HAVE_GSSAPI */
case ext_method:
- case extssh_method:
#ifdef NO_EXT_METHOD
error (0, 0, ":ext: method not supported by this port of CVS");
error (1, 0, "try :server: instead");
#else /* ! NO_EXT_METHOD */
! start_rsh_server (current_parsed_root, &to_server, &from_server);
#endif /* NO_EXT_METHOD */
break;
--- 4349,4370 ----
#endif /* HAVE_GSSAPI */
case ext_method:
#ifdef NO_EXT_METHOD
error (0, 0, ":ext: method not supported by this port of CVS");
error (1, 0, "try :server: instead");
#else /* ! NO_EXT_METHOD */
! start_rsh_server (current_parsed_root, &to_server, &from_server,
! 0);
! #endif /* NO_EXT_METHOD */
! break;
!
! case extssh_method:
! #ifdef NO_EXT_METHOD
! error (0, 0, ":extssh: method not supported by this port of CVS");
! error (1, 0, "try :server: instead");
! #else /* ! NO_EXT_METHOD */
! start_rsh_server (current_parsed_root, &to_server, &from_server,
! 1);
#endif /* NO_EXT_METHOD */
break;
***************
*** 4715,4724 ****
up and running, and that's most important. */
static void
! start_rsh_server (root, to_server, from_server)
cvsroot_t *root;
struct buffer **to_server;
struct buffer **from_server;
{
int pipes[2];
int child_pid;
--- 4725,4735 ----
up and running, and that's most important. */
static void
! start_rsh_server (root, to_server, from_server, force_use_ssh)
cvsroot_t *root;
struct buffer **to_server;
struct buffer **from_server;
+ int force_use_ssh;
{
int pipes[2];
int child_pid;
***************
*** 4726,4740 ****
/* If you're working through firewalls, you can set the
CVS_RSH environment variable to a script which uses rsh to
invoke another rsh on a proxy machine. */
! char *cvs_rsh = getenv ("CVS_RSH");
char *cvs_server = getenv ("CVS_SERVER");
int i = 0;
/* This needs to fit "rsh", "-b", "-l", "USER", "host",
"cmd (w/ args)", and NULL. We leave some room to grow. */
char *rsh_argv[10];
! if (!cvs_rsh)
! cvs_rsh = RSH_DFLT;
if (!cvs_server)
cvs_server = "cvs";
--- 4737,4757 ----
/* If you're working through firewalls, you can set the
CVS_RSH environment variable to a script which uses rsh to
invoke another rsh on a proxy machine. */
! char *cvs_rsh;
char *cvs_server = getenv ("CVS_SERVER");
int i = 0;
/* This needs to fit "rsh", "-b", "-l", "USER", "host",
"cmd (w/ args)", and NULL. We leave some room to grow. */
char *rsh_argv[10];
! if (force_use_ssh)
! cvs_rsh = "ssh";
! else
! {
! cvs_rsh = getenv ("CVS_RSH");
! if (!cvs_rsh)
! cvs_rsh = RSH_DFLT;
! }
if (!cvs_server)
cvs_server = "cvs";
***************
*** 4780,4801 ****
# else /* ! START_RSH_WITH_POPEN_RW */
static void
! start_rsh_server (root, to_server, from_server)
cvsroot_t *root;
struct buffer **to_server;
struct buffer **from_server;
{
/* If you're working through firewalls, you can set the
CVS_RSH environment variable to a script which uses rsh to
invoke another rsh on a proxy machine. */
! char *cvs_rsh = getenv ("CVS_RSH");
char *cvs_server = getenv ("CVS_SERVER");
char *command;
int tofd, fromfd;
int child_pid;
! if (!cvs_rsh)
! cvs_rsh = RSH_DFLT;
if (!cvs_server)
cvs_server = "cvs";
--- 4797,4825 ----
# else /* ! START_RSH_WITH_POPEN_RW */
static void
! start_rsh_server (root, to_server, from_server, force_use_ssh)
cvsroot_t *root;
struct buffer **to_server;
struct buffer **from_server;
+ int force_use_ssh;
{
/* If you're working through firewalls, you can set the
CVS_RSH environment variable to a script which uses rsh to
invoke another rsh on a proxy machine. */
! char *cvs_rsh;
char *cvs_server = getenv ("CVS_SERVER");
char *command;
int tofd, fromfd;
int child_pid;
! if (force_use_ssh)
! cvs_rsh = "ssh";
! else
! {
! cvs_rsh = getenv ("CVS_RSH");
! if (!cvs_rsh)
! cvs_rsh = RSH_DFLT;
! }
if (!cvs_server)
cvs_server = "cvs";
2008-01-25 Bruno Haible <[EMAIL PROTECTED]>
* src/root.c (parse_cvsroot): If the method is extssh, set
the cvs_rsh override to "ssh".
Index: src/root.c
===================================================================
RCS file: /sources/cvs/ccvs/src/root.c,v
retrieving revision 1.131
diff -c -3 -r1.131 root.c
*** src/root.c 25 Jan 2008 07:17:35 -0000 1.131
--- src/root.c 25 Jan 2008 14:45:52 -0000
***************
*** 677,683 ****
--- 677,686 ----
else if (!strcasecmp (method, "ext"))
newroot->method = ext_method;
else if (!strcasecmp (method, "extssh"))
+ {
newroot->method = extssh_method;
+ newroot->cvs_rsh = xstrdup ("ssh");
+ }
else if (!strcasecmp (method, "fork"))
newroot->method = fork_method;
else
_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs