Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

venvctrl relocate doesn't handle exec #4

Closed
MeabhG opened this issue Apr 18, 2018 · 1 comment · Fixed by #9
Closed

venvctrl relocate doesn't handle exec #4

MeabhG opened this issue Apr 18, 2018 · 1 comment · Fixed by #9

Comments

@MeabhG
Copy link

MeabhG commented Apr 18, 2018

When building a rpm with rpmvenv that has a very long long path name, files in /usr/bin/ have an exec added to the top of the python files rather then a python shebang, see example of the top /usr/bin/circusd:

#!/bin/sh
'''exec' /tmp/rpmvenvN0vF_Y/BUILDROOT/python-circus-0.14.0-10.el6.company_name.x86_64/usr/share/python-circus/python_circus_venv/bin/python "$0" "$@"
' '''

vencctrl doesn't relocate the files when they have an exec and the rpmvenv build will complete 'successfully'. Preferred behaviour would be to handle exec or raise an exception with a detailed error message when exec is found.

@kevinconway
Copy link
Owner

I was wondering how pip/virtualenv would eventually address this issue. When I started this project, and rpmvenv, it was simply a known limitation for Python packages and not much we could do. It looks like this is a fairly recent change in pip and the dh_virtualenv folks are working to address the same thing: spotify/dh-virtualenv#225.

In this case, we might need to add some more intelligence to the BinFile (https://github.com/kevinconway/venvctrl/blob/master/venvctrl/venv/base.py#L146) so that it can detect these.... "alternative" shebangs and manage them correctly.

Is this a PR you might be able to make?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants