10000 pypi distfile with wrong permissions. · Issue #548 · PyCQA/pycodestyle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pypi distfile with wrong permissions. #548

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

Closed
petrrr opened this issue Jun 20, 2016 · 13 comments
Closed

pypi distfile with wrong permissions. #548

petrrr opened this issue Jun 20, 2016 · 13 comments
Assignees
Milestone

Comments

@petrrr
Copy link
petrrr commented Jun 20, 2016

The currently available distfile for pycodestyle has permission no read permissions for world, which cases installation and runtime issues on some systems.

@sigmavirus24
Copy link
Member

@petrrr you're going to need to be significantly more descriptive. As it exists in the repository, pycodestyle.py has 0o755 permissions. When I do pip download pycodestyle and wheel unpack the pycodestyle.py file has 0o644 permissions.

@sigmavirus24
Copy link
Member

Further if I do pip download --no-binary :all: pycodestyle and tar xf pycodestyle-2.0.0.tar.gz the pycodestyle.py has the same permissions as in the repo.

@petrrr
Copy link
Author
petrrr commented Jun 20, 2016

If I download the file pycodestyle-2.0.0.tar.gz and use tar i get the following:

petr% tar -tvzf pycodestyle-2.0.0.tar.gz 
drwxrwx---  0 lee1001 38140       0  1 Jun 02:22 pycodestyle-2.0.0/
-rw-rw----  0 lee1001 38140   19451  1 Jun 02:00 pycodestyle-2.0.0/CHANGES.txt
-rw-rw----  0 lee1001 38140     161  1 Jun 01:52 pycodestyle-2.0.0/CONTRIBUTING.rst
drwxrwx---  0 lee1001 38140       0  1 Jun 02:22 pycodestyle-2.0.0/docs/
-rw-rw----  0 lee1001 38140    2824  1 Jun 02:00 pycodestyle-2.0.0/docs/advanced.rst
[...]-rw-rw----  0 lee1001 38140    2582  1 Jun 01:52 pycodestyle-2.0.0/docs/api.rst
-rw-rw----  0 lee1001 38140    8328  1 Jun 01:52 pycodestyle-2.0.0/docs/conf.py
-rw-rw----  0 lee1001 38140    4021  1 Jun 02:00 pycodestyle-2.0.0/docs/developer.rst
-rw-rw----  0 lee1001 38140    1911  1 Jun 01:52 pycodestyle-2.0.0/docs/index.rst
-rw-rw----  0 lee1001 38140   24888  1 Jun 02:00 pycodestyle-2.0.0/docs/intro.rst
-rw-rw----  0 lee1001 38140    5106  1 Jun 01:52 pycodestyle-2.0.0/docs/make.bat
-rw-rw----  0 lee1001 38140    5584  1 Jun 01:52 pycodestyle-2.0.0/docs/Makefile
-rw-rw----  0 lee1001 38140     227 31 May 18:17 pycodestyle-2.0.0/MANIFEST.in
-rw-rw----  0 lee1001 38140   29793  1 Jun 02:22 pycodestyle-2.0.0/PKG-INFO
drwxrwx---  0 lee1001 38140       0  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/
-rw-rw----  0 lee1001 38140       1  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/dependency_links.txt
-rw-rw----  0 lee1001 38140      51  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/entry_points.txt
-rw-rw----  0 lee1001 38140       1  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/namespace_packages.txt
-rw-rw----  0 lee1001 38140       1  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/not-zip-safe
-rw-rw----  0 lee1001 38140   29793  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/PKG-INFO
-rw-rw----  0 lee1001 38140    1154  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/SOURCES.txt
-rw-rw----  0 lee1001 38140      12  1 Jun 02:22 pycodestyle-2.0.0/pycodestyle.egg-info/top_level.txt
-rwxrwx---  0 lee1001 38140   83681  1 Jun 02:00 pycodestyle-2.0.0/pycodestyle.py
-rw-rw----  0 lee1001 38140    3031  1 Jun 02:00 pycodestyle-2.0.0/README.rst
-rw-rw----  0 lee1001 38140     139  1 Jun 02:22 pycodestyle-2.0.0/setup.cfg
-rw-rw----  0 lee1001 38140    1733  1 Jun 02:00 pycodestyle-2.0.0/setup.py
drwxrwx---  0 lee1001 38140       0  1 Jun 02:22 pycodestyle-2.0.0/testsuite/
-rw-rw----  0 lee1001 38140       0 31 May 18:17 pycodestyle-2.0.0/testsuite/__init__.py
-rw-rw----  0 lee1001 38140     675 31 May 18:17 pycodestyle-2.0.0/testsuite/E10.py
-rw-rw----  0 lee1001 38140     663 31 May 18:17 pycodestyle-2.0.0/testsuite/E11.py
-rw-rw----  0 lee1001 38140    6781 31 May 18:17 pycodestyle-2.0.0/testsuite/E12.py
-rw-rw----  0 lee1001 38140   12912 31 May 18:17 pycodestyle-2.0.0/testsuite/E12not.py
-rw-rw----  0 lee1001 38140     755 31 May 18:17 pycodestyle-2.0.0/testsuite/E20.py
-rw-rw----  0 lee1001 38140     226 31 May 18:17 pycodestyle-2.0.0/testsuite/E21.py
-rw-rw----  0 lee1001 38140    1989 31 May 18:17 pycodestyle-2.0.0/testsuite/E22.py
-rw-rw----  0 lee1001 38140     163 31 May 18:17 pycodestyle-2.0.0/testsuite/E23.py
-rw-rw----  0 lee1001 38140     216 31 May 18:17 pycodestyle-2.0.0/testsuite/E24.py
-rw-rw----  0 lee1001 38140     938  1 Jun 01:52 pycodestyle-2.0.0/testsuite/E25.py
-rw-rw----  0 lee1001 38140    1225 31 May 18:17 pycodestyle-2.0.0/testsuite/E26.py
-rw-rw----  0 lee1001 38140     555  1 Jun 01:52 pycodestyle-2.0.0/testsuite/E27.py
-rw-rw----  0 lee1001 38140     788 31 May 18:17 pycodestyle-2.0.0/testsuite/E30.py
-rw-rw----  0 lee1001 38140    1407 31 May 18:17 pycodestyle-2.0.0/testsuite/E30not.py
-rw-rw----  0 lee1001 38140     450 31 May 18:17 pycodestyle-2.0.0/testsuite/E40.py
-rw-rw----  0 lee1001 38140    2846 31 May 18:17 pycodestyle-2.0.0/testsuite/E50.py
-rw-rw----  0 lee1001 38140     418 31 May 18:17 pycodestyle-2.0.0/testsuite/E70.py
-rw-rw----  0 lee1001 38140    1062 31 May 18:17 pycodestyle-2.0.0/testsuite/E71.py
-rw-rw----  0 lee1001 38140     901 31 May 18:17 pycodestyle-2.0.0/testsuite/E72.py
-rw-rw----  0 lee1001 38140     262 31 May 18:17 pycodestyle-2.0.0/testsuite/E73.py
-rw-rw----  0 lee1001 38140     441 31 May 18:17 pycodestyle-2.0.0/testsuite/E90.py
-rw-rw----  0 lee1001 38140     152 31 May 18:17 pycodestyle-2.0.0/testsuite/latin-1.py
-rw-rw----  0 lee1001 38140     408 31 May 18:17 pycodestyle-2.0.0/testsuite/noqa.py
-rw-rw----  0 lee1001 38140      99 31 May 18:17 pycodestyle-2.0.0/testsuite/python3.py
-rw-rw----  0 lee1001 38140    7337  1 Jun 01:52 pycodestyle-2.0.0/testsuite/support.py
-rw-rw----  0 lee1001 38140    2243  1 Jun 01:52 pycodestyle-2.0.0/testsuite/test_all.py
-rw-rw----  0 lee1001 38140   15697  1 Jun 01:52 pycodestyle-2.0.0/testsuite/test_api.py
-rw-rw----  0 lee1001 38140    1222  1 Jun 01:52 pycodestyle-2.0.0/testsuite/test_parser.py
-rw-rw----  0 lee1001 38140    7171  1 Jun 01:52 pycodestyle-2.0.0/testsuite/test_shell.py
-rw-rw----  0 lee1001 38140     863  1 Jun 01:52 pycodestyle-2.0.0/testsuite/test_util.py
-rw-rw----  0 lee1001 38140      83 31 May 18:17 pycodestyle-2.0.0/testsuite/utf-8-bom.py
-rw-rw----  0 lee1001 38140    2557 31 May 18:17 pycodestyle-2.0.0/testsuite/utf-8.py
-rw-rw----  0 lee1001 38140    2645 31 May 18:17 pycodestyle-2.0.0/testsuite/W19.py
-rw-rw----  0 lee1001 38140     375 31 May 18:17 pycodestyle-2.0.0/testsuite/W29.py
-rw-rw----  0 lee1001 38140     269 31 May 18:17 pycodestyle-2.0.0/testsuite/W39.py
-rw-rw----  0 lee1001 38140     239 31 May 18:17 pycodestyle-2.0.0/testsuite/W60.py

To what I understood this usually happens when the umask of the releaser is set to restrictively.

The problem with this is that default installation procedures may fail and needs some patching.

@sigmavirus24
Copy link
Member

To what I understood this usually happens when the umask of the releaser is set to restrictively.

Do you mean that you think something is wrong with the computer that @IanLee1521 created the release from? Do you know what he needs to do to fix this problem?

@IanLee1521
Copy link
Member

Hmm, that does seem weird and incorrect.. I had used python setup.py sdist to generate... Would be good to know what the issue is though and get it fixed.

@petrrr
Copy link
Author
petrrr commented Jun 21, 2016

@IanLee1521
Experience from some other project (once okay the other time wrong) indicate that this might be due to the umask setting while releasing.

@sigmavirus24
Copy link
Member

@IanLee1521 what OS do you use again?

@IanLee1521
Copy link
Member

Built this on OS X. My default umask is 007, so I can rebuild a new sdist with 002 instead if folks think that will address things.

@petrrr
Copy link
Author
petrrr commented Jun 21, 2016

Yes, I am on OSX, but I recall that on Linux tar behaves the same. I am using Macports to manages most python packages except for development and MacPorts uses the setup.py script to install the package without modifying the permissions by default.

@sigmavirus24
Copy link
Member

@IanLee1521 that umask (or 022) is probably good to set globally. There's a way to set it with launchctl.

@IanLee1521
Copy link
Member

Yeah, I do that umask on purpose, but I will make a not to change that when I run setup.py sdist in the future.

What do folks feel is the right way to handle fixing pypi? Would it be reasonable to simply upload the same version with the fixed umask, or does there need to be a version bump for fixing the uploaded tar ball? I'd rather the former myself, not sure if there are other considerations I'm not thinking of though. It would be the same files, just with the different umask.

@petrrr
Copy link
Author
petrrr commented Jun 22, 2016

@IanLee1521: No, please avoid any stealth updates.

Stealth update cause big issues to packaging projects (I am talking here for example for MacPorts) and to whoever mirrors tarballs for any reason. There is no clear trigger for any changes/updates to take place, the name does not change but the checksum does. You also risk that both versions coexist on the net.

So if you update the tarball, please always bump the version as well. Anyway, if you want to avoid doing this immediately, at least from my perspective. you could correct permissions in the next release. I am now patching permissions for Macports. Still other might step into the same issue.

@sigmavirus24
Copy link
Member

What do folks feel is the right way to handle fixing pypi? Would it be reasonable to simply upload the same version with the fixed umask, or does there need to be a version bump for fixing the uploaded tar ball?

PyPI does not allow for you to replace the file with the same version, so you best create a new release. A 2.0.1/2.1.0 is needed anyway because of #550. May as well just roll them all into a new version

@IanLee1521 IanLee1521 self-assigned this Jun 22, 2016
@IanLee1521 IanLee1521 added this to the 2.1 milestone Jun 22, 2016
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

No branches or pull requests

3 participants
0