--- zope-cmfplone-2.5.1.orig/RegistrationTool.py
+++ zope-cmfplone-2.5.1/RegistrationTool.py
@@ -11,6 +11,9 @@
 from Products.CMFPlone.PloneBaseTool import PloneBaseTool
 from Products.CMFPlone.PloneTool import EMAIL_RE
 
+from Products.PluggableAuthService.interfaces.authservice \
+        import IPluggableAuthService
+
 # - remove '1', 'l', and 'I' to avoid confusion
 # - remove '0', 'O', and 'Q' to avoid confusion
 # - remove vowels to avoid spelling words
@@ -92,6 +95,28 @@
             return 0
         return 1
 
+    def isMemberIdAllowed(self, id):
+        if len(id) < 1 or id == 'Anonymous User':
+            return 0
+        if not self._ALLOWED_MEMBER_ID_PATTERN.match( id ):
+            return 0
+
+        pas = getToolByName(self, 'acl_users')
+        if IPluggableAuthService.providedBy(pas):
+            results = pas.searchPrincipals(id=id)
+            if results:
+                return 0
+        else:
+            membership = getToolByName(self, 'portal_membership')
+            if membership.getMemberById(id) is not None:
+                return 0
+            groups = getToolByName(self, 'portal_groups')
+            if groups.getGroupById(id) is not None:
+                return 0
+
+        return 1
+
+
     security.declarePublic( 'testPropertiesValidity' )
     def testPropertiesValidity(self, props, member=None):
 
--- zope-cmfplone-2.5.1.orig/statusmessages.py
+++ zope-cmfplone-2.5.1/statusmessages.py
@@ -0,0 +1,122 @@
+from base64 import encodestring, decodestring
+import binascii
+import struct
+
+from Products.statusmessages.message import Message
+
+def _encodeCookieValue(text, type, old=None):
+    """Encodes text and type to a list of Messages. If there is already some old
+       existing list, add the new Message at the end but don't add duplicate
+       messages.
+    """
+    results = []
+    message = Message(text, type=type)
+
+    if old is not None:
+        results = _decodeCookieValue(old)
+    if not message in results:
+        results.append(message)
+
+    messages = ''.join([r.encode() for r in results])
+    return encodestring(messages).rstrip()
+
+def _decodeCookieValue(string):
+    """Decode a cookie value to a list of Messages.
+    """
+    results = []
+    # Return nothing if the cookie is marked as deleted
+    if string == 'deleted':
+        return results
+    # Try to decode the cookie value
+    try:
+        value = decodestring(string)
+        while len(value) > 1: # at least 2 bytes of data
+            message, value = decode(value)
+            if message is not None:
+                results.append(message)
+    except (binascii.Error, UnicodeEncodeError):
+        logger.log(logging.ERROR, '%s \n%s',
+                   'Unexpected value in statusmessages cookie',
+                   sys.exc_value
+                   )
+        return []
+
+    return results
+
+def _utf8(value):
+    if isinstance(value, unicode):
+        return value.encode('utf-8')
+    elif isinstance(value, str):
+        return value
+    return ''
+
+def _unicode(value):
+    return unicode(value, 'utf-8', 'ignore')
+
+def encode(self):
+    """
+    Encode to a cookie friendly format.
+    
+    The format consists of a two bytes length header of 11 bits for the
+    message length and 5 bits for the type length followed by two values.
+    """
+    message = _utf8(self.message)[:0x3FF] # we can store 2^11 bytes
+    type = _utf8(self.type)[:0x1F]        # we can store 2^5 bytes
+    size = (len(message) << 5) + (len(type) & 31) # pack into 16 bits
+    
+    return struct.pack('!H%ds%ds' % (len(message), len(type)), 
+                       size, message, type)
+
+def decode(value):
+    """Decode messages from a cookie
+    
+    We return the decoded message object, and the remainder of the cookie
+    value (it can contain further messages).
+    
+    We expect at least 2 bytes (size information).
+    """
+
+    if len(value) > 2:
+        size = struct.unpack('!H', value[:2])[0]
+        msize, tsize = (size >> 5, size & 31)
+        message = Message(_unicode(value[2:msize+2]),
+                          _unicode(value[msize+2:msize+tsize+2]))
+        return message, value[msize+tsize+2:]
+    return None, ''
+    
+from Products.statusmessages import adapter
+from Products.statusmessages import message
+Message.encode = encode
+message.decode = decode
+adapter._encodeCookieValue = _encodeCookieValue
+adapter._decodeCookieValue = _decodeCookieValue
+
+# Plone 2.5 specific code
+from Products.CMFPlone.utils import getFSVersionTuple
+if getFSVersionTuple()[:2] == (2, 5):
+    HAS_GTS = True
+    try:
+        from Products.PageTemplates.GlobalTranslationService import \
+            getGlobalTranslationService
+    except ImportError:
+        HAS_GTS = False
+
+    if HAS_GTS:
+        original = adapter.StatusMessage.addStatusMessage
+        def addStatusMessage(self, text, type=''):
+            """Add a status message.
+            """
+            gts = getGlobalTranslationService()
+            parents = getattr(self.context, 'PARENTS', None)
+            aq_context = parents is not None and parents[0] or None
+            text = gts.translate(None, text, context=aq_context)
+            original(self, text, type)
+
+        def __eq__(self, other):
+             if not isinstance(other, Message):
+                 return False
+             if self.message == other.message and self.type == other.type:
+                 return True
+             return False
+             
+        Message.__eq__ = __eq__
--- zope-cmfplone-2.5.1.orig/utils.py
+++ zope-cmfplone-2.5.1/utils.py
@@ -20,7 +20,6 @@
 from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.UnicodeNormalizer import normalizeUnicode
 from Products.CMFPlone.interfaces.Translatable import ITranslatable
-from Products.CMFPlone import PloneMessageFactory as _
 import transaction
 
 # Canonical way to get at CMFPlone directory
@@ -202,6 +201,7 @@
     # The default is an extra fancy unicode elipsis
     empty = unicode('\x5b\xc2\xb7\xc2\xb7\xc2\xb7\x5d', 'utf-8', 'ignore')
     if translated:
+        from Products.CMFPlone import PloneMessageFactory as _
         empty = _(u'title_unset', default=empty)
     return empty
 
--- zope-cmfplone-2.5.1.orig/__init__.py
+++ zope-cmfplone-2.5.1/__init__.py
@@ -1,3 +1,6 @@
+# CVE-2007-5741 hotfix
+import statusmessages
+
 import sys
 import os
 import Globals
--- zope-cmfplone-2.5.1.orig/debian/watch
+++ zope-cmfplone-2.5.1/debian/watch
@@ -0,0 +1,4 @@
+# watch control file for uscan
+version=2
+# Site                                      Version Script
+http://heanet.dl.sourceforge.net/sourceforge/plone/PloneBase-([^rRcC]*)\.tar\.gz	debian uupdate
--- zope-cmfplone-2.5.1.orig/debian/changelog
+++ zope-cmfplone-2.5.1/debian/changelog
@@ -0,0 +1,474 @@
+zope-cmfplone (2.5.1-4etch2) stable-security; urgency=high
+
+  * utils.py: fixed a bug introduced with the security upload, delay the
+    import of Products.CMFPlone otherwise statusmessages.py breaks.
+    (Closes: #450767)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sat, 10 Nov 2007 13:48:48 +0100
+
+zope-cmfplone (2.5.1-4etch1) stable-security; urgency=high
+
+  * statusmessage.py, __init__.py: applied fix for CVE-2007-5741:
+    unsafe data interpreted as pickles. (Closes: #449523)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 08 Nov 2007 13:50:47 +0100
+
+zope-cmfplone (2.5.1-4) unstable; urgency=medium
+
+  * debian/control: build-depends on zope-debhelper >= 0.3.6, which fixes a
+    few important bugs in the maintainer scripts for the plone-site package.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 18 Jan 2007 10:52:34 +0100
+
+zope-cmfplone (2.5.1-3) unstable; urgency=high
+
+  * Security issue CVE 2006-4249, applied upstream patch:
+    http://plone.org/about/security/advisories/cve-2006-4249
+    (Closes: #401796)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Mon, 18 Dec 2006 16:29:07 +0100
+
+zope-cmfplone (2.5.1-2) unstable; urgency=medium
+
+  * Depend on zope-debhelper (>= 0.3.3) to fix a bashism in the generated
+    config script for plone-site.
+  * Add XS-Vcs-Svn field to control file.
+
+ -- Jérémy Bobbio <jeremy.bobbio@etu.upmc.fr>  Sat, 18 Nov 2006 11:46:28 +0100
+
+zope-cmfplone (2.5.1-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #388289)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun,  8 Oct 2006 15:20:14 +0200
+
+zope-cmfplone (2.5-1) unstable; urgency=low
+
+  * New upstream release, the first one supporting Zope 2.9
+  * debian/rules: build the plone-site instance using zope 2.9.
+  * debian/control: removed binary plone, it makes no sense anymore and
+    we already have plone-site with almost the same purpose.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun, 30 Jul 2006 21:38:27 +0200
+
+zope-cmfplone (2.1.3-2) unstable; urgency=low
+
+  * debian/control: recommends zope-linguaplone.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Wed, 28 Jun 2006 22:49:45 +0200
+
+zope-cmfplone (2.1.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Standards-Version: 3.7.2, no changes needed.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Wed,  7 Jun 2006 22:25:10 +0200
+
+zope-cmfplone (2.1.2-2) unstable; urgency=high
+
+  * Applied PloneHotfix20060410; Adds security declarations to unprotected
+    MembershipTool methods: changeMemberPortrait, deletePersonalPortrait,
+    testCurrentPassword.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Tue, 11 Apr 2006 11:37:42 +0200
+
+zope-cmfplone (2.1.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Upstream refers improvements to the migration procedure, so we could
+    close the bug reports related to this problem. (Closes: #328607)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun, 29 Jan 2006 21:40:17 +0000
+
+zope-cmfplone (2.1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added README.debian for plone-site package.
+    (Closes: #334449, #337146, #339049)
+  * Plone doesn't have anymore problems with accents in links. 
+    (Closes: #208593)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 24 Nov 2005 14:19:54 +0000
+
+zope-cmfplone (2.1-2) unstable; urgency=low
+
+  * debian/control: versioned dependency on zope2.7 (>= 2.7.7).
+
+ -- Fabio Tranchitella <kobold@debian.org>  Fri, 30 Sep 2005 13:24:01 +0000
+
+zope-cmfplone (2.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Set Debian Zope Team as maintainer and myself as uploader.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Wed,  7 Sep 2005 14:26:00 +0000
+
+zope-cmfplone (2.0.93-2) experimental; urgency=low
+
+  * debian/control: build-depends on lsb-release, and use it in debian/rules
+    to guess the distribution (Debian or Ubuntu).
+
+ -- Fabio Tranchitella <kobold@debian.org>  Tue, 23 Aug 2005 14:28:27 +0000
+
+zope-cmfplone (2.0.93-1) experimental; urgency=low
+
+  * New upstream release candidate (Plone-2.1-rc3).
+  * Depend on these non-core products: PloneErrorReporting, kupu | Epoz.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Fri, 19 Aug 2005 13:26:29 +0000
+
+zope-cmfplone (2.0.5-1) experimental; urgency=low
+
+  * New maintainer's email address.
+  * New upstream release.
+  * Make use of dh_installzope from zope-debhelper.
+  * Now this packaged is Based on zope-common. With this new layout
+    we should get rid of all the problems we had with the previous design.
+    (Closes: #297810, #214025)
+  * debian/po, debian/templates, debian/prerm: removed.
+  * Sorry Jens Nachtigall, we don't need the template anymore.
+    Thanks anyway for your work. (Closes: #297462)
+  * Added patch from Frank Bennet <bennett@nomolog.nagoya-u.ac.jp> to fix
+    email validation. (Closes: #292468).
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun,  7 Aug 2005 13:56:22 +0000
+
+zope-cmfplone (2.0.4-3) unstable; urgency=low
+
+  * debian/watch: fixed.
+
+ -- Fabio Tranchitella <kobold@kobold.it>  Tue, 11 Jan 2005 14:40:08 +0100
+
+zope-cmfplone (2.0.4-2) unstable; urgency=low
+
+  * debian/po/cs.po: added, thanks to Miroslav Kure. (Closes: #287703)
+
+ -- Fabio Tranchitella <kobold@kobold.it>  Tue,  4 Jan 2005 09:16:09 +0100
+
+zope-cmfplone (2.0.4-1) unstable; urgency=low
+
+  * New Maintainer
+  * Thanks for the NMU, Denis. (Closes: #248936)
+  * New upstream release. (Closes: #239834, #217423)
+  * Updated french debconf template, thanks to Christian Perrier.
+    (Closes: #250472)
+  * Added japanase debconf template, thanks to Hideki Yamane.
+    (Closes: #250472)
+
+ -- Fabio Tranchitella <kobold@kobold.it>  Wed, 20 Oct 2004 13:16:51 +0200
+
+zope-cmfplone (1.0.5.20030909-3.1) unstable; urgency=low
+
+  * NMU
+  * Use the shared/zope/restart debconf question instead of
+    zope-cmfplone/bouncezope.
+  * Rewrite zope-cmfplone/oldproduct_in_var debconf question by
+    using zope-formulator/oldproduct_in_var, and import translations.
+  * Convert debconf i18n to po-debconf.
+  * Do not ask shared/zope/restart question again when configuring this
+    package.
+  * Append 'exit 0' at the end of debian/postinst in case that
+    the last command inserted by #DEBHELPER# has a non-zero return
+    status.
+  * Call debconf-updatepo from the 'clean' target, as now documented
+    in po-debconf(7).
+
+ -- Denis Barbier <barbier@debian.org>  Thu, 13 May 2004 22:14:09 +0200
+
+zope-cmfplone (1.0.5.20030909-3) unstable; urgency=low
+
+  * Thanks for the NMU, Martin.
+    Closes: #226089, #223710, #221057
+  * removed the whole python compileall section from postinst -- it's 
+    not necessary because Zope will compile the python code itself 
+    when it loads it, whether or not it's been precompiled.
+    Closes: #229447 -- dpkg --configure zope-cmfplone fails (still)
+    Closes: #228703 -- assumption about /usr/local/bin/python2.2 etc.
+  
+ -- David Coe <davidc@debian.org>  Sat, 24 Jan 2004 22:00:44 -0500
+
+zope-cmfplone (1.0.5.20030909-2.1) unstable; urgency=low
+
+  * NMU
+  * debian/postinst: fixed the python lookup code. no need to be so
+    complicated. but this solution may still be considered a hack.
+      closes: Bug#226089, #214025, #223710, #221057
+
+ -- martin f. krafft <madduck@debian.org>  Sat, 10 Jan 2004 21:34:31 +0100
+
+zope-cmfplone (1.0.5.20030909-2) unstable; urgency=low
+
+  * changed cmf version dependencies because of a reported security problem
+    in cmf 1.3.1.  No other changes.
+
+ -- David Coe <davidc@debian.org>  Sun, 19 Oct 2003 23:55:50 -0400
+
+zope-cmfplone (1.0.5.20030909-1) unstable; urgency=low
+
+  * new upstream version (rerelease of 1.0.5)
+  
+ -- David Coe <davidc@debian.org>  Tue,  9 Sep 2003 11:50:27 -0400
+
+zope-cmfplone (1.0.5-1) unstable; urgency=low
+
+  * new upstream version
+  * not uploaded, some upstream files were missing
+  
+ -- David Coe <davidc@debian.org>  Mon,  8 Sep 2003 23:54:52 -0400
+
+zope-cmfplone (1.0.4-1) unstable; urgency=low
+
+  * new upstream version
+  * add i18n .po files 
+    Closes: #205106 Request to include plone-it.po (and other languages)
+  * update standards version (no changes)
+
+ -- David Coe <davidc@debian.org>  Mon,  8 Sep 2003 23:06:02 -0400
+
+zope-cmfplone (1.0.3-3) unstable; urgency=low
+
+  * make plone depend on the specific ${Source-Version} of zope-cmfplone.
+    Closes: #199662: plone: Should depend on a specific zope-cmfplone version
+  * don't nag about the need to 'migrate' plone instances, if the upstream 
+    version hasn't changed.
+  
+ -- David Coe <davidc@debian.org>  Wed,  2 Jul 2003 14:21:54 -0400
+
+zope-cmfplone (1.0.3-2) unstable; urgency=low
+
+  * reworded the "no upgrade path available" message, issued during plone
+    migration, so it doesn't sound like an error.  Change approved by
+    upstream.
+    Closes: 198497: "No upgrade path" error on plone migration
+  * removed a junk file that was inadvertently released
+    by upstream developers: CMFPlone/.HISTORY.txt.swp
+  
+ -- David Coe <davidc@debian.org>  Wed,  2 Jul 2003 01:29:05 -0400
+
+zope-cmfplone (1.0.3-1) unstable; urgency=low
+
+  * new upstream version
+  * now requires cmf >= 1.3.1 << 1.4
+  * there have been some problems reported upstream with Plone 1.0.3 
+    and localizer; if you encounter problems with localizer, see 
+    http://plone.org/documentation/errata for the current status and/or 
+    workarounds, or revert to plone 1.0.2 until a patch or new version 
+    becomes available.
+
+ -- David Coe <davidc@debian.org>  Tue,  1 Jul 2003 13:16:49 -0400
+
+zope-cmfplone (1.0.2-3) unstable; urgency=low
+
+  * deleted a now-obsolete step from debian/rules that caused
+    errors when building from the debian source package, and
+    worked around the fact that the upstream tarball now contains
+    some directory names with embedded spaces.  (Until they
+    also include directory names containing apostrophes, we'll
+    be ok.)
+    Closes: 196474: zope-cmfplone: FTBFS: Missing files?
+
+ -- David Coe <davidc@debian.org>  Sat,  7 Jun 2003 18:04:53 -0400
+
+zope-cmfplone (1.0.2-2) unstable; urgency=low
+
+  * implemented these two fixes in Errata for Plone 1.0.2 - "Vert" 
+    (published on the plone.org web site):
+    + CMFPlone/skins/plone_templates/main_template.pt has a TAL 
+      statement that will never compute the context's right/left slots.
+    + CMFPlone/skins/plone_content/event_edit_form.pt has a logical 
+      error that makes the hidden id input tag show up causing the 
+      edit of a event to break. 
+
+ -- David Coe <davidc@debian.org>  Thu,  5 Jun 2003 13:41:49 -0400
+
+zope-cmfplone (1.0.2-1) unstable; urgency=low
+
+  * new upstream release.
+  * requires Zope 2.6 or later; the former "ActivePak" hot 
+    patches are gone.  If you've still got Zope 2.5.1, stay with 
+    Plone 1.0.1 until you can upgrade Zope.
+  * in the 'plone' metapackage, moved zope-localizer and 
+    zope-translationservice from Suggests: to Recommends:, 
+    now that they've been packaged.
+  * standards-version 3.5.8 -> 3.5.10; no changes.
+  
+ -- David Coe <davidc@debian.org>  Tue,  3 Jun 2003 00:03:48 -0400
+
+zope-cmfplone (1.0.1-4) unstable; urgency=low
+
+  * correct postinst to understand old-style (python) and new-style (sh) 
+    Debian 'zope-z2' scripts.
+    Closes: #195456: zope-cmfplone fails to configure.
+
+ -- David Coe <davidc@debian.org>  Sun,  1 Jun 2003 00:31:48 -0400
+
+zope-cmfplone (1.0.1-3) unstable; urgency=low
+
+  * in the 'plone' metapackage, moved zope-cmfforum and zope-cmfphoto from
+    Suggests: to Recommends:, now that they're actually available in
+    Debian.  No other changes.
+
+ -- David Coe <davidc@debian.org>  Mon, 17 Mar 2003 15:18:40 -0500
+
+zope-cmfplone (1.0.1-2) unstable; urgency=low
+
+  * modified ActivePak/HTMLTALParser_patch to avoid an error when
+    starting under zope versions 2.6 and newer.
+    Closes: #183024: Error on Zope startup - couldn't install ActivePak
+  
+ -- David Coe <davidc@debian.org>  Sat,  1 Mar 2003 19:06:01 -0500
+
+zope-cmfplone (1.0.1-1) unstable; urgency=low
+
+  * new upstream release; mostly small bugfixes; see HISTORY.txt.
+  * removed the patches I added in 1.0release.20030205-1; now
+    released upstream.
+
+ -- David Coe <davidc@debian.org>  Sun, 23 Feb 2003 14:33:57 -0500
+
+zope-cmfplone (1.0release.20030205-2) unstable; urgency=low
+
+  * add a line to debian/rules to remove the .pyc files included
+    (unintentionally, I'm sure) by upstream.
+
+ -- David Coe <davidc@debian.org>  Thu,  6 Feb 2003 10:41:01 -0500
+
+zope-cmfplone (1.0release.20030205-1) unstable; urgency=low
+
+  * new upstream release.
+  * added patches from plone CVS to fix migration and a spelling error 
+    in 1.0.
+  * revised package descriptions and dependencies, and README.Debian,
+    to account for "standard" plone add-on packages not yet available 
+    in Debian.
+
+ -- David Coe <davidc@debian.org>  Wed,  5 Feb 2003 17:59:08 -0500
+
+zope-cmfplone (1.0rc2.20030119-2) unstable; urgency=low
+
+  * improved (corrected) the advice given in the template for migration
+    from 1.0rc2 to 1.0rc2.20030119.
+  * changed plone back to a non-versioned dependency on zope-cmfplone;
+    that change was unnecessary.
+  * improved the flow of debconf questions/notices.
+
+ -- David Coe <davidc@debian.org>  Wed, 22 Jan 2003 19:49:55 -0500
+
+zope-cmfplone (1.0rc2.20030119-1) unstable; urgency=low
+
+  * new upstream version (this week's 1.0rc2, newer and better than last
+    week's 1.0rc2); I will append the release date to upstream version
+    numbers from now on, until upstream stops releasing modified sources
+    with the same version number.
+  * removed the patches applied in 1.0rc2-4; they're now included
+    upstream.
+  * added a migration note explaining the manual changes required when
+    migrating from last week's rc2 (1.0rc2) to this week's rc2
+    (1.0rc2.20030119).
+  * this package now explains to new users that a plone-site instance must
+    be added (in zope) before plone can be used.
+  * changed plone metapackage to depend on the current zope-cmfplone *version*.
+
+ -- David Coe <davidc@debian.org>  Wed, 22 Jan 2003 14:00:43 -0500
+
+zope-cmfplone (1.0rc2-4) unstable; urgency=low
+
+  * modified rules to apply patches from the debian directory
+  * added two patches from CVS that "should have made it
+    into RC2" -- bugfixes in:
+      CMFPlone/skins/plone_forms/logged_in.py
+    and 
+      CMFPlone/skins/plone_3rdParty/CMFCollector/collector_add_issue_form.pt
+
+ -- David Coe <davidc@debian.org>  Tue, 14 Jan 2003 13:34:07 -0500
+
+zope-cmfplone (1.0rc2-3) unstable; urgency=low
+
+  * added a patch in ActivePak to prevent syntax errors in page templates
+    that contain tal:blocks with i18n: attributes.  Added a note to
+    README.Debian about the ActivePak patches.
+
+ -- David Coe <davidc@debian.org>  Tue, 14 Jan 2003 00:17:39 -0500
+
+zope-cmfplone (1.0rc2-2) unstable; urgency=low
+
+  * added portal_migration instructions and debconf note.
+
+ -- David Coe <davidc@debian.org>  Mon, 13 Jan 2003 16:31:07 -0500
+
+zope-cmfplone (1.0rc2-1) unstable; urgency=low
+
+  * new upstream version.
+  * improved postinst so it doesn't fail on woody systems, thanks
+    to Gregor Hoffleit's suggestion in bug #173551.
+  * re-added the ActivePak monkeypatch, which was removed by upstream 
+    but is still needed for zope versions < 2.6; modified its 
+    __init__.py so it takes no action on newer zope versions.
+  
+ -- David Coe <davidc@debian.org>  Mon, 13 Jan 2003 14:53:45 -0500
+
+zope-cmfplone (1.0rc1-3) unstable; urgency=low
+
+  * minor change to postinst, to use the version of python
+    the currently-installed zope uses.
+
+ -- David Coe <davidc@debian.org>  Thu,  2 Jan 2003 19:48:22 -0500
+
+zope-cmfplone (1.0rc1-2) unstable; urgency=low
+
+  * oops, don't install upsteream changelog in plone metapackage.
+  * minor change to config and postinst to avoid potential debconf 
+    template key name errors; might eventually close #173551.
+  
+ -- David Coe <davidc@debian.org>  Wed, 18 Dec 2002 14:02:27 -0500
+
+zope-cmfplone (1.0rc1-1) unstable; urgency=low
+
+  * new upstream release
+  * include some new doc files added by upstream
+  * add "plone" metapackage in anticipation of upstream product name changes
+  
+ -- David Coe <davidc@debian.org>  Wed, 18 Dec 2002 12:54:10 -0500
+
+zope-cmfplone (1.0beta3-4) unstable; urgency=low
+
+  * removed two obsolete doc files (they were also removed upstream) 
+    (MIGRATION.txt,  Plone1.0alphaFeatures.txt).
+  
+ -- David Coe <davidc@debian.org>  Tue, 17 Dec 2002 16:59:09 -0500
+
+zope-cmfplone (1.0beta3-3) unstable; urgency=low
+
+  * Oops, the upstream 'core' directory in CMFPlone/skins/plone_styles
+    was omitted by cvs.  Fixed.
+  * still Closes: #169810
+  
+ -- David Coe <davidc@debian.org>  Fri, 22 Nov 2002 18:16:26 -0500
+
+zope-cmfplone (1.0beta3-2) unstable; urgency=low
+
+  * packaged for the real debian (thanks to Sidnei da Silva and the rest 
+    of the plone.org team for their initial work on this package). 
+  * compile the (non-script) .py files during postinst
+  * improved postinst and templates to help users upgrading from a non-debian
+    installation of this product.
+  * upstream tarball includes other products (Formulator, DCWorkflow) which are 
+    ignored by this package -- the zope-formulator package provides Formulator, and 
+    zope itself provides DCWorkflow.  Upstream included those to make it easy
+    for non-debian zope users, they tell me.
+  * Closes: #169810: ITP: zope-cmfplone -- A Zope/CMF-based Content Management System
+
+ -- David Coe <davidc@debian.org>  Thu, 21 Nov 2002 20:24:49 -0500
+
+zope-cmfplone (1.0beta3-1) unstable; urgency=low
+
+  * Updated to new upstream version
+
+ -- Sidnei da Silva <dc@debian-rs.org>  Tue, 19 Nov 2002 16:05:25 -0200
+
+zope-cmfplone (1.0beta2-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Sidnei da Silva <dc@debian-rs.org>  Thu, 17 Oct 2002 14:22:48 -0300
+
--- zope-cmfplone-2.5.1.orig/debian/plone-site.templates
+++ zope-cmfplone-2.5.1/debian/plone-site.templates
@@ -0,0 +1,3 @@
+Template: plone-site/internal
+Type: note
+Description: Internal use
--- zope-cmfplone-2.5.1.orig/debian/compat
+++ zope-cmfplone-2.5.1/debian/compat
@@ -0,0 +1 @@
+5
--- zope-cmfplone-2.5.1.orig/debian/plone-site.dzinstance
+++ zope-cmfplone-2.5.1/debian/plone-site.dzinstance
@@ -0,0 +1,8 @@
+Package: plone-site
+ZopeVersion: 2.9
+Name: plone-site
+Addon-Mode: manual
+Addon-Technique: tree-linked
+Restart-Policy: end
+Products: CMFPlone
+Port: 8081
--- zope-cmfplone-2.5.1.orig/debian/zope-cmfplone.dzproduct
+++ zope-cmfplone-2.5.1/debian/zope-cmfplone.dzproduct
@@ -0,0 +1,5 @@
+Package: zope-cmfplone
+Name: CMFPlone
+Depends: Archetypes:1.3, ATContentTypes, ATReferenceBrowserWidget, CMFActionIcons:1.6, CMFCalendar:1.6, CMFCore:1.6, CMFDefault:1.6, CMFDynamicViewFTI, CMFFormController, CMFPlacefulWorkflow, CMFQuickInstallerTool, CMFSetup:1.6, CMFTopic:1.6, CMFUid:1.6, DCWorkflow:1.6, ExtendedPathIndex, ExternalEditor, GenericSetup, GroupUserFolder, kupu, Marshall, MimetypesRegistry:1.3, PasswordResetTool, PlacelessTranslationService, PloneErrorReporting, PloneLanguageTool, PlonePAS, PloneTranslations, PluggableAuthService, PluginRegistry, PortalTransforms:1.3, ResourceRegistries, SecureMailHost, statusmessages, validation:1.3, statusmessages
+Recommends: LinguaPlone, CacheFu
+ZopeVersions: >= 2.9
--- zope-cmfplone-2.5.1.orig/debian/plone.copyright
+++ zope-cmfplone-2.5.1/debian/plone.copyright
@@ -0,0 +1,11 @@
+This package was created by David Coe <davidc@debian.org> on 
+Wed, 18 Dec 2002 14:02:27 -0500, and it's actually maintained 
+by Fabio Tranchitella <kobold@kobold.it>
+
+This is a metapackage to depend on the correct real plone package.
+There is no upstream source code for this metapackage.
+
+This metapackage was created and released by David Coe, under the
+terms of the Gnu General Public License, version 2 or later.  See
+/usr/share/common-licenses/GPL for the full text of that license.
+
--- zope-cmfplone-2.5.1.orig/debian/zope-cmfplone.copyright
+++ zope-cmfplone-2.5.1/debian/zope-cmfplone.copyright
@@ -0,0 +1,21 @@
+This package was debianized by David Coe <davidc@debian.org> on
+Thu, 21 Nov 2002 14:29:44 -0500, and it's actually maintained by
+Fabio Tranchitella <kobold@kobold.it>.
+
+It was downloaded from:
+
+  http://heanet.dl.sourceforge.net/sourceforge/plone/PloneBase-2.1.tar.gz
+
+The main upstream site:
+
+  http://plone.org
+
+Upstream Authors: 
+
+  Alan Runyan <runyaga@runyaga.com>
+  Alexander Limi <limi@zope.no>
+
+You are free to distribute this software under the terms of the GNU
+General Public License, version 2 or later.  On Debian systems, the
+complete text of the GNU General Public License can be found in the
+/usr/share/common-licenses/GPL file.
--- zope-cmfplone-2.5.1.orig/debian/plone-site.copyright
+++ zope-cmfplone-2.5.1/debian/plone-site.copyright
@@ -0,0 +1,3 @@
+This package was created and released by Fabio Tranchitella, under 
+the terms of the Gnu General Public License, version 2 or later.  
+See /usr/share/common-licenses/GPL for the full text of that license.
--- zope-cmfplone-2.5.1.orig/debian/postinst
+++ zope-cmfplone-2.5.1/debian/postinst
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+db_stop
--- zope-cmfplone-2.5.1.orig/debian/control
+++ zope-cmfplone-2.5.1/debian/control
@@ -0,0 +1,28 @@
+Source: zope-cmfplone
+Section: web
+Priority: optional
+Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org>
+Uploaders: Fabio Tranchitella <kobold@debian.org>
+Build-Depends: debhelper (>= 5.0.0), dpatch
+Build-Depends-Indep: zope-debhelper (>= 0.3.6), lsb-release
+Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/pkg-zope/zope-cmfplone/trunk
+
+Package: zope-cmfplone
+Architecture: all
+Depends: ${zope:Depends}, zope-cmf1.6 (>= 1.6.2), zope-cmfcore1.6 (>= 1.6.2), zope-cmfdefault1.6 (>= 1.6.2), zope-cmftopic1.6 (>= 1.6.2), zope-cmfcalendar1.6 (>= 1.6.2), zope-dcworkflow1.6, zope-cmfactionicons1.6, zope-genericsetup, zope-archetypes (>= 1.4.1), zope-cmfquickinstallertool (>= 1.5.9), zope-btreefolder2 (>= 1.0.2), zope-groupuserfolder (>= 3.54), zope-cmfformcontroller (>= 2.0.5), zope-plonetranslations (>= 2.6.0), zope-securemailhost (>= 1.0.4), zope-atcontenttypes (>= 1.1.3), zope-atrbw (>= 1.5), zope-resourceregistries (>= 1.3.2), zope-extendedpathindex (>= 2.4), zope-cmfdynamicviewfti (>= 2.1), zope-pts (>= 1.3.3), python-imaging, zope-plonelanguagetool (>= 1.4), zope-cmfplacefulworkflow (>= 1.0.2), zope-plonepas (>= 2.1), zope-passwordresettool (>= 0.4.1), zope-pas (>= 1.4), zope-pluginregistry (>= 1.1.1), zope-externaleditor (>= 0.9.2), zope-kupu (>= 1.3.8), zope-statusmessages (>= 2.0.1), zope-ploneerrorreporting (>= 1.0)
+Recommends: zope-linguaplone (>= 0.9.final), zope-cachefu (>= 1.0.1)
+Suggests: zope-plonetestcase (>= 0.8.4)
+Description: content management system based on zope and cmf
+ Plone CMS aims to be a proper Content Management and Publishing
+ system, sharing the same qualities as Teamsite, Livelink and Documentum.
+ OODBMS, RDBMS, WEBDAV, FTP and XMLRPC integration out-of-the-box. Plone is
+ built with Zope and CMF.  See http://plone.org/ for more information.
+
+Package: plone-site
+Architecture: all
+Depends: zope-cmfplone (= ${Source-Version}), ${zope:Depends}, ${misc:Depends}
+Suggests: plone
+Description: preconfigured zope instance containing a plone site
+ This package setups an own zope instance with a ready-to-be-used
+ plone site.
--- zope-cmfplone-2.5.1.orig/debian/patches/DPATCH
+++ zope-cmfplone-2.5.1/debian/patches/DPATCH
@@ -0,0 +1,16 @@
+[ -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
--- zope-cmfplone-2.5.1.orig/debian/zope-cmfplone.README.Debian
+++ zope-cmfplone-2.5.1/debian/zope-cmfplone.README.Debian
@@ -0,0 +1,21 @@
+IMPORTANT: After a new Plone version has been installed and Zope has
+restarted, your Plone site(s) have to be "migrated" to the updated
+version. You do that (in the Zope management interface) by selecting
+"portal_migration" within *each* Plone Site instance. (They must be
+done individually).
+
+It is suggested that you take a backup of your Data.fs file before
+doing the migrations, in case you run into problems.
+
+The best source of documentation on setup and migration is the
+Plone.org site (which runs plone), at http://plone.org/
+
+There are mailing lists accessible from that site, and there is an
+active IRC #plone channel on freenode.net.
+
+The upstream docs/README.txt still says:
+
+  At the time of release, the Plone docs were not sufficiently up to
+  date to ship with the product.
+
+  Please refer to http://plone.org/documentation
--- zope-cmfplone-2.5.1.orig/debian/plone-site.README.Debian
+++ zope-cmfplone-2.5.1/debian/plone-site.README.Debian
@@ -0,0 +1,18 @@
+README for plone-site
+=====================
+
+Debian's "plone-site" is a pre-packaged zope2.8 instance for running
+one or more Plone sites. You can access to the ZMI (Zope Management 
+Interface) opening http://localhost:PORT/manage with your browser, where
+PORT is the port number you have chosen while installing this package.
+You will have to login with the user and password you specified while
+configuring the package.
+
+To run a Plone site, you need to add it to your zope instance within
+the ZMI ("add a Plone Site").
+
+To add other products to your plone-site instance, install the debian 
+packages for them and then run the following command:
+
+ # dzhandle -z2.8 add-product plone-site <List of Product Names>
+
--- zope-cmfplone-2.5.1.orig/debian/rules
+++ zope-cmfplone-2.5.1/debian/rules
@@ -0,0 +1,55 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+distribution := $(shell lsb_release -is)
+
+build: patch-stamp build-stamp
+build-stamp:
+	dh_testdir
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	dh_installzopeinstance -pplone-site plone-site
+	dh_installzope -pzope-cmfplone -X LICENSE  -X license.txt .
+	chmod 755 debian/zope-cmfplone/usr/share/zope/Products/CMFPlone/Extensions/add_copyright.py
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdebconf	
+	dh_installdocs -n
+ifeq ($(distribution),Ubuntu)
+	mv debian/zope-cmfplone/usr/share/doc/zope-cmfplone/README.Debian \
+	   debian/zope-cmfplone/usr/share/doc/zope-cmfplone/README.Ubuntu
+	mv debian/plone-site/usr/share/doc/plone-site/README.Debian \
+	   debian/plone-site/usr/share/doc/plone-site/README.Ubuntu
+endif
+	dh_installchangelogs --package=zope-cmfplone HISTORY.txt
+	dh_installchangelogs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-arch:
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary install
+
+include /usr/share/dpatch/dpatch.make
--- zope-cmfplone-2.5.1.orig/debian/plone-site.postinst
+++ zope-cmfplone-2.5.1/debian/plone-site.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+db_stop
