yoheimuta / google-bigquery-tools

Automatically exported from code.google.com/p/google-bigquery-tools
0 stars 4 forks source link

Incorrect file permissions on the bigquery.egg-info directory and files under in release bigquery-2.0.12.tar #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install bigquery-2.0.12 into a system as root
2. try to install any other python module that uses setuptools/distribute
3.

What is the expected output? What do you see instead?

I have to do this before installing to remove the problem:

  chmod 755 bigquery.egg-info
  chmod 644 bigquery.egg-info/*

What version of the product are you using? On what operating system?

2.0.12 on mac osx 10.8 with fink

Please provide any additional information below.

There is something wrong with how most python modules are being release by the 
cloud team at google.

Writing 
/sw/src/fink.build/root-docutils-py27-0.10-1/sw/lib/python2.7/site-packages/docu
tils-0.10-py2.7.egg-info

for i in *.txt ; do
  htmldoc=${i%txt}html
  echo "Making $htmldoc"
  PYTHONPATH=.:docutils/utils tools/rst2html.py $i $htmldoc
done
Making BUGS.html
Traceback (most recent call last):
  File "tools/rst2html.py", line 23, in <module>
    publish_cmdline(writer_name='html', description=description)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/core.py", line 349, in publish_cmdline
    pub.set_components(reader_name, parser_name, writer_name)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/core.py", line 93, in set_components
    self.set_reader(reader_name, self.parser, parser_name)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/core.py", line 83, in set_reader
    self.reader = reader_class(parser, parser_name)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/readers/__init__.py", line 52, in __init__
    self.set_parser(parser_name)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/readers/__init__.py", line 63, in set_parser
    parser_class = parsers.get_parser_class(parser_name)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/parsers/__init__.py", line 52, in get_parser_class
    module = __import__(parser_name, globals(), locals(), level=1)
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/parsers/rst/__init__.py", line 75, in <module>
    from docutils.parsers.rst import states
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/parsers/rst/states.py", line 120, in <module>
    from docutils.parsers.rst import directives, languages, tableparser, roles
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/parsers/rst/roles.py", line 78, in <module>
    from docutils.utils.code_analyzer import Lexer, LexerError
  File "/sw/src/fink.build/docutils-py27-0.10-1/docutils-0.10/docutils/utils/code_analyzer.py", line 13, in <module>
    from pygments.lexers import get_lexer_by_name
  File "/sw/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 18, in <module>
    from pygments.plugin import find_plugin_lexers
  File "/sw/lib/python2.7/site-packages/pygments/plugin.py", line 39, in <module>
    import pkg_resources
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2825, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 710, in subscribe
    callback(dist)
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2825, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2257, in activate
    self.insert_on(path)
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2364, in insert_on
    self.check_version_conflict()
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2403, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 2251, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 1219, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 1211, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/sw/lib/python2.7/site-packages/pkg_resources.py", line 1326, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: 
'/sw/lib/python2.7/site-packages/bigquery-2.0.12-py2.7.egg-info/top_level.txt'
### execution of /tmp/fink.Hdbk0 failed, exit code 1
### execution of /tmp/fink.eG47A failed, exit code 1
Removing runtime build-lock...

Original issue reported on code.google.com by schw...@gmail.com on 19 May 2013 at 12:49

GoogleCodeExporter commented 8 years ago
+1 on the permission problem. 

chmod-ing the two permissions like you did works for the installation, and 
allows you to install further python modules BUT the bq program still has to 
run in sudo mode, which I think is not OK.

Is this fixable on the user end, or maybe could the google team change the 
permissions on their end so this is not the case anymore?

Cheers

Original comment by nicholas...@starmakerinteractive.com on 9 Sep 2014 at 3:12