Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 602382 | Differences between
and this patch

Collapse All | Expand All

(-)flexbackup.xz (-4 / +23 lines)
Lines 695-700 Link Here
695
		$filename .= ".lzma";
695
		$filename .= ".lzma";
696
	    } elsif ($cfg::compress eq "xz") {
696
	    } elsif ($cfg::compress eq "xz") {
697
		$filename .= ".xz";
697
		$filename .= ".xz";
698
	    } elsif ($cfg::compress eq "lzip") {
699
		$filename .= ".lz";
698
	    }
700
	    }
699
	} elsif ($cfg::type eq "afio") {
701
	} elsif ($cfg::type eq "afio") {
700
	    # tag these a little different, the archive file itself isn't a
702
	    # tag these a little different, the archive file itself isn't a
Lines 713-718 Link Here
713
		$filename .= "-lzma";
715
		$filename .= "-lzma";
714
	    } elsif ($cfg::compress eq "xz") {
716
	    } elsif ($cfg::compress eq "xz") {
715
		$filename .= "-xz";
717
		$filename .= "-xz";
718
	    } elsif ($cfg::compress eq "lzip") {
719
		$filename .= "-lz";
716
	    }
720
	    }
717
	}
721
	}
718
722
Lines 2722-2728 Link Here
2722
    # First check if things are defined in the config file
2726
    # First check if things are defined in the config file
2723
    # Checks exist, true/false, or one of options
2727
    # Checks exist, true/false, or one of options
2724
    &checkvar(\$cfg::type,'type','dump afio cpio tar star pax zip ar shar lha copy rsync filelist','tar');
2728
    &checkvar(\$cfg::type,'type','dump afio cpio tar star pax zip ar shar lha copy rsync filelist','tar');
2725
    &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware lzma xz','gzip');
2729
    &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware lzma xz lzip','gzip');
2726
    &checkvar(\$cfg::compr_level,'compr_level','exist','4');
2730
    &checkvar(\$cfg::compr_level,'compr_level','exist','4');
2727
    &checkvar(\$cfg::verbose,'verbose','bool','true');
2731
    &checkvar(\$cfg::verbose,'verbose','bool','true');
2728
    &checkvar(\$cfg::sparse,'sparse','bool','true');
2732
    &checkvar(\$cfg::sparse,'sparse','bool','true');
Lines 3043-3048 Link Here
3043
	    $::z = " | $::path{$cfg::compress} -$cfg::compr_level ";
3047
	    $::z = " | $::path{$cfg::compress} -$cfg::compr_level ";
3044
	}
3048
	}
3045
	$::unz = "$::path{$cfg::compress} -d | ";
3049
	$::unz = "$::path{$cfg::compress} -d | ";
3050
    } elsif ($cfg::compress eq "lzip") {
3051
	$::path{'lzip'} = &checkinpath($cfg::compress);
3052
	push(@::remoteprogs, $::path{$cfg::compress});
3053
	if ($cfg::compr_level !~ m/^[123456789]$/) {
3054
	    push(@::errors,"\$compr_level must be set to 1-9");
3055
	} else {
3056
	    $::z = " | $::path{$cfg::compress} -$cfg::compr_level ";
3057
	}
3058
	$::unz = "$::path{$cfg::compress} -d | ";
3046
3059
3047
    } else {
3060
    } else {
3048
	$::z = "";
3061
	$::z = "";
Lines 3301-3306 Link Here
3301
		$::afio_z_flag = "-P $::path{$cfg::compress} -Q -$cfg::compr_level -Z";
3314
		$::afio_z_flag = "-P $::path{$cfg::compress} -Q -$cfg::compr_level -Z";
3302
		$::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Z";
3315
		$::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Z";
3303
3316
3317
	    } elsif ($cfg::compress eq "lzip") {
3318
		$::afio_z_flag = "-P $::path{$cfg::compress} -Q -$cfg::compr_level -Z";
3319
		$::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Z";
3320
3304
	    }
3321
	    }
3305
	    $::unz = ""; # Reset & just use this for reading the archive file.
3322
	    $::unz = ""; # Reset & just use this for reading the archive file.
3306
3323
Lines 3464-3470 Link Here
3464
	$::path{'lha'} = &checkinpath('lha');
3481
	$::path{'lha'} = &checkinpath('lha');
3465
	push(@::remoteprogs, $::path{'lha'});
3482
	push(@::remoteprogs, $::path{'lha'});
3466
3483
3467
	if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip|lzma|xz)$/) {
3484
	if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip|lzma|xz|lzip)$/) {
3468
	    warn("Using type \"lha\" with compress=$cfg::compress makes no sense");
3485
	    warn("Using type \"lha\" with compress=$cfg::compress makes no sense");
3469
	    warn("Setting compression to false");
3486
	    warn("Setting compression to false");
3470
	    $::unz = "";
3487
	    $::unz = "";
Lines 3839-3845 Link Here
3839
3856
3840
    # Try and guess file types and commpression scheme
3857
    # Try and guess file types and commpression scheme
3841
    # might as well since we are reading from a file in this case
3858
    # might as well since we are reading from a file in this case
3842
    if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip|lzma|xz)$/) {
3859
    if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip|lzma|xz|lz)$/) {
3843
	$cfg::type = $1;
3860
	$cfg::type = $1;
3844
	$cfg::compress = $2;
3861
	$cfg::compress = $2;
3845
	$cfg::type =~ s/^a$/ar/;
3862
	$cfg::type =~ s/^a$/ar/;
Lines 3849-3858 Link Here
3849
	$cfg::compress =~ s/Z/compress/;
3866
	$cfg::compress =~ s/Z/compress/;
3850
	$cfg::compress =~ s/lzma/lzma/;
3867
	$cfg::compress =~ s/lzma/lzma/;
3851
	$cfg::compress =~ s/xz/xz/;
3868
	$cfg::compress =~ s/xz/xz/;
3869
	$cfg::compress =~ s/lz/lzip/;
3852
	&log("| Auto-set to type=$cfg::type compress=$cfg::compress");
3870
	&log("| Auto-set to type=$cfg::type compress=$cfg::compress");
3853
	&optioncheck();                  # redo to set a few variables over
3871
	&optioncheck();                  # redo to set a few variables over
3854
3872
3855
    } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip|lzma|xz)$/) {
3873
    } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip|lzma|xz|lz)$/) {
3856
	$cfg::type = "afio";
3874
	$cfg::type = "afio";
3857
	$cfg::compress = $1;
3875
	$cfg::compress = $1;
3858
	$cfg::compress =~ s/gz/gzip/;
3876
	$cfg::compress =~ s/gz/gzip/;
Lines 3861-3866 Link Here
3861
	$cfg::compress =~ s/Z/compress/;
3879
	$cfg::compress =~ s/Z/compress/;
3862
	$cfg::compress =~ s/lzma/lzma/;
3880
	$cfg::compress =~ s/lzma/lzma/;
3863
	$cfg::compress =~ s/xz/xz/;
3881
	$cfg::compress =~ s/xz/xz/;
3882
	$cfg::compress =~ s/lz/lzip/;
3864
	&log("| Auto-set to type=$cfg::type compress=$cfg::compress");
3883
	&log("| Auto-set to type=$cfg::type compress=$cfg::compress");
3865
	&optioncheck();                  # redo to set a few variables over
3884
	&optioncheck();                  # redo to set a few variables over
3866
3885
(-)flexbackup.conf.xz (-2 / +2 lines)
Lines 96-103 Link Here
96
$prune{'/'} = 'tmp proc';
96
$prune{'/'} = 'tmp proc';
97
97
98
# Compression
98
# Compression
99
$compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware/lzma/xz
99
$compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware/lzma/xz/lzip
100
$compr_level = '4'; # compression level (1-9) (for gzip/bzip2/lzop/zip/lzma/xz)
100
$compr_level = '4'; # compression level (1-9) (for gzip/bzip2/lzop/zip/lzma/xz/lzip)
101
101
102
# Buffering program - to help streaming
102
# Buffering program - to help streaming
103
$buffer = 'false';         # one of false/buffer/mbuffer
103
$buffer = 'false';         # one of false/buffer/mbuffer

Return to bug 602382