r2128 - in zope2.12/branches/with-revived-tarball/debian (4 files)

pumazi-guest at users.alioth.debian.org pumazi-guest at users.alioth.debian.org
Tue Nov 9 21:40:56 UTC 2010


    Date: Tuesday, November 9, 2010 @ 21:40:27
  Author: pumazi-guest
Revision: 2128

Added a patch for the zodb package, which caused python-support to believe we had a dependency on python2.4. Removed the python-* packages for the time being, I'll likely put them back in in the next commit. I've successfully got this changeset to build and install.

Added:
  zope2.12/branches/with-revived-tarball/debian/patches/zodb-script-fix.patch
Modified:
  zope2.12/branches/with-revived-tarball/debian/control
  zope2.12/branches/with-revived-tarball/debian/patches/debian-changes-2.12.10-1
  zope2.12/branches/with-revived-tarball/debian/patches/series

Modified: zope2.12/branches/with-revived-tarball/debian/control
===================================================================
--- zope2.12/branches/with-revived-tarball/debian/control	2010-11-09 19:49:27 UTC (rev 2127)
+++ zope2.12/branches/with-revived-tarball/debian/control	2010-11-09 21:40:27 UTC (rev 2128)
@@ -3,9 +3,8 @@
 Priority: optional
 Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers at lists.alioth.debian.org>
 Uploaders: Fabio Tranchitella <kobold at debian.org>, Jonas Meurer <mejo at debian.org>, Michael Mulich (pumazi) <michael.mulich at gmail.com>
-Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.40), python-support, python, python-setuptools, python-pkg-resources, python-virtualenv, zope-debhelper (>= 0.3.12)
+Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.40), python-support, python, python-setuptools, python-pkg-resources, zope-debhelper (>= 0.3.12)
 Standards-Version: 3.9.1
-XS-Python-Version: 2.6
 Homepage: http://www.zope.org/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-zope/zope2.12/branches/with-revived-tarball
 Vcs-Svn: svn://svn.debian.org/pkg-zope/zope2.12/branches/with-revived-tarball
@@ -13,10 +12,9 @@
 Package: zope2.12
 Architecture: any
 Pre-Depends: zope-common (>= 0.5.49)
-Depends: python, python-zope.traversing, python-zope.testbrowser, python-zope.testing, python-tz, python-docutils, ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, debconf | debconf-2.0
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, debconf | debconf-2.0
 Provides: zope
 Suggests: python-unit, zope-book, zope-devguide
-XB-Python-Version: 2.6
 Description: Open Source Web Application Server
  Zope is an open source web application server primarily written in
  the Python programming language. It features a transactional object

Modified: zope2.12/branches/with-revived-tarball/debian/patches/debian-changes-2.12.10-1
===================================================================
--- zope2.12/branches/with-revived-tarball/debian/patches/debian-changes-2.12.10-1	2010-11-09 19:49:27 UTC (rev 2127)
+++ zope2.12/branches/with-revived-tarball/debian/patches/debian-changes-2.12.10-1	2010-11-09 21:40:27 UTC (rev 2128)
@@ -161,3 +161,257 @@
 @@ -1,2 +1 @@
  docutils
 -roman
+--- zope2.12-2.12.10.orig/source/Zope2/build/lib.linux-i686-2.6/webdav/davcmds.py
++++ zope2.12-2.12.10/source/Zope2/build/lib.linux-i686-2.6/webdav/davcmds.py
+@@ -173,7 +173,7 @@ class PropFind:
+                     if dflag:
+                         ob._p_deactivate()
+                 elif hasattr(ob, '__dav_resource__'):
+-                    uri = urljoin(url, absattr(ob.getId()))
++                    uri = urljoin(url, quote(absattr(ob.getId())))
+                     depth = depth=='infinity' and depth or 0
+                     self.apply(ob, uri, depth, result, top=0)
+                     if dflag:
+--- zope2.12-2.12.10.orig/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/copyzopeskel.py
++++ zope2.12-2.12.10/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/copyzopeskel.py
+@@ -1,3 +1,5 @@
++#!/usr/bin/env python
++
+ ##############################################################################
+ #
+ # Copyright (c) 2002 Zope Foundation and Contributors.
+@@ -162,7 +164,7 @@ def main():
+ 
+     copyskel(sourcedir, targetdir, uid, gid, **replacements)
+ 
+-def copyskel(sourcedir, targetdir, uid, gid, **replacements):
++def copyskel(sourcedir, targetdir, uid, gid, layout='zope', **replacements):
+     """ This is an independent function because we'd like to
+     import and call it from mkzopeinstance """
+     # Create the top of the instance:
+@@ -174,13 +176,22 @@ def copyskel(sourcedir, targetdir, uid,
+     # with it.
+     pwd = os.getcwd()
+     os.chdir(sourcedir)
+-    try:
++    ##try:
++    if True:
+         try:
+             os.path.walk(os.curdir, copydir,
+                          (targetdir, replacements, uid, gid))
++            if layout == 'fhs':
++                movedir(os.path.join(targetdir, 'etc'),
++                        os.path.join('/etc/zope2.12', os.path.basename(targetdir)),
++                        uid, gid)
++                movedir(os.path.join(targetdir, 'log'),
++                        os.path.join('/var/log/zope2.12', os.path.basename(targetdir)),
++                        uid, gid)
+         finally:
+             os.chdir(pwd)
+-    except (IOError, OSError), msg:
++    ##except (IOError, OSError), msg:
++    else:
+         print >>sys.stderr, msg
+         sys.exit(1)
+ 
+@@ -240,6 +251,39 @@ def copyin(src, dst, replacements, uid,
+     if uid is not None:
+         os.chown(dst, uid, gid)
+ 
++def movedir(sourcedir, targetdir, uid, gid):
++    try:
++        os.makedirs(os.path.dirname(targetdir))
++        if uid is not None:
++            os.chown(os.path.dirname(targetdir), uid, gid)
++    except:
++        pass
++    if not os.path.isdir(targetdir):
++        shutil.move(sourcedir, targetdir)
++    elif os.path.islink(sourcedir):
++        return
++    else:
++        import glob
++        for src in glob.glob(sourcedir + '/*') + glob.glob(targetdir + '/.*'):
++            base = os.path.basename(src)
++            target = os.path.join(targetdir, base)
++            if os.path.exists(target):
++                backup = target + '.old'
++                if os.path.exists(backup):
++                    if os.path.isdir(backup):
++                        shutil.rmtree(backup, ignore_errors=True)
++                    else:
++                        os.unlink(backup)
++                os.rename(target, backup)
++            shutil.move(src, target)
++        shutil.rmtree(sourcedir, ignore_errors=True)
++    if uid is not None:
++        os.chown(targetdir, uid, gid)
++        for root, dirs, files in os.walk(targetdir):
++            for name in files + dirs:
++                os.chown(os.path.join(root, name), uid, gid)
++    os.symlink(targetdir, sourcedir)
++
+ def usage(stream, msg=None):
+     if msg:
+         print >>stream, msg
+--- zope2.12-2.12.10.orig/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/mkzopeinstance.py
++++ zope2.12-2.12.10/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/mkzopeinstance.py
+@@ -1,3 +1,5 @@
++#!/usr/bin/env python
++
+ ##############################################################################
+ #
+ # Copyright (c) 2002 Zope Foundation and Contributors.
+@@ -21,11 +23,16 @@ Options:
+ -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
+ -p/--python -- the Python interpreter to use
++-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 sys
+@@ -34,8 +41,8 @@ import copyzopeskel
+ def main():
+     try:
+         opts, args = getopt.getopt(sys.argv[1:],
+-            "hu:d:s:p:",
+-            ["help", "user=", "dir=", "skelsrc=", "python="]
++            "hu:d:s:p:l:",
++            ["help", "user=", "dir=", "skelsrc=", "python=", "layout=", "service-user=", "service-port=", "zeo-server="]
+             )
+     except getopt.GetoptError, msg:
+         usage(sys.stderr, msg)
+@@ -47,6 +54,10 @@ def main():
+     skeltarget = None
+     skelsrc = None
+     python = None
++    layout = 'zope'
++    srvuser = 'zope:zope'
++    srvport = 9673
++    zeoserver = None
+ 
+     if check_buildout(script_path):
+         python = os.path.join(script_path, 'zopepy')
+@@ -78,6 +89,36 @@ def main():
+                 usage(sys.stderr, "user must be specified as name:password")
+                 sys.exit(2)
+             user, password = arg.split(":", 1)
++        if opt in ("--layout",):
++            if not arg or arg not in ('fhs', 'zope'):
++                usage(sys.stderr, "layout to use while copying the skeleton files (`fhs' or `zope')")
++                sys.exit(2)
++            layout = arg
++        if opt in ("--service-user",):
++            if not arg:
++                usage(sys.stderr, "service user must not be empty")
++                sys.exit(2)
++            if not ":" in arg:
++                usage(sys.stderr, "service user must be specified as user:group")
++                sys.exit(2)
++            srvuser = arg
++        if opt in ("--service-port",):
++            if not arg:
++                usage(sys.stderr, "service port must not be empty")
++                sys.exit(2)
++            try:
++                srvport = int(arg)
++            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.
+@@ -129,12 +170,28 @@ def main():
+         "INSTANCE_HOME": instancehome,
+         "ZOPE_SCRIPTS": script_path,
+         "ZOPE2PATH": zope2path,
++        "ZOPE_USER": srvuser.split(":")[0],
++        "ZOPE_HTTPPORT": str(srvport),
++        "ZEO_SERVER": zeoserver or 'localhost:8100',
+         }
+ 
+-    copyzopeskel.copyskel(skelsrc, skeltarget, None, None, **kw)
++    import pwd, grp
++    uid = pwd.getpwnam(srvuser.split(":")[0])
++    if uid: uid = uid[2]
++    gid = grp.getgrnam(srvuser.split(":")[1])
++    if gid: gid = gid[2]
++
++    copyzopeskel.copyskel(skelsrc, skeltarget, uid, gid, layout, **kw)
+     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
+--- zope2.12-2.12.10.orig/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/skel/etc/zope.conf.in
++++ zope2.12-2.12.10/source/Zope2/build/lib.linux-i686-2.6/Zope2/utilities/skel/etc/zope.conf.in
+@@ -23,6 +23,9 @@
+ # ZConfig "defines" used for later textual substitution
+ 
+ %define INSTANCE <<INSTANCE_HOME>>
++%define HTTPPORT <<ZOPE_HTTPPORT>>
++%define ZOPE_USER <<ZOPE_USER>>
++%define ZEO_SERVER <<ZEO_SERVER>>
+ 
+ # Directive: instancehome
+ #
+@@ -146,7 +149,7 @@ instancehome $INSTANCE
+ # Example:
+ #
+ #    effective-user chrism
+-
++effective-user $ZOPE_USER
+ 
+ # Directive: enable-product-installation
+ #
+@@ -964,7 +967,7 @@ instancehome $INSTANCE
+ 
+ <http-server>
+   # valid keys are "address" and "force-connection-close"
+-  address 8080
++  address $HTTPPORT
+ 
+   # force-connection-close on
+   #
+@@ -1065,7 +1068,7 @@ instancehome $INSTANCE
+ #   <zeoclient>
+ #     # See .../ZODB/component.xml for directives (sectiontype
+ #     # "zeoclient").
+-#     server localhost:8100
++#     server $ZEO_SERVER
+ #     storage 1
+ #     name zeostorage
+ #     var $INSTANCE/var
+--- zope2.12-2.12.10.orig/source/ZODB3/build/lib.linux-i686-2.6/ZODB/scripts/analyze.py
++++ zope2.12-2.12.10/source/ZODB3/build/lib.linux-i686-2.6/ZODB/scripts/analyze.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2.4
++#!/usr/bin/env python
+ 
+ # Based on a transaction analyzer by Matt Kromer.
+ 

Modified: zope2.12/branches/with-revived-tarball/debian/patches/series
===================================================================
--- zope2.12/branches/with-revived-tarball/debian/patches/series	2010-11-09 19:49:27 UTC (rev 2127)
+++ zope2.12/branches/with-revived-tarball/debian/patches/series	2010-11-09 21:40:27 UTC (rev 2128)
@@ -1,3 +1,4 @@
 debian-changes-2.12.10-1
 webdav.patch
 deb-zopeconf.patch
+zodb-script-fix.patch

Added: zope2.12/branches/with-revived-tarball/debian/patches/zodb-script-fix.patch
===================================================================
--- zope2.12/branches/with-revived-tarball/debian/patches/zodb-script-fix.patch	                        (rev 0)
+++ zope2.12/branches/with-revived-tarball/debian/patches/zodb-script-fix.patch	2010-11-09 21:40:27 UTC (rev 2128)
@@ -0,0 +1,9 @@
+Removing the python2.4 limitation.
+--- a/source/ZODB3/src/ZODB/scripts/analyze.py
++++ b/source/ZODB3/src/ZODB/scripts/analyze.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2.4
++#!/usr/bin/env python
+ 
+ # Based on a transaction analyzer by Matt Kromer.
+ 




More information about the pkg-zope-developers mailing list