Date: Tue, 29 Dec 2009 06:15:00 GMT From: Oleg Pudeyev <oleg@bsdpower.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/142115: [patch] Extract textproc/py-genshi during installation Message-ID: <200912290615.nBT6F0Ev076792@www.freebsd.org> Resent-Message-ID: <200912290620.nBT6K3B5046625@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 142115 >Category: ports >Synopsis: [patch] Extract textproc/py-genshi during installation >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: Tue Dec 29 06:20:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Oleg Pudeyev >Release: 7.2-STABLE >Organization: >Environment: FreeBSD projects.bsdpower.com 7.2-STABLE FreeBSD 7.2-STABLE #0: Sun Aug 30 13:45:46 EDT 2009 build@baffle.bsdpower.com:/build/obj/src/src/sys/GENERIC amd64 >Description: Please consider this patch to textproc/py-genshi. It adds -Z (--always-unzip) option to easy_install arguments and updates plist accordingly. Similar change has already been done for textproc/py-genshi-devel ([1]). I run trac, which depends on genshi. The user running trac only has write access to project directory, which is necessary for attachment uploads. Arranging for additional writeable directories for that user is a hassle, not to mention additional operations required for uncompressing the egg at runtime, associated staleness checks, and useless files on the filesystem. This change has been requested and done for genshi ([1]), but reverted in the most recent version of the port. Trac on my system broke after updating to most recent version, before this it worked fine. The reverting change has this note: "Reported that www/trac has problems when Genshi is installed with zip-safe=false". Could we get the actual problem report(s) that occur when genshi is uncompressed during installation, and maybe try to fix them, instead of installing genshi as an egg? [1] http://lists.freebsd.org/pipermail/freebsd-python/2008-August/001662.html >How-To-Repeat: Install www/trac. Attempt to start trac after changing uid to a non-root user, and not modifying environment (thus HOME keeps pointing to /root). For example: # TRAC_ENV_PARENT_DIR=/home/trac/projects spawn-fcgi -n -s /tmp/trac.sock -f /usr/local/share/trac/cgi-bin/trac.fcgi -u svn -g svn Expected result: Trac starts. Actual result: Oops... Trac detected an internal error: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/root/.python-eggs' The Python egg cache directory is currently set to: /root/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. >Fix: Patch attached with submission follows: diff -urN py-genshi.orig/Makefile py-genshi/Makefile --- py-genshi.orig/Makefile 2009-12-29 00:39:37.000000000 -0500 +++ py-genshi/Makefile 2009-12-29 00:53:51.000000000 -0500 @@ -7,7 +7,7 @@ PORTNAME= Genshi PORTVERSION= 0.5.1 -PORTREVISION= 3 +PORTREVISION= 4 #PORTEPOCH= 0 CATEGORIES= textproc www python MASTER_SITES= http://ftp.edgewall.com/pub/${PORTNAME:L}/ \ @@ -21,7 +21,7 @@ USE_PYDISTUTILS= easy_install PYEASYINSTALL_ARCHDEP= yes -PYDISTUTILS_INSTALLARGS= -O 1 -N -S ${PYTHONPREFIX_SITELIBDIR}/site-packages -d ${PYTHONPREFIX_SITELIBDIR} ${WRKSRC}/dist/${PYEASYINSTALL_EGG} +PYDISTUTILS_INSTALLARGS= -Z -O 1 -N -S ${PYTHONPREFIX_SITELIBDIR}/site-packages -d ${PYTHONPREFIX_SITELIBDIR} ${WRKSRC}/dist/${PYEASYINSTALL_EGG} DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} diff -urN py-genshi.orig/pkg-plist py-genshi/pkg-plist --- py-genshi.orig/pkg-plist 2009-12-29 00:39:37.000000000 -0500 +++ py-genshi/pkg-plist 2009-12-29 00:43:49.000000000 -0500 @@ -1,5 +1,76 @@ @comment $FreeBSD: ports/textproc/py-genshi/pkg-plist,v 1.8 2009/12/19 09:47:59 nivit Exp $ -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/entry_points.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/native_libs.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/requires.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/top_level.txt +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/zip-safe +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/__init__.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/_speedups.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/_speedups.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/_speedups.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/_speedups.so +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/builder.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/builder.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/builder.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/core.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/core.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/core.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/__init__.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/html.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/html.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/html.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/i18n.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/i18n.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/i18n.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/transform.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/transform.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters/transform.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/input.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/input.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/input.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/output.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/output.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/output.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/path.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/path.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/path.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/__init__.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/base.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/base.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/base.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/directives.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/directives.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/directives.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/eval.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/eval.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/eval.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/interpolation.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/interpolation.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/interpolation.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/loader.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/loader.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/loader.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/markup.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/markup.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/markup.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/plugin.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/plugin.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/plugin.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/text.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/text.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template/text.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/util.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/util.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/util.pyo %%PORTDOCS%%%%DOCSDIR%%/2000ft.png %%PORTDOCS%%%%DOCSDIR%%/api/api-objects.txt %%PORTDOCS%%%%DOCSDIR%%/api/class-tree.html @@ -241,3 +312,8 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%%/common %%PORTDOCS%%@dirrm %%DOCSDIR%%/api %%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/template +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi/filters +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/genshi +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO +@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912290615.nBT6F0Ev076792>