[Mailman-Users] Upgrading/migrating Mailman v2.1.9 -> v2.1.18-1

Mark Sapiro mark at msapiro.net
Thu Jan 15 04:03:11 CET 2015


On 01/14/2015 09:31 AM, Chris Nulk wrote:
> 
> Below is a list of the files I have modified (base directory is
> /usr/lib/mailman).  Should I pay special attention due to changes to any
> particular files?
> 
> bin/add_members
> bin/non_members
> Mailman/LDAPMemberships.py
> Mailman/ListAdmin.py
> Mailman/MailList.py
> Mailman/Version.py
> Mailman/versions.py
> Mailman/Cgi/listinfo.py
> Mailman/Cgi/options.py
> Mailman/Gui/GUIBase.py
> Mailman/Gui/Privacy.py
> Mailman/Handlers/Decorate.py
> Mailman/Handlers/Moderate.py
> Mailman/Queue/IncomingRunner.py


LDAPMemberships.py is not part of GNU Mailman. I think the latest
version is yours, but in any case you can continue to use whatever
you're using.

For the others, if you want to look at changes in advance, go to
<http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/944?remember=1484&compare_revid=1484>
to compare rev 944 (2.1.9) with rev 1484 (2.1.18-1), scroll down to the
list where file names are on the left preceded with > and click the > on
the ones you're interested in to see the diff



> I will also most likely do the same thing I did when I did the original
> mods to Version.py and versions.py.  I will bump the DATA_FILE_VERSION
> by one and make only the minimal change needed.


in 2.1.18-1, DATA_FILE_VERSION is already 104. The only reason to
increment DATA_FILE_VERSION is so versions.Update() will run when an
older list in first instantiated. Since your changes were made at
DATA_FILE_VERSION = 97, there's no point in incrementing
DATA_FILE_VERSION beyond 104.


> Actually, here are the
> two patch files I plan on using for those two files.  So I will make
> copies of the original files (for all files to be modified) and for
> Version.py I will check for the current DATA_FILE_VERSION number and
> adjust appropriately.
> 
> Patch for Version.py
> ---------------------------
> --- Version.py.original    2008-05-24 13:44:12.000000000 -0700
> +++ Version.py.Modified    2009-09-25 10:47:02.000000000 -0700
> @@ -37,7 +37,9 @@
>                 (REL_LEVEL << 4)  | (REL_SERIAL << 0))
> 
>  # config.pck schema version number
> -DATA_FILE_VERSION = 96
> +# Updated the DATA_FILE_VERSION due to adding a new
> +#    variable/attribute (previous value = 96) --Modified 24-Sep-2009
> +DATA_FILE_VERSION = 97
> 
>  # qfile/*.db schema version number
>  QFILE_SCHEMA_VERSION = 3
> 
> Patch file for versions.py
> ---------------------------------
> --- versions.py.original    2008-05-24 13:44:12.000000000 -0700
> +++ versions.py.Modified    2009-09-24 14:15:11.000000000 -0700
> @@ -113,6 +113,11 @@
>          l.forward_auto_discards = mm_cfg.DEFAULT_FORWARD_AUTO_DISCARDS
>      if not hasattr(l, 'generic_nonmember_action'):
>          l.generic_nonmember_action =
> mm_cfg.DEFAULT_GENERIC_NONMEMBER_ACTION
> +
> +    # Add an additional list attribute if not present --Modified
> 24-Sep-2009
> +    if not hasattr(l, 'accept_special_posters'):
> +        l.accept_special_posters = []
> +
>      # Now convert what we can...  Note that the interaction between the
>      # MM2.0.x attributes `moderated', `member_posting_only', and
> `posters' is
>      # so confusing, it makes my brain really ache.  Which is why they
> go away


This was the wrong place to add that code. This section of versions.py
is intended to transform old attributes from say Mailman 2.0 so that
they have the equivalent semantics in the current version.

The proper way to add a new attribute is in the NewVars(l) function at
the end around line 430 add

    add_only_if_missing('accept_special_posters', [])

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Users mailing list