PIP installing with /tmp mounted noexec

Open
#360 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by locating the module's pip installation entry point and how install options are exposed. Reproduce the failure with /tmp mounted noexec, then investigate passing pip's --build option so builds use an executable location. Done means the affected package installs successfully under this mount configuration and existing pip behavior remains intact.

Written by the indexing model from the issue text.

Description

I have found that certain PIP packages won't mount if the /tmp directory is mounted with the noexec mount option.

Example:

1485888563,,ui,message,    default: Error: /Stage[main]/Role::Packer::Orchestration/Python::Pip[ansible]/Exec[pip_install_ansible]/returns: change from notrun to 0 failed: pip wheel --help > /dev/null 2>&1 && { pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { pip --log /tmp/pip.log install  $wheel_support_flag     ansible==1.9.4 || pip --log /tmp/pip.log install      ansible==1.9.4 ;} returned 1 instead of one of [0]
...
/Stage[main]/Role::Packer::Orchestration/Python::Pip[ansible]/Exec[pip_install_ansible]/returns: Command "/usr/bin/python -u -c "import setuptools%!(PACKER_COMMA) tokenize;__file__='/tmp/pip-build-KGpbhZ/pycrypto/setup.py';f=getattr(tokenize%!(PACKER_COMMA) 'open'%!(PACKER_COMMA) open)(__file__);code=f.read().replace('\r\n'%!(PACKER_COMMA) '\n');f.close();exec(compile(code%!(PACKER_COMMA) __file__%!(PACKER_COMMA) 'exec'))" install --record /tmp/pip-ENqJTX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-KGpbhZ/pycrypto/

It looks like we could make this work by adding a feature to access pip install --build see doco.

Dominant language
Ruby
Stars
196
Forks
372
Avg merge
1d 18m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voxpupuli/puppet-python

All issues in voxpupuli/puppet-python

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.