Your message dated Thu, 10 Jul 2014 12:35:14 +0200
with message-id <[email protected]>
and subject line Re: Bug#752341: rsync: -e/--rsh doesn't support %H (contra
manpage)
has caused the Debian Bug report #752341,
regarding rsync: -e/--rsh doesn't support %H (contra manpage)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
752341: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752341
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: rsync
Version: 3.1.0-3
Severity: normal
The manpage gives the impression that if you need to use -e/--rsh and you
want the destination hostname somewhere other than the end of the command
line, you can put the token '%H' in the middle of the string and it'll be
replaced by the destination host. But this does not work:
$ PATH=/usr/bin strace -f -eexecve rsync -av -e 'ssh %H sudo -n --' ./
remotehost:/backup
execve("/usr/bin/rsync", ["rsync", "-av", "-e", "ssh %H sudo -n --", "./",
"remotehost:/backup"], [/* 36 vars */]) = 0
Process 15035 attached
[pid 15035] execve("/usr/bin/ssh", ["ssh", "%H", "sudo", "-n", "--",
"remotehost", "rsync", "--server", "-vlogDtpre.iLs", ".", "/backup"], [/* 36
vars */]) = 0
ssh: Could not resolve hostname %h: Name or service not known
Process 15035 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
You can see that the %H has been passed verbatim to ssh, and that the
remote hostname has been placed after the entire -e string.
The RSYNC_RSH environment variable (which is documented to be equivalent
to the -e option) exhibits the same bug.
The manpage is inconsistent about whether the token is %H or %h: neither
works.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (501, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages rsync depends on:
ii base-files 7.3
ii libacl1 2.2.52-1
ii libc6 2.19-3
ii libpopt0 1.16-8
ii lsb-base 4.1+Debian13
ii zlib1g 1:1.2.8.dfsg-1
rsync recommends no packages.
Versions of packages rsync suggests:
ii openssh-client 1:6.6p1-5
ii openssh-server 1:6.6p1-5
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sun 22 Jun 2014, Zack Weinberg wrote:
>
> The manpage gives the impression that if you need to use -e/--rsh and you
> want the destination hostname somewhere other than the end of the command
> line, you can put the token '%H' in the middle of the string and it'll be
> replaced by the destination host. But this does not work:
>
> $ PATH=/usr/bin strace -f -eexecve rsync -av -e 'ssh %H sudo -n --' ./
> remotehost:/backup
> execve("/usr/bin/rsync", ["rsync", "-av", "-e", "ssh %H sudo -n --", "./",
> "remotehost:/backup"], [/* 36 vars */]) = 0
> Process 15035 attached
> [pid 15035] execve("/usr/bin/ssh", ["ssh", "%H", "sudo", "-n", "--",
> "remotehost", "rsync", "--server", "-vlogDtpre.iLs", ".", "/backup"], [/* 36
> vars */]) = 0
> ssh: Could not resolve hostname %h: Name or service not known
> Process 15035 detached
> --- SIGCHLD (Child exited) @ 0 (0) ---
> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
> rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
>
> You can see that the %H has been passed verbatim to ssh, and that the
> remote hostname has been placed after the entire -e string.
>
> The RSYNC_RSH environment variable (which is documented to be equivalent
> to the -e option) exhibits the same bug.
You misread the manpage, you can only use the %H string in the
RSYNC_CONNECT_PROG environment variable, not in the -e option nor the
RSYNC_RSH environment variable.
Paul
--- End Message ---