Dennis Putnam writes:
> Since Centos 7 is way behind on mailman rpm (2.1.15 is the only
> available rpm) and mailman is currently at 2.1.34 I need to do a manual
> update. While I know how to install software, I am concerned that just
> doing a manual install from the tarball will mess up current
> settings,
Perhaps the most straightforward procedure is to backup mm_cfg.py and
the data in the archives, data, lists, logs, messages, and qfiles
folders under /var/lib/mailman. Then get the source rpm, unpack it,
delete the old source tree and replace it with the new source tree.
Review the patches and delete any that apply to executable Mailman
code, keep only those that make the Mailman installation conform to
Centos layout. Fixup the rpm control file (Mailman version, build,
and list of patches), and build an installable rpm and a srpm. Then
install the rpm. Finally, check that the files backed up above have
not been corrupted, and start Mailman.
If you have to do a full manual install, I am not familiar with
Centos's layout, but the principles are the same for all distros. The
main issues that are common are
1. For Mailman itself, preserving and restoring the site config file
(mm_cfg.py), the list config files, and any in-process messages
(qfiles).
2. For system administration, the manual install layout is usually
different from distro packaging. For several reasons, we
recommend installing to /usr/local (and /var/local), which is the
default, because you will not overwrite any state, and it is easy
to recognize which files are "new" and which are "old" from the
prefix.
3. This means that you will need to adjust system startup
configuration and services like logrotate, your MTA, and your
webserver, to point at the new Mailman installation.
4. It is important to remove all of the original package installation
including state data such as qfiles to avoid confusing Mailman
and/or running two Mailman processes at the same time.
Check the release notes to see if there are any special
considerations between 2.1.15 and 2.1.34.
Outline of the procedure:
1. Get the list of contents of the installed package using rpm or yum
or whatever. It won't have the list configs, qfiles, logs, or
mm_cfg.py, but should have the directories where those things
live, as well as the code. This should also capture boot scripts,
logrotate configs, and if you're lucky MTA and webserver configs.
This is useful information if no RH/Centos people show up; I can
be much more precise about what you need to preserve and restore,
and how to do it, if things go sidewise. find /etc -name '*mailman*'
may help, but I expect those files will be in the rpm query
output. (The leading * is to catch '00mailman.sh'-style naming.)
2. zip (or tar) up the whole thing: any Mailman configs in /etc, the
Mailman code in /usr, and the list database, qfiles (if any), and
logs from /var. Don't forget init scripts or systemd services
under /etc/, logrotate configs, etc. This is a backup and
reference installation.
3. Use the default install of the new code. You can untar source
pretty much anywhere. /usr/local/src and /tmp are common choices.
Install to /usr/local and /var/local. Much safer than trying to
install to the /usr and /var hierarchies.
4. The global config mm_cfg.py can be copied directly from your
Centos installation to /usr/local/lib/mailman/Mailman/ or you can
put in it /usr/local/etc/mailman and symlink.
5. IIRC the var stuff goes in
/var/local/lib/mailman/{lists,qfiles,...}. Just copy the list
configs and queue files from the old install there. It's probably
not a good idea to recursive copy the /var/lib/mailman directory,
because it contains symlinks into /usr/lib/mailman, and also if
there's anything including hidden files in /var/lib/mailman/lock,
it's likely that Mailman will fail to start or worse, function
incorrectly.
6. Start the new installation, if it works you can remove the Centos
mailman package with rpm (or whatever).
7. You will have to fiddle with MTA, webserver, logrotate and init
script configurations to point to the /usr/local and /var/local
hierarchies instead of /usr and /var. How you do that on Centos
I'm not sure, but usually there are .d folders under /etc where
the sysadmin can drop local configs that will not be overwritten
by the package manager. Some manual editing will very likely be
necessary because some package configuration is normally done by
scripts that directly edit config files rather than dropping
include files in .d folders.
I'm sorry, even as long as it is that's pretty sketchy. But as long
as you keep backups of mm_cfg.py and the list configs, qfiles, and
logs you will be able to restart Mailman as it is now. If you install
to /usr/local and /var/local, you don't have to worry about
overwriting anything.
------------------------------------------------------
Mailman-Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/[email protected]/
https://mail.python.org/archives/list/[email protected]/