diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-11-01 01:18:48 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-11-01 01:18:48 +0000 |
commit | f744802251fa47ed89b5dbdb49f3885665973966 (patch) | |
tree | 89c28457de8ad08daad95523b5a389fd6049fc96 /app-arch | |
parent | old (diff) | |
download | gentoo-2-f744802251fa47ed89b5dbdb49f3885665973966.tar.gz gentoo-2-f744802251fa47ed89b5dbdb49f3885665973966.tar.bz2 gentoo-2-f744802251fa47ed89b5dbdb49f3885665973966.zip |
Add fix from upstream.
(Portage version: 2.1.2_rc1-r1)
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/tar/ChangeLog | 8 | ||||
-rw-r--r-- | app-arch/tar/files/digest-tar-1.16-r1 | 3 | ||||
-rw-r--r-- | app-arch/tar/files/tar-1.16-segv.patch | 122 | ||||
-rw-r--r-- | app-arch/tar/tar-1.16-r1.ebuild | 66 |
4 files changed, 198 insertions, 1 deletions
diff --git a/app-arch/tar/ChangeLog b/app-arch/tar/ChangeLog index 490f753d912e..a10a8a7538d1 100644 --- a/app-arch/tar/ChangeLog +++ b/app-arch/tar/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-arch/tar # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.70 2006/10/21 21:45:56 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.71 2006/11/01 01:18:48 vapier Exp $ + +*tar-1.16-r1 (01 Nov 2006) + + 01 Nov 2006; Mike Frysinger <vapier@gentoo.org> + +files/tar-1.16-segv.patch, +tar-1.16-r1.ebuild: + Add fix from upstream. *tar-1.16 (21 Oct 2006) diff --git a/app-arch/tar/files/digest-tar-1.16-r1 b/app-arch/tar/files/digest-tar-1.16-r1 new file mode 100644 index 000000000000..9e015428baa6 --- /dev/null +++ b/app-arch/tar/files/digest-tar-1.16-r1 @@ -0,0 +1,3 @@ +MD5 d6fe544e834a8f9db6e6c7c2d38ec100 tar-1.16.tar.bz2 1785682 +RMD160 9d4a8a55ae0b62395cc7f72421fd274c443caf66 tar-1.16.tar.bz2 1785682 +SHA256 5037dfa4bdd426e680345681070a484f7f4edfa0b3381f595ca6dbc6ca1f5361 tar-1.16.tar.bz2 1785682 diff --git a/app-arch/tar/files/tar-1.16-segv.patch b/app-arch/tar/files/tar-1.16-segv.patch new file mode 100644 index 000000000000..f99fae50df8c --- /dev/null +++ b/app-arch/tar/files/tar-1.16-segv.patch @@ -0,0 +1,122 @@ +fix from upstream + +http://lists.gnu.org/archive/html/bug-tar/2006-10/msg00042.html + +To: "Karl Berry" <karl@freefriends.org> +From: "Sergey Poznyakoff" <gray@Mirddin.farlep.net> +Date: Wed, 01 Nov 2006 02:17:25 +0200 +Subject: Re: [Bug-tar] tar 1.16 segmentation fault + +Karl Berry <karl@freefriends.org> wrote: + +> I typed (by mistake): +> tar czfT x.tgz `cat /tmp/b` +> +> and got: +> Segmentation fault + +Thank you. I have installed the following fix: + +2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/tar.c: Handle zero-length entries in a files-from file + +Index: src/tar.c +=================================================================== +RCS file: /cvsroot/tar/tar/src/tar.c,v +retrieving revision 1.160 +diff -p -u -r1.160 tar.c +--- src/tar.c 17 Oct 2006 08:13:43 -0000 1.160 ++++ src/tar.c 1 Nov 2006 00:15:40 -0000 +@@ -953,7 +953,8 @@ enum read_file_list_state /* Result of + { + file_list_success, /* OK, name read successfully */ + file_list_end, /* End of list file */ +- file_list_zero /* Zero separator encountered where it should not */ ++ file_list_zero, /* Zero separator encountered where it should not */ ++ file_list_skip /* Empty (zero-length) entry encountered, skip it */ + }; + + /* Read from FP a sequence of characters up to FILENAME_TERMINATOR and put them +@@ -971,13 +972,15 @@ read_name_from_file (FILE *fp, struct ob + { + /* We have read a zero separator. The file possibly is + zero-separated */ +- /* FATAL_ERROR((0, 0, N_("file name contains null character"))); */ + return file_list_zero; + } + obstack_1grow (stk, c); + counter++; + } + ++ if (counter == 0 && c != EOF) ++ return file_list_skip; ++ + obstack_1grow (stk, 0); + + return (counter == 0 && c == EOF) ? file_list_end : file_list_success; +@@ -1058,31 +1061,42 @@ update_argv (const char *filename, struc + open_fatal (filename); + } + +- while ((read_state = read_name_from_file (fp, &argv_stk)) == file_list_success) +- count++; +- +- if (read_state == file_list_zero) ++ while ((read_state = read_name_from_file (fp, &argv_stk)) != file_list_end) + { +- size_t size; ++ switch (read_state) ++ { ++ case file_list_success: ++ count++; ++ break; ++ ++ case file_list_end: /* won't happen, just to pacify gcc */ ++ break; + +- WARN ((0, 0, N_("%s: file name read contains nul character"), +- quotearg_colon (filename))); ++ case file_list_zero: ++ { ++ size_t size; + +- /* Prepare new stack contents */ +- size = obstack_object_size (&argv_stk); +- p = obstack_finish (&argv_stk); +- for (; size > 0; size--, p++) +- if (*p) +- obstack_1grow (&argv_stk, *p); +- else +- obstack_1grow (&argv_stk, '\n'); +- obstack_1grow (&argv_stk, 0); +- count = 1; +- +- /* Read rest of files using new filename terminator */ +- filename_terminator = 0; +- while (read_name_from_file (fp, &argv_stk) == file_list_success) +- count++; ++ WARN ((0, 0, N_("%s: file name read contains nul character"), ++ quotearg_colon (filename))); ++ ++ /* Prepare new stack contents */ ++ size = obstack_object_size (&argv_stk); ++ p = obstack_finish (&argv_stk); ++ for (; size > 0; size--, p++) ++ if (*p) ++ obstack_1grow (&argv_stk, *p); ++ else ++ obstack_1grow (&argv_stk, '\n'); ++ obstack_1grow (&argv_stk, 0); ++ count = 1; ++ /* Read rest of files using new filename terminator */ ++ filename_terminator = 0; ++ break; ++ } ++ ++ case file_list_skip: ++ break; ++ } + } + + if (!is_stdin) diff --git a/app-arch/tar/tar-1.16-r1.ebuild b/app-arch/tar/tar-1.16-r1.ebuild new file mode 100644 index 000000000000..e8657383ff2d --- /dev/null +++ b/app-arch/tar/tar-1.16-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/tar-1.16-r1.ebuild,v 1.1 2006/11/01 01:18:48 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-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="nls static" + +RDEPEND="" +DEPEND="${RDEPEND} + nls? ( >=sys-devel/gettext-0.10.35 )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-segv.patch + + 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" + + # a nasty yet required symlink + dodir /etc + dosym /usr/sbin/${p}rmt /etc/${p}rmt + + 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 +} |