summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-02 21:46:44 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-02 21:46:44 +0000
commit977dabdd024545c6384d5ccd0201f6d64f0e2d75 (patch)
tree240c64bfb3ed3572e3ae950d1b6fddbc60a2a5ed /app-arch/cpio
parent- added epunt_cxx and fixed a uclibc error reported by psm (diff)
downloadhistorical-977dabdd024545c6384d5ccd0201f6d64f0e2d75.tar.gz
historical-977dabdd024545c6384d5ccd0201f6d64f0e2d75.tar.bz2
historical-977dabdd024545c6384d5ccd0201f6d64f0e2d75.zip
Add fix from redhat #90619.
Package-Manager: portage-2.0.51.21
Diffstat (limited to 'app-arch/cpio')
-rw-r--r--app-arch/cpio/ChangeLog10
-rw-r--r--app-arch/cpio/Manifest5
-rw-r--r--app-arch/cpio/cpio-2.6-r3.ebuild47
-rw-r--r--app-arch/cpio/files/cpio-2.6-chmodRaceC.patch125
-rw-r--r--app-arch/cpio/files/digest-cpio-2.6-r31
5 files changed, 185 insertions, 3 deletions
diff --git a/app-arch/cpio/ChangeLog b/app-arch/cpio/ChangeLog
index 3ef829891c0b..1ed580570c14 100644
--- a/app-arch/cpio/ChangeLog
+++ b/app-arch/cpio/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-arch/cpio
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.19 2005/03/30 19:12:01 wolf31o2 Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.20 2005/05/02 21:46:44 vapier Exp $
+
+*cpio-2.6-r3 (02 May 2005)
+
+ 02 May 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/cpio-2.6-chmodRaceC.patch, +cpio-2.6-r3.ebuild:
+ Add fix from redhat #90619.
30 Mar 2005; Chris Gianelloni <wolf31o2@gentoo.org> cpio-2.6-r2.ebuild:
Marking stable for genkernel.
diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest
index 851f99092f3e..44258678d59b 100644
--- a/app-arch/cpio/Manifest
+++ b/app-arch/cpio/Manifest
@@ -1,9 +1,12 @@
-MD5 5f91c6016f4c56b64d2c676a0c920179 ChangeLog 4641
+MD5 91126d18ec6db5d81921d0aff140f6d7 ChangeLog 4805
+MD5 06be6b40e596ca771c41031e7724bc36 cpio-2.6-r3.ebuild 1379
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
MD5 f70830cbd6b8132c9595fd7f13d0cc66 cpio-2.6-r2.ebuild 1117
MD5 e5b0619beac9b1fe4490c3424e903f1f files/2.6-umask.patch 1382
+MD5 898f15e2e1a554916e69e9397f130e81 files/digest-cpio-2.6-r3 61
MD5 ae93625090241de60fb662d4dd0153dc files/2.6-lstat.patch 843
MD5 527f6d401d12741d17a7ac7761a6d2d7 files/2.6-isnumber.patch 861
MD5 898f15e2e1a554916e69e9397f130e81 files/digest-cpio-2.6-r2 61
MD5 7894f923500cbeeb0b36117e08049b5d files/2.6-rili-big-files.patch 2709
MD5 c1efb6f13ac85b99cf4f468083101b53 files/cpio-2.6-gcc4-tests.patch 542
+MD5 08647cfda931b161030477956f57b03b files/cpio-2.6-chmodRaceC.patch 4153
diff --git a/app-arch/cpio/cpio-2.6-r3.ebuild b/app-arch/cpio/cpio-2.6-r3.ebuild
new file mode 100644
index 000000000000..fde6986f5e7d
--- /dev/null
+++ b/app-arch/cpio/cpio-2.6-r3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/cpio-2.6-r3.ebuild,v 1.1 2005/05/02 21:46:44 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-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~ppc-macos ~s390 ~sh ~sparc ~x86"
+IUSE="nls"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}-rili-big-files.patch #68520
+ epatch "${FILESDIR}"/${PV}-isnumber.patch #74929
+ epatch "${FILESDIR}"/${PV}-umask.patch #79844
+ epatch "${FILESDIR}"/${PV}-lstat.patch #80246
+ epatch "${FILESDIR}"/${P}-chmodRaceC.patch #90619
+ epatch "${FILESDIR}"/${P}-gcc4-tests.patch #89123
+}
+
+src_compile() {
+ # The configure script has a useless check for gethostname in
+ # libnsl ... but cpio doesn't utilize the lib/func anywhere,
+ # so let's force the lib to not be detected
+ ac_cv_lib_nsl_gethostname=no \
+ econf \
+ $(use_enable nls) \
+ --bindir=/bin \
+ --with-rmt=/usr/sbin/rmt \
+ || die
+ emake || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ dodoc ChangeLog NEWS README INSTALL
+ rm -f "${D}"/usr/share/man/man1/mt.1
+ rmdir "${D}"/usr/libexec
+}
diff --git a/app-arch/cpio/files/cpio-2.6-chmodRaceC.patch b/app-arch/cpio/files/cpio-2.6-chmodRaceC.patch
new file mode 100644
index 000000000000..6d9dd1fe6c79
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.6-chmodRaceC.patch
@@ -0,0 +1,125 @@
+Ripped from Fedora.
+
+http://bugs.gentoo.org/90619
+
+--- cpio-2.6/src/copyin.c.chmodRaceC 2005-04-25 13:19:34.079310381 +0200
++++ cpio-2.6/src/copyin.c 2005-04-25 14:09:32.514889697 +0200
+@@ -389,19 +389,26 @@
+ continue;
+ }
+
+- if (close (out_file_des) < 0)
+- error (0, errno, "%s", d->header.c_name);
+-
++ /*
++ * Avoid race condition.
++ * Set chown and chmod before closing the file desc.
++ * pvrabec@redhat.com
++ */
++
+ /* File is now copied; set attributes. */
+ if (!no_chown_flag)
+- if ((chown (d->header.c_name,
++ if ((fchown (out_file_des,
+ set_owner_flag ? set_owner : d->header.c_uid,
+ set_group_flag ? set_group : d->header.c_gid) < 0)
+ && errno != EPERM)
+ error (0, errno, "%s", d->header.c_name);
+ /* chown may have turned off some permissions we wanted. */
+- if (chmod (d->header.c_name, (int) d->header.c_mode) < 0)
++ if (fchmod (out_file_des, (int) d->header.c_mode) < 0)
++ error (0, errno, "%s", d->header.c_name);
++
++ if (close (out_file_des) < 0)
+ error (0, errno, "%s", d->header.c_name);
++
+ if (retain_time_flag)
+ {
+ times.actime = times.modtime = d->header.c_mtime;
+@@ -557,6 +564,25 @@
+ write (out_file_des, "", 1);
+ delayed_seek_count = 0;
+ }
++
++ /*
++ * Avoid race condition.
++ * Set chown and chmod before closing the file desc.
++ * pvrabec@redhat.com
++ */
++
++ /* File is now copied; set attributes. */
++ if (!no_chown_flag)
++ if ((fchown (out_file_des,
++ set_owner_flag ? set_owner : file_hdr->c_uid,
++ set_group_flag ? set_group : file_hdr->c_gid) < 0)
++ && errno != EPERM)
++ error (0, errno, "%s", file_hdr->c_name);
++
++ /* chown may have turned off some permissions we wanted. */
++ if (fchmod (out_file_des, (int) file_hdr->c_mode) < 0)
++ error (0, errno, "%s", file_hdr->c_name);
++
+ if (close (out_file_des) < 0)
+ error (0, errno, "%s", file_hdr->c_name);
+
+@@ -567,18 +593,6 @@
+ file_hdr->c_name, crc, file_hdr->c_chksum);
+ }
+
+- /* File is now copied; set attributes. */
+- if (!no_chown_flag)
+- if ((chown (file_hdr->c_name,
+- set_owner_flag ? set_owner : file_hdr->c_uid,
+- set_group_flag ? set_group : file_hdr->c_gid) < 0)
+- && errno != EPERM)
+- error (0, errno, "%s", file_hdr->c_name);
+-
+- /* chown may have turned off some permissions we wanted. */
+- if (chmod (file_hdr->c_name, (int) file_hdr->c_mode) < 0)
+- error (0, errno, "%s", file_hdr->c_name);
+-
+ if (retain_time_flag)
+ {
+ struct utimbuf times; /* For setting file times. */
+@@ -589,7 +603,7 @@
+ if (utime (file_hdr->c_name, &times) < 0)
+ error (0, errno, "%s", file_hdr->c_name);
+ }
+-
++
+ tape_skip_padding (in_file_des, file_hdr->c_filesize);
+ if (file_hdr->c_nlink > 1
+ && (archive_format == arf_newascii || archive_format == arf_crcascii) )
+--- cpio-2.6/src/copypass.c.chmodRaceC 2004-09-06 14:09:04.000000000 +0200
++++ cpio-2.6/src/copypass.c 2005-04-25 14:09:38.135076926 +0200
+@@ -181,19 +181,25 @@
+ }
+ if (close (in_file_des) < 0)
+ error (0, errno, "%s", input_name.ds_string);
+- if (close (out_file_des) < 0)
+- error (0, errno, "%s", output_name.ds_string);
+-
++ /*
++ * Avoid race condition.
++ * Set chown and chmod before closing the file desc.
++ * pvrabec@redhat.com
++ */
+ /* Set the attributes of the new file. */
+ if (!no_chown_flag)
+- if ((chown (output_name.ds_string,
++ if ((fchown (out_file_des,
+ set_owner_flag ? set_owner : in_file_stat.st_uid,
+ set_group_flag ? set_group : in_file_stat.st_gid) < 0)
+ && errno != EPERM)
+ error (0, errno, "%s", output_name.ds_string);
+ /* chown may have turned off some permissions we wanted. */
+- if (chmod (output_name.ds_string, in_file_stat.st_mode) < 0)
++ if (fchmod (out_file_des, in_file_stat.st_mode) < 0)
++ error (0, errno, "%s", output_name.ds_string);
++
++ if (close (out_file_des) < 0)
+ error (0, errno, "%s", output_name.ds_string);
++
+ if (reset_time_flag)
+ {
+ times.actime = in_file_stat.st_atime;
diff --git a/app-arch/cpio/files/digest-cpio-2.6-r3 b/app-arch/cpio/files/digest-cpio-2.6-r3
new file mode 100644
index 000000000000..822d7f4e46f3
--- /dev/null
+++ b/app-arch/cpio/files/digest-cpio-2.6-r3
@@ -0,0 +1 @@
+MD5 25e0e8725bc60ed3460c9cde92752674 cpio-2.6.tar.bz2 448452