Skip to content
Permalink
Browse files

Updated to LocalFS 1.1.0 in preparation for Zope 2.7/Python 2.3 support.

Currently works with Zope 2.6.2/Python 2.1.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4226 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Robert Shaw
Robert Shaw committed Dec 16, 2003
1 parent 2d8193d commit cc4960e03aad8223596c003370e5652d11bcd2c2
Showing with 73 additions and 25 deletions.
  1. +27 −25 www/zope-localfs/Portfile
  2. +46 −0 www/zope-localfs/files/patch-FSObject.py
@@ -1,7 +1,7 @@
# $Id: Portfile,v 1.2 2003/11/17 21:20:06 jkh Exp $
# $Id: Portfile,v 1.3 2003/12/16 05:36:37 rshaw Exp $
PortSystem 1.0
name zope-localfs
version 1.0.0
version 1.1.0
categories www python zope
maintainers rshaw@opendarwin.org
description Zope Local File System folder
@@ -16,32 +16,34 @@ long_description The Local File System is an add-in product for \
system.
platforms darwin
homepage http://sourceforge.net/projects/localfs
distname LocalFS-1-0-0
extract.suffix .tgz
distname LocalFS-1-1-0
master_sites sourceforge:localfs
checksums md5 f3d27cfb5d09232bf2a01dad736c0740
depends_build bin:python2.1:python21 \
path:${prefix}/www/Zope:zope
configure {}
checksums md5 738c05ad9e4cb59518269bc21fa79a1d

set python /usr/bin/env\ python2.1
set python ${prefix}/bin/python2.1
set pythonlib ${prefix}/lib/python2.1
set zopehome ${prefix}/www/Zope
set zopeprod ${zopehome}/lib/python/Products
set zopeuser zope
set zopegroup www

depends_build bin:${python}:python21 \
path:${zopehome}:zope

patchfiles patch-FSObject.py
pre-patch { system "ln -s lib/python/Products/LocalFS ${workpath}/${distname}" }

configure {}

pre-build { file copy ${zopehome}/inst/compilezpy.py ${workpath}
system "find ${workpath} -name '*.py\[co\]' | xargs rm" }

build { system "cd ${workpath} && \
${python} ${workpath}/compilezpy.py" }

pre-build { system "cp ${zopehome}/inst/compilezpy.py \
${workpath}/lib/python/Products" }

build { system "cd ${workpath}/lib/python/Products && \
${python} ${workpath}/lib/python/Products/compilezpy.py"
system "cd ${workpath}/lib/python/Products && \
${python} -O ${workpath}/lib/python/Products/compilezpy.py" }

destroot { set zopebase ${destroot}${zopehome}
set productsdir ${zopebase}/lib/python/Products
set zopeuser zope

# Copy Plone products into the Products directory
system "install -d ${productsdir}"
system "cp -R ${workpath}/lib/python/Products/LocalFS ${productsdir}"
system "cd ${zopebase} && chown -R zope lib"
system "cd ${zopebase} && chgrp -R www lib" }
destroot { file mkdir ${destroot}${zopeprod}
system "cp -R ${workpath}/lib/python/Products/LocalFS ${destroot}${zopeprod}"
system "chown -R ${zopeuser} ${destroot}${zopeprod}"
system "chgrp -R ${zopegroup} ${destroot}${zopeprod}" }

@@ -0,0 +1,46 @@
--- FSObject.py.orig Sat Sep 14 11:23:19 2002
+++ FSObject.py Mon Dec 15 21:03:42 2003
@@ -180,16 +180,18 @@
self._fs_update_mtime()
except EnvironmentError, err:
if (err[0] == errno.EACCES):
- if os.path.exists(tmp_path):
+ if os.path.exists(self._fs_data.path):
raise 'Forbidden', HTTPResponse()._error_html(
'Forbidden',
"Sorry, you do not have permission to overwrite "
- "this file.<p>")
+ "this file: %s<p>"
+ % self._fs_data.path)
else:
raise 'Forbidden', HTTPResponse()._error_html(
'Forbidden',
"Sorry, you do not have permission to write "
- "to this directory.<p>")
+ "to this directory: %s<p>"
+ % os.path.dirname(self._fs_data.path))
else: raise

def _fs_write(self,file,write_props=1):
@@ -235,16 +237,18 @@
self._fs_props.write()
except EnvironmentError, err:
if (err[0] == errno.EACCES):
- if os.path.exists(tmp_path):
+ if os.path.exists(self._fs_props.path):
raise 'Forbidden', HTTPResponse()._error_html(
'Forbidden',
"Sorry, you do not have permission to overwrite "
- "this file.<p>")
+ "this file: %s<p>"
+ % self._fs_props.path)
else:
raise 'Forbidden', HTTPResponse()._error_html(
'Forbidden',
"Sorry, you do not have permission to write "
- "to this directory.<p>")
+ "to this directory: %s<p>"
+ % os.path.dirname(self._fs_props.path))
else: raise

def _fs_write_props(self,file):

0 comments on commit cc4960e

Please sign in to comment.
You can’t perform that action at this time.