diff options
author | Marien Zwart <marienz@gentoo.org> | 2006-10-01 00:42:59 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2006-10-01 00:42:59 +0000 |
commit | a8d01d068f89dcf2f721f60cfa7061f5c1a4b7f3 (patch) | |
tree | 96fb247349fb1b4e2b8efe0e77ca0c0ff91a803e /sys-apps | |
parent | Needs autoconf 2.60. Bug #148684 (diff) | |
download | historical-a8d01d068f89dcf2f721f60cfa7061f5c1a4b7f3.tar.gz historical-a8d01d068f89dcf2f721f60cfa7061f5c1a4b7f3.tar.bz2 historical-a8d01d068f89dcf2f721f60cfa7061f5c1a4b7f3.zip |
Deal with running ebd from a deleted directory.
Package-Manager: portage-2.1.2_pre1-r4
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/pkgcore/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/pkgcore/Manifest | 25 | ||||
-rw-r--r-- | sys-apps/pkgcore/files/digest-pkgcore-0.1-r1 | 3 | ||||
-rw-r--r-- | sys-apps/pkgcore/files/pkgcore-0.1-sandbox-in-deleted-dir.patch | 163 | ||||
-rw-r--r-- | sys-apps/pkgcore/pkgcore-0.1-r1.ebuild | 75 |
5 files changed, 266 insertions, 8 deletions
diff --git a/sys-apps/pkgcore/ChangeLog b/sys-apps/pkgcore/ChangeLog index b25ec7af37c9..cda3c0169706 100644 --- a/sys-apps/pkgcore/ChangeLog +++ b/sys-apps/pkgcore/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/pkgcore # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/pkgcore/ChangeLog,v 1.1 2006/09/30 22:12:52 marienz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pkgcore/ChangeLog,v 1.2 2006/10/01 00:42:59 marienz Exp $ + +*pkgcore-0.1-r1 (01 Oct 2006) + + 01 Oct 2006; Marien Zwart <marienz@gentoo.org> + +files/pkgcore-0.1-sandbox-in-deleted-dir.patch, +pkgcore-0.1-r1.ebuild: + Deal with running ebd from a deleted directory. *pkgcore-0.1 (30 Sep 2006) diff --git a/sys-apps/pkgcore/Manifest b/sys-apps/pkgcore/Manifest index d2d675758aa7..e323579cbdb1 100644 --- a/sys-apps/pkgcore/Manifest +++ b/sys-apps/pkgcore/Manifest @@ -1,15 +1,23 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX pkgcore-0.1-sandbox-in-deleted-dir.patch 6747 RMD160 aab59bac96ff0a2e2e7c9826c171c8c6e9c54089 SHA1 2903ff6323a09a7f5c935fcaa0d0e38050126ac9 SHA256 efc257eb43f4fa6b3a3c3b05ab13178c561d4566b84bd212cceb4d04247b2711 +MD5 503da3fe97ae47740175bc658c5d3a33 files/pkgcore-0.1-sandbox-in-deleted-dir.patch 6747 +RMD160 aab59bac96ff0a2e2e7c9826c171c8c6e9c54089 files/pkgcore-0.1-sandbox-in-deleted-dir.patch 6747 +SHA256 efc257eb43f4fa6b3a3c3b05ab13178c561d4566b84bd212cceb4d04247b2711 files/pkgcore-0.1-sandbox-in-deleted-dir.patch 6747 DIST pkgcore-0.1.tar.bz2 386019 RMD160 49907cac4b83a0d00afaf41773e457886c1e054f SHA1 7852e3d90c8b0eaa2a9f4f069cdcbd0d3b3022eb SHA256 66f88ae7d181d182a02f1a99db222bd82d583c2de06a9ad6d5e6bc4701a3ec30 +EBUILD pkgcore-0.1-r1.ebuild 1929 RMD160 f55994521474ceb4c6857f65bd2dc035186c8427 SHA1 52f8f06b8c0a0a4eb05ab4978b1e84c877205364 SHA256 e6f0d47b6c9e3a6675ab78f48bd2eaa75c93a38c1198b0a6be505e8faa917d18 +MD5 5b8aaf71e4d543d5e5be7d6ff362c612 pkgcore-0.1-r1.ebuild 1929 +RMD160 f55994521474ceb4c6857f65bd2dc035186c8427 pkgcore-0.1-r1.ebuild 1929 +SHA256 e6f0d47b6c9e3a6675ab78f48bd2eaa75c93a38c1198b0a6be505e8faa917d18 pkgcore-0.1-r1.ebuild 1929 EBUILD pkgcore-0.1.ebuild 1820 RMD160 9760f51d92326a43d6afca5b3873c0d5b48729c5 SHA1 ebf6268fb842f37709aad301135470854cf3929d SHA256 7d1e10fc11e046d72ab6af935e18707c36f4e3b3d211004518e14a2eb86b272d MD5 dc461f052464daad2b7dc7bc141ef1f2 pkgcore-0.1.ebuild 1820 RMD160 9760f51d92326a43d6afca5b3873c0d5b48729c5 pkgcore-0.1.ebuild 1820 SHA256 7d1e10fc11e046d72ab6af935e18707c36f4e3b3d211004518e14a2eb86b272d pkgcore-0.1.ebuild 1820 -MISC ChangeLog 337 RMD160 39be26f58529d2da0efbaef13f6414779be196ec SHA1 84e818550e7bfb49895a000f35d37241b50514cb SHA256 ad38ef7f3c901c59fdd2e42ca6a74522095570f7fa79248c0c7e201bc32c9281 -MD5 48abab9b3d749a1a8ce845e7b67cbf64 ChangeLog 337 -RMD160 39be26f58529d2da0efbaef13f6414779be196ec ChangeLog 337 -SHA256 ad38ef7f3c901c59fdd2e42ca6a74522095570f7fa79248c0c7e201bc32c9281 ChangeLog 337 +MISC ChangeLog 543 RMD160 efc278626283de6478e900be0ce00f507c9a7186 SHA1 40cd9a65945c28499d3e8de3086632bc2ecb268a SHA256 5d6546611f9d2cf39906b7f4ffcb94372111e0cfd09d1f0ee5b7ead4bed58db6 +MD5 b36b48aab700322bd942366715941f6f ChangeLog 543 +RMD160 efc278626283de6478e900be0ce00f507c9a7186 ChangeLog 543 +SHA256 5d6546611f9d2cf39906b7f4ffcb94372111e0cfd09d1f0ee5b7ead4bed58db6 ChangeLog 543 MISC metadata.xml 222 RMD160 01bd2c9180f544353de73063bede0dd6b8ca6152 SHA1 95963907e0f22bc3795213303a68a2155b1ba78a SHA256 6e5dda05386711c829057f65bfd0e3ae693232628949c1612163ce9915963a63 MD5 5dff6cc33967055cfde969cbcb7b6d5d metadata.xml 222 RMD160 01bd2c9180f544353de73063bede0dd6b8ca6152 metadata.xml 222 @@ -17,10 +25,13 @@ SHA256 6e5dda05386711c829057f65bfd0e3ae693232628949c1612163ce9915963a63 metadata MD5 ab58c21cebc059bcab47c4889619d390 files/digest-pkgcore-0.1 238 RMD160 1930995286171cd66d6acb8e71dbb93faf1fdc11 files/digest-pkgcore-0.1 238 SHA256 4c9dd628eebfbd9e0ae3da7f993ab3a8c52bcc6be8c060c66cb76287db20479c files/digest-pkgcore-0.1 238 +MD5 ab58c21cebc059bcab47c4889619d390 files/digest-pkgcore-0.1-r1 238 +RMD160 1930995286171cd66d6acb8e71dbb93faf1fdc11 files/digest-pkgcore-0.1-r1 238 +SHA256 4c9dd628eebfbd9e0ae3da7f993ab3a8c52bcc6be8c060c66cb76287db20479c files/digest-pkgcore-0.1-r1 238 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFHuvrUElL7eJpfEQRAokFAJ9SYKAinGAcde0xoO6Ev60+edwVNACgjfmy -uY9igzM+v+llZzPq6X0k7Kg= -=mnDR +iD8DBQFFHw8ZUElL7eJpfEQRAr4+AJ9WscNNL8cL9LWnu4e1trdp4KyjWACfeY99 +tdQ6rztScXXsJvfr8tCuwmQ= +=1ZU9 -----END PGP SIGNATURE----- diff --git a/sys-apps/pkgcore/files/digest-pkgcore-0.1-r1 b/sys-apps/pkgcore/files/digest-pkgcore-0.1-r1 new file mode 100644 index 000000000000..9740cb113e3e --- /dev/null +++ b/sys-apps/pkgcore/files/digest-pkgcore-0.1-r1 @@ -0,0 +1,3 @@ +MD5 c0b918f3ce670aa4ec28d29c339146a1 pkgcore-0.1.tar.bz2 386019 +RMD160 49907cac4b83a0d00afaf41773e457886c1e054f pkgcore-0.1.tar.bz2 386019 +SHA256 66f88ae7d181d182a02f1a99db222bd82d583c2de06a9ad6d5e6bc4701a3ec30 pkgcore-0.1.tar.bz2 386019 diff --git a/sys-apps/pkgcore/files/pkgcore-0.1-sandbox-in-deleted-dir.patch b/sys-apps/pkgcore/files/pkgcore-0.1-sandbox-in-deleted-dir.patch new file mode 100644 index 000000000000..e9a3600ec6f6 --- /dev/null +++ b/sys-apps/pkgcore/files/pkgcore-0.1-sandbox-in-deleted-dir.patch @@ -0,0 +1,163 @@ +# Bazaar revision bundle v0.8 +# +# message: +# test for sandbox + nonexistant cwd. +# +# committer: Brian Harring <ferringb@gentoo.org> +# date: Sat 2006-09-30 17:38:28.315999985 -0700 + +=== modified file pkgcore/ebuild/processor.py // last-changed:ferringb@gentoo.o +... rg-20061001002928-e3ad5eb445bb7f3a +--- pkgcore/ebuild/processor.py ++++ pkgcore/ebuild/processor.py +@@ -206,6 +206,9 @@ + else: + spawn_func = pkgcore.spawn.spawn + ++ # force to a neutral dir so that sandbox/fakeroot won't explode if ++ # ran from a nonexistant dir ++ spawn_opts["chdir"] = "/tmp" + # little trick. we force the pipes to be high up fd wise so + # nobody stupidly hits 'em. + max_fd = min(pkgcore.spawn.max_fd_limit, 1024) + +=== modified file pkgcore/spawn.py // last-changed:ferringb@gentoo.org-20061001 +... 002928-e3ad5eb445bb7f3a +--- pkgcore/spawn.py ++++ pkgcore/spawn.py +@@ -130,7 +130,7 @@ + + def spawn(mycommand, env=None, opt_name=None, fd_pipes=None, returnpid=False, + uid=None, gid=None, groups=None, umask=None, logfile=None, +- path_lookup=True): ++ chdir=None, path_lookup=True): + + """wrapper around execve + +@@ -195,7 +195,7 @@ + # pylint: disable-msg=W0703 + try: + _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, +- uid, umask) ++ uid, umask, chdir) + except Exception, e: + # We need to catch _any_ exception so that it doesn't + # propogate out of this function and cause exiting +@@ -249,7 +249,8 @@ + # Everything succeeded + return 0 + +-def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask): ++def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask, ++ chdir): + """internal function to handle exec'ing the child process. + + If it succeeds this function does not return. It might raise an +@@ -286,6 +287,9 @@ + except OSError: + pass + ++ if chdir is not None: ++ os.chdir(chdir) ++ + # Set requested process permissions. + if gid: + os.setgid(gid) + +=== modified file pkgcore/test/test_spawn.py +--- pkgcore/test/test_spawn.py ++++ pkgcore/test/test_spawn.py +@@ -76,6 +76,33 @@ + fp, spawn_type=spawn.spawn_sandbox)[1][0].split(":")]) + os.unlink(fp) + ++ ++ @capability_based(spawn.sandbox_capable, "sandbox binary wasn't found") ++ def test_sandbox_empty_dir(self): ++ """ ++ sandbox gets pissy if it's ran from a nonexistant dir ++ ++ this verifies our fix works. ++ """ ++ fp = self.generate_script( ++ "pkgcore-spawn-sandbox.sh", "echo $LD_PRELOAD") ++ dpath = os.path.join(self.dir, "dar") ++ os.mkdir(dpath) ++ try: ++ cwd = os.getcwd() ++ except OSError: ++ cwd = None ++ try: ++ os.chdir(dpath) ++ os.rmdir(dpath) ++ self.assertIn("libsandbox.so", [os.path.basename(x.strip()) for x in ++ spawn.spawn_get_output( ++ fp, spawn_type=spawn.spawn_sandbox, chdir='/')[1][0].split(":")]) ++ os.unlink(fp) ++ finally: ++ if cwd is not None: ++ os.chdir(cwd) ++ + @capability_based(spawn.fakeroot_capable, "fakeroot binary wasn't found") + def test_fakeroot(self): + try: + +# revision id: ferringb@gentoo.org-20061001003828-74aa66b080d128bf +# sha1: 79dcf8b726e7596560bb1f1d1dd5b5489baacb65 +# inventory sha1: 2035b787956ee5082dd5ed878ec7db4f490b7278 +# parent ids: +# ferringb@gentoo.org-20061001002928-e3ad5eb445bb7f3a +# base id: ferringb@gentoo.org-20060930215710-1f00848a64fa7930 +# properties: +# branch-nick: integration + +# message: +# add chdir resetting option for spawn, use it for sandbox (sandbox sucks) when ran from a non existant dir +# +# committer: Brian Harring <ferringb@gentoo.org> +# date: Sat 2006-09-30 17:29:28.269999981 -0700 + +=== modified file pkgcore/ebuild/processor.py // encoding:base64 +LS0tIHBrZ2NvcmUvZWJ1aWxkL3Byb2Nlc3Nvci5weQorKysgcGtnY29yZS9lYnVpbGQvcHJvY2Vz +c29yLnB5CkBAIC0yMDYsNiArMjA2LDkgQEAKICAgICAgICAgZWxzZToKICAgICAgICAgICAgIHNw +YXduX2Z1bmMgPSBwa2djb3JlLnNwYXduLnNwYXduCiAKKyAgICAgICAgIyBmb3JjZSB0byBhIG5l +dXRyYWwgZGlyIHNvIHRoYXQgc2FuZGJveC9mYWtlcm9vdCB3b24ndCBleHBsb2RlIGlmCisgICAg +ICAgICMgcmFuIGZyb20gYSBub25leGlzdGFudCBkaXIKKyAgICAgICAgc3Bhd25fb3B0c1siY2hk +aXIiXSA9ICIvdG1wIgogICAgICAgICAjIGxpdHRsZSB0cmljay4gd2UgZm9yY2UgdGhlIHBpcGVz +IHRvIGJlIGhpZ2ggdXAgZmQgd2lzZSBzbwogICAgICAgICAjIG5vYm9keSBzdHVwaWRseSBoaXRz +ICdlbS4KICAgICAgICAgbWF4X2ZkID0gbWluKHBrZ2NvcmUuc3Bhd24ubWF4X2ZkX2xpbWl0LCAx +MDI0KQoK + +=== modified file pkgcore/spawn.py // encoding:base64 +LS0tIHBrZ2NvcmUvc3Bhd24ucHkKKysrIHBrZ2NvcmUvc3Bhd24ucHkKQEAgLTEzMCw3ICsxMzAs +NyBAQAogCiBkZWYgc3Bhd24obXljb21tYW5kLCBlbnY9Tm9uZSwgb3B0X25hbWU9Tm9uZSwgZmRf +cGlwZXM9Tm9uZSwgcmV0dXJucGlkPUZhbHNlLAogICAgICAgICAgIHVpZD1Ob25lLCBnaWQ9Tm9u +ZSwgZ3JvdXBzPU5vbmUsIHVtYXNrPU5vbmUsIGxvZ2ZpbGU9Tm9uZSwKLSAgICAgICAgICBwYXRo +X2xvb2t1cD1UcnVlKToKKyAgICAgICAgICBjaGRpcj1Ob25lLCBwYXRoX2xvb2t1cD1UcnVlKToK +IAogICAgICIiIndyYXBwZXIgYXJvdW5kIGV4ZWN2ZQogCkBAIC0xOTUsNyArMTk1LDcgQEAKICAg +ICAgICAgIyBweWxpbnQ6IGRpc2FibGUtbXNnPVcwNzAzCiAgICAgICAgIHRyeToKICAgICAgICA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cXVlc3RlZCBwcm9jZXNzIHBlcm1pc3Npb25zLgogICAgIGlmIGdpZDoKICAg +ICAgICAgb3Muc2V0Z2lkKGdpZCkKCg== + +# revision id: ferringb@gentoo.org-20061001002928-e3ad5eb445bb7f3a +# sha1: b4ccfdb63ee142de540dd13229b45f005e66fe1a +# inventory sha1: 75babaf4b20292a23aed08646032d6d20e8d5e8b +# parent ids: +# ferringb@gentoo.org-20060930215710-1f00848a64fa7930 +# properties: +# branch-nick: integration + diff --git a/sys-apps/pkgcore/pkgcore-0.1-r1.ebuild b/sys-apps/pkgcore/pkgcore-0.1-r1.ebuild new file mode 100644 index 000000000000..149d2bbb088b --- /dev/null +++ b/sys-apps/pkgcore/pkgcore-0.1-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pkgcore/pkgcore-0.1-r1.ebuild,v 1.1 2006/10/01 00:42:59 marienz Exp $ + +inherit distutils eutils + +DESCRIPTION="pkgcore package manager" +HOMEPAGE="http://dev.gentooexperimental.org/pkgcore-trac/" +SRC_URI="http://dev.gentooexperimental.org/~${PN}/releases/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="doc" + +DEPEND=">=dev-lang/python-2.4" +RDEPEND=">=dev-lang/python-2.4 + || ( >=dev-lang/python-2.5 dev-python/pycrypto ) + >=app-shells/bash-3.0 + doc? ( >=dev-python/docutils-0.4 )" + + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-sandbox-in-deleted-dir.patch" +} + + +src_compile() { + distutils_src_compile + + if use doc; then + ./build_docs.py || die "doc building failed" + fi +} + +src_install() { + distutils_src_install + + # This wrapper is not useful when called directly. + rm "${D}/usr/bin/pwrapper" + + if use doc; then + dohtml -r doc dev-notes + fi + + dodoc doc/*.rst + docinto dev-notes + dodoc dev-notes/*.rst + +} + +pkg_postinst() { + einfo "Registering plugins..." + register_plugin.py -s fs_ops copyfile 1 pkgcore.fs.ops.default_copyfile + register_plugin.py -s fs_ops ensure_perms 1 \ + pkgcore.fs.ops.default_ensure_perms + register_plugin.py -s fs_ops mkdir 1 pkgcore.fs.ops.default_mkdir + register_plugin.py -s fs_ops merge_contents 1 \ + pkgcore.fs.ops.merge_contents + register_plugin.py -s fs_ops unmerge_contents 1 \ + pkgcore.fs.ops.unmerge_contents + register_plugin.py -s format ebuild_built 0.0 \ + pkgcore.ebuild.ebuild_built.generate_new_factory + register_plugin.py -s format ebuild_src 0.0 \ + pkgcore.ebuild.ebuild_src.generate_new_factory +} + +src_test() { + "${python}" setup.py build_ext --force --inplace || \ + die "failed building extensions in src dir for testing" + "${python}" ./sandbox/test.py || die "tested returned non zero" +} |