Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#36193 closed defect (fixed)

File permissions of port py27-httplib2 appear incorrect

Reported by: NickFabry (Nick Fabry) Owned by: akitada@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: skymoo (Adam Mercer), mndavidoff (Monte Davidoff)
Port: py27-httplib2

Description

A port (py27-errorhandler) that depended on py27-http2 failed to install. Looking up the failure log, the following line indicated a problem with the py27-http2 port:

:info:build IOError: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/httplib2-0.7.6-py2.7.egg-info/top_level.txt'

it appeared that several files that form the py27-http2 port had perms of 640, rather than the typical 644, meaning that a non-root process couldn't read the files.

fabry@Tomokato:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/httplib2-0.7.6-py2.7.egg-info
[4997] $ ls -lah
total 32
drwxr-xr-x    6 root  wheel   204B Sep 17 18:15 .
drwxr-xr-x  100 root  wheel   3.3K Sep 17 18:15 ..
-rw-r-----    1 root  wheel   2.3K Sep 17 18:15 PKG-INFO
-rw-r-----    1 root  wheel   787B Sep 17 18:15 SOURCES.txt
-rw-r-----    1 root  wheel     1B Sep 17 18:15 dependency_links.txt
-rw-r-----    1 root  wheel     9B Sep 17 18:15 top_level.txt

I think these permissions are set upon port installation, hence I think this is a problem with the port.

I tried force uninstalling, cleaning, and reinstalling py27-http2 & py27-errorhandler, with the same results. A sudo chmod 644 to the /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/httplib2-0.7.6-py2.7.egg-info directory fixed the problems (i.e. sudo port install py27-errorhandler successfully completed).

This problem occurred on OS X 10.8.1, using Xcode 4.4.1 (4F1003), Macports 2.1.2, py27-httplib2 @2-0.7.6_0.

Thanks for contributing to Macports!

Attachments (1)

patch-Portfile.diff (520 bytes) - added by lpsinger (Leo Singer) 12 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Cc: ram@… added
Owner: changed from macports-tickets@… to akitada@…
Port: py27-httplib2 added; py27-http2 removed
Summary: File permissions of port py27-http2 appear incorrectFile permissions of port py27-httplib2 appear incorrect

In the future, please Cc the port maintainer(s).

comment:2 Changed 12 years ago by mndavidoff (Monte Davidoff)

It appears this problem was introduced in r97824, which upgraded py-httplib2 from 2-0.7.5 to 2-0.7.6.

comment:3 Changed 12 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

Changed 12 years ago by lpsinger (Leo Singer)

Attachment: patch-Portfile.diff added

comment:4 Changed 12 years ago by lpsinger (Leo Singer)

The permissions are incorrect in the 0.7.6 tarball itself. Has someone reported the issue to the httplib2 maintainers?

The attached patch fixes the issue in a temporary post-extract phase by setting the world-readable bit recursively on ${worksrcpath}. Is this safe and appropriate for this port?

comment:5 Changed 12 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: newclosed

comment:6 Changed 12 years ago by schwehr@…

Reported to the maintainer: issue 251 on httplib2 site.

Note: See TracTickets for help on using tickets.