Michael Paoli via BALUG-Test wrote on 2024-08-18 01:30:
Just using the Debian packages. I think they include the venv setup, but haven't poked into the details to see exactly how they function in that regard.
There should be approaching *zero* Debian packages installed!
From my brain-addled notes:
## Use PG, not MySQL! Change next line per venv instructions online: apt install default-libmysqlclient-dev build-essential
## More Debian package(s): sudo apt install libpcre3 libpcre3-dev
Various notes follow, the TL;DR is above regarding which repo packages to install.
Everything gets installed inside a venv with pip!
sudo useradd --create-home \ --home-dir /opt/mailman \ --shell /bin/bash \ mailman
sudo chown -v mailman: /opt/mailman sudo chmod -v 755 /opt/mailman
sudo -i -u mailman bash -c "python3 -m venv venv; echo 'source /opt/mailman/venv/bin/activate' >> /opt/mailman/.bashrc; exit"
sudo -i -u mailman bash -c "pip install wheel mailman PyMySQL"
## Run as sudo: mkdir /etc/mailman3 touch /etc/mailman3/mailman3.service touch /etc/mailman3/mailman-hyperkitty.cfg
## This is about the only Debian / Ubuntu packages to install: ## And, screw messing with MySQL, PostgreSQL all the way: apt update ## Use PG, not MySQL, change next line per venv instructions online: apt install default-libmysqlclient-dev build-essential
## Is this run as mailman? I *think* so, inside the venv: pip install mailman-web mailman-hyperkitty
## As user mailman inside venv: MAILMAN_WEB_CONFIG=/etc/mailman3/mailman-web.py mailman-web migrate
MAILMAN_WEB_CONFIG=/etc/mailman3/mailman-web.py mailman-web collectstatic MAILMAN_WEB_CONFIG=/etc/mailman3/mailman-web.py mailman-web compress MAILMAN_WEB_CONFIG=/etc/mailman3/mailman-web.py mailman-web compressmessages
pip install uwsgi
## create & edit /etc/mailman3/uwsgi.ini: ## You can run test run uwsgi using the following command: ## ## (venv)$ uwsgi --ini /etc/mailman3/uwsgi.ini uwsgi --ini /etc/mailman3/uwsgi.ini
## NOTE: if /opt/mailman/web/logs/uwsgi-error.log (?) has this: ## !!! no internal routing support, rebuild with pcre support !!! ## then... ## pip uninstall uwsgi ## More Debian package(s): sudo apt install libpcre3 libpcre3-dev pip install --force-reinstall -U --no-deps --no-cache-dir uwsgi
Next and last: Xapian full-text search.
## Xapian full-text search ################################### ## Xapian full-text search ################################### ## Xapian full-text search ################################### ## ## Latest version: 1.4.25 ## Inside (venv) as mailman: export XAPIAN_VERSION="1.4.25" mkdir /tmp/mailman/xapian -vp cd /tmp/mailman/xapian curl https://raw.githubusercontent.com/notanumber/xapian-haystack/master/xapian_w... bash xapian_wheel_builder.sh $XAPIAN_VERSION ls -l *.whl wheelFile=$(ls *.whl) pip install ${wheelFile} xapian-haystack unset wheelFile rm -fr /tmp/mailman/xapian > /dev/null echo "Edit /etc/mailman3/settings_local.py and add HAYSTACK_CONNECTIONS" ## DO NOT OVERLOOK XAPIAN-HAYSTACK IN LINES ABOVE!!! ## DO NOT OVERLOOK XAPIAN-HAYSTACK IN LINES ABOVE!!! ## DO NOT OVERLOOK XAPIAN-HAYSTACK IN LINES ABOVE!!!