summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2006-09-28 00:10:00 +0000
committerSeemant Kulleen <seemant@gentoo.org>2006-09-28 00:10:00 +0000
commitc13b12e5ab69b3c202a59b961866d482ac9436bb (patch)
treef55825b8e8ee5322f01fb84b9b242c04899f17ff /app-backup
parentVersion bump. (diff)
downloadgentoo-2-c13b12e5ab69b3c202a59b961866d482ac9436bb.tar.gz
gentoo-2-c13b12e5ab69b3c202a59b961866d482ac9436bb.tar.bz2
gentoo-2-c13b12e5ab69b3c202a59b961866d482ac9436bb.zip
Patch to make this work with more recent versions of rsync. Closes bug #148935 by David Relson
(Portage version: 2.1.2_pre1-r4)
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/backuppc/ChangeLog11
-rw-r--r--app-backup/backuppc/backuppc-2.1.2-r1.ebuild130
-rw-r--r--app-backup/backuppc/files/BackupPC-2.1.2pl2.diff202
-rw-r--r--app-backup/backuppc/files/digest-backuppc-2.1.24
-rw-r--r--app-backup/backuppc/files/digest-backuppc-2.1.2-r16
5 files changed, 351 insertions, 2 deletions
diff --git a/app-backup/backuppc/ChangeLog b/app-backup/backuppc/ChangeLog
index 413c7cb8632e..96a61eab539a 100644
--- a/app-backup/backuppc/ChangeLog
+++ b/app-backup/backuppc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-backup/backuppc
-# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.3 2005/10/02 15:02:29 flameeyes Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.4 2006/09/28 00:09:59 seemant Exp $
+
+*backuppc-2.1.2-r1 (28 Sep 2006)
+
+ 28 Sep 2006; Seemant Kulleen <seemant@gentoo.org>
+ +files/BackupPC-2.1.2pl2.diff, +backuppc-2.1.2-r1.ebuild:
+ Patch to make this work with more recent versions of rsync. Closes bug
+ #148935 by David Relson
02 Oct 2005; Diego Pettenò <flameeyes@gentoo.org> backuppc-2.1.2.ebuild:
Don't use /bin/false as shell for backuppc user. Use -1 instead.
diff --git a/app-backup/backuppc/backuppc-2.1.2-r1.ebuild b/app-backup/backuppc/backuppc-2.1.2-r1.ebuild
new file mode 100644
index 000000000000..bb2e647cd225
--- /dev/null
+++ b/app-backup/backuppc/backuppc-2.1.2-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/backuppc-2.1.2-r1.ebuild,v 1.1 2006/09/28 00:10:00 seemant Exp $
+
+inherit eutils webapp
+
+IUSE="samba doc"
+
+MY_P=BackupPC-${PV}
+PATCH_VER=0.1
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="A high performance, enterprise grade backup system for backing up
+Linux, Windows, Mac OS X desktops and laptops to a server's disk. No client
+side software needed."
+HOMEPAGE="http://backuppc.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-${PATCH_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/perl"
+RDEPEND="dev-perl/File-RsyncP
+ app-arch/par2cmdline
+ app-arch/gzip
+ app-arch/bzip2
+ app-arch/unzip
+ dev-perl/Archive-Zip
+ virtual/mta
+ samba? ( net-fs/samba )"
+
+PATCHDIR=${WORKDIR}/gentoo/prepatch
+
+pkg_setup() {
+ enewgroup backuppc
+ enewuser backuppc -1 -1 /dev/null backuppc
+
+ webapp_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}; cd ${S}
+ epatch ${FILESDIR}/${MY_P}pl2.diff
+
+ EPATCH_SUFFIX="diff" epatch ${PATCHDIR}
+}
+
+src_compile() {
+ find ./ -name 'CVS' -type d | xargs rm -rf
+}
+
+src_test() {
+ einfo "Can not test"
+}
+
+src_install() {
+ local myconf
+ if use samba ; then
+ myconf="--bin-path smbclient=$(type -p smbclient)"
+ myconf="--bin-path nmblookup=$(type -p nmblookup)"
+ fi
+
+ webapp_src_preinst
+
+ dodir ${MY_HTDOCSDIR}/${PN}
+
+ ./configure.pl \
+ --batch \
+ --bin-path perl=$(type -p perl) \
+ --bin-path ptar=$(type -p tar) \
+ --bin-path rsync=$(type -p rsync) \
+ --bin-path ping=$(type -p ping) \
+ --bin-path df=$(type -p df) \
+ --bin-path ssh=$(type -p ssh) \
+ --bin-path sendmail=$(type -p sendmail) \
+ --bin-path hostname=$(type -p hostname) \
+ --bin-path gzip=$(type -p gzip) \
+ --bin-path bzip2=$(type -p bzip2) \
+ --bin-path hostname=$(type -p hostname) \
+ --hostname XXXXXX \
+ --uid-ignore \
+ --install-dir=/usr \
+ --dest-dir ${D} \
+ --html-dir ${MY_HTDOCSDIR}/image \
+ --html-dir-url /backuppc/image \
+ --cgi-dir ${MY_CGIBINDIR}/ \
+ --data-dir /var/lib/backuppc \
+ ${myconf} || die "failed the configure.pl script"
+
+ pod2man \
+ --section=8 \
+ --center="BackupPC manual" \
+ ${S}/doc/BackupPC.pod backuppc.8 || die "failed to generate man page"
+
+ doman backuppc.8
+
+ diropts -m 750
+ keepdir /var/lib/backuppc/{trash,pool,pc,log,cpool}
+
+ diropts -m 755
+ dodir /etc/backuppc
+ mv ${D}/var/lib/backuppc/conf/* ${D}/etc/backuppc
+ rmdir ${D}/var/lib/backuppc/conf
+
+ fperms 644 /etc/backuppc/config.pl
+ fperms 644 /etc/backuppc/hosts
+
+ newinitd ${S}/init.d/gentoo-backuppc backuppc
+ newconfd ${S}/init.d/gentoo-backuppc.conf backuppc
+
+ webapp_postinst_txt \
+ en ${FILESDIR}/postinstall-en.txt || die "webapp_postinst_txt"
+
+ webapp_src_install || die "webapp_src_install"
+
+ cd ${D}/etc/backuppc
+ ebegin "Patching config.pl for sane defaults"
+ patch -p0 < ${WORKDIR}/gentoo/postpatch/config.pl.diff
+ eend $?
+
+ chown -R backuppc:backuppc "${D}/var/lib/backuppc"
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+
+ ebegin "Adjusting ownership of /var/lib/backuppc"
+ chown -R backuppc:backuppc "${ROOT}/var/lib/backuppc"
+ eend $?
+}
diff --git a/app-backup/backuppc/files/BackupPC-2.1.2pl2.diff b/app-backup/backuppc/files/BackupPC-2.1.2pl2.diff
new file mode 100644
index 000000000000..e98ff4f0e9c3
--- /dev/null
+++ b/app-backup/backuppc/files/BackupPC-2.1.2pl2.diff
@@ -0,0 +1,202 @@
+#
+# BackupPC-2.1.2pl2.diff: BackupPC patch file generated
+# on Sun Jun 18 19:36:32 2006.
+#
+# This patch file should be applied to a cleanly unpacked BackupPC
+# version 2.1.2. Do not apply any old patch files; each
+# patch file accumulates all previous changes.
+#
+# Example:
+#
+# # fetch BackupPC-2.1.2.tar.gz
+# # fetch BackupPC-2.1.2pl2.diff
+# tar zxvf BackupPC-2.1.2.tar.gz
+# cd BackupPC-2.1.2
+# patch -p0 < ../BackupPC-2.1.2pl2.diff
+# perl configure.pl
+#
+# ChangeLog:
+#
+# - In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs}
+# and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and
+# "Can't open .../f%2f for empty output" errors with rsync 2.6.7+.
+# Fix proposed by Justin Pessa and Vincent Ho, and confirmed by
+# Dan Niles.
+#
+# - Added patch from Michael (mna.news) to ignore "file is unchanged"
+# message from tar 1.15.x during incremental backups.
+#
+# - Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
+# when used with xtar on MacOS. Reported by Samuel Bancal and
+# Matthew Radey, who helped with debugging.
+#
+# - Fixed bug in BackupPC_tarExtract for files >8GB in size whose
+# lengths are multiples of 256. Reported by Jamie Myers and
+# Marko Tukiainen, who both helped debugging the problem.
+#
+# - Fixed bug in lib/BackupPC/Xfer/RsyncFileIO.pm that caused
+# incorrected deleted attributes to be set in directories
+# where one of the files had an rsync phase 1 retry during
+# an incremental. Reported by Tony Nelson.
+#
+--- bin/BackupPC_tarExtract 2005-09-05 16:21:21.000000000 -0700
++++ bin/BackupPC_tarExtract 2006-06-18 19:36:31.995945464 -0700
+@@ -58,7 +58,7 @@
+ exit(1);
+ }
+ my $client = $1;
+-if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
++if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
+ print("$0: bad share name '$ARGV[1]'\n");
+ exit(1);
+ }
+@@ -101,7 +101,7 @@
+ # Copyright 1998 Stephen Zander. All rights reserved.
+ #
+ my $tar_unpack_header
+- = 'Z100 A8 A8 A8 A12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
++ = 'Z100 A8 A8 A8 a12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
+ my $tar_header_length = 512;
+
+ my $BufSize = 1048576; # 1MB or 2^20
+@@ -251,7 +251,7 @@
+ $name = $longName if ( defined($longName) );
+ $linkname = $longLink if ( defined($longLink) );
+ $name =~ s{^\./+}{};
+- $name =~ s{/+$}{};
++ $name =~ s{/+\.?$}{};
+ $name =~ s{//+}{/}g;
+ return {
+ name => $name,
+@@ -313,7 +313,7 @@
+ #
+ my($nRead);
+ #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
+- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
++ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
+ my $poolWrite = BackupPC::PoolWrite->new($bpc,
+ "$OutDir/$ShareName/$f->{mangleName}",
+ $f->{size}, $Compress);
+@@ -351,7 +351,7 @@
+ # a plain file.
+ #
+ $f->{size} = length($f->{linkname});
+- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
++ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
+ my $poolWrite = BackupPC::PoolWrite->new($bpc,
+ "$OutDir/$ShareName/$f->{mangleName}",
+ $f->{size}, $Compress);
+@@ -369,7 +369,7 @@
+ # contents.
+ #
+ $f->{size} = length($f->{linkname});
+- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
++ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
+ my $poolWrite = BackupPC::PoolWrite->new($bpc,
+ "$OutDir/$ShareName/$f->{mangleName}",
+ $f->{size}, $Compress);
+@@ -393,7 +393,7 @@
+ } else {
+ $data = "$f->{devmajor},$f->{devminor}";
+ }
+- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
++ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
+ my $poolWrite = BackupPC::PoolWrite->new($bpc,
+ "$OutDir/$ShareName/$f->{mangleName}",
+ length($data), $Compress);
+@@ -487,17 +487,21 @@
+ #
+ sub pathCreate
+ {
+- my($dir, $fullPath, $file, $f) = @_;
++ my($dir, $fullPath, $f) = @_;
+
+ #
+ # Get parent directory of each of $dir and $fullPath
+ #
+- $dir =~ s{/[^/]*$}{};
++ # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
++ $dir =~ s{/([^/]*)$}{};
++ my $file = $bpc->fileNameUnmangle($1);
+ $fullPath =~ s{/[^/]*$}{};
+- return if ( -d $fullPath );
++ return if ( -d $fullPath || $file eq "" );
++ unlink($fullPath) if ( -e $fullPath );
+ mkpath($fullPath, 0, 0777);
+ $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
+ if ( !defined($Attrib{$dir}) );
++ # print("pathCreate: adding file = $file to dir = $dir\n");
+ $Attrib{$dir}->set($file, {
+ type => BPC_FTYPE_DIR,
+ mode => 0755,
+--- lib/BackupPC/Lib.pm 2005-09-05 16:21:21.000000000 -0700
++++ lib/BackupPC/Lib.pm 2006-06-18 19:36:32.035939384 -0700
+@@ -59,7 +59,7 @@
+ TopDir => $topDir || '__TOPDIR__',
+ BinDir => $installDir || '__INSTALLDIR__',
+ LibDir => $installDir || '__INSTALLDIR__',
+- Version => '2.1.2',
++ Version => '2.1.2pl2',
+ BackupFields => [qw(
+ num type startTime endTime
+ nFiles size nFilesExist sizeExist nFilesNew sizeNew
+--- lib/BackupPC/Xfer/RsyncFileIO.pm 2005-09-05 16:21:21.000000000 -0700
++++ lib/BackupPC/Xfer/RsyncFileIO.pm 2006-06-18 19:36:32.120926464 -0700
+@@ -405,6 +405,11 @@
+ my($fio, $d) = @_;
+ my($poolWrite);
+
++ #
++ # Don't write attributes on 2nd phase - they're already
++ # taken care of during the first phase.
++ #
++ return if ( $fio->{phase} > 0 );
+ if ( !defined($d) ) {
+ #
+ # flush all entries (in reverse order)
+@@ -932,6 +937,7 @@
+
+ close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
+ unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
++ $fio->{phase} = $phase;
+
+ #
+ # Check the final md4 digest
+--- lib/BackupPC/Xfer/Tar.pm 2005-09-05 16:21:21.000000000 -0700
++++ lib/BackupPC/Xfer/Tar.pm 2006-06-18 19:36:32.110927984 -0700
+@@ -221,8 +221,13 @@
+ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
+ $t->{fileCnt}++;
+ } else {
+- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
+- $t->{xferErrCnt}++;
++ #
++ # Ignore annoying log message on incremental for tar 1.15.x
++ #
++ if ( !/: file is unchanged; not dumped$/ ) {
++ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
++ $t->{xferErrCnt}++;
++ }
+ #
+ # If tar encounters a minor error, it will exit with a non-zero
+ # status. We still consider that ok. Remember if tar prints
+--- conf/config.pl 2005-09-05 16:21:22.000000000 -0700
++++ conf/config.pl 2006-06-18 19:36:31.968949568 -0700
+@@ -1052,7 +1052,7 @@
+ '--perms',
+ '--owner',
+ '--group',
+- '--devices',
++ '-D',
+ '--links',
+ '--times',
+ '--block-size=2048',
+@@ -1086,7 +1086,7 @@
+ '--perms',
+ '--owner',
+ '--group',
+- '--devices',
++ '-D',
+ '--links',
+ '--times',
+ '--block-size=2048',
diff --git a/app-backup/backuppc/files/digest-backuppc-2.1.2 b/app-backup/backuppc/files/digest-backuppc-2.1.2
index 20a380714b51..40e3ccf0597e 100644
--- a/app-backup/backuppc/files/digest-backuppc-2.1.2
+++ b/app-backup/backuppc/files/digest-backuppc-2.1.2
@@ -1,2 +1,6 @@
MD5 72fc0f09084f44c42ba5d22451cfe29b BackupPC-2.1.2.tar.gz 354599
+RMD160 4708ea10f1471d266bb7c77f86cfecb919348d13 BackupPC-2.1.2.tar.gz 354599
+SHA256 5ed4afb044611eb00ef6910d56c3cb9fab34dd29a67600e4a727c0beed27a383 BackupPC-2.1.2.tar.gz 354599
MD5 84a94fa957cef434e453c0d8350c0b46 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219
+RMD160 ae172882e58707bbe0c9d659ca300e490bc375b2 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219
+SHA256 3f171d145cb0bae0f28b2f3861e039b4b43686b3fd25aa66d8a8262f54b50862 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219
diff --git a/app-backup/backuppc/files/digest-backuppc-2.1.2-r1 b/app-backup/backuppc/files/digest-backuppc-2.1.2-r1
new file mode 100644
index 000000000000..40e3ccf0597e
--- /dev/null
+++ b/app-backup/backuppc/files/digest-backuppc-2.1.2-r1
@@ -0,0 +1,6 @@
+MD5 72fc0f09084f44c42ba5d22451cfe29b BackupPC-2.1.2.tar.gz 354599
+RMD160 4708ea10f1471d266bb7c77f86cfecb919348d13 BackupPC-2.1.2.tar.gz 354599
+SHA256 5ed4afb044611eb00ef6910d56c3cb9fab34dd29a67600e4a727c0beed27a383 BackupPC-2.1.2.tar.gz 354599
+MD5 84a94fa957cef434e453c0d8350c0b46 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219
+RMD160 ae172882e58707bbe0c9d659ca300e490bc375b2 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219
+SHA256 3f171d145cb0bae0f28b2f3861e039b4b43686b3fd25aa66d8a8262f54b50862 backuppc-2.1.2-gentoo-0.1.tar.bz2 17219