diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-10-10 00:03:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-10 00:03:39 +0000 |
commit | ddda2db739249018d92b5d0b4edc02a286c91962 (patch) | |
tree | aa8c12a5207eaf841d23e4ff543ce416b34dc9d5 /app-arch | |
parent | ppc64 stable wrt #324077 (diff) | |
download | gentoo-2-ddda2db739249018d92b5d0b4edc02a286c91962.tar.gz gentoo-2-ddda2db739249018d92b5d0b4edc02a286c91962.tar.bz2 gentoo-2-ddda2db739249018d92b5d0b4edc02a286c91962.zip |
old
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/cpio/cpio-2.10-r1.ebuild | 41 | ||||
-rw-r--r-- | app-arch/cpio/cpio-2.10.ebuild | 28 | ||||
-rw-r--r-- | app-arch/cpio/cpio-2.9-r2.ebuild | 40 | ||||
-rw-r--r-- | app-arch/cpio/cpio-2.9-r3.ebuild | 41 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch | 142 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-CVE-2007-4476.patch | 90 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-gnu-inline.patch | 139 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-packed.patch | 34 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch | 101 |
9 files changed, 0 insertions, 656 deletions
diff --git a/app-arch/cpio/cpio-2.10-r1.ebuild b/app-arch/cpio/cpio-2.10-r1.ebuild deleted file mode 100644 index f949491298e1..000000000000 --- a/app-arch/cpio/cpio-2.10-r1.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# 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.7 2010/05/21 16:59:42 hwoarang 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 x86 ~sparc-fbsd ~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/cpio-2.10.ebuild b/app-arch/cpio/cpio-2.10.ebuild deleted file mode 100644 index 2c18f8acb5a7..000000000000 --- a/app-arch/cpio/cpio-2.10.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/cpio-2.10.ebuild,v 1.1 2009/06/20 10:20:01 vapier Exp $ - -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_compile() { - econf \ - $(use_enable nls) \ - --bindir=/bin \ - --with-rmt=/usr/sbin/rmt \ - || die - 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/cpio-2.9-r2.ebuild b/app-arch/cpio/cpio-2.9-r2.ebuild deleted file mode 100644 index 8584c428f733..000000000000 --- a/app-arch/cpio/cpio-2.9-r2.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/cpio-2.9-r2.ebuild,v 1.9 2009/01/31 01:23:55 jer Exp $ - -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" - -DEPEND="" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-CVE-2007-4476.patch #196978 - epatch "${FILESDIR}"/${P}-gnu-inline.patch #198817 - epatch "${FILESDIR}"/${P}-restore-perms-owners.patch #218040 -} - -src_compile() { - econf \ - $(use_enable nls) \ - --bindir=/bin \ - --with-rmt=/usr/sbin/rmt \ - || die - 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/cpio-2.9-r3.ebuild b/app-arch/cpio/cpio-2.9-r3.ebuild deleted file mode 100644 index 76ed187276e7..000000000000 --- a/app-arch/cpio/cpio-2.9-r3.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/cpio-2.9-r3.ebuild,v 1.1 2009/01/17 17:57:05 vapier Exp $ - -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" - -DEPEND="" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-CVE-2007-4476.patch #196978 - epatch "${FILESDIR}"/${P}-gnu-inline.patch #198817 - epatch "${FILESDIR}"/${P}-restore-perms-owners.patch #218040 - epatch "${FILESDIR}"/${P}-packed.patch #255096 -} - -src_compile() { - econf \ - $(use_enable nls) \ - --bindir=/bin \ - --with-rmt=/usr/sbin/rmt \ - || die - 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 deleted file mode 100644 index c510ff565df9..000000000000 --- a/app-arch/cpio/files/cpio-2.9-64-bit-wide-inode-fixup.patch +++ /dev/null @@ -1,142 +0,0 @@ -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 diff --git a/app-arch/cpio/files/cpio-2.9-CVE-2007-4476.patch b/app-arch/cpio/files/cpio-2.9-CVE-2007-4476.patch deleted file mode 100644 index 2edbb1eb1c56..000000000000 --- a/app-arch/cpio/files/cpio-2.9-CVE-2007-4476.patch +++ /dev/null @@ -1,90 +0,0 @@ -http://bugs.gentoo.org/196978 - ---- lib/paxnames.c -+++ lib/paxnames.c -@@ -36,15 +36,27 @@ - return strcmp (name1, name2) == 0; - } - --/* Return zero if TABLE contains a copy of STRING; otherwise, insert a -- copy of STRING to TABLE and return 1. */ --bool --hash_string_insert (Hash_table **table, char const *string) -+/* Return zero if TABLE contains a LEN-character long prefix of STRING, -+ otherwise, insert a newly allocated copy of this prefix to TABLE and -+ return 1. If RETURN_PREFIX is not NULL, point it to the allocated -+ copy. */ -+static bool -+hash_string_insert_prefix (Hash_table **table, char const *string, size_t len, -+ const char **return_prefix) - { - Hash_table *t = *table; -- char *s = xstrdup (string); -+ char *s; - char *e; - -+ if (len) -+ { -+ s = xmalloc (len + 1); -+ memcpy (s, string, len); -+ s[len] = 0; -+ } -+ else -+ s = xstrdup (string); -+ - if (! ((t - || (*table = t = hash_initialize (0, 0, hash_string_hasher, - hash_string_compare, 0))) -@@ -52,7 +64,11 @@ - xalloc_die (); - - if (e == s) -- return 1; -+ { -+ if (return_prefix) -+ *return_prefix = s; -+ return 1; -+ } - else - { - free (s); -@@ -60,6 +76,14 @@ - } - } - -+/* Return zero if TABLE contains a copy of STRING; otherwise, insert a -+ copy of STRING to TABLE and return 1. */ -+bool -+hash_string_insert (Hash_table **table, char const *string) -+{ -+ return hash_string_insert_prefix (table, string, 0, NULL); -+} -+ - /* Return 1 if TABLE contains STRING. */ - bool - hash_string_lookup (Hash_table const *table, char const *string) -@@ -88,7 +112,8 @@ - If ABSOLUTE_NAMES is 0, strip filesystem prefix from the file name. */ - - char * --safer_name_suffix (char const *file_name, bool link_target, bool absolute_names) -+safer_name_suffix (char const *file_name, bool link_target, -+ bool absolute_names) - { - char const *p; - -@@ -121,11 +146,9 @@ - - if (prefix_len) - { -- char *prefix = alloca (prefix_len + 1); -- memcpy (prefix, file_name, prefix_len); -- prefix[prefix_len] = '\0'; -- -- if (hash_string_insert (&prefix_table[link_target], prefix)) -+ const char *prefix; -+ if (hash_string_insert_prefix (&prefix_table[link_target], file_name, -+ prefix_len, &prefix)) - { - static char const *const diagnostic[] = - { diff --git a/app-arch/cpio/files/cpio-2.9-gnu-inline.patch b/app-arch/cpio/files/cpio-2.9-gnu-inline.patch deleted file mode 100644 index 0057b8da4f69..000000000000 --- a/app-arch/cpio/files/cpio-2.9-gnu-inline.patch +++ /dev/null @@ -1,139 +0,0 @@ -http://bugs.gentoo.org/198817 - -from upstream gnulib for "extern inline" changes - -diff --git a/lib/argp-fmtstream.h b/lib/argp-fmtstream.h -index 93fa651..50f1387 100644 ---- a/lib/argp-fmtstream.h -+++ b/lib/argp-fmtstream.h -@@ -1,5 +1,5 @@ - /* Word-wrapping and line-truncating streams. -- Copyright (C) 1997, 2006 Free Software Foundation, Inc. -+ Copyright (C) 1997, 2006-2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader <miles@gnu.ai.mit.edu>. - -@@ -134,6 +134,7 @@ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs, - const char *__fmt, ...) - __attribute__ ((__format__ (printf, 2, 3))); - -+#if _LIBC || !defined __OPTIMIZE__ - extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); - extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); - -@@ -144,6 +145,7 @@ extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs, - const char *__str, size_t __len); - extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, - const char *__str, size_t __len); -+#endif - - /* Access macros for various bits of state. */ - #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin) -@@ -153,6 +155,7 @@ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, - #define __argp_fmtstream_rmargin argp_fmtstream_rmargin - #define __argp_fmtstream_wmargin argp_fmtstream_wmargin - -+#if _LIBC || !defined __OPTIMIZE__ - /* Set __FS's left margin to LMARGIN and return the old value. */ - extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, - size_t __lmargin); -@@ -174,6 +177,7 @@ extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, - /* Return the column number of the current output point in __FS. */ - extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); - extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); -+#endif - - /* Internal routines. */ - extern void _argp_fmtstream_update (argp_fmtstream_t __fs); -@@ -197,7 +201,28 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); - #endif - - #ifndef ARGP_FS_EI --#define ARGP_FS_EI extern inline -+# ifdef __GNUC__ -+ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 -+ inline semantics, unless -fgnu89-inline is used. It defines a macro -+ __GNUC_STDC_INLINE__ to indicate this situation or a macro -+ __GNUC_GNU_INLINE__ to indicate the opposite situation. -+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline -+ semantics but warns, unless -fgnu89-inline is used: -+ warning: C99 inline functions are not supported; using GNU89 -+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute -+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */ -+# if defined __GNUC_STDC_INLINE__ -+# define ARGP_FS_EI inline -+# elif defined __GNUC_GNU_INLINE__ -+# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__)) -+# else -+# define ARGP_FS_EI extern inline -+# endif -+# else -+ /* With other compilers, assume the ISO C99 meaning of 'inline', if -+ the compiler supports 'inline' at all. */ -+# define ARGP_FS_EI inline -+# endif - #endif - - ARGP_FS_EI size_t -diff --git a/lib/argp.h b/lib/argp.h -index fb11de6..aa76eb4 100644 ---- a/lib/argp.h -+++ b/lib/argp.h -@@ -520,9 +520,11 @@ extern void __argp_state_help (const struct argp_state *__restrict __state, - FILE *__restrict __stream, - unsigned int __flags); - -+#if _LIBC || !defined __USE_EXTERN_INLINES - /* Possibly output the standard usage message for ARGP to stderr and exit. */ - extern void argp_usage (const struct argp_state *__state); - extern void __argp_usage (const struct argp_state *__state); -+#endif - - /* If appropriate, print the printf string FMT and following args, preceded - by the program name and `:', to stderr, and followed by a `Try ... --help' -@@ -551,6 +553,7 @@ extern void __argp_failure (const struct argp_state *__restrict __state, - const char *__restrict __fmt, ...) - __attribute__ ((__format__ (__printf__, 4, 5))); - -+#if _LIBC || !defined __USE_EXTERN_INLINES - /* Returns true if the option OPT is a valid short option. */ - extern int _option_is_short (const struct argp_option *__opt) __THROW; - extern int __option_is_short (const struct argp_option *__opt) __THROW; -@@ -559,6 +562,7 @@ extern int __option_is_short (const struct argp_option *__opt) __THROW; - options array. */ - extern int _option_is_end (const struct argp_option *__opt) __THROW; - extern int __option_is_end (const struct argp_option *__opt) __THROW; -+#endif - - /* Return the input field for ARGP in the parser corresponding to STATE; used - by the help routines. */ -@@ -579,7 +583,28 @@ extern void *__argp_input (const struct argp *__restrict __argp, - # endif - - # ifndef ARGP_EI --# define ARGP_EI extern __inline__ -+# ifdef __GNUC__ -+ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 -+ inline semantics, unless -fgnu89-inline is used. It defines a macro -+ __GNUC_STDC_INLINE__ to indicate this situation or a macro -+ __GNUC_GNU_INLINE__ to indicate the opposite situation. -+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline -+ semantics but warns, unless -fgnu89-inline is used: -+ warning: C99 inline functions are not supported; using GNU89 -+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute -+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */ -+# if defined __GNUC_STDC_INLINE__ -+# define ARGP_EI __inline__ -+# elif defined __GNUC_GNU_INLINE__ -+# define ARGP_EI extern __inline__ __attribute__ ((__gnu_inline__)) -+# else -+# define ARGP_EI extern __inline__ -+# endif -+# else -+ /* With other compilers, assume the ISO C99 meaning of 'inline', if -+ the compiler supports 'inline' at all. */ -+# define ARGP_EI inline -+# endif - # endif - - ARGP_EI void diff --git a/app-arch/cpio/files/cpio-2.9-packed.patch b/app-arch/cpio/files/cpio-2.9-packed.patch deleted file mode 100644 index e6579cd41707..000000000000 --- a/app-arch/cpio/files/cpio-2.9-packed.patch +++ /dev/null @@ -1,34 +0,0 @@ -http://bugs.debian.org/438155 - -force structures that are overlaid on files via mmap to be packed so that -alignment doesnt screw up the offsets - ---- cpio-2.9/src/cpiohdr.h -+++ cpio-2.9/src/cpiohdr.h -@@ -35,7 +35,7 @@ - unsigned short c_mtimes[2]; - unsigned short c_namesize; - unsigned short c_filesizes[2]; --}; -+} __attribute__((packed)); - - struct old_ascii_header - { -@@ -50,7 +50,7 @@ - char c_mtime[11]; - char c_namesize[6]; - char c_filesize[11]; --}; -+} __attribute__((packed)); - - /* "New" portable format and CRC format: - -@@ -80,7 +80,7 @@ - char c_namesize[8]; /* count includes terminating NUL in pathname */ - char c_chksum[8]; /* 0 for "new" portable format; for CRC format - the sum of all the bytes in the file */ --}; -+} __attribute__((packed)); - - struct cpio_file_stat /* Internal representation of a CPIO header */ - { diff --git a/app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch b/app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch deleted file mode 100644 index 83e6351608db..000000000000 --- a/app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch +++ /dev/null @@ -1,101 +0,0 @@ -http://bugs.gentoo.org/218040 - -fix from upstream to restore owners/perms in some situations - ---- cpio-2.9/src/extern.h -+++ cpio-2.9/src/extern.h -@@ -211,7 +211,7 @@ uintmax_t from_ascii (char const *where, - - void delay_set_stat (char const *file_name, struct stat *st, - mode_t invert_permissions); --void repair_delayed_set_stat (char const *dir, -+int repair_delayed_set_stat (char const *dir, - struct stat *dir_stat_info); - void apply_delayed_set_stat (void); - ---- cpio-2.9/src/copyin.c -+++ cpio-2.9/src/copyin.c -@@ -570,6 +570,7 @@ static void - copyin_directory (struct cpio_file_stat *file_hdr, int existing_dir) - { - int res; /* Result of various function calls. */ -+ struct stat file_stat; - #ifdef HPUX_CDF - int cdf_flag; /* True if file is a CDF. */ - int cdf_char; /* Index of `+' char indicating a CDF. */ -@@ -626,7 +627,6 @@ copyin_directory (struct cpio_file_stat - create_all_directories(), so the mkdir will fail - because the directory exists. If that's the case, - don't complain about it. */ -- struct stat file_stat; - if (errno != EEXIST) - { - mkdir_error (file_hdr->c_name); -@@ -645,7 +645,11 @@ copyin_directory (struct cpio_file_stat - } - } - -- set_perms (-1, file_hdr); -+ /* if the directory is queued for delayed_set_stat, -+ fix permissions in the queue, otherwise set the permissions now */ -+ void cpio_to_stat (struct cpio_file_stat *hdr, struct stat *st); cpio_to_stat(file_hdr, &file_stat); -+ if (repair_delayed_set_stat(file_hdr->c_name, &file_stat)) -+ set_perms (-1, file_hdr); - } - - static void ---- cpio-2.9/src/util.c -+++ cpio-2.9/src/util.c -@@ -1265,6 +1265,16 @@ stat_to_cpio (struct cpio_file_stat *hdr - hdr->c_tar_linkname = NULL; - } - -+void -+cpio_to_stat (struct cpio_file_stat *hdr, struct stat *st) -+{ -+ stat (hdr->c_name, st); -+ st->st_mode = hdr->c_mode; -+ st->st_uid = CPIO_UID(hdr->c_uid); -+ st->st_gid = CPIO_GID(hdr->c_gid); -+ st->st_mtime = hdr->c_mtime; -+} -+ - #ifndef HAVE_FCHOWN - # define fchown(fd, uid, gid) (-1) - #endif -@@ -1389,7 +1399,7 @@ delay_set_stat (char const *file_name, s - created within the file name of DIR. The intermediate directory turned - out to be the same as this directory, e.g. due to ".." or symbolic - links. *DIR_STAT_INFO is the status of the directory. */ --void -+int - repair_delayed_set_stat (char const *dir, - struct stat *dir_stat_info) - { -@@ -1400,22 +1410,19 @@ repair_delayed_set_stat (char const *dir - if (stat (data->stat.c_name, &st) != 0) - { - stat_error (data->stat.c_name); -- return; -+ return 0; - } - - if (st.st_dev == dir_stat_info->st_dev - && st.st_ino == dir_stat_info->st_ino) - { - stat_to_cpio (&data->stat, dir_stat_info); -- data->invert_permissions = -- ((dir_stat_info->st_mode ^ st.st_mode) -- & MODE_RWX & ~ newdir_umask); -- return; -+ data->invert_permissions = 0; -+ return 0; - } - } - -- ERROR ((0, 0, _("%s: Unexpected inconsistency when making directory"), -- quotearg_colon (dir))); -+ return -1; - } - - void |