Thursday, August 27, 2020

How to set up a mailman server

I tried to get the mailman suite installed “the Lino way” from the gitlab clone.

The mailman suite is like any other Lino site, except that the settings.py file is copied from https://gitlab.com/mailman/mailman-suite.

Not yet finished. Draft installation instructions:

$ sudo apt install postgresql
$ mkdir /usr/local/lino/lino_local/mailman
$ cd $_
$ virtualenv -p python3 env
$ a
$ mkdir env/repositories
$ cd $_
$ git clone https://gitlab.com/mailman/mailman.git
$ pip install -e mailman/
$ go mailman

$ cp /opt/mailman/mailman-suite/mailman-suite_project/settings.py .

Install Python wrappers for using the PostgreSQL database, memcached and the Whoosh backend for HyperKitty archive search:

$ pip install psycopg2-binary pylibmc Whoosh

https://gitlab.com/mailman/mailman-suite : Files for setting up the whole Mailman Suite with integrated Mailman Core beside Hyperkitty and Postorius running in a single django instance.

https://wiki.list.org/DOC/Mailman%203%20installation%20experience

I reviewed the docs in Using Mailman.

Optimizations in getlino

I added some new features to getlino in order to use it for installing a mailman site:

  • getlino startsite has now the database options (db-engine, db-user etc) so that you can override them per site without needing to run getlino configure.

  • Added a new choice lino.projects.std in KNOWN_REPOS.

The getlino test suite said quite often:

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Seems that simply installing locales-all fixed this.

About intersphinx_urls

The test suite itself (inv test) passes on travis, but the build then fails during inv bd. That’s because some days ago I had the .travis.yml also install lino_book, which is required to building the getlino docs just in order to get the intersphinx url. Now it turns out that lino_book fails to install because swig is not installed. OMG! I almost decided to remove inv bd from the .travis.yml script and declare that building the docs, for getlino, is not a requirement. But maybe another solution is to simply hard-code the URL of the book in the conf.py file of the getlino docs:

intersphinx_mapping['book'] = ('https://www.lino-framework.org/', None)

This has at least two disadvantages:

  • I won’t be able to build the getlino docs when I am offline.

  • The intersphinx url is now stored in two different places.

But these disadvantage anyway show that storing the intersphinx_urls in the main package isn’t such a good idea. Another limitation of the current intersphinx_urls system is that it doesn’t work for the Lino Community Guide doctree (because the cg repository has no python package).

Is there a way to get the public metadata about a python package (basically the data given in the setup.py file) without actually installing the package? Couldn’t find anything.