diff options
author | Lisa M. Seelye <lisa@gentoo.org> | 2006-05-26 18:48:49 +0000 |
---|---|---|
committer | Lisa M. Seelye <lisa@gentoo.org> | 2006-05-26 18:48:49 +0000 |
commit | 0af7480d8637ebb04eb84bc2650db50d0ad154ee (patch) | |
tree | 8c7618a459c0cbfb4730df9f7acae71eabc414fc /app-backup | |
parent | Version bump. (diff) | |
download | gentoo-2-0af7480d8637ebb04eb84bc2650db50d0ad154ee.tar.gz gentoo-2-0af7480d8637ebb04eb84bc2650db50d0ad154ee.tar.bz2 gentoo-2-0af7480d8637ebb04eb84bc2650db50d0ad154ee.zip |
Resolve remote backup issue following CAN-2005-2965 - see bug 116510.
(Portage version: 2.1_pre10-r5)
Diffstat (limited to 'app-backup')
7 files changed, 140 insertions, 2 deletions
diff --git a/app-backup/flexbackup/ChangeLog b/app-backup/flexbackup/ChangeLog index 9f16b7951a82..3212d49eba06 100644 --- a/app-backup/flexbackup/ChangeLog +++ b/app-backup/flexbackup/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-backup/flexbackup -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-backup/flexbackup/ChangeLog,v 1.4 2005/10/21 18:27:26 hansmi Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-backup/flexbackup/ChangeLog,v 1.5 2006/05/26 18:48:49 lisa Exp $ + +*flexbackup-1.2.1-r2 (26 May 2006) + + 26 May 2006; Lisa Seelye <lisa@gentoo.org> + +files/flexbackup-1.2.1-secure-tempfile.patch, + +flexbackup-1.2.1-r2.ebuild: + Resolve remote backup issue following CAN-2005-2965 - see bug 116510. 21 Oct 2005; Michael Hanselmann <hansmi@gentoo.org> flexbackup-1.2.1-r1.ebuild: diff --git a/app-backup/flexbackup/files/digest-flexbackup-1.2.0-r1 b/app-backup/flexbackup/files/digest-flexbackup-1.2.0-r1 index da5bb7944a12..bd2be7a50e2f 100644 --- a/app-backup/flexbackup/files/digest-flexbackup-1.2.0-r1 +++ b/app-backup/flexbackup/files/digest-flexbackup-1.2.0-r1 @@ -1 +1,3 @@ MD5 a5e57e7070ad3da1b5a9e0aed2aeda83 flexbackup-1.2.0.tar.gz 73170 +RMD160 ff36fc51a28520155866006d7d77651bb2f258fa flexbackup-1.2.0.tar.gz 73170 +SHA256 50a424d1faa277d7c15199f59e26049f7a99c896351324304edfec6c0cbd22da flexbackup-1.2.0.tar.gz 73170 diff --git a/app-backup/flexbackup/files/digest-flexbackup-1.2.1 b/app-backup/flexbackup/files/digest-flexbackup-1.2.1 index 1627b7f3c29d..92deefe369f4 100644 --- a/app-backup/flexbackup/files/digest-flexbackup-1.2.1 +++ b/app-backup/flexbackup/files/digest-flexbackup-1.2.1 @@ -1 +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/digest-flexbackup-1.2.1-r1 b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r1 index 1627b7f3c29d..92deefe369f4 100644 --- a/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r1 +++ b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r1 @@ -1 +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/digest-flexbackup-1.2.1-r2 b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r2 new file mode 100644 index 000000000000..92deefe369f4 --- /dev/null +++ b/app-backup/flexbackup/files/digest-flexbackup-1.2.1-r2 @@ -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-secure-tempfile.patch b/app-backup/flexbackup/files/flexbackup-1.2.1-secure-tempfile.patch new file mode 100644 index 000000000000..d97027270c28 --- /dev/null +++ b/app-backup/flexbackup/files/flexbackup-1.2.1-secure-tempfile.patch @@ -0,0 +1,72 @@ +--- flexbackup 2003-10-10 07:12:09.000000000 -0700 ++++ /usr/bin/flexbackup 2006-05-14 13:14:54.000000000 -0700 +@@ -269,6 +269,7 @@ + untie(%::index); + } + ++system ('rm', '-rf', $cfg::tmpdir); + exit(0); + + ###################################################################### +@@ -811,6 +812,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 +833,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) { +@@ -2750,8 +2761,9 @@ + $::path{'find'} = &checkinpath('find'); + $::path{'dd'} = &checkinpath('dd'); + $::path{'printf'} = &checkinpath('printf'); ++ $::path{'mkdir'} = &checkinpath('mkdir'); + +- 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; +@@ -3442,6 +3454,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 +@@ -5236,8 +5257,8 @@ + # 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"; diff --git a/app-backup/flexbackup/flexbackup-1.2.1-r2.ebuild b/app-backup/flexbackup/flexbackup-1.2.1-r2.ebuild new file mode 100644 index 000000000000..66e19b809107 --- /dev/null +++ b/app-backup/flexbackup/flexbackup-1.2.1-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2006 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-r2.ebuild,v 1.1 2006/05/26 18:48:49 lisa 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="dev-lang/perl + sys-apps/findutils + app-arch/tar + app-arch/mt-st" + +src_unpack() { + unpack ${A} + cd "${S}" + #Substituting out this patch for bug #116510 +# epatch "${FILESDIR}"/${P}-CAN-2005-2965.patch + epatch "${FILESDIR}"/flexbackup-1.2.1-secure-tempfile.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} + make install \ + PREFIX="${D}"/usr \ + CONFFILE="${D}"/etc/flexbackup.conf \ + || die + + dodoc CHANGES CREDITS INSTALL README TODO + dohtml faq.html +} + +pkg_postinst() { + einfo "Please edit your /etc/flexbackup.conf file to suit your" + einfo "needs. If you are using devfs, the tape device should" + einfo "be set to /dev/tapes/tape0/mtn. If you need to use any" + einfo "archiver other than tar, please emerge it separately." +} |