Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2013 17:33:32 +1100 (EST)
From:      Kubilay Kocak <koobs.freebsd@gmail.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        nivit@FreeBSD.org
Subject:   ports/176803: [PATCH] devel/py-dateutil: Incorrect permissions for installed egg-info files
Message-ID:  <20130310063332.181CE39FC3@freebsd-RELENG_9-amd64.elysium>
Resent-Message-ID: <201303100640.r2A6e0oc061063@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         176803
>Category:       ports
>Synopsis:       [PATCH] devel/py-dateutil: Incorrect permissions for installed egg-info files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 10 06:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kubilay Kocak
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD freebsd-RELENG_9-amd64.elysium 9.1-STABLE FreeBSD 9.1-STABLE #0 r245946: Sun Jan 27 13:13:07 EST
>Description:

The egg-info files installed by this port have 600 permissions, not
allowing them to be read by a non privileged user. This causes the
following tracebacks to occur:

Traceback (most recent call last):
  File "/usr/local/bin/easy_install-2.7", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2825, in <module>
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 710, in subscribe
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2825, in <lambda>
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2257, in activate
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2364, in insert_on
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2403, in check_version_conflict
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 2251, in _get_metadata
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 1219, in get_metadata_lines
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 1211, in get_metadata
  File "build/bdist.freebsd-9.1-STABLE-amd64/egg/pkg_resources.py", line 1326, in _get
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/python_dateutil-2.1-py2.7.egg/EGG-INFO/top_level.txt'

This issue has been reported in at least Debian and ArchLinux bug trackers:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462297
https://bugs.archlinux.org/task/30020

Attached patch chmods directories 755 and files 644 post-patch:

Port maintainer (nivit@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:

--- py27-dateutil-2.1.patch begins here ---
diff -ruN /usr/ports/devel/py-dateutil/Makefile ./Makefile
--- /usr/ports/devel/py-dateutil/Makefile	2013-01-24 18:51:55.000000000 +1100
+++ ./Makefile	2013-03-10 17:31:17.423735432 +1100
@@ -1,5 +1,5 @@
 # Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
-# $FreeBSD: ports/devel/py-dateutil/Makefile,v 1.17 2013/01/24 07:51:55 svnexp Exp $
+# $FreeBSD: head/devel/py-dateutil/Makefile 310916 2013-01-24 07:42:32Z rm $
 
 PORTNAME=	dateutil
 PORTVERSION=	2.1
@@ -20,6 +20,11 @@
 USE_PYDISTUTILS=	easy_install
 PYDISTUTILS_PKGNAME=	python-dateutil
 
+# Fix incorrect permissions
+post-patch:
+	@${FIND} ${WRKSRC} -type d -print0 | ${XARGS} -0 ${CHMOD} 0755
+	@${FIND} ${WRKSRC} -type f -print0 | ${XARGS} -0 ${CHMOD} 0644
+
 regression-test: build
 	@cd ${WRKSRC} && ${PYTHON_CMD} test.py
 
--- py27-dateutil-2.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130310063332.181CE39FC3>