Skip Menu |

This queue is for tickets about the File-Rsync CPAN distribution.

Report information
The Basics
Id: 107063
Status: resolved
Priority: 0/
Queue: File-Rsync

People
Owner: LEAKIN [...] cpan.org
Requestors: gnassiopoulos [...] cfa.harvard.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'rsync-path' no longer works in new call
Date: Sun, 13 Sep 2015 10:48:44 -0400
To: bug-File-Rsync [...] rt.cpan.org
From: George Nassiopoulos <gnassiopoulos [...] cfa.harvard.edu>
Hello, The 'new' 'rsync-path' option documented in the File::Rsync Synopsis: use File::Rsync; $obj = File::Rsync->new( archive => 1, compress => 1, rsh => '/usr/local/bin/ssh', 'rsync-path' => '/usr/local/bin/rsync' ); Does not seem to work in version 0.46. It did work in version 0.43. 'path-to-rsync' does work instead. -- George E. Nassiopoulos gnassiopoulos@cfa.harvard.edu
Subject: Re: [rt.cpan.org #107063] 'rsync-path' no longer works in new call
Date: Mon, 14 Sep 2015 13:35:42 -0500
To: George Nassiopoulos via RT <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] japh.net>
George, Do you have a specific code sample where this is failing? It seems to be working properly in my tests. Note that rsync-path is an rsync option to tell the remote end where to find the rsync binary and path-to-rsync is a File::Rsync option to tell perl where to find the rsync binary on the local system, overriding the normal PATH lookup. Also, version 0.46 has a bug parsing hash references that could be causing a problem. I have 0.47 staged for release to fix it. You can pull the pre-released version here for testing: http://www.japh.net/File-Rsync-0.47.tar.gz -Lee Show quoted text
> Date: Sun, 13 Sep 2015 10:49:16 -0400 > From: George Nassiopoulos via RT <bug-File-Rsync@rt.cpan.org> > To: undisclosed-recipients: ; > Subject: [rt.cpan.org #107063] 'rsync-path' no longer works in new call > X-CPAN.org: This message routed through the cpan.org mail forwarding > service. Please use PAUSE pause.perl.org to configure your delivery > settings. > Reply-To: bug-File-Rsync@rt.cpan.org > X-RT-Loop-Prevention: rt.cpan.org > RT-Ticket: rt.cpan.org #107063 > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > RT-Originator: gnassiopoulos@cfa.harvard.edu > X-RT-Original-Encoding: utf-8 > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > 2015.9.13.143917 > > Sun Sep 13 10:49:15 2015: Request 107063 was acted upon. > Transaction: Ticket created by gnassiopoulos@cfa.harvard.edu > Queue: File-Rsync > Subject: 'rsync-path' no longer works in new call > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: gnassiopoulos@cfa.harvard.edu > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107063 > > > > Hello, > > The 'new' 'rsync-path' option documented in the > File::Rsync Synopsis: > > use File::Rsync; > > $obj = File::Rsync->new( > archive => 1, > compress => 1, > rsh => '/usr/local/bin/ssh', > 'rsync-path' => '/usr/local/bin/rsync' > ); > > > Does not seem to work in version 0.46. It did > work in version 0.43. 'path-to-rsync' does work > instead. > > > -- > George E. Nassiopoulos > gnassiopoulos@cfa.harvard.edu >
Subject: Re: [rt.cpan.org #107063] 'rsync-path' no longer works in new call
Date: Mon, 14 Sep 2015 14:52:27 -0400
To: bug-File-Rsync [...] rt.cpan.org
From: George Nassiopoulos <gnassiopoulos [...] cfa.harvard.edu>
On Mon, Sep 14, 2015 at 2:36 PM, Lee Eakin via RT <bug-File-Rsync@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=107063 > > > George, > Do you have a specific code sample where this is failing? It seems to > be working properly in my tests. > > Note that rsync-path is an rsync option to tell the remote end where to > find the rsync binary and path-to-rsync is a File::Rsync option to tell > perl where to find the rsync binary on the local system, overriding the > normal PATH lookup. > > Also, version 0.46 has a bug parsing hash references that could be > causing a problem. I have 0.47 staged for release to fix it. > You can pull the pre-released version here for testing: > http://www.japh.net/File-Rsync-0.47.tar.gz > -Lee
Hi Lee, My apologies. I wasn't aware of the distinction between rsync-path and path-to-rsync. The perl script i'm running has always done an rsync from a local src filesystem (solaris or linux) to a local NFS mounted dst filesystem. I had been using new->('rsync-path' ... call and the perl script was able to find the proper executable to run up until v4.3. I can try to condense the script I have down to a few lines to see if I can replicate the issue. For what it's worth, I upgraded to v.46 when I also installed perl5.20.2. I don't know if there are any funny interactions because of the perl version I'm using. Thanks for your reply and your time. If I can successfully condense the problem down to a few lines I'll pass it along to you. At some point I want to see if v.47 works. -- George E. Nassiopoulos gnassiopoulos@cfa.harvard.edu
Subject: Re: [rt.cpan.org #107063] 'rsync-path' no longer works in new call
Date: Mon, 14 Sep 2015 15:50:09 -0400
To: bug-File-Rsync [...] rt.cpan.org
From: George Nassiopoulos <gnassiopoulos [...] cfa.harvard.edu>
On Mon, Sep 14, 2015 at 2:52 PM, George Nassiopoulos <gnassiopoulos@cfa.harvard.edu> wrote: Show quoted text
> On Mon, Sep 14, 2015 at 2:36 PM, Lee Eakin via RT > <bug-File-Rsync@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=107063 > >> >> George, >> Do you have a specific code sample where this is failing? It seems to >> be working properly in my tests. >> >> Note that rsync-path is an rsync option to tell the remote end where to >> find the rsync binary and path-to-rsync is a File::Rsync option to tell >> perl where to find the rsync binary on the local system, overriding the >> normal PATH lookup. >> >> Also, version 0.46 has a bug parsing hash references that could be >> causing a problem. I have 0.47 staged for release to fix it. >> You can pull the pre-released version here for testing: >> http://www.japh.net/File-Rsync-0.47.tar.gz >> -Lee
> > > Hi Lee, > > My apologies. I wasn't aware of the distinction between rsync-path and > path-to-rsync. The perl script i'm running has always > done an rsync from a local src filesystem (solaris or linux) to a local > NFS mounted dst filesystem. I had been using new->('rsync-path' ... > call and the perl script was able to find the proper executable to > run up until v4.3. I can try to condense the script I have down to a few > lines to see if I can replicate the issue. For what it's worth, I upgraded > to v.46 when I also installed perl5.20.2. I don't know if there are any > funny interactions because of the perl version I'm using. > > Thanks for your reply and your time. If I can successfully condense the > problem down to a few lines I'll pass it along to you. At some point I > want to see if v.47 works. > > -- > George E. Nassiopoulos > gnassiopoulos@cfa.harvard.edu
Hello again Lee, Here is a short program that uses perl5.20.2 and calls File::Rsync v0.46: ########################################### #!/opt/bin/perl5.20.2/perl -w # use strict; use Fcntl; use File::Rsync; use vars qw( %rsync_control ) ; my $src_dir = "/tmp/A/" ; my $dst_dir = "/tmp/B" ; $rsync_control{ "rsync_defaults" } = [ "archive" => 1, ] ; my $rsync_obj = File::Rsync->new( @{ $rsync_control { rsync_defaults } } , 'rsync-path' => "/opt/bin/rsync" , ) ; $rsync_obj->exec( "src" => $src_dir , "dst" => $dst_dir , ) ; my $command_used = $rsync_obj->lastcmd; print STDERR "$command_used\n" ; ########################################### When I run the script I get: e.g. 1 % ./t_perl5.20.2_v46.pl rsync --archive --rsync-path=/opt/bin/rsync /tmp/A/ /tmp/B If I change only the version of perl that the script runs to perl5.16.3 install (which has File::Rsync v0.43 installed) I get: e.g. 2 % ./t_perl5.16.3_v43.pl /opt/bin/rsync --archive --rsync-path=/opt/bin/rsync /tmp/A/ /tmp/B If I call new with 'path-to-rsync' I get: e.g. 3 % ./t_perl5.20.2_v46.pl /opt/bin/rsync --archive /tmp/A/ /tmp/B e.g. 4 % ./t_perl5.16.3_v43.pl /opt/bin/rsync --archive /tmp/A/ /tmp/B If I read your initial email to me correctly, it almost sounds as if the v0.43 behaviour I got used to using is not intended and contrary to documentation and I should have been using both rsync-path and path-to-rsync all along ? I apologize for my confusion. -- George E. Nassiopoulos gnassiopoulos@cfa.harvard.edu
Subject: Re: [rt.cpan.org #107063] 'rsync-path' no longer works in new call
Date: Mon, 14 Sep 2015 15:04:31 -0500
To: George Nassiopoulos via RT <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] ti.com>
Ah! OK, version 0.43 saved a location for rsync on install so that 'path-to-rsync' was not needed except to override the installed location. Unfortunately the logic for that broke automated installs an made cpan archive syncing very painful to setup. To fix that problem and a couple of others, the newer code defaults to using $ENV{PATH} (on Unix) to find the rsync command. Version 0.46 went even further to support rsync on Windows. You can modify $ENV{PATH} in your script to include /opt/bin or add the path_to_rsync option. I personally prefer defining a known good path inside the script, but the module should work using either method. -Lee Show quoted text
> Date: Mon, 14 Sep 2015 15:50:41 -0400 > From: George Nassiopoulos via RT <bug-File-Rsync@rt.cpan.org> > To: undisclosed-recipients: ; > Subject: Re: [rt.cpan.org #107063] 'rsync-path' no longer works in new call > X-CPAN.org: This message routed through the cpan.org mail forwarding > service. Please use PAUSE pause.perl.org to configure your delivery > settings. > Reply-To: bug-File-Rsync@rt.cpan.org > X-RT-Loop-Prevention: rt.cpan.org > RT-Ticket: rt.cpan.org #107063 > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > RT-Originator: gnassiopoulos@cfa.harvard.edu > X-RT-Original-Encoding: utf-8 > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > 2015.9.14.194516 > > Queue: File-Rsync > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107063 > > > On Mon, Sep 14, 2015 at 2:52 PM, George Nassiopoulos > <gnassiopoulos@cfa.harvard.edu> wrote:
> > On Mon, Sep 14, 2015 at 2:36 PM, Lee Eakin via RT > > <bug-File-Rsync@rt.cpan.org> wrote:
> >> <URL: https://rt.cpan.org/Ticket/Display.html?id=107063 > > >> > >> George, > >> Do you have a specific code sample where this is failing? It seems to > >> be working properly in my tests. > >> > >> Note that rsync-path is an rsync option to tell the remote end where to > >> find the rsync binary and path-to-rsync is a File::Rsync option to tell > >> perl where to find the rsync binary on the local system, overriding the > >> normal PATH lookup. > >> > >> Also, version 0.46 has a bug parsing hash references that could be > >> causing a problem. I have 0.47 staged for release to fix it. > >> You can pull the pre-released version here for testing: > >> http://www.japh.net/File-Rsync-0.47.tar.gz > >> -Lee
> > > > > > Hi Lee, > > > > My apologies. I wasn't aware of the distinction between rsync-path and > > path-to-rsync. The perl script i'm running has always > > done an rsync from a local src filesystem (solaris or linux) to a local > > NFS mounted dst filesystem. I had been using new->('rsync-path' ... > > call and the perl script was able to find the proper executable to > > run up until v4.3. I can try to condense the script I have down to a few > > lines to see if I can replicate the issue. For what it's worth, I upgraded > > to v.46 when I also installed perl5.20.2. I don't know if there are any > > funny interactions because of the perl version I'm using. > > > > Thanks for your reply and your time. If I can successfully condense the > > problem down to a few lines I'll pass it along to you. At some point I > > want to see if v.47 works. > > > > -- > > George E. Nassiopoulos > > gnassiopoulos@cfa.harvard.edu
> > Hello again Lee, > > Here is a short program that uses perl5.20.2 and calls File::Rsync v0.46: > > ########################################### > #!/opt/bin/perl5.20.2/perl -w > # > > use strict; > > use Fcntl; > > use File::Rsync; > > use vars qw( %rsync_control ) ; > > my $src_dir = "/tmp/A/" ; my $dst_dir = "/tmp/B" ; > > $rsync_control{ "rsync_defaults" } = [ > "archive" => 1, > ] ; > > my $rsync_obj = File::Rsync->new( > @{ $rsync_control { rsync_defaults } } , > 'rsync-path' => "/opt/bin/rsync" , > ) ; > > $rsync_obj->exec( "src" => $src_dir , "dst" => $dst_dir , ) ; > > my $command_used = $rsync_obj->lastcmd; > > print STDERR "$command_used\n" ; > ########################################### > > When I run the script I get: > > e.g. 1 % ./t_perl5.20.2_v46.pl > rsync --archive --rsync-path=/opt/bin/rsync /tmp/A/ /tmp/B > > If I change only the version of perl that the script runs to > perl5.16.3 install (which has File::Rsync v0.43 installed) I get: > > e.g. 2 % ./t_perl5.16.3_v43.pl > /opt/bin/rsync --archive --rsync-path=/opt/bin/rsync /tmp/A/ /tmp/B > > If I call new with 'path-to-rsync' I get: > > e.g. 3 % ./t_perl5.20.2_v46.pl > /opt/bin/rsync --archive /tmp/A/ /tmp/B > e.g. 4 % ./t_perl5.16.3_v43.pl > /opt/bin/rsync --archive /tmp/A/ /tmp/B > > If I read your initial email to me correctly, it almost sounds as if the > v0.43 behaviour I got used to using is not intended and contrary to > documentation and I should have been using both rsync-path and > path-to-rsync all along ? I apologize for my confusion. > > -- > George E. Nassiopoulos > gnassiopoulos@cfa.harvard.edu >