Date: Wed, 6 Apr 2011 13:08:57 GMT From: Volodymyr Kostyrko <c.kworr@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/156220: bad luck running greenlet-based apps under restricted user Message-ID: <201104061308.p36D8vNr092535@red.freebsd.org> Resent-Message-ID: <201104061310.p36DA7se020567@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156220 >Category: ports >Synopsis: bad luck running greenlet-based apps under restricted user >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 06 13:10:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Volodymyr Kostyrko >Release: RELENG_8_2 >Organization: >Environment: FreeBSD chmmr.3501.lan 8.2-RELEASE FreeBSD 8.2-RELEASE #0 r218964M: Mon Mar 28 11:14:22 EEST 2011 arcade@chmmr.3501.lan:/usr/obj/usr/src/sys/MINIMAL_8 amd64 >Description: While writing one script I have experienced problems running it under restricted user. It keeps yelling me about PYTHON_EGG_CACHE and wants some directory to be writable. If I want to redistribute such script between different machines I'll need to: 1. Alter environment of restricted user. I'm not happy with it as I'm trying to restrict such users from writing to the disk. I also don't think pointing PYTHON_EGG_CACHE to something under /tmp would be a secure choice. 2. Install manually unpacked packages to be used by script. Also I wouldn't be happy updating that. 3. Change installation instructions so that no packages would be installed in compressed form. On the last one I can say that installing compressed eggs is illogical from my point of view. Everything about files, libraries, packages and their respective versions is already managed by ports. I may be missing something we get from eggs but from my point of view they are useless and add some clutter. >How-To-Repeat: cd /usr/ports/devel/py-gevent ; make install clean echo import gevent | su -m www -c `which python` >Fix: Patch attached. Patch attached with submission follows: diff -urN /usr/ports/devel/py-greenlet/Makefile py-greenlet/Makefile --- /usr/ports/devel/py-greenlet/Makefile 2011-04-06 15:34:09.096207636 +0300 +++ py-greenlet/Makefile 2011-04-06 16:06:29.436486288 +0300 @@ -7,6 +7,7 @@ PORTNAME= greenlet PORTVERSION= 0.3.1 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_CHEESESHOP} MASTER_SITE_SUBDIR= source/g/greenlet @@ -18,10 +19,9 @@ ONLY_FOR_ARCHS= amd64 i386 USE_PYTHON= yes -USE_PYDISTUTILS= easy_install +USE_PYDISTUTILS= yes PYDISTUTILS_PKGNAME= greenlet -PYEASYINSTALL_ARCHDEP= yes -PLIST_FILES= %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% +PLIST_FILES= %%PYTHON_SITELIBDIR%%/greenlet.so .include <bsd.port.mk> diff -urN /usr/ports/devel/py-greenlet/files/patch-setup.py py-greenlet/files/patch-setup.py --- /usr/ports/devel/py-greenlet/files/patch-setup.py 1970-01-01 03:00:00.000000000 +0300 +++ py-greenlet/files/patch-setup.py 2011-04-06 15:38:51.531726134 +0300 @@ -0,0 +1,21 @@ +--- setup.py.old 2010-04-05 23:17:53.000000000 +0300 ++++ setup.py 2011-04-06 15:38:47.972184712 +0300 +@@ -1,6 +1,5 @@ + import os +-from setuptools import Extension +-from setuptools import setup ++from distutils.core import Extension, setup + + setup( + name="greenlet", +@@ -11,10 +10,8 @@ + maintainer="Kyle Ambroff", + maintainer_email="kyle@ambroff.com", + url="http://bitbucket.org/ambroff/greenlet", +- repository='http://bitbucket.org/ambroff/greenlet/', + license="MIT License", + platforms=['any'], +- test_suite='tests.test_collector', + headers=['greenlet.h'], + ext_modules=[Extension(name='greenlet', sources=['greenlet.c'])], + classifiers=[ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104061308.p36D8vNr092535>