diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-10-27 18:19:39 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-10-27 18:19:39 +0000 |
commit | 9f842dedf5610b3b3b9d456f378787b1c4df64dd (patch) | |
tree | 0ae06e14f56d0d33b8df57ba953bb824779f1cca /app-arch/tar | |
parent | Security bump (diff) | |
download | historical-9f842dedf5610b3b3b9d456f378787b1c4df64dd.tar.gz historical-9f842dedf5610b3b3b9d456f378787b1c4df64dd.tar.bz2 historical-9f842dedf5610b3b3b9d456f378787b1c4df64dd.zip |
Fix -C switch wrt #342735 by "ferret". Fix --transform switch wrt #342785.
Package-Manager: portage-2.2.0_alpha1/cvs/Linux x86_64
Diffstat (limited to 'app-arch/tar')
-rw-r--r-- | app-arch/tar/ChangeLog | 9 | ||||
-rw-r--r-- | app-arch/tar/Manifest | 6 | ||||
-rw-r--r-- | app-arch/tar/files/tar-1.24-mkdirat.patch | 31 | ||||
-rw-r--r-- | app-arch/tar/files/tar-1.24-transform-2.patch | 53 | ||||
-rw-r--r-- | app-arch/tar/files/tar-1.24-transform.patch | 173 | ||||
-rw-r--r-- | app-arch/tar/tar-1.24-r1.ebuild | 72 |
6 files changed, 342 insertions, 2 deletions
diff --git a/app-arch/tar/ChangeLog b/app-arch/tar/ChangeLog index 86215518c60f..79f1874285ec 100644 --- a/app-arch/tar/ChangeLog +++ b/app-arch/tar/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-arch/tar # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.156 2010/10/26 06:31:44 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.157 2010/10/27 18:19:39 ssuominen Exp $ + +*tar-1.24-r1 (27 Oct 2010) + + 27 Oct 2010; Samuli Suominen <ssuominen@gentoo.org> +tar-1.24-r1.ebuild, + +files/tar-1.24-mkdirat.patch, +files/tar-1.24-transform.patch, + +files/tar-1.24-transform-2.patch: + Fix -C switch wrt #342735 by "ferret". Fix --transform switch wrt #342785. 26 Oct 2010; Samuli Suominen <ssuominen@gentoo.org> tar-1.24.ebuild: Fix ./configure with FEATURES="-userpriv" wrt #342593. diff --git a/app-arch/tar/Manifest b/app-arch/tar/Manifest index 1a9e0c97e984..f2acc4402349 100644 --- a/app-arch/tar/Manifest +++ b/app-arch/tar/Manifest @@ -3,11 +3,15 @@ AUX tar-1.23-revert-pipe.patch 3743 RMD160 0d1945ffd7ea720c563d46199d1d0b43aeaf8 AUX tar-1.23-strncpy.patch 1249 RMD160 1e0f8fcc6152ec3cc4208a5efebdb4d97b928113 SHA1 9a4c94827703fae8572246c6380d55821db15196 SHA256 d88ba0b9d3b5dc9a8d6b70e4e71c376ff8dcd3412cb8ffceca3a722a17dbaa85 AUX tar-1.23-symlink-k-hang.patch 4936 RMD160 c58d2911e50d6ff5e88001b4755a9e4c9ba511f3 SHA1 9f4bdbf733d25982029741b8cc5b8b49a5168380 SHA256 14a5d98abc174ec5a630719e8ba55f395e91591072cba3da448e77ce9d37bbbf AUX tar-1.23-tests.patch 662 RMD160 ef87a9f5c25240abddde45be4fb0a932c1fd2ec7 SHA1 9ab7f0d1f35ee7acd0ae74ec50c79a7dcafc03e5 SHA256 6898df207d16007233b3ed79b330e036172db7204ed35273123e87bcac7116d9 +AUX tar-1.24-mkdirat.patch 1026 RMD160 6080ad88ed3661f6291bd7e810d868be08466b8d SHA1 bbc5127c3b7dd63dd2beaf601f312acaa9ce5791 SHA256 fa0e3e62b3ec281ddced033d7219a2992f396d278a13360b10d42b03d980cfbf +AUX tar-1.24-transform-2.patch 1834 RMD160 0aace8938804e8632f82c044025f8c4989c95034 SHA1 787e26224463fe35f7224879a0f36c0abd13a6a8 SHA256 b1d2e5e62cbf75507f635e59010c2562ff49b94b7f26d06389f4091b09d6cf62 +AUX tar-1.24-transform.patch 4935 RMD160 3f7c6a80be8f0ac11514f971e75fdaf22d9d6a7e SHA1 56cb27762ef59e2e01e287960c3b2e21713bfd24 SHA256 ad7c974398537ab7ae67c90306ce03cf2f2b313489282d50a2a1d489d94eca07 AUX tar.1 16821 RMD160 f58bc7cfeeee0cc811a6c2b5dd1dffe8b197231e SHA1 b354f0803c03cd59fe24f93d532f27f6f0136316 SHA256 f3558b444ab9427c06bc92838c29194051ed64edd0a909163cfa715cc7e6dcdd DIST tar-1.23.tar.bz2 2189324 RMD160 e79062b7f69d80b734445306f69fb8b96801e909 SHA1 6f3b1443a019da02e4ec20a1446d4aa54b488071 SHA256 c9328372db62fbb1d94c9e4e3cefc961111af46de47085b635359c00a0eebe36 DIST tar-1.24.tar.bz2 2322847 RMD160 52d6959462c840453f5358eb4e05b052fd33305c SHA1 d9ce3b4a4d18b010294ed8609473b0e6ae276a5d SHA256 17c6e065758f68f034cea977187ab8ec484da62c0fae1410428bb0d8eee3aded EBUILD tar-1.23-r2.ebuild 1757 RMD160 fe262e531e6edca865a1c49eb47bfca9f10b1edf SHA1 c2c58c2488f731adc4964fd19c6da415c93e31c5 SHA256 870839e7cfbbea1e978cb042a80b8283bffeacfe9e4f294e29591898a22ed103 EBUILD tar-1.23-r4.ebuild 1824 RMD160 6721228dfd20f85bd93278148f0f7fa7d57db84f SHA1 8fa3f45e1c85c3a06ab6062940a37f3c67ce50c0 SHA256 25bde52ba653a03f48aa26dd0d86e5879e381260b7fae24f6095de5ef55b1de0 +EBUILD tar-1.24-r1.ebuild 1829 RMD160 25e17b9b832d41b29d3a2fac5011c89ff6647380 SHA1 c1700f1b8a2e1a330069c9b1b2e23620d8465d99 SHA256 08338ffe228f9880c9d7cf6740083b605e37e3ae4a143457d849226238dc59cc EBUILD tar-1.24.ebuild 1680 RMD160 6ac903050cc684a6aab8bb0033c6ec23eb0e0ef8 SHA1 ae22196c11be0d784954a797d139c9bacef6a7b7 SHA256 fbd0cd3360fb10a5a316583afe8e5f273e4f06dd66563454b16004b6bb6141fa -MISC ChangeLog 23324 RMD160 9c7c22c45ec1fe1c829df1603d3860c5a93e9959 SHA1 1f2eacc830e7e7998590ae59c814713ac2d8d291 SHA256 a780cb787308a1223e3e5b0bbb6caf77660028bad4aaaaa255205070a34a1609 +MISC ChangeLog 23608 RMD160 828ec63ffff221269e800709725e01ddd7c523f2 SHA1 20c9adabfd1b4fff26af5d44b084d35b050655aa SHA256 cac213951374c718f5cbbe20751d1a449c4b070ea158cfdbebef87295c68989c MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 diff --git a/app-arch/tar/files/tar-1.24-mkdirat.patch b/app-arch/tar/files/tar-1.24-mkdirat.patch new file mode 100644 index 000000000000..51d2f2a8255b --- /dev/null +++ b/app-arch/tar/files/tar-1.24-mkdirat.patch @@ -0,0 +1,31 @@ +From acb77ac5bd4bf9248070c9c512525eee8258aebd Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Tue, 26 Oct 2010 03:20:19 +0000 +Subject: tar: fix bug with -C and extracting directories + +Problem reported by Denis Excoffier in +<http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00034.html>. + +* src/extract.c (extract_dir): Use mkdirat, not mkdir. +* tests/extrac16.at: New file, to test for this bug. +* tests/Makefile.am (TESTSUITE_AT): Add it. +* tests/testsuite.at: Include it. + +This file is a placeholder. It will be replaced with the actual ChangeLog +by make dist. Run make ChangeLog if you wish to create it earlier. +--- +diff --git a/src/extract.c b/src/extract.c +index 0d23d4a..98236ac 100644 +--- a/src/extract.c ++++ b/src/extract.c +@@ -777,7 +777,7 @@ extract_dir (char *file_name, int typeflag) + + for (;;) + { +- status = mkdir (file_name, mode); ++ status = mkdirat (chdir_fd, file_name, mode); + if (status == 0) + { + current_mode = mode & ~ current_umask; +-- +cgit v0.8.3.2 diff --git a/app-arch/tar/files/tar-1.24-transform-2.patch b/app-arch/tar/files/tar-1.24-transform-2.patch new file mode 100644 index 000000000000..1366c471da69 --- /dev/null +++ b/app-arch/tar/files/tar-1.24-transform-2.patch @@ -0,0 +1,53 @@ +From 5af29cb944c84e2d539ce9df527d63c29f6012b9 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <gray@gnu.org.ua> +Date: Wed, 27 Oct 2010 11:07:46 +0000 +Subject: Transform file names when updating and appendig to archives. + +This complements 28e91b48. + +* src/common.h (transform_stat_info): New prototype. +* src/list.c (transform_stat_info): Remove static qualifier. +* src/update.c (update_archive): Call transform_stat_info. +* tests/Makefile.am (TESTSUITE_AT): Add append03.at +* tests/testsuite.at: Include append03.at +--- +diff --git a/src/common.h b/src/common.h +index 192cf9e..4a63824 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -550,6 +550,7 @@ extern size_t recent_long_link_blocks; + + void decode_header (union block *header, struct tar_stat_info *stat_info, + enum archive_format *format_pointer, int do_user_group); ++void transform_stat_info (int typeflag, struct tar_stat_info *stat_info); + char const *tartime (struct timespec t, bool full_time); + + #define OFF_FROM_HEADER(where) off_from_header (where, sizeof (where)) +diff --git a/src/list.c b/src/list.c +index e1e06ca..c65e171 100644 +--- a/src/list.c ++++ b/src/list.c +@@ -116,7 +116,7 @@ transform_member_name (char **pinput, int type) + return transform_name_fp (pinput, type, decode_xform, &type); + } + +-static void ++void + transform_stat_info (int typeflag, struct tar_stat_info *stat_info) + { + if (typeflag == GNUTYPE_VOLHDR) +diff --git a/src/update.c b/src/update.c +index 69fa592..e3228d4 100644 +--- a/src/update.c ++++ b/src/update.c +@@ -130,6 +130,8 @@ update_archive (void) + + decode_header (current_header, ¤t_stat_info, + ¤t_format, 0); ++ transform_stat_info (current_header->header.typeflag, ++ ¤t_stat_info); + archive_format = current_format; + + if (subcommand_option == UPDATE_SUBCOMMAND +-- +cgit v0.8.3.2 diff --git a/app-arch/tar/files/tar-1.24-transform.patch b/app-arch/tar/files/tar-1.24-transform.patch new file mode 100644 index 000000000000..b6638adc9b2b --- /dev/null +++ b/app-arch/tar/files/tar-1.24-transform.patch @@ -0,0 +1,173 @@ +From 28e91b48f680a6fab90ee39145123647345f385f Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <gray@gnu.org.ua> +Date: Tue, 26 Oct 2010 14:47:16 +0000 +Subject: Make sure name matching occurs before name transformation. + +The commit 9c194c99 altered that order. + +* src/list.c (transform_stat_info): New function. Split off from +decode_header. +(read_and): Call transform_stat_info right before do_something, +and after deciding if we should proceed with this member name, +so that name matching occurs before name transformation. + +* tests/extrac17.at: New file. +* tests/Makefile.am (TESTSUITE_AT): Add extrac17.at +* tests/testsuite.at: Include extrac17.at. +--- +diff --git a/src/list.c b/src/list.c +index d15653d..e1e06ca 100644 +--- a/src/list.c ++++ b/src/list.c +@@ -75,6 +75,66 @@ base64_init (void) + base64_map[(int) base_64_digits[i]] = i; + } + ++static char * ++decode_xform (char *file_name, void *data) ++{ ++ int type = *(int*)data; ++ ++ switch (type) ++ { ++ case XFORM_SYMLINK: ++ /* FIXME: It is not quite clear how and to which extent are the symbolic ++ links subject to filename transformation. In the absence of another ++ solution, symbolic links are exempt from component stripping and ++ name suffix normalization, but subject to filename transformation ++ proper. */ ++ return file_name; ++ ++ case XFORM_LINK: ++ file_name = safer_name_suffix (file_name, true, absolute_names_option); ++ break; ++ ++ case XFORM_REGFILE: ++ file_name = safer_name_suffix (file_name, false, absolute_names_option); ++ break; ++ } ++ ++ if (strip_name_components) ++ { ++ size_t prefix_len = stripped_prefix_len (file_name, ++ strip_name_components); ++ if (prefix_len == (size_t) -1) ++ prefix_len = strlen (file_name); ++ file_name += prefix_len; ++ } ++ return file_name; ++} ++ ++static bool ++transform_member_name (char **pinput, int type) ++{ ++ return transform_name_fp (pinput, type, decode_xform, &type); ++} ++ ++static void ++transform_stat_info (int typeflag, struct tar_stat_info *stat_info) ++{ ++ if (typeflag == GNUTYPE_VOLHDR) ++ /* Name transformations don't apply to volume headers. */ ++ return; ++ ++ transform_member_name (&stat_info->file_name, XFORM_REGFILE); ++ switch (typeflag) ++ { ++ case SYMTYPE: ++ transform_member_name (&stat_info->link_name, XFORM_SYMLINK); ++ break; ++ ++ case LNKTYPE: ++ transform_member_name (&stat_info->link_name, XFORM_LINK); ++ } ++} ++ + /* Main loop for reading an archive. */ + void + read_and (void (*do_something) (void)) +@@ -135,7 +195,8 @@ read_and (void (*do_something) (void)) + continue; + } + } +- ++ transform_stat_info (current_header->header.typeflag, ++ ¤t_stat_info); + (*do_something) (); + continue; + +@@ -495,47 +556,6 @@ read_header (union block **return_block, struct tar_stat_info *info, + } + } + +-static char * +-decode_xform (char *file_name, void *data) +-{ +- int type = *(int*)data; +- +- switch (type) +- { +- case XFORM_SYMLINK: +- /* FIXME: It is not quite clear how and to which extent are the symbolic +- links subject to filename transformation. In the absence of another +- solution, symbolic links are exempt from component stripping and +- name suffix normalization, but subject to filename transformation +- proper. */ +- return file_name; +- +- case XFORM_LINK: +- file_name = safer_name_suffix (file_name, true, absolute_names_option); +- break; +- +- case XFORM_REGFILE: +- file_name = safer_name_suffix (file_name, false, absolute_names_option); +- break; +- } +- +- if (strip_name_components) +- { +- size_t prefix_len = stripped_prefix_len (file_name, +- strip_name_components); +- if (prefix_len == (size_t) -1) +- prefix_len = strlen (file_name); +- file_name += prefix_len; +- } +- return file_name; +-} +- +-static bool +-transform_member_name (char **pinput, int type) +-{ +- return transform_name_fp (pinput, type, decode_xform, &type); +-} +- + #define ISOCTAL(c) ((c)>='0'&&(c)<='7') + + /* Decode things from a file HEADER block into STAT_INFO, also setting +@@ -655,23 +675,9 @@ decode_header (union block *header, struct tar_stat_info *stat_info, + || stat_info->dumpdir) + stat_info->is_dumpdir = true; + } +- +- if (header->header.typeflag == GNUTYPE_VOLHDR) +- /* Name transformations don't apply to volume headers. */ +- return; +- +- transform_member_name (&stat_info->file_name, XFORM_REGFILE); +- switch (header->header.typeflag) +- { +- case SYMTYPE: +- transform_member_name (&stat_info->link_name, XFORM_SYMLINK); +- break; +- +- case LNKTYPE: +- transform_member_name (&stat_info->link_name, XFORM_LINK); +- } + } + ++ + /* Convert buffer at WHERE0 of size DIGS from external format to + uintmax_t. DIGS must be positive. If TYPE is nonnull, the data + are of type TYPE. The buffer must represent a value in the range +-- +cgit v0.8.3.2 diff --git a/app-arch/tar/tar-1.24-r1.ebuild b/app-arch/tar/tar-1.24-r1.ebuild new file mode 100644 index 000000000000..9c08d7905e9d --- /dev/null +++ b/app-arch/tar/tar-1.24-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/tar-1.24-r1.ebuild,v 1.1 2010/10/27 18:19:39 ssuominen Exp $ + +EAPI="2" + +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 )" + +RESTRICT="test" # Remove this from 1.25 + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.23-strncpy.patch #317139 + epatch "${FILESDIR}"/${P}-mkdirat.patch #342735 + epatch "${FILESDIR}"/${P}-transform{,-2}.patch #342785 + + 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_configure() { + 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 \ + FORCE_UNSAFE_CONFIGURE=1 \ + econf \ + --enable-backup-scripts \ + --bindir=/bin \ + --libexecdir=/usr/sbin \ + $(use_enable nls) \ + ${myconf} +} + +src_install() { + local p="" + use userland_GNU || p=g + + emake DESTDIR="${D}" install || die + + if [[ -z ${p} ]] ; then + # a nasty yet required piece of baggage + exeinto /etc + doexe "${FILESDIR}"/rmt || die + fi + + dodoc AUTHORS ChangeLog* NEWS README* 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 +} |