From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 23 17:00:11 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2684A1065682 for ; Wed, 23 Jul 2008 17:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 81EEB8FC13 for ; Wed, 23 Jul 2008 17:00:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6NH09DJ094416 for ; Wed, 23 Jul 2008 17:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6NH09uA094415; Wed, 23 Jul 2008 17:00:09 GMT (envelope-from gnats) Resent-Date: Wed, 23 Jul 2008 17:00:09 GMT Resent-Message-Id: <200807231700.m6NH09uA094415@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcus von Appen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C72510656C7 for ; Wed, 23 Jul 2008 16:58:07 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.18.43]) by mx1.freebsd.org (Postfix) with ESMTP id 337748FC0C for ; Wed, 23 Jul 2008 16:58:05 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from [89.182.211.214] (helo=medusa.sysfault.org) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KLhf8-00073W-Vx for FreeBSD-gnats-submit@freebsd.org; Wed, 23 Jul 2008 18:58:04 +0200 Received: from localhost ([127.0.0.1] helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KLhfD-000EYE-PJ for FreeBSD-gnats-submit@freebsd.org; Wed, 23 Jul 2008 18:58:09 +0200 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.2/8.14.2/Submit) id m6NGw7dP055937; Wed, 23 Jul 2008 18:58:07 +0200 (CEST) (envelope-from marcus) Message-Id: <200807231658.m6NGw7dP055937@medusa.sysfault.org> Date: Wed, 23 Jul 2008 18:58:07 +0200 (CEST) From: Marcus von Appen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/125905: [Maintainer-update] sysutils/flexbackup: patch set incorporation X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2008 17:00:11 -0000 >Number: 125905 >Category: ports >Synopsis: [Maintainer-update] sysutils/flexbackup: patch set incorporation >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jul 23 17:00:08 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Marcus von Appen >Release: FreeBSD 7.0-STABLE i386 >Organization: >Environment: System: FreeBSD medusa.sysfault.org 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Jul 18 10:09:33 CEST 2008 >Description: This adds various patches from the Gentoo repository to the flexbackup port. Those include: - Tempfile security fixes - LZMA compression support - Patches for bash3 usage - Remote buffer usage fixes - Fixes for filenames with spaces. - Fixes for large files and afio usage. - Pruning fixes. It also adds a new link to additional configuration information in pkg-descr. Added file(s): - files/patch-flexbackup - files/patch-flexbackup.1 - files/patch-flexbackup.conf.5 Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- flexbackup-1.2.1_3.patch begins here --- diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/Makefile /usr/ports/sysutils/flexbackup.new/Makefile --- /usr/ports/sysutils/flexbackup/Makefile 2008-06-06 16:02:58.000000000 +0200 +++ /usr/ports/sysutils/flexbackup.new/Makefile 2008-07-19 10:06:50.000000000 +0200 @@ -7,7 +7,7 @@ PORTNAME= flexbackup PORTVERSION= 1.2.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= http://www.edwinh.org/flexbackup/tarball/ \ http://www.reynoldsnet.org/flexbackup/tarball/ @@ -27,7 +27,7 @@ BUFFER "Enable buffer support" Off \ MBUFFER "Enable mbuffer support" Off \ STAR "Enable star support" Off \ - ZIP "Eanble zip support" Off + ZIP "Enable zip support" Off .include diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/files/patch-flexbackup /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup --- /usr/ports/sysutils/flexbackup/files/patch-flexbackup 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup 2008-07-19 10:00:58.000000000 +0200 @@ -0,0 +1,395 @@ +--- ./flexbackup.orig 2008-07-19 09:56:20.000000000 +0200 ++++ ./flexbackup 2008-07-19 09:58:09.000000000 +0200 +@@ -269,6 +269,7 @@ + untie(%::index); + } + ++system ('rm', '-rf', $cfg::tmpdir); + exit(0); + + ###################################################################### +@@ -441,7 +442,7 @@ + # Get rid of trailing / + $dir = &nuke_trailing_slash($dir); + +- # If level is icremental for the set, each dir might ++ # If level is incremental for the set, each dir might + # have a different numeric level + if (!defined($::set_incremental)) { + $level = $::level; +@@ -687,6 +688,8 @@ + $filename .= ".zip"; + } elsif ($cfg::compress eq "compress") { + $filename .= ".Z"; ++ } elsif ($cfg::compress eq "lzma") { ++ $filename .= ".lzma"; + } + } elsif ($cfg::type eq "afio") { + # tag these a little different, the archive file itself isn't a +@@ -701,6 +704,8 @@ + $filename .= "-zip"; + } elsif ($cfg::compress eq "compress") { + $filename .= "-Z"; ++ } elsif ($cfg::compress eq "lzma") { ++ $filename .= "-lzma"; + } + } + +@@ -811,6 +816,11 @@ + ($remove, @cmds) = &backup_filelist($label, $localdir, $title, $level, $remote); + } + ++ if(defined($remote)) { ++ # create our temporary directory as first remote command ++ unshift(@cmds, &maybe_remote_cmd("$::path{mkdir} -p $cfg::tmpdir", $remote)); ++ } ++ + # Nuke any tmp files used in the above routines + if ($remove ne '') { + push(@cmds, &maybe_remote_cmd("$::path{rm} -f $remove", $remote)); +@@ -827,6 +837,11 @@ + push(@cmds, &maybe_remote_cmd("$::path{rm} -f $pkglist", $remote)); + } + } ++ ++ if(defined($remote)) { ++ # remove temporary directory as our last remote command ++ push(@cmds, &maybe_remote_cmd("$::path{rm} -rf $cfg::tmpdir", $remote)); ++ } + + # Strip multiple spaces + foreach my $cmd (@cmds) { +@@ -1140,7 +1155,7 @@ + $cmd .= "$::path{afio} -o "; + $cmd .= "$no_compress "; + $cmd .= "-z "; +- $cmd .= "-1 m "; ++ $cmd .= "-1 mC "; + $cmd .= "$::afio_z_flag "; + $cmd .= "$::afio_verb_flag "; + $cmd .= "$::afio_sparse_flag "; +@@ -1286,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 "; +@@ -1336,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 "; +@@ -1353,7 +1367,7 @@ + $cmd .= "$remote:"; + } + } +- $cmd .= "$dir/ $::device"; ++ $cmd .= "\"$dir/\" \"$::device\""; + + push(@cmds, $cmd); + +@@ -1643,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'); +@@ -1667,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 +@@ -1785,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 +@@ -2700,7 +2715,7 @@ + # First check if things are defined in the config file + # Checks exist, true/false, or one of options + &checkvar(\$cfg::type,'type','dump afio cpio tar star pax zip ar shar lha copy rsync filelist','tar'); +- &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware','gzip'); ++ &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware lzma','gzip'); + &checkvar(\$cfg::compr_level,'compr_level','exist','4'); + &checkvar(\$cfg::verbose,'verbose','bool','true'); + &checkvar(\$cfg::sparse,'sparse','bool','true'); +@@ -2750,8 +2765,10 @@ + $::path{'find'} = &checkinpath('find'); + $::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'})); ++ push(@::remoteprogs,($::path{'touch'},$::path{'rm'},$::path{'find'},$::path{'printf'},$::path{'mkdir'})); + + # Check device (or dir) + $::ftape = 0; +@@ -3001,6 +3018,16 @@ + $::z = " | $::path{zip} -$cfg::compr_level - -"; + $::unz = "$::path{funzip} | "; + } ++ } elsif ($cfg::compress eq "lzma") { ++ $::path{'lzma'} = &checkinpath($cfg::compress); ++ push(@::remoteprogs, $::path{$cfg::compress}); ++ if ($cfg::compr_level !~ m/^[123456789]$/) { ++ push(@::errors,"\$compr_level must be set to 1-9"); ++ } else { ++ $::z = " | $::path{$cfg::compress} -$cfg::compr_level "; ++ } ++ $::unz = "$::path{$cfg::compress} -d | "; ++ + } else { + $::z = ""; + $::unz = ""; +@@ -3059,12 +3086,11 @@ + $::read_cmd = "$bufcmd $read_flags"; + + } elsif ($cfg::buffer eq "mbuffer") { +- + $::path{'mbuffer'} = &checkinpath('mbuffer'); + push(@::remoteprogs, $::path{'mbuffer'}); + + my $megs = $cfg::buffer_megs . "M"; +- my $bufcmd = "$::path{mbuffer} -q -m $megs -p $cfg::buffer_fill_pct $mbuffer_blk_flag "; ++ my $bufcmd = "$::path{mbuffer} -q -m $megs -P $cfg::buffer_fill_pct $mbuffer_blk_flag "; + + $::buffer_cmd = " | $bufcmd"; + $::write_cmd = "$bufcmd -f -o "; +@@ -3075,7 +3101,6 @@ + } + } + } else { +- + # If buffering disabled, use dd or cat depending on if blocking turned off on not + if ($cfg::blksize eq '0') { + $::buffer_cmd = ""; +@@ -3252,6 +3277,10 @@ + $::afio_z_flag = "-P $::path{$cfg::compress} -Q -c -Z"; + $::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Q -c -Z"; + ++ } elsif ($cfg::compress eq "lzma") { ++ $::afio_z_flag = "-P $::path{$cfg::compress} -Q -$cfg::compr_level -Z"; ++ $::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Z"; ++ + } + $::unz = ""; # Reset & just use this for reading the archive file. + +@@ -3415,7 +3444,7 @@ + $::path{'lha'} = &checkinpath('lha'); + push(@::remoteprogs, $::path{'lha'}); + +- if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip)$/) { ++ if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip|lzma)$/) { + warn("Using type \"lha\" with compress=$cfg::compress makes no sense"); + warn("Setting compression to false"); + $::unz = ""; +@@ -3442,6 +3471,15 @@ + push(@::errors,"\$tmpdir $cfg::tmpdir is not writable"); + } + ++ $cfg::hostname = `hostname`; ++ chomp($cfg::hostname); ++ ++ # Use a subdirectory of the user-specified directory as our tmpdir ++ # Also note that we make it closer to globally unique as we sometimes ++ # use this variable for remote systems, so PID isn't enough ++ $cfg::tmpdir = $cfg::tmpdir .'/flexbackup.'.$$.'.'.$cfg::hostname; ++ mkdir ($cfg::tmpdir) || die "Can't create temporary directory, $!"; ++ + # Levels + if (defined($::opt{'level'}) and + (defined($::opt{'incremental'}) or +@@ -3781,7 +3819,7 @@ + + # Try and guess file types and commpression scheme + # might as well since we are reading from a file in this case +- if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip)$/) { ++ if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip|lzma)$/) { + $cfg::type = $1; + $cfg::compress = $2; + $cfg::type =~ s/^a$/ar/; +@@ -3789,16 +3827,18 @@ + $cfg::compress =~ s/bz2/bzip2/; + $cfg::compress =~ s/lzo/lzop/; + $cfg::compress =~ s/Z/compress/; ++ $cfg::compress =~ s/lzma/lzma/; + &log("| Auto-set to type=$cfg::type compress=$cfg::compress"); + &optioncheck(); # redo to set a few variables over + +- } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip)$/) { ++ } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip|lzma)$/) { + $cfg::type = "afio"; + $cfg::compress = $1; + $cfg::compress =~ s/gz/gzip/; + $cfg::compress =~ s/bz2/bzip2/; + $cfg::compress =~ s/lzo/lzop/; + $cfg::compress =~ s/Z/compress/; ++ $cfg::compress =~ s/lzma/lzma/; + &log("| Auto-set to type=$cfg::type compress=$cfg::compress"); + &optioncheck(); # redo to set a few variables over + +@@ -4843,23 +4883,31 @@ + } + + if (defined(%{$::prune{$prunekey}})) { ++ my $rex; + # FreeBSD needs -E (above) and no backslashes around the (|) chars + if ($::uname =~ /FreeBSD/) { +- $cmd .= '-regex "\./('; +- $cmd .= join('|', keys %{$::prune{$prunekey}}); +- $cmd .= ')/.*" '; +- } else { +- $cmd .= '-regex "\./\('; +- $cmd .= join('\|', keys %{$::prune{$prunekey}}); +- $cmd .= '\)/.*" '; +- } +- $cmd .= '-prune -o '; ++ $rex = '"\./('; ++ $rex .= join('|', keys %{$::prune{$prunekey}}); ++ $rex .= ')"'; ++ } else { ++ $rex = '"\./\('; ++ $rex .= join('\|', keys %{$::prune{$prunekey}}); ++ $rex .= '\)"'; ++ } ++ # Show what the darn thing is constructing for prune expressions. ++ (my $temp = $rex) =~ 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. ++ &log("| No pruning defined for this tree."); + # Can't use find -depth with -prune (see single unix spec etc) + # (not toally required anyway, only if you are archiving dirs you + # don't have permissions on and are running as non-root) + $cmd .= "-depth "; + } ++ &line(); + + $cmd .= "$::mountpoint_flag "; + $cmd .= "! -type s "; +@@ -5229,6 +5277,7 @@ + my $tmp_script = "$cfg::tmpdir/buftest.$host.$PROCESS_ID.sh"; + my $retval = 0; + my $pipecmd; ++ my $explicit_success; + + $buffer_cmd =~ s:^\s*\|\s*::; + $buffer_cmd =~ s:\s*\|\s*$::; +@@ -5236,14 +5285,14 @@ + # Create a script which tests the buffer program + open(SCR,"> $tmp_script") || die; + print SCR "#!/bin/sh\n"; +- print SCR "tmp_data=/tmp/bufftest\$\$.txt\n"; +- print SCR "tmp_err=/tmp/bufftest\$\$.err\n"; ++ print SCR "tmp_data=\`tempfile\`\n"; ++ print SCR "tmp_err=\`tempfile\`\n"; + print SCR "echo testme > \$tmp_data\n"; + print SCR "$buffer_cmd > /dev/null 2> \$tmp_err < \$tmp_data\n"; + print SCR "res=\$?\n"; + print SCR "out=\`cat \$tmp_err\`\n"; + print SCR "if [ \$res -eq 0 ]; then\n"; +- print SCR " echo successful\n"; ++ print SCR " echo \"successful\"\n"; + print SCR "else\n"; + print SCR " echo \"unsuccessful: exit code \$res: \$out\" \n"; + print SCR "fi\n"; +@@ -5254,14 +5303,22 @@ + 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 = "cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -f $tmp_script')"; + } + + if (!defined($::debug)) { +- + open(PIPE,"$pipecmd |") || die; ++ ++ $explicit_success = 0; + while () { ++ if (/^successful$/) { ++ $explicit_success = 1; ++ last; ++ } + if (/^unsuccessful: exit code (\d+): (.*)/) { + $retval = $1; + my $out = $2; +@@ -5290,11 +5347,15 @@ + print $::msg "\n(debug) $pipecmd\n"; + } + +- if ($retval == 0) { ++ if ($explicit_success) { + print $::msg "Ok\n"; + } else { ++ if ($retval == 0) { ++ push(@::errors, "Unanticipated problems encountered testing '$cfg::buffer' on host '$host'."); ++ } else { + print $::msg "Failed!\n"; + } ++ } + unlink("$tmp_script"); + + return($retval); +@@ -5396,10 +5457,10 @@ + my $shell = $1; + my $ver = $2; + if ($shell eq 'bash') { +- if ($ver =~ m/^2/) { +- $::shelltype{$host} = 'bash2'; +- } else { ++ if ($ver =~ m/^1/) { + $::shelltype{$host} = 'bash1'; ++ } else { ++ $::shelltype{$host} = 'bash2'; + } + } else { + $::shelltype{$host} = $shell; +@@ -5686,3 +5747,5 @@ + + return($spinner[$index]); + } ++ ++ diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/files/patch-flexbackup.1 /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.1 --- /usr/ports/sysutils/flexbackup/files/patch-flexbackup.1 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.1 2008-07-19 10:00:58.000000000 +0200 @@ -0,0 +1,11 @@ +--- ./flexbackup.1.orig 2008-07-19 09:56:14.000000000 +0200 ++++ ./flexbackup.1 2008-07-19 09:57:40.000000000 +0200 +@@ -48,7 +48,7 @@ + Extract (restore) the files listed in text file \(dqfilelist\(dq into your + current working directory. + .TP +-\fBflexbackup\fR \fI-extract\fR \fI-flist\fR <\fIfilename\fR> ++\fBflexbackup\fR \fI-extract\fR \fI-onefile\fR <\fIfilename\fR> + Extract (restore) the single file named \(dqfilename\(dq into your current + working directory. + .TP diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/files/patch-flexbackup.conf /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.conf --- /usr/ports/sysutils/flexbackup/files/patch-flexbackup.conf 2006-10-10 10:23:41.000000000 +0200 +++ /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.conf 2008-07-19 10:24:54.000000000 +0200 @@ -1,10 +1,141 @@ ---- flexbackup.conf.orig Fri Sep 15 09:59:46 2006 -+++ flexbackup.conf Fri Sep 15 10:00:32 2006 -@@ -219,6 +219,8 @@ +--- ./flexbackup.conf.orig 2008-07-19 09:56:25.000000000 +0200 ++++ ./flexbackup.conf 2008-07-19 10:00:50.000000000 +0200 +@@ -12,29 +12,92 @@ + + # Configure backup "sets". + # Not needed if you use "-dir " to backup one tree at a time. +-# Each set is a simple space-separated list of filesystems +-# Remote filesystems should denoted as 'host:dir' +-# You can use anything (other than 'all') as set names ++# Each set is a simple space-separated list of filesystems. Remote filesystems ++# should denoted as 'host:dir'. If the filesystem name (local or remote) ++# contains spaces, then it should be enclosed in its entirety in double quotes. ++# Multiple quoted filesystems included in a set should be space separated just ++# like unquoted filesystem. The Perl '.' string concatenation operator can be ++# used to split excessively long lines. + # +-# Example: +-# $set{'set1'} = "/home /usr"; +-# $set{'set2'} = "/dir3 machine2:/dir4 machine3:/dir5"; ++# You can use anything (other than 'all') as set names. ++# ++# Examples: ++# $set{'set1'} = '/home /usr'; ++# $set{'set2'} = '/dir3 machine2:/dir4 machine3:/dir5'; ++# $set{'set3'} = ++# '"/mnt/winmachine1/Documents and Settings" ' . ++# '"/mnt/winmachine1/Program Files"'; + # + # "-set all" will back up all defined sets. If you are doing a full backup + # using tapes, each "set" will go onto a different tape and you will be + # prompted for tape change in between. + # +-$set{'backup'} = "/home"; ++$set{'backup'} = '/home'; + + # Subtree pruning + # A space-separated list of directories to prune from each backup. +-# Key is a filesystem or host:dir spec as outlined above +-# regular expressions allowed (not shell-type wildcards!) +-$prune{'/'} = "tmp proc"; ++# Key is a filesystem or host:dir spec as outlined above. ++# Regular expressions are allowed (not shell-type wildcards!) ++# ++# Note: These "directories" are actually regular expressions and must ++# match "find" output relative to the path of the current backup set. This ++# means that different exclusions are needed for different backup sets. ++# This is a little tricky, so, read on. ++# ++# The regular expressions are processed by "find" but, before "find" is run, ++# FlexBackup changes into the base directory of the backup set in progress. ++# FlexBackup then runs "find" with a path of "." which means all output lines ++# start with "./". To be helpful, FlexBackup packages each space-separated ++# prune directory as follows. If you have a prune list like this ++# ++# $prune{'/somedir'} = 'one two three'; ++# ++# then, the constructed -regex argument to "find" looks like this ++# ++# -regex "\./(one|two|three)" ++# ++# (with characters escaped as necessary depending on your environment). ++# ++# Another thing you need to know is that FlexBackup only uses the prune ++# terms that match the current base directory in the set you're backing ++# up. For example, if your backup set definition looks like this ++# ++# $set{'daily'} = '/home /root /var /usr'; ++# ++# and you want to do some exclusions in "/home" and "/var" (but not the other ++# directories), you must set up a prune list for those two directories ++# separately. For example, to exclude bert's and ernie's home directories plus ++# /var/tmp, you would need the following: ++# ++# $prune{'/home'} = 'bert ernie'; ++# $prune{'/var'} = 'tmp'; ++# ++# In particular, combining these *does not* work. For example, this ++# ++# $prune{'/'} = 'home/bert home/ernie var/tmp'; ++# ++# doesn't work, unless, of course, your backup set is backing up "/", ++# which our example is not. ++# ++# Like the $set configuration item, special handling is required for ++# directories with spaces in them. Double quotes should surround pruning ++# targets but not the key. Example: ++# ++# $prune{'/mnt/winmachine1/Documents and Settings'} = ++# '"user1/Local Settings/Temp" user2'; ++# ++# Many other complex and abstruse variations are possible. Here's one ++# interesting corner case. If you want to preserve a directory but none of its ++# contents, you can do it. Picking on ernie from our previous example, preserve ++# only his home directory: ++# ++# $prune{'/home'} = 'ernie/.*'; ++# ++$prune{'/'} = 'tmp proc'; + + # Compression +-$compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware +-$compr_level = '4'; # compression level (1-9) (for gzip/bzip2/lzop/zip) ++$compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware/lzma ++$compr_level = '4'; # compression level (1-9) (for gzip/bzip2/lzop/zip/lzma) + + # Buffering program - to help streaming + $buffer = 'buffer'; # one of false/buffer/mbuffer +@@ -84,7 +147,8 @@ + # True to try and preserve file access times during backup, if the selected + # archive program can do so. Note that if this is true, -cnewer checks (file + # permission/status changes only, not content) are turned off when deciding +-# which files to archive on the local system. ++# which files to archive on the local system. This is because preserving the ++# access time changes the permission/status change time in the filesystem. + $atime_preserve = 'false'; + + # Span across filesytems? ("dump" will ignore this option) +@@ -97,8 +161,13 @@ + # leading directories (the filesystem specs above or the "-dir" flag). + # Matches paths, not filenames, so put .* on the front/back as needed. + # Comment these out to exclude nothing. +-$exclude_expr[0] = '.*/[Cc]ache/.*'; +-$exclude_expr[1] = '.*~$'; ++# ++# Gentoo note: The first example line breaks portage in a restored backup ++# because "/usr/lib/portage/pym/cache" is not backed up. Way too general! ++# The moral of this story is, be very careful with global excludes. The ++# second example is probably okay. ++# $exclude_expr[0] = '.*/[Cc]ache/.*'; ++# $exclude_expr[1] = '.*~$'; + + # If true (default), and using a tape device, level zero "set" backups + # assume you want to erase and use a new tape for each set. If false, level +@@ -219,6 +288,8 @@ # $path{'afio'} = 'sudo -u nonrootuser afio'; # -+$path{'tar'} = %%TAR_CMD%%; ++$path{'tar'} = '%%TAR_CMD%%'; + # ---------------------------------------------------------------------- # mt operation overrides. Set if flexbackup doesn't know the right mt diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/files/patch-flexbackup.conf.5 /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.conf.5 --- /usr/ports/sysutils/flexbackup/files/patch-flexbackup.conf.5 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/sysutils/flexbackup.new/files/patch-flexbackup.conf.5 2008-07-19 10:00:58.000000000 +0200 @@ -0,0 +1,77 @@ +--- ./flexbackup.conf.5.orig 2008-07-19 09:56:34.000000000 +0200 ++++ ./flexbackup.conf.5 2008-07-19 09:57:58.000000000 +0200 +@@ -24,23 +24,51 @@ + .TP + \fB$set{\fI'tag'\fR}\fR = \fI'/dir'\fR; + Configure backup \(dqsets\(dq. Not needed if \(dq-dir \(dq is used to +-backup one tree at a time. Each set is a simple space-separated list of +-filesystems/directories. Remote filesystems should be denoted as +-\(dqhost:directory\(dq. You can use anything (other than \fI'all'\fR) as set +-names. Using \(dq-set all\(dq will back up all defined sets. If you are doing +-a full backup using tapes, each \(dqset\(dq will go onto a different tape and +-you will be prompted for tape change in between. Examples: ++backup one tree at a time. ++Each set is a simple space-separated list of filesystems/directories. ++Remote filesystems should be denoted as \(dqhost:directory\(dq. ++You can use anything (other than \fI'all'\fR) as set names. ++Using \(dq-set all\(dq will back up all defined sets. ++If you are doing a full backup using tapes, each \(dqset\(dq will go onto a ++different tape and you will be prompted for tape change in between. ++Examples: + .RS + .PP + \fB$set{\fI'set1'\fI}\fR = \fI'/home /usr'\fR; + .br + \fB$set{\fI'set2'\fI}\fR = \fI'/dir3 machine2:/dir4 machine3:/dir5'\fR; ++.br ++.PP ++Directories (local or remote) with spaces in their names should be enclosed in ++their entirety in double quotes. ++Multiple quoted directories included in a set should be space separated just ++like unquoted directories. ++The Perl '.' string concatenation operator can be used to split excessively ++long sets. ++Example: ++.PP ++\fB$set{\fI'set3'\fI}\fR = \fI ++ '\(dq/mnt/winmachine1/Documents and Settings\(dq ' . ++ '\(dq/mnt/winmachine1/Program Files\(dq';\fR + .RE + .TP + \fB$prune{\fI'/'\fR}\fR = \fI'tmp proc'\fR; + Configure subtree pruning. A space-separated list of directories to prune from + each backup. Key is a filesystem/directory or \(dqhost:directory\(dq spec as +-outlined above regular expressions allowed (not shell-type wildcards!). ++outlined above. Regular expressions allowed (not shell-type wildcards!). ++.RS ++.PP ++Like the \fB$set\fR configuration item, special handling is required for ++directories with spaces in them. Double quotes should surround pruning targets ++but not the key. Example: ++.PP ++\fB$prune{\fI'/mnt/winmachine1/Documents and Settings'\fI}\fR = ++ \fI'\(dquser1/Local Settings/Temp\(dq user2'\fR; ++.br ++.PP ++There are lots of examples and additional explanation in the provided sample ++configuration file. ++.RE + .TP + \fB$compress\fR = \fI'false|gzip|bzip2|lzop|zip|compress|hardware'\fR; + .TQ +@@ -205,7 +233,7 @@ + .RS + .TP + If GNU \fBtar\fR is called \fB\(dqgtar\(dq\fR on your system: +-\fB$path{'tar'} = 'gtar'; ++\fB$path{'tar'} = 'gtar';\fR + .TP + Or it can be used to \fB\(dqsudo\(dq\fR certain commands: + \fB$path{\fI'find'\fR}\fR = \fI'sudo find'\fR; +@@ -302,3 +330,6 @@ + Written by Edwin Huffstutler (edwinh@computer.org) + .SH "SEE ALSO" + \fBflexbackup\fR(1) ++.\" Local Variables: ++.\" mode: nroff ++.\" End: diff -ruN --exclude=CVS /usr/ports/sysutils/flexbackup/pkg-descr /usr/ports/sysutils/flexbackup.new/pkg-descr --- /usr/ports/sysutils/flexbackup/pkg-descr 2003-08-29 15:02:37.000000000 +0200 +++ /usr/ports/sysutils/flexbackup.new/pkg-descr 2008-07-23 18:50:05.000000000 +0200 @@ -11,4 +11,7 @@ o Keeps a table of contents so you know archives are on each tape o Nice log files +You can get additional information about remote backup strategies using SSH +at http://www.sysfault.org/flexbackup.html + WWW: http://flexbackup.sourceforge.net/ --- flexbackup-1.2.1_3.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: