Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 124557 Details for
Bug 184560
app-backup/flexbackup fails to back up targets with spaces in their names in some modes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch now fixes all backup modes.
flexbackup-1.2.1-spaces-in-filenames.patch (text/plain), 3.99 KB, created by
John R. Graham
on 2007-07-11 13:24:28 UTC
(
hide
)
Description:
Patch now fixes all backup modes.
Filename:
MIME Type:
Creator:
John R. Graham
Created:
2007-07-11 13:24:28 UTC
Size:
3.99 KB
patch
obsolete
>Index: flexbackup >=================================================================== >--- flexbackup (.../tags/flexbackup-1.2.1-r5) (revision 777) >+++ flexbackup (.../trunk) (revision 777) >@@ -1301,8 +1301,8 @@ > $cmd .= "$::unz"; > } > $cmd .= "("; >- $cmd .= "mkdir -p $::device ; "; >- $cmd .= "cd $::device ; "; >+ $cmd .= "mkdir -p \"$::device\" ; "; >+ $cmd .= "cd \"$::device\" ; "; > $cmd .= "$::path{cpio} -i "; > $cmd .= "-m "; > $cmd .= "-d "; >@@ -1351,9 +1351,8 @@ > > # Have to take leading './' off to make rsync's include/exclude work right > $cmd .= " | $::path{sed} -e \"s/\\.\\///g\" | "; >- > $cmd .= "$::path{rsync} "; >- $cmd .= "--include-from=- --exclude=* "; >+ $cmd .= "--files-from=- "; > $cmd .= "--archive "; > $cmd .= "$::rsync_verb_flag "; > $cmd .= "--delete --delete-excluded "; >@@ -1368,7 +1367,7 @@ > $cmd .= "$remote:"; > } > } >- $cmd .= "$dir/ $::device"; >+ $cmd .= "\"$dir/\" \"$::device\""; > > push(@cmds, $cmd); > >@@ -1658,7 +1657,9 @@ > my $tmpfile = "$cfg::tmpdir/ar.$PROCESS_ID"; > my $remove = ''; > >- &log("| NOTE: ar archives will not descend directories"); >+ &log("| NOTE: ar archives will not recurse into subdirectories,"); >+ &log("| which makes them inappropriate for most backups."); >+ &log("| Be sure this is what you want."); > > if (defined($remote) and ($level != 0)) { > my $time = &get_last_date($label, $level, 'numeric'); >@@ -1682,11 +1683,13 @@ > $cmd = "cd \"$dir\" && "; > $cmd .= &file_list_cmd( $dir, $stamp, 'newline', $level, $remote, '-maxdepth 1 ! -type d'); > $cmd .= "> $filelist; "; >+ # Escape any spaces in filenames. >+ $cmd .= "$::path{sed} -i -e 's/ /\\\\ /g' $filelist; "; > > $cmd .= "$::path{ar} rc"; > $cmd .= "$::ar_verb_flag "; > $cmd .= "$tmpfile "; >- $cmd .= "`$::path{cat} $filelist`"; >+ $cmd .= "\@$filelist "; > $cmd .= "; $::path{cat} $tmpfile $::z"; > > # Buffer both sides if remote >@@ -1800,12 +1803,9 @@ > > $cmd = "cd \"$dir\" && "; > $cmd .= &file_list_cmd( $dir, $stamp, 'newline', $level, $remote); >- $cmd .= "> $filelist; "; >- >- $cmd .= "$::path{lha} a"; >+ $cmd .= " | $::path{lha} a"; > $cmd .= "$::lha_verb_flag "; > $cmd .= "$tmpfile "; >- $cmd .= "`$::path{cat} $filelist`"; > $cmd .= "; $::path{cat} $tmpfile $::z"; > > # Buffer both sides if remote >@@ -2766,6 +2766,7 @@ > $::path{'dd'} = &checkinpath('dd'); > $::path{'printf'} = &checkinpath('printf'); > $::path{'mkdir'} = &checkinpath('mkdir'); >+ $::path{'sed'} = &checkinpath('sed'); > > push(@::remoteprogs,($::path{'touch'},$::path{'rm'},$::path{'find'},$::path{'printf'},$::path{'mkdir'})); > >@@ -4894,9 +4895,10 @@ > $rex .= '\)"'; > } > # Show what the darn thing is constructing for prune expressions. >- &log("| \"find\" regex for pruning is:"); >- &log("| $rex"); >- &line(); >+ my $temp = $rex; >+ $temp =~ s/\\([()|])/$1/g; >+ &log("| \"find\" regex for pruning (shell escaping omitted for clarity) is:"); >+ &log("| $temp"); > $cmd .= '-regex ' . $rex . ' -prune -o '; > } else { > # Show what the darn thing is constructing for prune expressions. >@@ -4906,6 +4908,7 @@ > # don't have permissions on and are running as non-root) > $cmd .= "-depth "; > } >+ &line(); > > $cmd .= "$::mountpoint_flag "; > $cmd .= "! -type s "; >@@ -5301,12 +5304,14 @@ > print $::msg "| Checking '$cfg::buffer' on this machine... "; > $pipecmd = "sh $tmp_script "; > } else { >+ $pipecmd = >+ "$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; " . >+ "cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; " . >+ "sh $tmp_script; rm -rf $cfg::tmpdir')"; > print $::msg "| Checking '$cfg::buffer' on host $host... "; >- $pipecmd = "$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -rf $cfg::tmpdir')"; > } > > if (!defined($::debug)) { >- > open(PIPE,"$pipecmd |") || die; > > $explicit_success = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 184560
:
124205
|
124206
|
124557
|
125301