summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-12-02 22:59:57 +0000
committerMike Frysinger <vapier@gentoo.org>2006-12-02 22:59:57 +0000
commit1c7290a07b083ce671f0ad3a95a1f0e1162aba0c (patch)
tree4da6579d262ac8cf59de62331f009c38bf57b7e1 /app-arch/tar
parentupdate libpng-manual.txt digest (diff)
downloadgentoo-2-1c7290a07b083ce671f0ad3a95a1f0e1162aba0c.tar.gz
gentoo-2-1c7290a07b083ce671f0ad3a95a1f0e1162aba0c.tar.bz2
gentoo-2-1c7290a07b083ce671f0ad3a95a1f0e1162aba0c.zip
Grab change from upstream to remove GNUTYPE_NAMES #155901.
(Portage version: 2.1.2_rc2-r3)
Diffstat (limited to 'app-arch/tar')
-rw-r--r--app-arch/tar/ChangeLog8
-rw-r--r--app-arch/tar/files/digest-tar-1.16-r23
-rw-r--r--app-arch/tar/files/tar-1.16-remove-GNUTYPE_NAMES.patch169
-rw-r--r--app-arch/tar/tar-1.16-r2.ebuild67
4 files changed, 246 insertions, 1 deletions
diff --git a/app-arch/tar/ChangeLog b/app-arch/tar/ChangeLog
index a10a8a7538d1..111990aceee3 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.71 2006/11/01 01:18:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.72 2006/12/02 22:59:57 vapier Exp $
+
+*tar-1.16-r2 (02 Dec 2006)
+
+ 02 Dec 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/tar-1.16-remove-GNUTYPE_NAMES.patch, +tar-1.16-r2.ebuild:
+ Grab change from upstream to remove GNUTYPE_NAMES #155901.
*tar-1.16-r1 (01 Nov 2006)
diff --git a/app-arch/tar/files/digest-tar-1.16-r2 b/app-arch/tar/files/digest-tar-1.16-r2
new file mode 100644
index 000000000000..9e015428baa6
--- /dev/null
+++ b/app-arch/tar/files/digest-tar-1.16-r2
@@ -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-remove-GNUTYPE_NAMES.patch b/app-arch/tar/files/tar-1.16-remove-GNUTYPE_NAMES.patch
new file mode 100644
index 000000000000..24b03f3f8a51
--- /dev/null
+++ b/app-arch/tar/files/tar-1.16-remove-GNUTYPE_NAMES.patch
@@ -0,0 +1,169 @@
+this is based on the upstream diff to remove GNUTYPE_NAMES ... only difference
+is src/Makefile.am is not tweaked (so we dont have to run autotools) nor is the
+doc/tar.texi updated. instead, the entire src/mangle.c is ifdef-ed out.
+
+http://bugs.gentoo.org/155901
+
+2006-11-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Remove support for mangled names.
+ * doc/tar.texi (verbose tutorial): Likewise.
+ * src/Makefile.am (tar_SOURCES): Remove mangle.c.
+ * src/common.h (extract_mangle): Remove decl.
+ * src/extract.c (extract_mangle_wrapper): Remove.
+ (prepare_to_extract): Remove support for mangled names.
+ * src/list.c (read_and, print_header): Likewise.
+ * src/mangle.c: Remove.
+ * src/tar.h (GNUTYPE_NAMES): Remove.
+
+Index: NEWS
+===================================================================
+RCS file: /cvsroot/tar/tar/NEWS,v
+retrieving revision 1.126
+retrieving revision 1.127
+diff -u -p -r1.126 -r1.127
+--- NEWS 29 Nov 2006 18:16:27 -0000 1.126
++++ NEWS 30 Nov 2006 06:39:29 -0000 1.127
+@@ -1,6 +1,14 @@
+ GNU tar NEWS - User visible changes.
+ Please send GNU tar bug reports to <bug-tar@gnu.org>
+
++* Support for reading ustar type 'N' header logical records has been removed.
++ This GNU extension was generated only by very old versions of GNU 'tar'.
++ Unfortunately its implementation had security holes; see
++ <http://archives.neohapsis.com/archives/fulldisclosure/2006-11/0344.html>.
++ We don't expect that any tar archives in practical use have type 'N'
++ records, but if you have one and you trust its contents, you can
++ decode it with GNU tar 1.16 or earlier.
++
+ version 1.16 - Sergey Poznyakoff, 2006-10-21
+
+ * After creating an archive, tar exits with code 1 if some files were
+Index: src/common.h
+===================================================================
+RCS file: /cvsroot/tar/tar/src/common.h,v
+retrieving revision 1.91
+retrieving revision 1.92
+diff -u -p -r1.91 -r1.92
+--- src/common.h 29 Nov 2006 18:16:27 -0000 1.91
++++ src/common.h 30 Nov 2006 06:39:29 -0000 1.92
+@@ -546,10 +546,6 @@ enum read_header tar_checksum (union blo
+ void skip_file (off_t size);
+ void skip_member (void);
+
+-/* Module mangle.c. */
+-
+-void extract_mangle (void);
+-
+ /* Module misc.c. */
+
+ void assign_string (char **dest, const char *src);
+Index: src/extract.c
+===================================================================
+RCS file: /cvsroot/tar/tar/src/extract.c,v
+retrieving revision 1.97
+retrieving revision 1.98
+diff -u -p -r1.97 -r1.98
+--- src/extract.c 29 Nov 2006 18:16:27 -0000 1.97
++++ src/extract.c 30 Nov 2006 06:39:29 -0000 1.98
+@@ -1024,13 +1024,6 @@ extract_fifo (char *file_name, int typef
+ #endif
+
+ static int
+-extract_mangle_wrapper (char *file_name, int typeflag)
+-{
+- extract_mangle ();
+- return 0;
+-}
+-
+-static int
+ extract_volhdr (char *file_name, int typeflag)
+ {
+ if (verbose_option)
+@@ -1121,10 +1114,6 @@ prepare_to_extract (char const *file_nam
+ *fun = extract_volhdr;
+ break;
+
+- case GNUTYPE_NAMES:
+- *fun = extract_mangle_wrapper;
+- break;
+-
+ case GNUTYPE_MULTIVOL:
+ ERROR ((0, 0,
+ _("%s: Cannot extract -- file is continued from another volume"),
+Index: src/list.c
+===================================================================
+RCS file: /cvsroot/tar/tar/src/list.c,v
+retrieving revision 1.101
+retrieving revision 1.102
+diff -u -p -r1.101 -r1.102
+--- src/list.c 2 Jun 2006 08:05:04 -0000 1.101
++++ src/list.c 30 Nov 2006 06:39:29 -0000 1.102
+@@ -107,7 +107,6 @@ read_and (void (*do_something) (void))
+ {
+ case GNUTYPE_VOLHDR:
+ case GNUTYPE_MULTIVOL:
+- case GNUTYPE_NAMES:
+ break;
+
+ case DIRTYPE:
+@@ -1047,10 +1046,6 @@ print_header (struct tar_stat_info *st,
+ modes[0] = 'M';
+ break;
+
+- case GNUTYPE_NAMES:
+- modes[0] = 'N';
+- break;
+-
+ case GNUTYPE_LONGNAME:
+ case GNUTYPE_LONGLINK:
+ modes[0] = 'L';
+@@ -1234,10 +1229,6 @@ print_header (struct tar_stat_info *st,
+ uintbuf));
+ fprintf (stdlis, _("--Continued at byte %s--\n"), size);
+ break;
+-
+- case GNUTYPE_NAMES:
+- fprintf (stdlis, _("--Mangled file names--\n"));
+- break;
+ }
+ }
+ fflush (stdlis);
+Index: src/mangle.c
+===================================================================
+RCS file: src/mangle.c
+diff -N src/mangle.c
+--- src/mangle.c 15 May 2005 03:59:10 -0000 1.17
++++ src/mangle.c
+@@ -1,1 +1,2 @@
++#if 0
+ /* Encode long filenames for GNU tar.
+@@ -121,1 +121,2 @@
+ }
++#endif
+Index: src/tar.h
+===================================================================
+RCS file: /cvsroot/tar/tar/src/tar.h,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- src/tar.h 29 Nov 2006 18:28:45 -0000 1.37
++++ src/tar.h 30 Nov 2006 06:39:29 -0000 1.38
+@@ -165,6 +165,7 @@ struct oldgnu_header
+ 'A' Solaris Access Control List
+ 'E' Solaris Extended Attribute File
+ 'I' Inode only, as in 'star'
++ 'N' Obsolete GNU tar, for file names that do not fit into the main header.
+ 'X' POSIX 1003.1-2001 eXtended (VU version) */
+
+ /* This is a dir entry that contains the names of files that were in the
+@@ -180,9 +181,6 @@ struct oldgnu_header
+ /* This is the continuation of a file that began on another volume. */
+ #define GNUTYPE_MULTIVOL 'M'
+
+-/* For storing filenames that do not fit into the main header. */
+-#define GNUTYPE_NAMES 'N'
+-
+ /* This is for sparse files. */
+ #define GNUTYPE_SPARSE 'S'
+
diff --git a/app-arch/tar/tar-1.16-r2.ebuild b/app-arch/tar/tar-1.16-r2.ebuild
new file mode 100644
index 000000000000..dbfcbfa75fb9
--- /dev/null
+++ b/app-arch/tar/tar-1.16-r2.ebuild
@@ -0,0 +1,67 @@
+# 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-r2.ebuild,v 1.1 2006/12/02 22:59:57 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
+ epatch "${FILESDIR}"/${P}-remove-GNUTYPE_NAMES.patch #155901
+
+ 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
+}