summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-01-20 07:30:57 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-01-20 07:30:57 +0000
commite01b6b72ad5235a423ac3db21b5f68cc0546664d (patch)
treedd6f388389879da3cb117955477488fb099f6f08 /app-arch
parentKeyword ~amd64-linux/~x86-linux; use helpers to avoid EPREFIX (diff)
downloadhistorical-e01b6b72ad5235a423ac3db21b5f68cc0546664d.tar.gz
historical-e01b6b72ad5235a423ac3db21b5f68cc0546664d.tar.bz2
historical-e01b6b72ad5235a423ac3db21b5f68cc0546664d.zip
Cpio on XFS fails to deal with hardlinks properly, apply fix from upstream mailing list.
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/cpio/ChangeLog11
-rw-r--r--app-arch/cpio/Manifest4
-rw-r--r--app-arch/cpio/cpio-2.10-r1.ebuild41
-rw-r--r--app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch142
4 files changed, 195 insertions, 3 deletions
diff --git a/app-arch/cpio/ChangeLog b/app-arch/cpio/ChangeLog
index e6b83cd52fef..2402c399b509 100644
--- a/app-arch/cpio/ChangeLog
+++ b/app-arch/cpio/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-arch/cpio
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.99 2009/06/20 10:20:01 vapier Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.100 2010/01/20 07:30:56 robbat2 Exp $
+
+*cpio-2.10-r1 (20 Jan 2010)
+
+ 20 Jan 2010; Robin H. Johnson <robbat2@gentoo.org>
+ +files/cpio-2.9-64-bit-wide-inode-fixup.patch, +cpio-2.10-r1.ebuild:
+ Cpio on XFS fails to deal with hardlinks properly, apply fix from upstream
+ mailing list.
*cpio-2.10 (20 Jun 2009)
diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest
index 1f373479a5a5..fe7ba55a2a0c 100644
--- a/app-arch/cpio/Manifest
+++ b/app-arch/cpio/Manifest
@@ -1,11 +1,13 @@
+AUX cpio-2.9-64-bit-wide-inode-fixup.patch 4432 RMD160 6d34d9d4167932ada64a30814a1926f6836ffaf3 SHA1 8e82ed29cb63e53bbd505277017f6cef4fb523c1 SHA256 1f3e2039c7df9e45a877f8302ec7bf1db434f552173a33b8fa58924fadf55883
AUX cpio-2.9-CVE-2007-4476.patch 2330 RMD160 88ba8d2103f9666f7886f6a39696ab47f46c8d5d SHA1 da29807e9ffb0dbb39e69eff44cc6ad44977764f SHA256 0c0a2fb1c1c02da04fd9b4d2ecb28087849611a2dfaeea821ba7fce0313c61f7
AUX cpio-2.9-gnu-inline.patch 5997 RMD160 2345e986c114aa4498f4e4fabab9453e02afcc93 SHA1 7b20f00dbdd4edb580ee075ea8372166dec7345c SHA256 8321e782c140397c025822cde84c7f737eb7631655ab07f1803441627086c784
AUX cpio-2.9-packed.patch 853 RMD160 0c500d121d054a398919a6539450dee66bf41162 SHA1 eb510d8d0092430a51a92e0afbbfef1c90a79000 SHA256 ef9655822561577debf39376d7e6f317184347271c34ab86029c36d3308c22e6
AUX cpio-2.9-restore-perms-owners.patch 3082 RMD160 e4cee4074f4402f546877bc3e44c6284dedbe7ea SHA1 351084cdb95f2c2a95f1fc799829b5958d6b461c SHA256 f237971131763f18bb419d38941bc2942bb946961d2a32ca18284b0f6c212517
DIST cpio-2.10.tar.bz2 951395 RMD160 1bbc1b8c4cf59a74d542aabb410d4fe26b6cf180 SHA1 a87f85c23697163000c656db9eb26a348aa3397b SHA256 def23150e4e081599ecb013736f4403617fefbb6f6e6806dc6a98129913d79d5
DIST cpio-2.9.tar.bz2 758195 RMD160 6fbd93755e266ad7ff9644cb7fe3c3e54d61ac44 SHA1 ef381d0f33f1ea74475b6d813c42a74327762c4a SHA256 bb9a5fa693a8f4ef4685eb447cea1dc5b787e37c302569928ef74df460724707
+EBUILD cpio-2.10-r1.ebuild 1049 RMD160 64f80d3f68a739b8f158b0aa2747eab3c5f24af1 SHA1 c497d4a30fa01b60cba1725bc6cd9ca9bf9a1ed0 SHA256 9b379ca89c0d3c1fd6b53382d811416ece7dc45d1673c8ad0ba7782f2ae32872
EBUILD cpio-2.10.ebuild 806 RMD160 fc7523487250674d200998c4e9e13d145ba658ab SHA1 a80b3745d1b335239bec143da6938071a964989e SHA256 ebabb228205709a873d5987a9ee5eb9fb111560d2fd11333bcf1c1899b21eab0
EBUILD cpio-2.9-r2.ebuild 1031 RMD160 6d6dddae5e8f8c14f24c2e1bd8a81ddfc7631dad SHA1 026fb2e6e608dd8b7e69585ea1454e5ff55fdec1 SHA256 f0eee2f139dfcb911b03be9291c570c05267010cf64b32a1630b4ea064d71ee6
EBUILD cpio-2.9-r3.ebuild 1094 RMD160 370b7ae3ee8a46c3c8d5b1577f70349e0ae13d60 SHA1 e1528f44b92b8c62aee8220b4b0ba1d76907b61e SHA256 cf711d25e2a60cbd5761faf3ca9e1927ebf9a5fe2177f275cc0d56d076c8cda9
-MISC ChangeLog 13565 RMD160 c9dfaa5985fe4b4f4caafa470726f59aa8799a14 SHA1 69f34f435908aaa7bf733a4b16731299ccfb8454 SHA256 a9d0c97ff44a09676913b6f40cd0548a6dce15738bcc6a40be3299d1c80896f0
+MISC ChangeLog 13814 RMD160 f3df93f662c93d8a4357f6d98bf9369d16ec6f22 SHA1 6bfb5add8cadc289cce669e4e1563e2cd26f77bd SHA256 e43528280cab079b454160732fb772ca576f1c2bf3e31c11b7e43881c17501f8
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
diff --git a/app-arch/cpio/cpio-2.10-r1.ebuild b/app-arch/cpio/cpio-2.10-r1.ebuild
new file mode 100644
index 000000000000..bac96c2e3f50
--- /dev/null
+++ b/app-arch/cpio/cpio-2.10-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/cpio-2.10-r1.ebuild,v 1.1 2010/01/20 07:30:56 robbat2 Exp $
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="http://www.gnu.org/software/cpio/cpio.html"
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nls"
+
+src_prepare() {
+ # Per here: http://lists.gnu.org/archive/html/bug-cpio/2009-10/msg00000.html
+ # fixes hardlink creation from XFS
+ epatch "${FILESDIR}"/cpio-2.9-64-bit-wide-inode-fixup.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --bindir=/bin \
+ --with-rmt=/usr/sbin/rmt \
+ || die
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog NEWS README
+ rm -f "${D}"/usr/share/man/man1/mt.1
+ rmdir "${D}"/usr/libexec || die
+}
diff --git a/app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch b/app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch
new file mode 100644
index 000000000000..c510ff565df9
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch
@@ -0,0 +1,142 @@
+Add support for filesystems with inode-fields wider than 32-bits (I witnessed
+this bug on a large XFS filesystem).
+This patch fixes the bug that hardlinked files are *not* included at
+all (i.e. both files are listed, but the content is not transmitted with
+either of them).
+
+The patch is relative to the bleeding edge version of cpio on the git
+repostory.
+
+ src/copyin.c | 8 ++++----
+ src/copyout.c | 4 ++--
+ src/copypass.c | 2 +-
+ src/extern.h | 6 +++---
+ src/util.c | 6 +++---
+ 5 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/copyin.c b/src/copyin.c
+index 5b7594b..8ba2bc9 100644
+--- a/src/copyin.c
++++ b/src/copyin.c
+@@ -258,7 +258,7 @@ create_defered_links (struct cpio_file_stat *file_hdr)
+ {
+ struct deferment *d;
+ struct deferment *d_prev;
+- int ino;
++ ino_t ino;
+ int maj;
+ int min;
+ int link_res;
+@@ -306,7 +306,7 @@ create_defered_links_to_skipped (struct cpio_file_stat *file_hdr,
+ {
+ struct deferment *d;
+ struct deferment *d_prev;
+- int ino;
++ ino_t ino;
+ int maj;
+ int min;
+ if (file_hdr->c_filesize == 0)
+@@ -1460,8 +1460,8 @@ process_copy_in ()
+ struct cpio_file_stat *h;
+ h = &file_hdr;
+ fprintf (stderr,
+- "magic = 0%o, ino = %d, mode = 0%o, uid = %d, gid = %d\n",
+- h->c_magic, h->c_ino, h->c_mode, h->c_uid, h->c_gid);
++ "magic = 0%o, ino = %ld, mode = 0%o, uid = %d, gid = %d\n",
++ h->c_magic, (long)h->c_ino, h->c_mode, h->c_uid, h->c_gid);
+ fprintf (stderr,
+ "nlink = %d, mtime = %d, filesize = %d, dev_maj = 0x%x\n",
+ h->c_nlink, h->c_mtime, h->c_filesize, h->c_dev_maj);
+diff --git a/src/copyout.c b/src/copyout.c
+index dd9bac2..b3bb0ad 100644
+--- a/src/copyout.c
++++ b/src/copyout.c
+@@ -110,7 +110,7 @@ static int
+ count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
+ {
+ struct deferment *d;
+- int ino;
++ ino_t ino;
+ int maj;
+ int min;
+ int count;
+@@ -167,7 +167,7 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des)
+ {
+ struct deferment *d;
+ struct deferment *d_prev;
+- int ino;
++ ino_t ino;
+ int maj;
+ int min;
+ ino = file_hdr->c_ino;
+diff --git a/src/copypass.c b/src/copypass.c
+index 8941b76..20929a6 100644
+--- a/src/copypass.c
++++ b/src/copypass.c
+@@ -387,7 +387,7 @@ process_copy_pass ()
+
+ int
+ link_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,
+- int st_ino)
++ ino_t st_ino)
+ {
+ int link_res;
+ char *link_name;
+diff --git a/src/extern.h b/src/extern.h
+index a832897..6144be1 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -119,7 +119,7 @@ void process_copy_out (void);
+ /* copypass.c */
+ void process_copy_pass (void);
+ int link_to_maj_min_ino (char *file_name, int st_dev_maj,
+- int st_dev_min, int st_ino);
++ int st_dev_min, ino_t st_ino);
+ int link_to_name (char *link_name, char *link_target);
+
+ /* dirname.c */
+@@ -169,9 +169,9 @@ void warn_if_file_changed (char *file_name, off_t old_file_size,
+ time_t old_file_mtime);
+ void create_all_directories (char *name);
+ void prepare_append (int out_file_des);
+-char *find_inode_file (unsigned long node_num,
++char *find_inode_file (ino_t node_num,
+ unsigned long major_num, unsigned long minor_num);
+-void add_inode (unsigned long node_num, char *file_name,
++void add_inode (ino_t node_num, char *file_name,
+ unsigned long major_num, unsigned long minor_num);
+ int open_archive (char *file);
+ void tape_offline (int tape_des);
+diff --git a/src/util.c b/src/util.c
+index 1eb92ae..16a4320 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -686,7 +686,7 @@ prepare_append (int out_file_des)
+
+ struct inode_val
+ {
+- unsigned long inode;
++ ino_t inode;
+ unsigned long major_num;
+ unsigned long minor_num;
+ char *file_name;
+@@ -713,7 +713,7 @@ inode_val_compare (const void *val1, const void *val2)
+ }
+
+ char *
+-find_inode_file (unsigned long node_num, unsigned long major_num,
++find_inode_file (ino_t node_num, unsigned long major_num,
+ unsigned long minor_num)
+ {
+ struct inode_val sample;
+@@ -732,7 +732,7 @@ find_inode_file (unsigned long node_num, unsigned long major_num,
+ /* Associate FILE_NAME with the inode NODE_NUM. (Insert into hash table.) */
+
+ void
+-add_inode (unsigned long node_num, char *file_name, unsigned long major_num,
++add_inode (ino_t node_num, char *file_name, unsigned long major_num,
+ unsigned long minor_num)
+ {
+ struct inode_val *temp;
+--
+1.6.2.151.gdc0be