r965 - in /zope2.10/trunk/debian: changelog patches/deb-zopeconf.dpatch
bzed-guest at users.alioth.debian.org
bzed-guest at users.alioth.debian.org
Thu Jul 26 09:34:03 UTC 2007
Author: bzed-guest
Date: Thu Jul 26 09:34:02 2007
New Revision: 965
URL: http://svn.debian.org/wsvn/pkg-zope/?sc=1&rev=965
Log:
updating the debian zope patch to the latest version form zope2.9
Modified:
zope2.10/trunk/debian/changelog
zope2.10/trunk/debian/patches/deb-zopeconf.dpatch
Modified: zope2.10/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-zope/zope2.10/trunk/debian/changelog?rev=965&op=diff
==============================================================================
--- zope2.10/trunk/debian/changelog (original)
+++ zope2.10/trunk/debian/changelog Thu Jul 26 09:34:02 2007
@@ -1,3 +1,10 @@
+zope2.10 (2.10.4-2) unstable; urgency=low
+
+ * Adding the latest Debian specific patch to support ZEOs as primary
+ datastore in mkzopeinstance.
+
+ -- Bernd Zeimetz <bernd at bzed.de> Thu, 26 Jul 2007 11:29:53 +0200
+
zope2.10 (2.10.4-1) unstable; urgency=low
* New upstream release.
Modified: zope2.10/trunk/debian/patches/deb-zopeconf.dpatch
URL: http://svn.debian.org/wsvn/pkg-zope/zope2.10/trunk/debian/patches/deb-zopeconf.dpatch?rev=965&op=diff
==============================================================================
--- zope2.10/trunk/debian/patches/deb-zopeconf.dpatch (original)
+++ zope2.10/trunk/debian/patches/deb-zopeconf.dpatch Thu Jul 26 09:34:02 2007
@@ -6,19 +6,21 @@
. $(dirname $0)/DPATCH
@DPATCH@
-diff -rNu Zope-2.10.1-final.orig/z/skel/etc/zope.conf.in Zope-2.10.1-final/z/skel/etc/zope.conf.in
---- Zope-2.10.1-final.orig/z/skel/etc/zope.conf.in 2006-10-03 08:08:25.000000000 +0200
-+++ Zope-2.10.1-final/z/skel/etc/zope.conf.in 2006-11-01 14:31:36.000000000 +0100
-@@ -24,6 +24,8 @@
+diff -urN zope2.9-2.9.7/z/skel/etc/zope.conf.in zope2.9-2.9.7.debian/z/skel/etc/zope.conf.in
+--- zope2.9-2.9.7/z/skel/etc/zope.conf.in 2007-03-25 11:41:51.000000000 +0200
++++ zope2.9-2.9.7.debian/z/skel/etc/zope.conf.in 2007-06-15 15:09:10.000000000 +0200
+@@ -23,7 +23,10 @@
+ # ZConfig "defines" used for later textual substitution
%define INSTANCE <<INSTANCE_HOME>>
++%define HTTPPORT <<ZOPE_HTTPPORT>>
%define ZOPE <<ZOPE_HOME>>
+%define ZOPE_USER <<ZOPE_USER>>
-+%define HTTPPORT <<ZOPE_HTTPPORT>>
++%define ZEO_SERVER <<ZEO_SERVER>>
# Directive: instancehome
#
-@@ -147,6 +149,7 @@
+@@ -147,6 +150,7 @@
# Example:
#
# effective-user chrism
@@ -26,18 +28,86 @@
# Directive: enable-product-installation
-@@ -902,7 +905,7 @@
+@@ -902,7 +906,7 @@
<http-server>
# valid keys are "address" and "force-connection-close"
- address 8080
+ address $HTTPPORT
# force-connection-close on
- # You can also use the WSGI interface between ZServer and ZPublisher:
- # use-wsgi on
-diff -rNu Zope-2.10.1-final.orig/z/utilities/copyzopeskel.py Zope-2.10.1-final/z/utilities/copyzopeskel.py
---- Zope-2.10.1-final.orig/z/utilities/copyzopeskel.py 2006-10-03 08:08:24.000000000 +0200
-+++ Zope-2.10.1-final/z/utilities/copyzopeskel.py 2006-11-01 14:31:36.000000000 +0100
+ </http-server>
+
+@@ -951,13 +955,33 @@
+ # IMPORTANT: At least one database with a mount-point of "/"
+ # must be specified for Zope to start properly.
+
+-<zodb_db main>
+- # Main FileStorage database
+- <filestorage>
+- path $INSTANCE/var/Data.fs
+- </filestorage>
+- mount-point /
+-</zodb_db>
++# ZODB: <zodb_db main>
++# ZODB: # Main FileStorage database
++# ZODB: <filestorage>
++# ZODB: path $INSTANCE/var/Data.fs
++# ZODB: </filestorage>
++# ZODB: mount-point /
++# ZODB: </zodb_db>
++
++# Other storage examples
++#
++# ZEO client storage:
++#
++# ZEO: <zodb_db main>
++# ZEO: mount-point /
++# ZEO: # ZODB cache, in number of objects
++# ZEO: cache-size 5000
++# ZEO: <zeoclient>
++# ZEO: server $ZEO_SERVER
++# ZEO: storage 1
++# ZEO: name zeostorage
++# ZEO: var $INSTANCE/var
++# ZEO: # ZEO client cache, in bytes
++# ZEO: cache-size 20MB
++# ZEO: # Uncomment to have a persistent disk cache
++# ZEO: #client zeo1
++# ZEO: </zeoclient>
++# ZEO: </zodb_db>
+
+ <zodb_db temporary>
+ # Temporary storage database (for sessions)
+@@ -968,26 +992,6 @@
+ container-class Products.TemporaryFolder.TemporaryContainer
+ </zodb_db>
+
+-# Other storage examples
+-#
+-# ZEO client storage:
+-#
+-# <zodb_db main>
+-# mount-point /
+-# # ZODB cache, in number of objects
+-# cache-size 5000
+-# <zeoclient>
+-# server localhost:8100
+-# storage 1
+-# name zeostorage
+-# var $INSTANCE/var
+-# # ZEO client cache, in bytes
+-# cache-size 20MB
+-# # Uncomment to have a persistent disk cache
+-# #client zeo1
+-# </zeoclient>
+-# </zodb_db>
+-
+ # Product configuration (product-config) section(s)
+ #
+ # Description:
+diff -urN zope2.9-2.9.7/z/utilities/copyzopeskel.py zope2.9-2.9.7.debian/z/utilities/copyzopeskel.py
+--- zope2.9-2.9.7/z/utilities/copyzopeskel.py 2007-03-25 11:41:50.000000000 +0200
++++ zope2.9-2.9.7.debian/z/utilities/copyzopeskel.py 2007-06-15 14:59:03.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.4
+#!/usr/bin/python2.4
@@ -65,10 +135,10 @@
(targetdir, replacements, uid, gid))
+ if layout == 'fhs':
+ movedir(os.path.join(targetdir, 'etc'),
-+ os.path.join('/etc/zope2.10', os.path.basename(targetdir)),
++ os.path.join('/etc/zope2.9', os.path.basename(targetdir)),
+ uid, gid)
+ movedir(os.path.join(targetdir, 'log'),
-+ os.path.join('/var/log/zope2.10', os.path.basename(targetdir)),
++ os.path.join('/var/log/zope2.9', os.path.basename(targetdir)),
+ uid, gid)
finally:
os.chdir(pwd)
@@ -118,31 +188,49 @@
def usage(stream, msg=None):
if msg:
print >>stream, msg
-diff -rNu Zope-2.10.1-final.orig/z/utilities/mkzopeinstance.py Zope-2.10.1-final/z/utilities/mkzopeinstance.py
---- Zope-2.10.1-final.orig/z/utilities/mkzopeinstance.py 2006-10-03 08:08:24.000000000 +0200
-+++ Zope-2.10.1-final/z/utilities/mkzopeinstance.py 2006-11-01 14:31:36.000000000 +0100
-@@ -36,8 +36,8 @@
+diff -urN zope2.9-2.9.7/z/utilities/mkzopeinstance.py zope2.9-2.9.7.debian/z/utilities/mkzopeinstance.py
+--- zope2.9-2.9.7/z/utilities/mkzopeinstance.py 2007-03-25 11:41:50.000000000 +0200
++++ zope2.9-2.9.7.debian/z/utilities/mkzopeinstance.py 2007-06-15 15:22:36.000000000 +0200
+@@ -22,11 +22,16 @@
+ -d/--dir -- the dir in which the instance home should be created
+ -u/--user NAME:PASSWORD -- set the user name and password of the initial user
+ -s/--skelsrc -- the dir from which skeleton files should be copied
++-l/--layout -- layout to use while copying the skeleton files (`fhs' or `zope')
++--service-user -- system user to be used to run this instance (user:group)
++--service-port -- HTTP port used to run this instance
++--zeo-server HOST:PORT -- use a ZEO server instead of a local ZODB database
+
+ When run without arguments, this script will ask for the information necessary
+ to create a Zope instance home.
+ """
+
++import re
+ import getopt
+ import os
+ import shutil
+@@ -36,8 +41,8 @@
def main():
try:
opts, args = getopt.getopt(sys.argv[1:],
- "hu:d:s:",
- ["help", "user=", "dir=", "skelsrc="]
+ "hu:d:s:l:",
-+ ["help", "user=", "dir=", "skelsrc=", "layout=", "service-user=", "service-port="]
++ ["help", "user=", "dir=", "skelsrc=", "layout=", "service-user=", "service-port=", "zeo-server="]
)
except getopt.GetoptError, msg:
usage(sys.stderr, msg)
-@@ -48,6 +48,9 @@
+@@ -48,6 +53,10 @@
password = None
skeltarget = None
skelsrc = None
+ srvport = 9673
+ srvuser = "zope:zope"
++ zeoserver = None
+ layout = "zope"
for opt, arg in opts:
if opt in ("-d", "--dir"):
-@@ -71,6 +74,28 @@
+@@ -71,6 +80,36 @@
usage(sys.stderr, "user must be specified as name:password")
sys.exit(2)
user, password = arg.split(":", 1)
@@ -168,15 +256,24 @@
+ except ValueError:
+ usage(sys.stderr, "service port must be an integer")
+ sys.exit(2)
++ if opt in ("--zeo-server"):
++ if not arg:
++ usage(sys.stderr, "zeo server must not be empty")
++ sys.exit(2)
++ if not ":" in arg:
++ usage(sys.stderr, "zeo server must be specified as host:port")
++ sys.exit(2)
++ zeoserver = arg
if not skeltarget:
# interactively ask for skeltarget and initial user name/passwd.
-@@ -119,9 +144,17 @@
+@@ -119,12 +158,28 @@
"INSTANCE_HOME": instancehome,
"SOFTWARE_HOME": softwarehome,
"ZOPE_HOME": zopehome,
+ "ZOPE_USER": srvuser.split(":")[0],
+ "ZOPE_HTTPPORT": str(srvport),
++ "ZEO_SERVER": zeoserver or 'localhost:8100',
}
- copyzopeskel.copyskel(skelsrc, skeltarget, None, None, **kw)
@@ -190,3 +287,13 @@
if user and password:
write_inituser(inituser, user, password)
++ zope_conf = os.path.join(skeltarget, 'etc', 'zope.conf')
++ re_zodb = re.compile('^# %s: ' % (zeoserver and 'ZEO' or 'ZODB')).sub
++ output = []
++ for r in open(zope_conf).readlines():
++ output.append(re_zodb('', r))
++ open(zope_conf, 'w').write(''.join(output))
++
+ def usage(stream, msg=None):
+ if msg:
+ print >>stream, msg
More information about the pkg-zope-commits
mailing list