diff options
Diffstat (limited to 'app-arch/tar')
-rw-r--r-- | app-arch/tar/ChangeLog | 8 | ||||
-rw-r--r-- | app-arch/tar/files/digest-tar-1.19-r1 | 3 | ||||
-rw-r--r-- | app-arch/tar/files/tar-1.19-update-flag.patch | 102 | ||||
-rw-r--r-- | app-arch/tar/tar-1.19-r1.ebuild | 69 |
4 files changed, 181 insertions, 1 deletions
diff --git a/app-arch/tar/ChangeLog b/app-arch/tar/ChangeLog index 7cd7c921907f..f700a5578fa0 100644 --- a/app-arch/tar/ChangeLog +++ b/app-arch/tar/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-arch/tar # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.124 2007/12/01 17:07:05 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.125 2007/12/10 08:39:40 vapier Exp $ + +*tar-1.19-r1 (10 Dec 2007) + + 10 Dec 2007; Mike Frysinger <vapier@gentoo.org> + +files/tar-1.19-update-flag.patch, +tar-1.19-r1.ebuild: + Fix from upstream for an update regression #200315 by Billy DeVincentis. 01 Dec 2007; Markus Rothe <corsair@gentoo.org> tar-1.19.ebuild: Stable on ppc64 diff --git a/app-arch/tar/files/digest-tar-1.19-r1 b/app-arch/tar/files/digest-tar-1.19-r1 new file mode 100644 index 000000000000..bb34999276de --- /dev/null +++ b/app-arch/tar/files/digest-tar-1.19-r1 @@ -0,0 +1,3 @@ +MD5 bcc2e19b19823b9ab68c94586067a792 tar-1.19.tar.bz2 1882486 +RMD160 302d814c1b1d6a8074a9d26e202eb59284b675b0 tar-1.19.tar.bz2 1882486 +SHA256 c690d46da77b1ee07b7c758de46d6d07da698a75e63ed3e8f83e3fca8f809cb4 tar-1.19.tar.bz2 1882486 diff --git a/app-arch/tar/files/tar-1.19-update-flag.patch b/app-arch/tar/files/tar-1.19-update-flag.patch new file mode 100644 index 000000000000..09f6df947951 --- /dev/null +++ b/app-arch/tar/files/tar-1.19-update-flag.patch @@ -0,0 +1,102 @@ +http://bugs.gentoo.org/200315 + +2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/buffer.c (check_compressed_archive): Do not bail out if the + file is too short, set boolean flag, passed as an argument + instead. This fixes a bug introduced on 2007-08-24. See also + tests/shortupd.at. + +Index: src/buffer.c +=================================================================== +RCS file: /cvsroot/tar/tar/src/buffer.c,v +retrieving revision 1.115 +retrieving revision 1.116 +diff -u -p -r1.115 -r1.116 +--- src/buffer.c 31 Oct 2007 13:10:55 -0000 1.115 ++++ src/buffer.c 5 Dec 2007 09:45:22 -0000 1.116 +@@ -229,19 +229,21 @@ static struct zip_magic const magic[] = + + /* Check if the file ARCHIVE is a compressed archive. */ + enum compress_type +-check_compressed_archive () ++check_compressed_archive (bool *pshort) + { + struct zip_magic const *p; + bool sfr; +- bool short_file = false; ++ bool temp; ++ ++ if (!pshort) ++ pshort = &temp; + + /* Prepare global data needed for find_next_block: */ + record_end = record_start; /* set up for 1st record = # 0 */ + sfr = read_full_records; + read_full_records = true; /* Suppress fatal error on reading a partial + record */ +- if (find_next_block () == 0) +- short_file = true; ++ *pshort = find_next_block () == 0; + + /* Restore global values */ + read_full_records = sfr; +@@ -254,9 +256,6 @@ check_compressed_archive () + if (memcmp (record_start->buffer, p->magic, p->length) == 0) + return p->type; + +- if (short_file) +- ERROR ((0, 0, _("This does not look like a tar archive"))); +- + return ct_none; + } + +@@ -273,11 +272,16 @@ open_compressed_archive () + + if (!multi_volume_option) + { +- enum compress_type type = check_compressed_archive (); ++ bool shortfile; ++ enum compress_type type = check_compressed_archive (&shortfile); + + if (type == ct_none) +- return archive; +- ++ { ++ if (shortfile) ++ ERROR ((0, 0, _("This does not look like a tar archive"))); ++ return archive; ++ } ++ + /* FD is not needed any more */ + rmtclose (archive); + +@@ -502,15 +506,18 @@ _open_archive (enum access_mode wanted_a + { + case ACCESS_READ: + { ++ bool shortfile; + enum compress_type type; + + archive = STDIN_FILENO; + +- type = check_compressed_archive (); ++ type = check_compressed_archive (&shortfile); + if (type != ct_none) + FATAL_ERROR ((0, 0, + _("Archive is compressed. Use %s option"), + compress_option (type))); ++ if (shortfile) ++ ERROR ((0, 0, _("This does not look like a tar archive"))); + } + break; + +@@ -554,7 +561,7 @@ _open_archive (enum access_mode wanted_a + O_RDWR | O_CREAT | O_BINARY, + MODE_RW, rsh_command_option); + +- if (check_compressed_archive () != ct_none) ++ if (check_compressed_archive (NULL) != ct_none) + FATAL_ERROR ((0, 0, + _("Cannot update compressed archives"))); + break; diff --git a/app-arch/tar/tar-1.19-r1.ebuild b/app-arch/tar/tar-1.19-r1.ebuild new file mode 100644 index 000000000000..2f9a7212f8a7 --- /dev/null +++ b/app-arch/tar/tar-1.19-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/tar-1.19-r1.ebuild,v 1.1 2007/12/10 08:39:40 vapier Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="Use this to make tarballs :)" +HOMEPAGE="http://www.gnu.org/software/tar/" +SRC_URI="http://ftp.gnu.org/gnu/tar/${P}.tar.bz2 + ftp://alpha.gnu.org/gnu/tar/${P}.tar.bz2 + mirror://gnu/tar/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="nls static userland_GNU" + +RDEPEND="" +DEPEND="${RDEPEND} + nls? ( >=sys-devel/gettext-0.10.35 )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-gnu-inline.patch #198817 + epatch "${FILESDIR}"/${P}-update-flag.patch #200315 + + if ! use userland_GNU ; then + sed -i \ + -e 's:/backup\.sh:/gbackup.sh:' \ + scripts/{backup,dump-remind,restore}.in \ + || die "sed non-GNU" + fi +} + +src_compile() { + local myconf + use static && append-ldflags -static + use userland_GNU || myconf="--program-prefix=g" + # Work around bug in sandbox #67051 + gl_cv_func_chown_follows_symlink=yes \ + econf \ + --enable-backup-scripts \ + --bindir=/bin \ + --libexecdir=/usr/sbin \ + $(use_enable nls) \ + ${myconf} || die + emake || die "emake failed" +} + +src_install() { + local p="" + use userland_GNU || p=g + + emake DESTDIR="${D}" install || die "make install failed" + + if [[ -z ${p} ]] ; then + # a nasty yet required piece of baggage + exeinto /etc + doexe "${FILESDIR}"/rmt || die + fi + + dodoc AUTHORS ChangeLog* NEWS README* PORTS THANKS + newman "${FILESDIR}"/tar.1 ${p}tar.1 + mv "${D}"/usr/sbin/${p}backup{,-tar} + mv "${D}"/usr/sbin/${p}restore{,-tar} + + rm -f "${D}"/usr/$(get_libdir)/charset.alias +} |