summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2007-04-15 15:41:51 +0000
committerStefan Schweizer <genstef@gentoo.org>2007-04-15 15:41:51 +0000
commit2c0eacc7cb235531d47c232ef804f74e0d8f30b3 (patch)
tree0f8ea95373a814c5d4acaa36e90342862adc0c8f /app-backup/flexbackup
parentDo not use GMPCV variable. (diff)
downloadgentoo-2-2c0eacc7cb235531d47c232ef804f74e0d8f30b3.tar.gz
gentoo-2-2c0eacc7cb235531d47c232ef804f74e0d8f30b3.tar.bz2
gentoo-2-2c0eacc7cb235531d47c232ef804f74e0d8f30b3.zip
New ebuild addresses bugs #171205 (mbuffer command line option fix & doc improvements) and #173672 (remote host buffer detection).
(Portage version: 2.1.2.3)
Diffstat (limited to 'app-backup/flexbackup')
-rw-r--r--app-backup/flexbackup/ChangeLog8
-rw-r--r--app-backup/flexbackup/files/digest-flexbackup-1.2.1-r43
-rw-r--r--app-backup/flexbackup/files/flexbackup-1.2.1-mbuffer-switch.patch130
-rw-r--r--app-backup/flexbackup/files/flexbackup-1.2.1-remote-bufftest.patch59
-rw-r--r--app-backup/flexbackup/flexbackup-1.2.1-r4.ebuild52
5 files changed, 251 insertions, 1 deletions
diff --git a/app-backup/flexbackup/ChangeLog b/app-backup/flexbackup/ChangeLog
index 7ed0a66d2a51..e4d835db39ca 100644
--- a/app-backup/flexbackup/ChangeLog
+++ b/app-backup/flexbackup/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-backup/flexbackup
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/flexbackup/ChangeLog,v 1.13 2007/03/19 17:22:54 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-backup/flexbackup/ChangeLog,v 1.14 2007/04/15 15:41:51 genstef Exp $
+
+ 15 Apr 2007; John R. Graham (john_r_graham) <john_r_graham@mindspring.com>
+ +flexbackup-1.2.1-r4.ebuild, +files/flexbackup-1.2.1-mbuffer-switch.patch,
+ +files/flexbackup-1.2.1-remote-bufftest.patch:
+ New ebuild addresses bugs #171205 (mbuffer command line option fix & doc
+ improvements) and #173672 (remote host buffer detection).
19 Mar 2007; Bryan Østergaard <kloeri@gentoo.org> metadata.xml:
Remove mholzer from metadata.xml due to retirement.
diff --git a/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r4 b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r4
new file mode 100644
index 000000000000..92deefe369f4
--- /dev/null
+++ b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r4
@@ -0,0 +1,3 @@
+MD5 4955c89dbee354248f354a9bf0a480dd flexbackup-1.2.1.tar.gz 80158
+RMD160 d2a56ce6a3770498ef96ffbf75f65026b04f492c flexbackup-1.2.1.tar.gz 80158
+SHA256 58282b21985be75f1219c5ff4906d217055ed8627ea3e2ffdfe7a2393bc9d2c3 flexbackup-1.2.1.tar.gz 80158
diff --git a/app-backup/flexbackup/files/flexbackup-1.2.1-mbuffer-switch.patch b/app-backup/flexbackup/files/flexbackup-1.2.1-mbuffer-switch.patch
new file mode 100644
index 000000000000..d22e40f24c26
--- /dev/null
+++ b/app-backup/flexbackup/files/flexbackup-1.2.1-mbuffer-switch.patch
@@ -0,0 +1,130 @@
+Common subdirectories: flexbackup-1.2.1-r3/contrib and flexbackup-1.2.1-r4/contrib
+diff -ubB flexbackup-1.2.1-r3/flexbackup flexbackup-1.2.1-r4/flexbackup
+--- flexbackup-1.2.1-r3/flexbackup 2007-04-14 17:03:34.000000000 -0400
++++ flexbackup-1.2.1-r4/flexbackup 2007-04-14 17:09:48.000000000 -0400
+@@ -442,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;
+@@ -3090,7 +3090,7 @@
+ 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 ";
+@@ -4884,18 +4884,24 @@
+ }
+
+ 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 .= '\)/.*" ';
+- }
++ $rex = '-regex "\./(';
++ $rex .= join('|', keys %{$::prune{$prunekey}});
++ $rex .= ')/.*" ';
++ } else {
++ $rex = '-regex "\./\(';
++ $rex .= join('\|', keys %{$::prune{$prunekey}});
++ $rex .= '\)/.*" ';
++ }
++ # Show what the darn thing is constructing for prune expressions.
++ &log("| \"find\" regex for pruning is: $rex");
++ $cmd .= $rex;
+ $cmd .= '-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)
+diff -ubB flexbackup-1.2.1-r3/flexbackup.conf flexbackup-1.2.1-r4/flexbackup.conf
+--- flexbackup-1.2.1-r3/flexbackup.conf 2007-04-14 17:03:35.000000000 -0400
++++ flexbackup-1.2.1-r4/flexbackup.conf 2007-04-14 17:09:48.000000000 -0400
+@@ -30,6 +30,45 @@
+ # 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!)
++#
++# 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\)/.*"
++#
++# The last 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";
++#
++# does not work, unless, of course, your backup set is backing up "/",
++# which our example is not.
++#
+ $prune{'/'} = "tmp proc";
+
+ # Compression
+@@ -84,7 +123,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 +137,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] = '.*~$';
++#
++# 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
diff --git a/app-backup/flexbackup/files/flexbackup-1.2.1-remote-bufftest.patch b/app-backup/flexbackup/files/flexbackup-1.2.1-remote-bufftest.patch
new file mode 100644
index 000000000000..3d473b9810ce
--- /dev/null
+++ b/app-backup/flexbackup/files/flexbackup-1.2.1-remote-bufftest.patch
@@ -0,0 +1,59 @@
+Common subdirectories: flexbackup-1.2.1-r4/contrib and flexbackup-1.2.1-r5/contrib
+diff -ubB flexbackup-1.2.1-r4/flexbackup flexbackup-1.2.1-r5/flexbackup
+--- flexbackup-1.2.1-r4/flexbackup 2007-04-14 17:09:48.000000000 -0400
++++ flexbackup-1.2.1-r5/flexbackup 2007-04-14 17:23:20.000000000 -0400
+@@ -5276,6 +5276,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*$::;
+@@ -5290,7 +5291,7 @@
+ 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";
+@@ -5302,13 +5303,19 @@
+ $pipecmd = "sh $tmp_script ";
+ } else {
+ print $::msg "| Checking '$cfg::buffer' on host $host... ";
+- $pipecmd = "cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -f $tmp_script')";
++ $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;
+ while (<PIPE>) {
++ if (/^successful$/) {
++ $explicit_success = 1;
++ last;
++ }
+ if (/^unsuccessful: exit code (\d+): (.*)/) {
+ $retval = $1;
+ my $out = $2;
+@@ -5337,11 +5344,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);
diff --git a/app-backup/flexbackup/flexbackup-1.2.1-r4.ebuild b/app-backup/flexbackup/flexbackup-1.2.1-r4.ebuild
new file mode 100644
index 000000000000..6afee22bcb6c
--- /dev/null
+++ b/app-backup/flexbackup/flexbackup-1.2.1-r4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/flexbackup/flexbackup-1.2.1-r4.ebuild,v 1.1 2007/04/15 15:41:51 genstef Exp $
+
+inherit eutils
+
+DESCRIPTION="Flexible backup script using perl"
+HOMEPAGE="http://flexbackup.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE=""
+
+RDEPEND="app-arch/mt-st"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/flexbackup-1.2.1-lzma.patch
+ #Substituting out this patch for bug #116510
+# epatch "${FILESDIR}"/${P}-CAN-2005-2965.patch
+ epatch "${FILESDIR}"/flexbackup-1.2.1-secure-tempfile.patch
+ epatch "${FILESDIR}"/flexbackup-1.2.1-bash.patch
+ epatch "${FILESDIR}"/flexbackup-1.2.1-mbuffer-switch.patch
+ epatch "${FILESDIR}"/flexbackup-1.2.1-remote-bufftest.patch
+
+ sed -i \
+ -e '/^\$type = /s:afio:tar:' \
+ -e "/^\$buffer = /s:'buffer':'false':" \
+ flexbackup.conf || die
+}
+
+src_install() {
+ dodir /etc /usr/bin /usr/share/man/man{1,5}
+ emake install \
+ PREFIX="${D}"/usr \
+ CONFFILE="${D}"/etc/flexbackup.conf \
+ || die "emake install failed"
+
+ dodoc CHANGES CREDITS INSTALL README TODO
+ dohtml faq.html
+}
+
+pkg_postinst() {
+ elog "Please edit your /etc/flexbackup.conf file to suit your"
+ elog "needs. If you are using devfs, the tape device should"
+ elog "be set to /dev/tapes/tape0/mtn. If you need to use any"
+ elog "archiver other than tar, please emerge it separately."
+}