* On 4/16/25 01:04, Sam Darwin via Mailman-users wrote:
"Virtualenv Installation, recommended for Production"

It's recommended for production.

I've followed that method. If someone does this, they may never encounter
or bump into any files from the "distro packaging (specifically in Debian
and Ubuntu)" .

True, and that's fine. :)


Which means they're missing out on this particular idea about the mailman wrapper. The script is small enough it can be described in the docs.

Let's try a grep inside mailman-suite-docs:

grep -r -i wrapper *

no relevant results.

They are small scripts, but describing them in the documentation is problematic
because they depend on user names and file system locations, which in turn are
distro- or even system-dependent. (Just as an example, some distros use www-data
as the web service user, which is needed for the hyperkitty and postorius
integrations, while other distros use wwwrun and even others just plain www or
something else entirely.)

Providing such wrappers as part of venv or the upstream repository is hence not
possible.

This said, nobody prevents you from creating such wrappers for use with your
venv installation tailored to your system either, just make sure that you write
them up correctly. :)


Also, as is often the way, the documentation could probably be also improved.
For instance, the migration documentation says:

This, and in general all, mailman commands should be run as the Mailman
user and not as root. Running some of these commands as root can create
files owned by root that can’t be read by the Mailman user.

But it doesn't explicitly tell you how to do this. Naturally, as a system
administrator installing, maintaining and migrating mailman instances, you
should probably know how to run a command as a specific user.


su -s /bin/sh -c "mailman ..." $LIST_USER

and

su -s /bin/sh -c "$PYTHON_BINARY $PATH_TO_MANAGE_PY ..." $WWW_USER

is probably what you want to execute commands either as the mailing list or as the web user, with all these variables being pseudo-variables that you want to fill in/hardcode to fit your system correctly. Putting that in the documentation and especially educating users to not use them in a copy-and-paste manner is difficult, though. Try that and you'll probably have an influx of requests along the lines of "I don't have a variable called $LIST_USER, the command fails to execute!"



Mihai

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/KTHXAMKJARTKJWLABXIEAS2VPEPGKM25/

This message sent to arch...@mail-archive.com

Reply via email to