r1670 - in zope2.12/trunk/debian (11 files)

Jonas Meurer mejo at alioth.debian.org
Mon Jul 6 00:30:43 UTC 2009


    Date: Monday, July 6, 2009 @ 00:30:42
  Author: mejo
Revision: 1670

migrate from dpatch to quilt patch management

Added:
  zope2.12/trunk/debian/patches/01_webdav.patch
    (from rev 1667, zope2.12/trunk/debian/patches/webdav.dpatch)
  zope2.12/trunk/debian/patches/02_deb-zopeconf.patch
    (from rev 1667, zope2.12/trunk/debian/patches/deb-zopeconf.dpatch)
  zope2.12/trunk/debian/patches/series
    (from rev 1655, zope2.12/trunk/debian/patches/00list)
Modified:
  zope2.12/trunk/debian/README.source
  zope2.12/trunk/debian/changelog
  zope2.12/trunk/debian/control
  zope2.12/trunk/debian/rules
Deleted:
  zope2.12/trunk/debian/patches/00list
  zope2.12/trunk/debian/patches/DPATCH
  zope2.12/trunk/debian/patches/deb-zopeconf.dpatch
  zope2.12/trunk/debian/patches/webdav.dpatch

Modified: zope2.12/trunk/debian/README.source
===================================================================
--- zope2.12/trunk/debian/README.source	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/README.source	2009-07-06 00:30:42 UTC (rev 1670)
@@ -1,2 +1,2 @@
-This package uses dpatch for its patch management, see
-/usr/share/doc/dpatch/README.source.gz if you are unfamiliar with it.
+This package uses quilt for its patch management, see
+/usr/share/doc/quilt/README.source if you are unfamiliar with it.

Modified: zope2.12/trunk/debian/changelog
===================================================================
--- zope2.12/trunk/debian/changelog	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/changelog	2009-07-06 00:30:42 UTC (rev 1670)
@@ -6,8 +6,9 @@
   * Bump python version to 2.5.
   * Remove useless tarball handling from debian/rules, distribute zope
     upstream tarball directly.
+  * Migrate to quilt patch system from dpatch.
 
- -- Jonas Meurer <mejo at debian.org>  Mon, 06 Jul 2009 00:31:02 +0200
+ -- Jonas Meurer <mejo at debian.org>  Mon, 06 Jul 2009 02:27:13 +0200
 
 zope2.11 (2.11.3-1) unstable; urgency=low
 

Modified: zope2.12/trunk/debian/control
===================================================================
--- zope2.12/trunk/debian/control	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/control	2009-07-06 00:30:42 UTC (rev 1670)
@@ -3,7 +3,7 @@
 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>, Bernd Zeimetz <bzed at debian.org>
-Build-Depends: debhelper (>= 6.0.0), python-support (>= 0.5.3), python2.5-dev, python2.5, python, zope-debhelper (>= 0.3.6), lsb-release, dpatch
+Build-Depends: debhelper (>= 6.0.0), python-support (>= 0.5.3), python2.5-dev, python2.5, python, zope-debhelper (>= 0.3.6), lsb-release, quilt (>= 0.40)
 Standards-Version: 3.8.2
 XS-Python-Version: 2.5
 Homepage: http://www.zope.org/
@@ -16,7 +16,7 @@
 Depends: python2.5, python-tz, lsb-base, ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, debconf | debconf-2.0
 Provides: zope
 Suggests: python-unit, zope-book, zope-devguide
-XB-Python-Version: 2.4
+XB-Python-Version: 2.5
 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

Deleted: zope2.12/trunk/debian/patches/00list
===================================================================
--- zope2.12/trunk/debian/patches/00list	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/patches/00list	2009-07-06 00:30:42 UTC (rev 1670)
@@ -1,2 +0,0 @@
-deb-zopeconf
-webdav

Copied: zope2.12/trunk/debian/patches/01_webdav.patch (from rev 1667, zope2.12/trunk/debian/patches/webdav.dpatch)
===================================================================
--- zope2.12/trunk/debian/patches/01_webdav.patch	                        (rev 0)
+++ zope2.12/trunk/debian/patches/01_webdav.patch	2009-07-06 00:30:42 UTC (rev 1670)
@@ -0,0 +1,15 @@
+## 01_webdav.patch
+##
+## Fix quoting for webdav resources
+
+--- src/webdav/davcmds.py
++++ src/webdav/davcmds.py
+@@ -173,7 +173,7 @@
+                     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:

Copied: zope2.12/trunk/debian/patches/02_deb-zopeconf.patch (from rev 1667, zope2.12/trunk/debian/patches/deb-zopeconf.dpatch)
===================================================================
--- zope2.12/trunk/debian/patches/02_deb-zopeconf.patch	                        (rev 0)
+++ zope2.12/trunk/debian/patches/02_deb-zopeconf.patch	2009-07-06 00:30:42 UTC (rev 1670)
@@ -0,0 +1,239 @@
+## 02_deb-zopeconf.patch
+## by Fabio Tranchitella <kobold at debian.org> and Jonas Meurer <mejo at debian.org>
+##
+## Debian specific configuration;
+
+--- src/Zope2/utilities/skel/etc/zope.conf.in
++++ src/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,6 +149,7 @@
+ # Example:
+ #
+ #    effective-user chrism
++effective-user $ZOPE_USER
+ 
+ 
+ # Directive: enable-product-installation
+@@ -952,7 +956,7 @@
+ 
+ <http-server>
+   # valid keys are "address" and "force-connection-close"
+-  address 8080
++  address $HTTPPORT
+ 
+   # force-connection-close on
+   #
+@@ -1061,7 +1065,7 @@
+ #   <zeoclient>
+ #     # See .../ZODB/component.xml for directives (sectiontype
+ #     # "zeoclient").
+-#     server localhost:8100
++#     server $ZEO_SERVER
+ #     storage 1
+ #     name zeostorage
+ #     var $INSTANCE/var
+--- src/Zope2/utilities/copyzopeskel.py
++++ src/ZOpe2/utilities/copyzopeskel.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2.4
++#!/usr/bin/env python2.5
+ 
+ ##############################################################################
+ #
+@@ -164,7 +164,7 @@
+ 
+     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:
+@@ -176,13 +176,22 @@
+     # 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.11', os.path.basename(targetdir)),
++                        uid, gid)
++                movedir(os.path.join(targetdir, 'log'),
++                        os.path.join('/var/log/zope2.11', 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)
+ 
+@@ -242,6 +251,39 @@
+     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
+--- src/Zope2/utilities/mkzopeinstance.py
++++ src/Zope2/utilities/mkzopeinstance.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2.4
++#!/usr/bin/env python2.5
+ 
+ ##############################################################################
+ #
+@@ -23,11 +23,16 @@
+ -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
+@@ -36,8 +41,8 @@
+ 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)
+@@ -49,6 +54,10 @@
+     skeltarget = None
+     skelsrc = None
+     python = None
++    layout = "zope"
++    srvuser = "zope:zope"
++    srvport = 9673
++    zeoserver = None
+ 
+     if check_buildout():
+         python = os.path.abspath('bin/zopepy')
+@@ -80,6 +89,36 @@
+                 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.
+@@ -130,12 +169,28 @@
+         "PYTHONW":PYTHONW,
+         "INSTANCE_HOME": instancehome,
+         "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

Deleted: zope2.12/trunk/debian/patches/DPATCH
===================================================================
--- zope2.12/trunk/debian/patches/DPATCH	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/patches/DPATCH	2009-07-06 00:30:42 UTC (rev 1670)
@@ -1,16 +0,0 @@
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0

Deleted: zope2.12/trunk/debian/patches/deb-zopeconf.dpatch
===================================================================
--- zope2.12/trunk/debian/patches/deb-zopeconf.dpatch	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/patches/deb-zopeconf.dpatch	2009-07-06 00:30:42 UTC (rev 1670)
@@ -1,243 +0,0 @@
-#! /bin/sh -e
-##
-## DP: Debian specific configuration;
-## DP: Author: Fabio Tranchitella
-## DP: Updated: Jonas Meurer
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
---- src/Zope2/utilities/skel/etc/zope.conf.in
-+++ src/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,6 +149,7 @@
- # Example:
- #
- #    effective-user chrism
-+effective-user $ZOPE_USER
- 
- 
- # Directive: enable-product-installation
-@@ -952,7 +956,7 @@
- 
- <http-server>
-   # valid keys are "address" and "force-connection-close"
--  address 8080
-+  address $HTTPPORT
- 
-   # force-connection-close on
-   #
-@@ -1061,7 +1065,7 @@
- #   <zeoclient>
- #     # See .../ZODB/component.xml for directives (sectiontype
- #     # "zeoclient").
--#     server localhost:8100
-+#     server $ZEO_SERVER
- #     storage 1
- #     name zeostorage
- #     var $INSTANCE/var
---- src/Zope2/utilities/copyzopeskel.py	2009-05-26 16:20:10.000000000 +0200
-+++ copyzopeskel.py	2009-07-06 01:58:45.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.4
-+#!/usr/bin/env python2.5
- 
- ##############################################################################
- #
-@@ -164,7 +164,7 @@
- 
-     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:
-@@ -176,13 +176,22 @@
-     # 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.11', os.path.basename(targetdir)),
-+                        uid, gid)
-+                movedir(os.path.join(targetdir, 'log'),
-+                        os.path.join('/var/log/zope2.11', 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)
- 
-@@ -242,6 +251,39 @@
-     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
---- src/Zope2/utilities/mkzopeinstance.py	2009-05-26 16:20:10.000000000 +0200
-+++ mkzopeinstance.py	2009-07-06 02:04:45.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.4
-+#!/usr/bin/env python2.5
- 
- ##############################################################################
- #
-@@ -23,11 +23,16 @@
- -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
-@@ -36,8 +41,8 @@
- 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)
-@@ -49,6 +54,10 @@
-     skeltarget = None
-     skelsrc = None
-     python = None
-+    layout = "zope"
-+    srvuser = "zope:zope"
-+    srvport = 9673
-+    zeoserver = None
- 
-     if check_buildout():
-         python = os.path.abspath('bin/zopepy')
-@@ -80,6 +89,36 @@
-                 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.
-@@ -130,12 +169,28 @@
-         "PYTHONW":PYTHONW,
-         "INSTANCE_HOME": instancehome,
-         "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

Copied: zope2.12/trunk/debian/patches/series (from rev 1655, zope2.12/trunk/debian/patches/00list)
===================================================================
--- zope2.12/trunk/debian/patches/series	                        (rev 0)
+++ zope2.12/trunk/debian/patches/series	2009-07-06 00:30:42 UTC (rev 1670)
@@ -0,0 +1,2 @@
+01_webdav.patch
+02_deb-zopeconf.patch

Deleted: zope2.12/trunk/debian/patches/webdav.dpatch
===================================================================
--- zope2.12/trunk/debian/patches/webdav.dpatch	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/patches/webdav.dpatch	2009-07-06 00:30:42 UTC (rev 1670)
@@ -1,18 +0,0 @@
-#! /bin/sh -e
-##
-## DP: Fix quoting for webdav resources
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
---- src/webdav/davcmds.py
-+++ src/webdav/davcmds.py
-@@ -173,7 +173,7 @@
-                     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:

Modified: zope2.12/trunk/debian/rules
===================================================================
--- zope2.12/trunk/debian/rules	2009-07-06 00:17:53 UTC (rev 1669)
+++ zope2.12/trunk/debian/rules	2009-07-06 00:30:42 UTC (rev 1670)
@@ -34,14 +34,14 @@
 # 	MAKEFLAGS += -j$(NUMJOBS)
 # endif
 
-# Include dpatch stuff.
-include /usr/share/dpatch/dpatch.make
+# Include quilt stuff.
+include /usr/share/quilt/quilt.make
 
 ZVER	  := 2.12
 ZOPE	  := zope$(ZVER)
 PACKAGE	  := zope$(ZVER)
 DEBIAN    := $(CURDIR)/debian/$(PACKAGE)
-PYTHONVER := 2.6
+PYTHONVER := 2.5
 PYTHONBIN := /usr/bin/python$(PYTHONVER)
 
 distribution := $(shell lsb_release -is)
@@ -49,32 +49,40 @@
 clean: unpatch
 	dh_testdir
 	dh_testroot
+	if test -f Makefile; then $(MAKE) clean; fi
 	for f in debian/*.in; do \
 	  generated=`echo $$f | sed 's,.in$$,,;s,ZVER,$(ZVER),'`; \
 	  rm -f $$generated $$generated.tmp; \
 	done
-	rm -f -r build-base $(ZBASE) z
-	dh_clean build-indep-stamp build-arch-stamp
+	dh_clean configure-stamp build-indep-stamp build-arch-stamp
 
+configure: configure-stamp
+configure-stamp: $(QUILT_STAMPFN)
+	dh_testdir
+	CFLAGS="$(CFLAGS)" ./configure $(confflags) \
+		--prefix=/usr/lib/$(ZOPE) \
+		--with-python=$(PYTHONBIN)
+	touch $@
+
 build: build-arch build-indep
 
 build-arch: build-arch-stamp
-build-arch-stamp: patch-stamp
-	CFLAGS="$(CFLAGS)" ./configure \
-		--prefix=$(DEBIAN)/usr/lib/$(ZOPE) \
-		--with-python=$(PYTHONBIN)
-	make
+build-arch-stamp: configure-stamp
+	dh_testdir
+	$(MAKE)
 	touch $@
 
 build-indep: build-indep-stamp
 build-indep-stamp:
+	dh_testdir
 	touch $@
 
 install: install-indep install-arch
 
-install-indep:
+install-indep: build-arch-stamp
 	dh_testdir
 	dh_testroot
+	dh_prep
 	dh_installzopeinstance -pzope$(ZVER)-sandbox sandbox
 	dh_installdocs -i
 	dh_install -i
@@ -83,10 +91,10 @@
        debian/zope$(ZVER)-sandbox/usr/share/doc/zope$(ZVER)-sandbox/README.Ubuntu
 endif
 
-install-arch:
+install-arch: build-indep-stamp
 	dh_testdir
 	dh_testroot
-	dh_clean -k -s
+	dh_prep -s
 	for f in debian/*.in; do \
 	  generated=`echo $$f | sed 's,.in$$,,;s,ZVER,$(ZVER),'`; \
 	  sed 's, at ZVER@,$(ZVER),g' $$f > $$generated.tmp; \
@@ -99,7 +107,7 @@
 	dh_installdirs -s
 
 	# Install Zope and remove *.pyc
-	make install
+	$(MAKE) install
 	find $(DEBIAN) -name '*.pyc' | xargs -r rm -r
 
 	# FHS enforcement
@@ -112,9 +120,6 @@
 
 	echo "Zope$(ZVER) logs placeholder" > $(DEBIAN)/var/log/$(ZOPE)/.placeholder
 
-	mkdir -p  $(DEBIAN)/usr/share/doc/
-	#dh_link -p$(ZOPE) /usr/share/doc/$(ZOPE) /usr/lib/$(ZOPE)/doc
-
 	# Fix python interpreter where needed
 	for i in `find $(DEBIAN) -type f`; do \
 	  if sed '1s,#!.*python[^ ]*\(.*\),#!$(PYTHONBIN)\1,' \
@@ -135,11 +140,6 @@
 	# Remove zope documentation, as it is redundant
 	rm -fr $(DEBIAN)/usr/lib/$(ZOPE)/doc
 	
-	# Remove tests for python2.5 and python2.6, we don't use it anyway
-	#rm $(DEBIAN)/usr/lib/$(ZOPE)/lib/python/RestrictedPython/tests/before_and_after25.py \
-	#   $(DEBIAN)/usr/lib/$(ZOPE)/lib/python/RestrictedPython/tests/before_and_after26.py \
-	#   $(DEBIAN)/usr/lib/$(ZOPE)/lib/python/RestrictedPython/tests/security_in_syntax26.py
-
 	# Fix permissions for files
 	chmod 755 $(DEBIAN)/usr/lib/$(ZOPE)/lib/python/DocumentTemplate/release.sh \
 	          $(DEBIAN)/usr/lib/$(ZOPE)/lib/python/ZPublisher/Client.py \
@@ -171,8 +171,8 @@
 binary-common:
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs -k z/doc/CHANGES.txt
-	dh_installdocs -X INSTALL.txt z/doc/*
+	dh_installchangelogs -k doc/CHANGES.txt
+	dh_installdocs -X INSTALL.txt doc/*
 	dh_installdocs
 	dh_installlogrotate
 	dh_installdebconf
@@ -197,4 +197,4 @@
 	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
 
 binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
+.PHONY: configure build clean install install-indep install-arch binary-common binary-indep binary-arch binary patch unpatch




More information about the pkg-zope-commits mailing list