prefix=@prefix@
datarootdir=@datarootdir@
exec_prefix=@exec_prefix@
-stunnel4=@STUNNEL4@
bindir=@bindir@
+libdir=@libdir@/rsync
mandir=@mandir@
LIBS=@LIBS@
install: all
-${MKDIR_P} ${DESTDIR}${bindir}
+ -${MKDIR_P} ${DESTDIR}${libdir}
${INSTALLCMD} ${INSTALL_STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
${INSTALLCMD} -m 755 rsync-ssl ${DESTDIR}${bindir}
- ${INSTALLCMD} -m 755 rsync-ssl-rsh ${DESTDIR}${bindir}
+ ${INSTALLCMD} -m 755 ssl-rsh ${DESTDIR}${libdir}
-${MKDIR_P} ${DESTDIR}${mandir}/man1
-${MKDIR_P} ${DESTDIR}${mandir}/man5
if test -f rsync.1; then ${INSTALLMAN} -m 644 rsync.1 ${DESTDIR}${mandir}/man1; fi
fi ; \
done
-rsync.1: rsync.yo
+rsync.1: rsync.yo $(srcdir)/tweak_manpage
yodl2man -o rsync.1 $(srcdir)/rsync.yo
-$(srcdir)/tweak_manpage rsync.1
-rsync-ssl.1: rsync-ssl.yo
+rsync-ssl.1: rsync-ssl.yo $(srcdir)/tweak_manpage
yodl2man -o rsync-ssl.1 $(srcdir)/rsync-ssl.yo
-$(srcdir)/tweak_manpage rsync-ssl.1
-rsyncd.conf.5: rsyncd.conf.yo
+rsyncd.conf.5: rsyncd.conf.yo $(srcdir)/tweak_manpage
yodl2man -o rsyncd.conf.5 $(srcdir)/rsyncd.conf.yo
-$(srcdir)/tweak_manpage rsyncd.conf.5
- Added the `--write-devices` option based on the long-standing patch.
- - Added openssl support to the rsync-ssl script via its renamed helper script,
- rsync-ssl-rsh. Both bash scripts are now installed by default (removing the
- install-ssl-client make target). Rsync was also enhanced to set the
+ - Added openssl support to the rsync-ssl script via a (lib installed) helper
+ script, ssl-rsh. Both bash scripts are now installed by default, removing
+ the install-ssl-client make target. Rsync was also enhanced to set the
`RSYNC_PORT` environment variable when running a daemon-over-rsh script. Its
value is the user-specified port number (set via `--port` or an rsync://
URL) or 0 if the user didn't override the port.
%config(noreplace) /etc/xinetd.d/rsync
%{_prefix}/bin/rsync
%{_prefix}/bin/rsync-ssl
-%{_prefix}/bin/rsync-ssl-rsh
+%{_prefix}/lib/rsync/ssl-rsh
%{_mandir}/man1/rsync.1*
%{_mandir}/man1/rsync-ssl.1*
%{_mandir}/man5/rsyncd.conf.5*
esac
mydir="${0%/*}"
+libdir="$mydir/../lib/rsync"
-exec "$mydir/rsync" --rsh="$mydir/rsync-ssl-rsh" "${@}"
+exec "$mydir/rsync" --rsh="$libdir/ssl-rsh" "${@}"
Note that the stunnel connection type requires at least version 4 of stunnel,
which should be the case on modern systems.
-This script requires that a helper script named bf(rsync-ssl-rsh) be installed
-in the same directory as this bf(rsync-ssl) script so that rsync can use it as
-its remote-shell command.
+This script requires that a helper script named bf(ssl-rsh) be installed the
+@libdir@ dir so that rsync can use it as its remote-shell command.
manpagesection(ENVIRONMENT VARIABLES)
manpagefiles()
-rsync-ssl-rsh
+@libdir@/ssl-rsh
manpageseealso()
#!/bin/bash
# This must be called as (note the trailing dot):
#
-# rsync-ssl-rsh HOSTNAME rsync --server --daemon .
+# ssl-rsh HOSTNAME rsync --server --daemon .
#
# ... which is typically done via the rsync-ssl script, which results in something like this:
#
-# rsync --rsh=rsync-ssl-rsh -aiv HOSTNAME::module [ARGS]
+# rsync --rsh=/usr/lib/rsync/ssl-rsh -aiv HOSTNAME::module [ARGS]
#
# This SSL setup based on the files by: http://dozzie.jarowit.net/trac/wiki/RsyncSSL
# Note that an stunnel connection requires at least version 4.x of stunnel.
-# The environment can override our defaults using RSYNC_SSL_* variables
+# The environment can override our defaults using RSYNC_SSL_* variables. See `man rsync-ssl`.
function path_search {
IFS_SAVE="$IFS"
shift
if [[ -z "$hostname" || "$1" != rsync || "$2" != --server || "$3" != --daemon ]]; then
- echo "Usage: rsync-ssl-helper HOSTNAME rsync --server --daemon ." 1>&2
+ echo "Usage: ssl-rsh HOSTNAME rsync --server --daemon ." 1>&2
exit 1
fi
use strict;
use warnings;
+our %subs;
+
+BEGIN {
+ open IN, '<', 'Makefile' or die $!;
+ while (<IN>) {
+ my ($var, $val) = /^(\w+)=(.+)/;
+ next unless defined $val;
+ $val =~ s/\$\{(\w+)\}/$subs{$1}/ while $val =~ /\$\{/;
+ $subs{$var} = $val;
+ last if $var eq 'libdir';
+ }
+ close IN;
+}
+
# We only need to use "\&'" or "\&." at the start of a line.
s/(?<=.)\\\&(['.])/$1/g;
s/^\\\&(\\\(oq)/$1/gm;
+s/\@libdir\@/$subs{libdir}/g;
+
sub realquotes
{
my($txt) = @_;