Package: zope2.10
Version: 2.10.4-2
Severity: important

debian/patches/deb-zopeconf.dpatch adds several command line options
and arguments but handles thos options inappropriately in the patches
to /usr/lib/zope2.10/bin/mkzopeinstance.py.  For example:

+        if opt in ("--service-user"):

Since ("--service-user") is a string and not a tuple, if opt is '-u'
then this test is true and the -u argument which should only set the
*in zope* user ends up specifying a system user.  It should be:

+        if opt in ("--service-user",):

Attached is a diff against debian/patches/deb-zopeconf.dpatch to this
effect.

Ross Patterson

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages zope2.10 depends on:
ii  debconf [debconf-2.0]         1.5.14     Debian configuration management sy
ii  libc6                         2.6.1-1+b1 GNU C Library: Shared libraries
ii  lsb-base                      3.1-24     Linux Standard Base 3.1 init scrip
ii  python2.4                     2.4.4-6    An interactive high-level object-o
ii  zope-common                   0.5.37     common settings and scripts for zo

zope2.10 recommends no packages.

-- no debconf information

diff -u /usr/src/zope2.10-2.10.4/debian/patches/deb-zopeconf.dpatch\~ /usr/src/zope2.10-2.10.4/debian/patches/deb-zopeconf.dpatch
--- /usr/src/zope2.10-2.10.4/debian/patches/deb-zopeconf.dpatch~	2007-08-30 10:25:45.000000000 -0700
+++ /usr/src/zope2.10-2.10.4/debian/patches/deb-zopeconf.dpatch	2007-08-30 10:26:27.000000000 -0700
@@ -234,12 +234,12 @@
                  usage(sys.stderr, "user must be specified as name:password")
                  sys.exit(2)
              user, password = arg.split(":", 1)
-+        if opt in ("--layout"):
++        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 opt in ("--service-user",):
 +            if not arg:
 +                usage(sys.stderr, "service user must not be empty")
 +                sys.exit(2)
@@ -247,7 +247,7 @@
 +                usage(sys.stderr, "service user must be specified as user:group")
 +                sys.exit(2)
 +            srvuser = arg
-+        if opt in ("--service-port"):
++        if opt in ("--service-port",):
 +            if not arg:
 +                usage(sys.stderr, "service port must not be empty")
 +                sys.exit(2)
@@ -256,7 +256,7 @@
 +            except ValueError:
 +                usage(sys.stderr, "service port must be an integer")
 +                sys.exit(2)
-+        if opt in ("--zeo-server"):
++        if opt in ("--zeo-server",):
 +            if not arg:
 +                usage(sys.stderr, "zeo server must not be empty")
 +                sys.exit(2)

Diff finished.  Thu Aug 30 10:52:15 2007

Reply via email to