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

[FIX] Python library permissions #40

Closed
wants to merge 1 commit into from

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Jun 20, 2017

I must insist that we add read and execute on all Python libraries if our intent is to have Odoo running from system Python. Otherwise, there are permissions errors.

Error log from a current build:

odoo-web_1   | Traceback (most recent call last):
odoo-web_1   |   File "/usr/local/bin/odoo", line 4, in <module>
odoo-web_1   |     __import__('pkg_resources').require('odoo==10.0')
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3037, in <module>
odoo-web_1   |     @_call_aside
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3021, in _call_aside
odoo-web_1   |     f(*args, **kwargs)
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3050, in _initialize_master_working_set
odoo-web_1   |     working_set = WorkingSet._build_master()
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 655, in _build_master
odoo-web_1   |     ws.require(__requires__)
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 969, in require
odoo-web_1   |     needed = self.resolve(parse_requirements(requirements))
odoo-web_1   |   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 855, in resolve
odoo-web_1   |     raise DistributionNotFound(req, requirers)
odoo-web_1   | pkg_resources.DistributionNotFound: The 'odoo==10.0' distribution was not found and is required by the application

* Reapply execute and read permissions for Python libraries (regression of Tecnativa#35)
@lasley
Copy link
Contributor Author

lasley commented Jun 20, 2017

Hrmmmm I think there's more to it than just this - I'm still getting the error after these changes. They don't persist if I add USER root to the end of my scaffold Dockerfile.

@yajo
Copy link
Contributor

yajo commented Jun 21, 2017

AFAIK pip already puts the correct permissions in files, that's why I only care about the one I add manually here. Can you tell me how to reproduce the problem?

It seems like you are not using our scaffolding, so it's harder to know your env and fix it, but as a blind guess, I'd say the problem is that you are running a semi-devel environment but forgot to add PIP_INSTALL_ODOO=false as a build arg...

@lasley
Copy link
Contributor Author

lasley commented Jun 22, 2017

Ok yeah so I think this is something in my image - although it's definitely pip installing. I think there's actually some danger in specific things in the apt_build. I'll report back soon

@yajo
Copy link
Contributor

yajo commented Jun 22, 2017

Fine, closing then, reopen if needed 😉

@yajo yajo closed this Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants