$OpenBSD: patch-usr_share_mysql-zrm_plugins_socket-copy_pl,v 1.1 2012/04/03 10:56:03 giovanni Exp $
--- usr/share/mysql-zrm/plugins/socket-copy.pl.orig	Thu Feb  4 01:19:25 2010
+++ usr/share/mysql-zrm/plugins/socket-copy.pl	Tue Apr  3 12:40:28 2012
@@ -70,7 +70,7 @@ my $REMOTE_MYSQL_BINPATH = "/usr/bin";
 # Uncomment and modify this if some other directory is to be used
 #$ENV{'TMPDIR'}="/tmp";
 
-my $TAR = "tar";
+my $TAR = "gtar";
 my $CP="cp -pr";
 
 my $MYSQL_BINPATH="/usr/bin";
@@ -164,7 +164,7 @@ sub getCopyParameters()
 sub doLocalTar()
 {
         my $cmd;
-        my $tarCmd = "$TAR --same-owner $compress -phsC ";
+        my $tarCmd = "$TAR --same-owner -f- $compress -phsC ";
 	
 	my $s = $srcFile;
 	$s =~ s/^"//;
@@ -318,7 +318,7 @@ sub sendArgsToRemoteHost()
 # This will read the data from the socket and pipe the output to tar
 sub readTarStream()
 {
-	unless( open( TAR_H, "|$TAR --same-owner $compress -xphsC $destDir 2>/dev/null" ) ){
+	unless( open( TAR_H, "|$TAR --same-owner $compress -f- -xphsC $destDir 2>/dev/null" ) ){
 		die "tar failed $!";
 	}
         binmode( TAR_H );
@@ -344,7 +344,7 @@ sub readTarStream()
 #$_[1] filename
 sub writeTarStream()
 {
-        unless(open( TAR_H, "$TAR --same-owner $compress -cphsC $_[0] $_[1] 2>/dev/null|" ) ){
+        unless(open( TAR_H, "$TAR --same-owner $compress -f- -cphsC $_[0] $_[1] 2>/dev/null|" ) ){
                 &printandDie( "tar failed $!\n" );
         }
 	binmode( TAR_H );
