Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Mar 2001 04:15:51 +0900
From:      "Akinori MUSHA" <knu@iDaemons.org>
To:        Maxim Sobolev <sobomax@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: Changing rsync to use SSH rather than RSH by default
Message-ID:  <86g0gst4bc.wl@archon.local.idaemons.org>
In-Reply-To: <3AA3D231.ED6EAD14@FreeBSD.org>
References:  <200102260748.f1Q7me520862@freefall.freebsd.org> <86lmqt6ekc.wl@archon.local.idaemons.org> <20010226002530.A21297@hub.freebsd.org> <86k86d6cge.wl@archon.local.idaemons.org> <20010226160325.C2746@dragon.nuxi.com> <86hf18t96x.wl@archon.local.idaemons.org> <3AA3D231.ED6EAD14@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Mon, 05 Mar 2001 19:51:45 +0200,
sobomax wrote:
> I'm not very adamant about it because of POLA, but as long as the port and
> package will be printing an appropriate message on installation it should be
> OK.

OK, I wrote pkg-message so noone would be A'ed. :)

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"We're only at home when we're on the run, on the wing, on the fly"

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/rsync/Makefile,v
retrieving revision 1.54
diff -u -r1.54 Makefile
--- Makefile	2001/02/07 14:51:15	1.54
+++ Makefile	2001/03/05 18:57:56
@@ -8,6 +8,7 @@
 
 PORTNAME=	rsync
 PORTVERSION=	2.4.6
+PORTREVISION=	1
 CATEGORIES=	net ipv6
 MASTER_SITES=	ftp://samba.anu.edu.au/pub/rsync/  \
 		ftp://sunsite.auc.dk/pub/unix/rsync/  \
@@ -25,6 +26,16 @@
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} >= 400016
+USE_SSH?=	yes
+.else
+USE_SSH?=	no
+.endif
+
+.if ${USE_SSH:U} == YES
+EXTRA_PATCHES=	${FILESDIR}/ssh-patch-*
+.endif
+
 .if ${OSVERSION} >= 400014
 CONFIGURE_ARGS=	--enable-ipv6
 .else
@@ -48,5 +59,6 @@
 	${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/rsync
 	${INSTALL_DATA} ${WRKSRC}/tech_report.tex ${PREFIX}/share/doc/rsync
 .endif
+	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: pkg-message
===================================================================
RCS file: pkg-message
diff -N pkg-message
--- /dev/null	Tue Mar  6 03:55:00 2001
+++ pkg-message	Tue Mar  6 03:57:03 2001
@@ -0,0 +1,7 @@
+************************************************************
+Note that rsync now uses SSH as the transport by default.
+
+If you still need to use RSH instead, please specify
+"-e rsh" in the rsync command line or set the environment
+variable RSYNC_RSH to "rsh".
+************************************************************
Index: files/ssh-patch-README
===================================================================
RCS file: ssh-patch-README
diff -N ssh-patch-README
--- /dev/null	Tue Mar  6 03:55:00 2001
+++ ssh-patch-README	Mon Feb 26 17:54:35 2001
@@ -0,0 +1,24 @@
+--- README.orig	Wed Sep  6 11:46:43 2000
++++ README	Mon Feb 26 17:54:31 2001
+@@ -57,7 +57,7 @@
+  -W, --whole-file            copy whole files, no incremental checks
+  -x, --one-file-system       don't cross filesystem boundaries
+  -B, --block-size=SIZE       checksum blocking size (default 700)
+- -e, --rsh=COMMAND           specify rsh replacement
++ -e, --rsh=COMMAND           specify rsh replacement (default ssh)
+      --rsync-path=PATH       specify path to rsync on the remote machine
+  -C, --cvs-exclude           auto ignore files in the same way CVS does
+      --delete                delete files that don't exist on the sending side
+@@ -90,10 +90,10 @@
+ SETUP
+ -----
+ 
+-Rsync uses rsh or ssh for communication. It does not need to be setuid
++Rsync uses ssh or rsh for communication. It does not need to be setuid
+ and requires no special privileges for installation. It does not
+ require a inetd entry or a daemon. You must, however, have a working
+-rsh or ssh system. Using ssh is recommended for its security
++ssh or rsh system. Using rsh is discouraged for lack of security
+ features. 
+ 
+ To install rsync, first run the "configure" script. This will create a
Index: files/ssh-patch-options.c
===================================================================
RCS file: ssh-patch-options.c
diff -N ssh-patch-options.c
--- /dev/null	Tue Mar  6 03:55:00 2001
+++ ssh-patch-options.c	Mon Feb 26 17:46:47 2001
@@ -0,0 +1,11 @@
+--- options.c.orig	Mon Feb 26 17:37:19 2001
++++ options.c	Mon Feb 26 17:46:28 2001
+@@ -138,7 +138,7 @@
+   rprintf(F," -W, --whole-file            copy whole files, no incremental checks\n");
+   rprintf(F," -x, --one-file-system       don't cross filesystem boundaries\n");
+   rprintf(F," -B, --block-size=SIZE       checksum blocking size (default %d)\n",BLOCK_SIZE);  
+-  rprintf(F," -e, --rsh=COMMAND           specify rsh replacement\n");
++  rprintf(F," -e, --rsh=COMMAND           specify rsh replacement (default %s)\n", RSYNC_RSH);
+   rprintf(F,"     --rsync-path=PATH       specify path to rsync on the remote machine\n");
+   rprintf(F," -C, --cvs-exclude           auto ignore files in the same way CVS does\n");
+   rprintf(F,"     --existing              only update files that already exist\n");
Index: files/ssh-patch-rsync.1
===================================================================
RCS file: ssh-patch-rsync.1
diff -N ssh-patch-rsync.1
--- /dev/null	Tue Mar  6 03:55:00 2001
+++ ssh-patch-rsync.1	Mon Feb 26 17:50:02 2001
@@ -0,0 +1,82 @@
+--- rsync.1.orig	Wed Sep  6 11:46:43 2000
++++ rsync.1	Mon Feb 26 17:49:56 2001
+@@ -36,7 +36,7 @@
+ .IP o 
+ a CVS exclude mode for ignoring the same files that CVS would ignore
+ .IP o 
+-can use any transparent remote shell, including rsh or ssh
++can use any transparent remote shell, including ssh or rsh
+ .IP o 
+ does not require root privileges
+ .IP o 
+@@ -55,8 +55,8 @@
+ .IP 
+ .IP o 
+ for copying from the local machine to a remote machine using
+-a remote shell program as the transport (such as rsh or
+-ssh)\&. This is invoked when the destination path contains a
++a remote shell program as the transport (such as ssh or
++rsh)\&. This is invoked when the destination path contains a
+ single : separator\&.
+ .IP 
+ .IP o 
+@@ -86,11 +86,11 @@
+ .PP 
+ See the file README for installation instructions\&.
+ .PP 
+-Once installed you can use rsync to any machine that you can use rsh
+-to\&.  rsync uses rsh for its communications, unless both the source and
++Once installed you can use rsync to any machine that you can use ssh
++to\&.  rsync uses ssh for its communications, unless both the source and
+ destination are local\&.
+ .PP 
+-You can also specify an alternative to rsh, by either using the -e
++You can also specify an alternative to ssh, by either using the -e
+ command line option, or by setting the RSYNC_RSH environment variable\&.
+ .PP 
+ One common substitute is to use ssh, which offers a high degree of
+@@ -151,7 +151,7 @@
+ .PP 
+ .SH "CONNECTING TO AN RSYNC SERVER" 
+ .PP 
+-It is also possible to use rsync without using rsh or ssh as the
++It is also possible to use rsync without using ssh or rsh as the
+ transport\&. In this case you will connect to a remote rsync server
+ running on TCP port 873\&. 
+ .PP 
+@@ -160,7 +160,7 @@
+ your web proxy\&. Note that your web proxy must allow proxying to port
+ 873, this must be configured in your proxy servers ruleset\&.
+ .PP 
+-Using rsync in this way is the same as using it with rsh or ssh except
++Using rsync in this way is the same as using it with ssh or rsh except
+ that:
+ .PP 
+ .IP o 
+@@ -270,7 +270,7 @@
+  -W, --whole-file            copy whole files, no incremental checks
+  -x, --one-file-system       don\'t cross filesystem boundaries
+  -B, --block-size=SIZE       checksum blocking size (default 700)
+- -e, --rsh=COMMAND           specify rsh replacement
++ -e, --rsh=COMMAND           specify rsh replacement (default ssh)
+      --rsync-path=PATH       specify path to rsync on the remote machine
+  -C, --cvs-exclude           auto ignore files in the same way CVS does
+      --existing              only update files that already exist
+@@ -563,7 +563,7 @@
+ .IP "\fB-e, --rsh=COMMAND\fP" 
+ This option allows you to choose an alternative
+ remote shell program to use for communication between the local and
+-remote copies of rsync\&. By default, rsync will use rsh, but you may
++remote copies of rsync\&. By default, rsync will use ssh, but you may
+ like to instead use ssh because of its high security\&.
+ .IP 
+ You can also choose the remote shell program using the RSYNC_RSH
+@@ -887,7 +887,7 @@
+ .DS 
+  
+ 
+-   rsh remotehost /bin/true > out\&.dat
++   ssh remotehost /bin/true > out\&.dat
+ 
+ .DE 
+  
Index: files/ssh-patch-rsync.h
===================================================================
RCS file: ssh-patch-rsync.h
diff -N ssh-patch-rsync.h
--- /dev/null	Tue Mar  6 03:55:00 2001
+++ ssh-patch-rsync.h	Mon Feb 26 17:47:40 2001
@@ -0,0 +1,11 @@
+--- rsync.h.orig	Sat Aug 19 22:10:39 2000
++++ rsync.h	Mon Feb 26 17:47:15 2001
+@@ -72,7 +72,7 @@
+ #if HAVE_REMSH
+ #define RSYNC_RSH "remsh"
+ #else
+-#define RSYNC_RSH "rsh"
++#define RSYNC_RSH "ssh"
+ #endif
+ 
+ #include <sys/types.h>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86g0gst4bc.wl>