diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-06-01 23:04:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-06-01 23:04:32 +0000 |
commit | 0fd5f5e99259cb764948c0fcb354018b046e9aa5 (patch) | |
tree | 49d79735858c0302c6d01699587c7dfbe48685f1 | |
parent | make xml2po FHS compliant, bug #190798. (diff) | |
download | historical-0fd5f5e99259cb764948c0fcb354018b046e9aa5.tar.gz historical-0fd5f5e99259cb764948c0fcb354018b046e9aa5.tar.bz2 historical-0fd5f5e99259cb764948c0fcb354018b046e9aa5.zip |
Add fix from upstream for restoring perms/owners properly #218040 by alexsaa.
Package-Manager: portage-2.2_pre5.spank.spunk
-rw-r--r-- | app-arch/cpio/ChangeLog | 10 | ||||
-rw-r--r-- | app-arch/cpio/Manifest | 14 | ||||
-rw-r--r-- | app-arch/cpio/cpio-2.9-r2.ebuild | 40 | ||||
-rw-r--r-- | app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch | 101 |
4 files changed, 162 insertions, 3 deletions
diff --git a/app-arch/cpio/ChangeLog b/app-arch/cpio/ChangeLog index 44a8d2c52f08..f9ae1345c3c5 100644 --- a/app-arch/cpio/ChangeLog +++ b/app-arch/cpio/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-arch/cpio -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.89 2007/11/18 02:43:01 vapier Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/cpio/ChangeLog,v 1.90 2008/06/01 23:04:31 vapier Exp $ + +*cpio-2.9-r2 (01 Jun 2008) + + 01 Jun 2008; Mike Frysinger <vapier@gentoo.org> + +files/cpio-2.9-restore-perms-owners.patch, +cpio-2.9-r2.ebuild: + Add fix from upstream for restoring perms/owners properly #218040 by alexsaa. 18 Nov 2007; Mike Frysinger <vapier@gentoo.org> +files/cpio-2.9-gnu-inline.patch, cpio-2.9-r1.ebuild: diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest index d65eb0964cef..27c4b3e34cde 100644 --- a/app-arch/cpio/Manifest +++ b/app-arch/cpio/Manifest @@ -1,13 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX cpio-2.7-copypass.patch 439 RMD160 099995b064adc56e194aa8515783da628a7937de SHA1 1bab5e3fd912b9e9a4d83eeb44563b26461c8465 SHA256 068a0d9e30641eebe9ab1d789b31b2d0214346f5f0b01364e3fb6cc09637cde3 AUX cpio-2.7-link-terminate.patch 542 RMD160 1b2bf69ec397c73a802527e34537252f306a8d76 SHA1 aa053ab524f48520227d3c6d9a8ebf63a27d5473 SHA256 3a868339b78d4bb66c7efb1d0bfdd70a5c5ecd48ac6a7ba2fe60097f308fccba 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-restore-perms-owners.patch 3082 RMD160 e4cee4074f4402f546877bc3e44c6284dedbe7ea SHA1 351084cdb95f2c2a95f1fc799829b5958d6b461c SHA256 f237971131763f18bb419d38941bc2942bb946961d2a32ca18284b0f6c212517 DIST cpio-2.7.tar.bz2 698221 RMD160 0ae35717237133da5bba18376af0ec685ac67360 SHA1 ce1c8ab703d62fc1d30ca59e044ba9f43c3db574 SHA256 b59390450233b5298d210f6369e98d91d07b7f4261ddb962d654185dd02b5b0e DIST cpio-2.8.tar.bz2 745180 RMD160 23d321a656eced97e9cd4cfc13b068fbc95ff900 SHA1 73517edeb77a8723c003b0b0dd1a5159411d0cdf SHA256 b0a12fabee60023a99e8dbd97a83b6c0e3846054cc6c24a33ab56db58db182f0 DIST cpio-2.9.tar.bz2 758195 RMD160 6fbd93755e266ad7ff9644cb7fe3c3e54d61ac44 SHA1 ef381d0f33f1ea74475b6d813c42a74327762c4a SHA256 bb9a5fa693a8f4ef4685eb447cea1dc5b787e37c302569928ef74df460724707 EBUILD cpio-2.7-r2.ebuild 978 RMD160 28f367500a3392d33f51e19c7dd104dfd27aac85 SHA1 0263d4ac2053554a3695cdd7e15137a3d95c95a0 SHA256 17d6419998adccd1b205dd76e4053c43ae19d7f77e9e009ec6402b38b27a62ef EBUILD cpio-2.8.ebuild 804 RMD160 295ad523964fe7fce42311cba0aa9e392b2d0af5 SHA1 eaf6dc77470d3fbd2a6c2b94e78efc018dc1d7f1 SHA256 1ca0633111001c8b39207ac5e031bba1fa7880ad327419fe673019d822031679 EBUILD cpio-2.9-r1.ebuild 971 RMD160 b4708a489afe9241ef29f9161dba34d8a8cd6a0f SHA1 e5956e7fb181c2de04cdddefcb7474f46054a587 SHA256 051fbf6eea0e4410d3d02a1d38fcb9036c3b10333b83dc87ac702fde3f425f97 +EBUILD cpio-2.9-r2.ebuild 1046 RMD160 926919f2223aac753652288976896d0b998905fe SHA1 35116a68d0eeccffcfa0c6d9fcabd91642ead709 SHA256 dc727342000c577ec1445625336ab5763ed4eff58be0002666c1bf06ea3d53dd EBUILD cpio-2.9.ebuild 804 RMD160 3ee6466ae074f329bcf64881650fdf560c269d2f SHA1 affd959396a075b77f7d3594d7d4a8cd2621d8a6 SHA256 57a1632698de87e26e8097595ef8779f4652242fb0fa37d433b14a2574b2b882 -MISC ChangeLog 12321 RMD160 ecc72986b35180d25ee3426085de8494ee47b8a6 SHA1 25950eba829a7945aa41feef72a23fbf11d42399 SHA256 d60bdbba7162e6956c2ad125d51ba336572846da3fdea222895e49f33dc7f652 +MISC ChangeLog 12547 RMD160 5536de1f532cba2a6e18e5967dd9f8de8043f435 SHA1 ed5e138846c0cf233da4385d896ca0ff8f1a4686 SHA256 6b38e7ffdd4c310e9d67cd8adaa9db010e1df16375275d3b985b8cea8d954e07 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.7 (GNU/Linux) + +iD8DBQFIQysFj9hvisErhMIRAkvfAKCj3GnFUVxqWnYG1noW+byk/qaTFACgycIK +wr6ZHtX7foDQUvowbBV+jps= +=VI/d +-----END PGP SIGNATURE----- diff --git a/app-arch/cpio/cpio-2.9-r2.ebuild b/app-arch/cpio/cpio-2.9-r2.ebuild new file mode 100644 index 000000000000..40e203eb3a8c --- /dev/null +++ b/app-arch/cpio/cpio-2.9-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2008 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.1 2008/06/01 23:04:31 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 +} + +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-restore-perms-owners.patch b/app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch new file mode 100644 index 000000000000..83e6351608db --- /dev/null +++ b/app-arch/cpio/files/cpio-2.9-restore-perms-owners.patch @@ -0,0 +1,101 @@ +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 |