{ "info": { "author": "Tim Harder", "author_email": "radhermit@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "|pypi| |test| |coverage|\n\n========\npychroot\n========\n\npychroot is a python library and cli tool that simplify chroot handling.\nSpecifically, the library provides a **Chroot** context manager that enables\nmore pythonic methods for running code in chroots while the **pychroot**\nutility works much like an extended chroot command in the terminal.\n\nUsage\n=====\n\nIn its simplest form, the library can be used similar to the following::\n\n from pychroot import Chroot\n\n with Chroot('/path/to/chroot'):\n code that will be run\n inside the chroot\n\nBy default, this will bind mount the host's /dev, /proc, and /sys filesystems\ninto the chroot as well as the /etc/resolv.conf file (so DNS resolution works\nas expected in the chroot).\n\nA simple chroot equivalent is also installed as **pychroot**. It can be used in\na similar fashion to chroot; however, it also performs the bind mounts\npreviously mentioned so the environment is usable. In addition, pychroot\nsupports specifying custom bind mounts, for example::\n\n pychroot -R /home/user ~/chroot\n\nwill recursively bind mount the user's home directory at the same location\ninside the chroot directory in addition to the standard bind mounts. See\npychroot's help output for more options.\n\nWhen running on a system with a recent kernel (Linux 3.8 and on) and user\nnamespaces enabled pychroot can be run by a regular user. Currently\npychroot just maps the current user to root in the chroot environment. This\nmeans that recursively chown-ing the chroot directory to the user running\npychroot should essentially allow that user to act as root in the pychroot\nenvironment.\n\nImplementation details\n======================\n\nNamespaces are used by the context manager to isolate the chroot instance from\nthe host system and to simplify the teardown phase for the environments. By\ndefault, new mount, UTS, IPC, and pid namespaces are used. In addition, if\nrunning as non-root, both user and network namespaces will be enabled as well\nso that the chrooting and mounting process will work without elevated\npermissions.\n\nOne quirk of note is that currently local variables are not propagated back\nfrom the chroot context to the main context due to the usage of separate\nprocesses running the contexts. This means that something similar to the\nfollowing won't work::\n\n from pychroot import Chroot\n\n with Chroot('/path/to/chroot'):\n answer = 42\n print(answer)\n\nIn this case, a NameError exception will be raised unless the variable *answer*\nwas previously defined. This will probably be fixed to some extent in a future\nrelease.\n\nRequirements\n============\n\npychroot is quite Linux specific due to the use of namespaces via the\n`snakeoil`_ library which also require proper kernel support. Specifically, the\nfollowing kernel config options are required to be enabled for full namespace\nsupport::\n\n CONFIG_NAMESPACES=y\n CONFIG_UTS_NS=y\n CONFIG_IPC_NS=y\n CONFIG_USER_NS=y\n CONFIG_PID_NS=y\n CONFIG_NET_NS=y\n\nInstalling\n==========\n\nIn a virtualenv or elsewhere via pip::\n\n pip install pychroot\n\nFrom the repo manually::\n\n python setup.py install\n\nBugs\n====\n\nPlease create an issue in the `issue tracker`_.\n\nTests\n=====\n\nTests are handled via pytest, run via::\n\n py.test\n\nwhich is also integrated into setup.py, run via::\n\n python setup.py test\n\nAlso, tests for all supported python versions can be run together or\nindividually via::\n\n tox\n\n\n.. _`issue tracker`: https://github.com/pkgcore/pychroot/issues\n.. _`snakeoil`: https://github.com/pkgcore/snakeoil\n.. _mock: https://pypi.python.org/pypi/mock\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pychroot.svg\n :target: https://pypi.python.org/pypi/pychroot\n.. |test| image:: https://travis-ci.org/pkgcore/pychroot.svg?branch=master\n :target: https://travis-ci.org/pkgcore/pychroot\n.. |coverage| image:: https://codecov.io/gh/pkgcore/pychroot/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pkgcore/pychroot\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pkgcore/pychroot", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pychroot", "package_url": "https://pypi.org/project/pychroot/", "platform": "Posix", "project_url": "https://pypi.org/project/pychroot/", "project_urls": { "Homepage": "https://github.com/pkgcore/pychroot" }, "release_url": "https://pypi.org/project/pychroot/0.10.0/", "requires_dist": [ "snakeoil (~=0.8.1)" ], "requires_python": "", "summary": "a python library and cli tool that simplify chroot handling", "version": "0.10.0" }, "last_serial": 5719954, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "ae15333447ee09a8c2e785196841056f", "sha256": "cfba35012717e0b5a3f355042d9019dc7cd4fbd52569c8a58a9266fde71ab034" }, "downloads": -1, "filename": "pychroot-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ae15333447ee09a8c2e785196841056f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21938, "upload_time": "2019-08-23T10:26:44", "url": "https://files.pythonhosted.org/packages/81/eb/68741084913a38073b3d51b1291c5f12cd584bc712eec9e1ad702467bf9c/pychroot-0.10.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a671b47420eff240beb9858aec9de7b", "sha256": "3f8346d31abd268c9e8f0f8fe0502ffe07db03b7e12099f70f188dd8464a00f4" }, "downloads": -1, "filename": "pychroot-0.10.0.tar.gz", "has_sig": false, "md5_digest": "7a671b47420eff240beb9858aec9de7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23960, "upload_time": "2019-08-23T10:26:45", "url": "https://files.pythonhosted.org/packages/93/8f/ab2ae10b71aa9b5f095445e7f64885dda57ba4e2d685230bab69ad1f67df/pychroot-0.10.0.tar.gz" } ], "0.9.10": [ { "comment_text": "", "digests": { "md5": "e7e261964c6448b64fe6db0c6ba56ae8", "sha256": "a27a37a7b1ad06fa38b17ad55e2a85af7696db89a4be400b6d5bff7759d77faf" }, "downloads": -1, "filename": "pychroot-0.9.10.tar.gz", "has_sig": true, "md5_digest": "e7e261964c6448b64fe6db0c6ba56ae8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17890, "upload_time": "2015-07-06T00:11:51", "url": "https://files.pythonhosted.org/packages/a5/96/f70dfbec38cad8380555d98aa701306a92ab20920647e5e183886af68749/pychroot-0.9.10.tar.gz" } ], "0.9.11": [ { "comment_text": "", "digests": { "md5": "27760e3a052310e92a776b29ef4bbfb0", "sha256": "986a49997bb90e78e68cc99363659e01482adc0158c895d621f754b7d1a1870e" }, "downloads": -1, "filename": "pychroot-0.9.11.tar.gz", "has_sig": true, "md5_digest": "27760e3a052310e92a776b29ef4bbfb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17904, "upload_time": "2015-07-06T01:38:16", "url": "https://files.pythonhosted.org/packages/00/8b/d5b33a26a2fb1ba5be3b8f0525b14cf457e79ecc86fc7a6303df7e9e0d71/pychroot-0.9.11.tar.gz" } ], "0.9.12": [ { "comment_text": "", "digests": { "md5": "2bd1bfcd2595fa3586da217c90601325", "sha256": "a536341b52d1e50ddbd20a999a24ca927d9efc1a2dc14a0488e6b2a7c9eeb7cb" }, "downloads": -1, "filename": "pychroot-0.9.12.tar.gz", "has_sig": true, "md5_digest": "2bd1bfcd2595fa3586da217c90601325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19791, "upload_time": "2015-08-10T06:04:51", "url": "https://files.pythonhosted.org/packages/da/d3/36bdc6ba50c591ec84761f0e98b889a0c9fda6c070838c9325fc849f6be7/pychroot-0.9.12.tar.gz" } ], "0.9.13": [ { "comment_text": "", "digests": { "md5": "2f7ebfe8b08fc7d413615e06dd1da010", "sha256": "e94c9c738402f4957e757aa1fdcd2febeaa7cc01df1b1ca0d6adf3324a8bbfce" }, "downloads": -1, "filename": "pychroot-0.9.13.tar.gz", "has_sig": true, "md5_digest": "2f7ebfe8b08fc7d413615e06dd1da010", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25610, "upload_time": "2015-12-13T05:34:22", "url": "https://files.pythonhosted.org/packages/c5/bb/8525ef2fb8ea0834c33004a57e4a79cb46e2d16026f0a16743847a64de18/pychroot-0.9.13.tar.gz" } ], "0.9.14": [ { "comment_text": "", "digests": { "md5": "eb855d6fe7f993b1f0d2ba14b696d29d", "sha256": "d934838d30f974eb6cd52d2d6f72b8a27f4bfff0dbc5acc735a43fa33a988d58" }, "downloads": -1, "filename": "pychroot-0.9.14.tar.gz", "has_sig": true, "md5_digest": "eb855d6fe7f993b1f0d2ba14b696d29d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30084, "upload_time": "2016-05-28T20:18:36", "url": "https://files.pythonhosted.org/packages/4d/c7/5a7e90a28934d3c2a5bed9435da796370a9abcaed75e29934abf34870bc3/pychroot-0.9.14.tar.gz" } ], "0.9.15": [ { "comment_text": "", "digests": { "md5": "68dacbb75fa62791e7a5b9c74ad3ef35", "sha256": "d2cf687b9c890fe5adea73d1b248d3d09d3d629d946be1fc6be989eddc9f5152" }, "downloads": -1, "filename": "pychroot-0.9.15.tar.gz", "has_sig": true, "md5_digest": "68dacbb75fa62791e7a5b9c74ad3ef35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30109, "upload_time": "2016-05-29T00:06:11", "url": "https://files.pythonhosted.org/packages/a9/d0/f66ee3cf4ce9aac6336b8a3d556b31b2c7a7f394007a813892d0d49ede2d/pychroot-0.9.15.tar.gz" } ], "0.9.16": [ { "comment_text": "", "digests": { "md5": "ef11bbd0c6221e599875789391fa6d2a", "sha256": "8bcfde4f045d34181ab6ec869abb6608c1340de4dd15ceac003287ec610d221d" }, "downloads": -1, "filename": "pychroot-0.9.16.tar.gz", "has_sig": true, "md5_digest": "ef11bbd0c6221e599875789391fa6d2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31027, "upload_time": "2016-11-01T03:06:44", "url": "https://files.pythonhosted.org/packages/71/f0/c21a8e3f0b573424daa61700b08e76867742e43105631a996a22b99b1099/pychroot-0.9.16.tar.gz" } ], "0.9.17": [ { "comment_text": "", "digests": { "md5": "8a79ffd9cfc11df6f8ba46b2ffb41879", "sha256": "cf6dc84515d8985b6b58930addaba6111698f5e144b7f2cfdcf25561ce052290" }, "downloads": -1, "filename": "pychroot-0.9.17-py2-none-any.whl", "has_sig": false, "md5_digest": "8a79ffd9cfc11df6f8ba46b2ffb41879", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 23642, "upload_time": "2017-09-21T23:34:50", "url": "https://files.pythonhosted.org/packages/33/a2/c77611fa3450bbebe658048de2372ede104911d37f257c4307e2ac25a3d8/pychroot-0.9.17-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20952348aca4d4530c8b82de97e76b4c", "sha256": "2f87a18428a74e24fccd54ce6aa58b108a301859d6f332e4f21848d70336be35" }, "downloads": -1, "filename": "pychroot-0.9.17-py3-none-any.whl", "has_sig": false, "md5_digest": "20952348aca4d4530c8b82de97e76b4c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23640, "upload_time": "2017-09-21T23:34:51", "url": "https://files.pythonhosted.org/packages/06/5f/3f67d5258e559a0db014e488466edc7a10c3c8bf54f06eb8a36e5f4d5acd/pychroot-0.9.17-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49adb6d0ec7c17578d23b8957121bff0", "sha256": "4556d110ab3270c2eec817c1e9573e14fe851a9034ee45b4d96b2695f812c467" }, "downloads": -1, "filename": "pychroot-0.9.17.tar.gz", "has_sig": false, "md5_digest": "49adb6d0ec7c17578d23b8957121bff0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32036, "upload_time": "2017-09-21T23:34:52", "url": "https://files.pythonhosted.org/packages/55/57/da59af8d5e45e0a8b971ee51a3b1a5110e3447419b7e91232831a055a48b/pychroot-0.9.17.tar.gz" } ], "0.9.18": [ { "comment_text": "", "digests": { "md5": "a2968e198d5bdc37df3c72469427f014", "sha256": "f2654c305a3542cf6e268509b5c6cb1b53c41ce56b1a083bcdfa2758ec8b7204" }, "downloads": -1, "filename": "pychroot-0.9.18-py2-none-any.whl", "has_sig": false, "md5_digest": "a2968e198d5bdc37df3c72469427f014", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 23330, "upload_time": "2017-10-04T20:02:50", "url": "https://files.pythonhosted.org/packages/49/80/42a6678fac01d0f1ed36f13365dfe790824aed64b7d4f02ec3578f385cc8/pychroot-0.9.18-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27a81fe77e57c2a8c8c9c8686a457af9", "sha256": "a9cd9cbb065fd6855d8b1e5c18888d646208d5b13b21ec0a69c650ef7dc06a1b" }, "downloads": -1, "filename": "pychroot-0.9.18-py3-none-any.whl", "has_sig": false, "md5_digest": "27a81fe77e57c2a8c8c9c8686a457af9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23329, "upload_time": "2017-10-04T20:02:53", "url": "https://files.pythonhosted.org/packages/0f/42/0e4a722f85514476d20e020acfca31dea756e0ef04ff9f2dd8fa8ecd74e7/pychroot-0.9.18-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b7afebdda14748d4b269f44145544f9", "sha256": "ec78082c9ea8a30733ac1cf9773431fe118fb4cbeaf1098572c3b8e4e16eb7aa" }, "downloads": -1, "filename": "pychroot-0.9.18.tar.gz", "has_sig": false, "md5_digest": "0b7afebdda14748d4b269f44145544f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32879, "upload_time": "2017-10-04T20:02:55", "url": "https://files.pythonhosted.org/packages/a1/f1/ee565b0e9fd1784495858addfa13737af7b809dc032e0eeece2b0531d763/pychroot-0.9.18.tar.gz" } ], "0.9.7": [ { "comment_text": "", "digests": { "md5": "a2534b568d2334dfdb6cf9cbe6231e6d", "sha256": "13598368bdf19a2d0869dbb9c0e95906e1cf086bec76322f349a9013f8db0928" }, "downloads": -1, "filename": "pychroot-0.9.7.tar.gz", "has_sig": true, "md5_digest": "a2534b568d2334dfdb6cf9cbe6231e6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11014, "upload_time": "2015-03-25T04:12:20", "url": "https://files.pythonhosted.org/packages/6e/0f/f68dce69351dc300c22618f2d2a1eb3c027b0fc4cbc67433c71c591de0ba/pychroot-0.9.7.tar.gz" } ], "0.9.8": [ { "comment_text": "", "digests": { "md5": "0e85bd80a1a1d7ae1eb27d84e20ecc81", "sha256": "9d924b90b017a0357ad4c326904191427a6e9c3733e049854e293825bd28ad61" }, "downloads": -1, "filename": "pychroot-0.9.8.tar.gz", "has_sig": true, "md5_digest": "0e85bd80a1a1d7ae1eb27d84e20ecc81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11320, "upload_time": "2015-03-25T23:18:13", "url": "https://files.pythonhosted.org/packages/58/6f/1bb2437cee756c61db8950f7064f6e0287540c1c7ef4a04297c3e87a3a52/pychroot-0.9.8.tar.gz" } ], "0.9.9": [ { "comment_text": "", "digests": { "md5": "2c4113b12b0d0a4f86bb8f017e05709c", "sha256": "49558bdc85dbdd25dbd2b3417eb857bd770bfb026db76c7e2bcedc8c605fe76b" }, "downloads": -1, "filename": "pychroot-0.9.9.tar.gz", "has_sig": true, "md5_digest": "2c4113b12b0d0a4f86bb8f017e05709c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11936, "upload_time": "2015-04-04T02:36:37", "url": "https://files.pythonhosted.org/packages/0d/9a/a4893dc41f47baad7ccf5801bc82ea7e9398a481d7a8ba02d16525910a9d/pychroot-0.9.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae15333447ee09a8c2e785196841056f", "sha256": "cfba35012717e0b5a3f355042d9019dc7cd4fbd52569c8a58a9266fde71ab034" }, "downloads": -1, "filename": "pychroot-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ae15333447ee09a8c2e785196841056f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21938, "upload_time": "2019-08-23T10:26:44", "url": "https://files.pythonhosted.org/packages/81/eb/68741084913a38073b3d51b1291c5f12cd584bc712eec9e1ad702467bf9c/pychroot-0.10.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a671b47420eff240beb9858aec9de7b", "sha256": "3f8346d31abd268c9e8f0f8fe0502ffe07db03b7e12099f70f188dd8464a00f4" }, "downloads": -1, "filename": "pychroot-0.10.0.tar.gz", "has_sig": false, "md5_digest": "7a671b47420eff240beb9858aec9de7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23960, "upload_time": "2019-08-23T10:26:45", "url": "https://files.pythonhosted.org/packages/93/8f/ab2ae10b71aa9b5f095445e7f64885dda57ba4e2d685230bab69ad1f67df/pychroot-0.10.0.tar.gz" } ] }