Patchew is designed around three components:
-
a web server, which hosts the Patchew user interface and also exposes API endpoints for use from the other parts;
-
one or more importers, which read email from an IMAP server, send them to the server, and pushes the messages to a git tree;
-
and a set of testers, which poll for git trees that have been pushed and runs a shell script on the cloned tree.
The flow can be represented as follows
IMAP API
Mail ------> Importer -----> Patchew server
API git
Importer ----> Unapplied series (mbox) ----> Git Server
|
'-----> Patchew server
API
API git shell API
Tester -----> Untested series (tag) ----> Tree ----> Result -----> Patchew server
While the importer's two tasks could in principle be split to two separate components, usually a single person can be the point of contact for both of them. One importer can handle one or more patchew projects, and similarly for testers. However, while one project will typically get email from one importer only, it can be served by multiple testers (for example for different architectures or operating systems).
./scripts/deploy -s [email protected]
If you do not have public key access configured on the host, add "-k".
(TODO)
-
Create importer user
-
Create tester user
-
Create maintainer user
(TODO)
??? Can you configure the git plugin after the importer has been created ???
Get IMAP server fingerprint:
openssl s_client -connect imap.gmail.com:993 |
openssl x509 -fingerprint |
grep Fingerprint
(may need to add "-starttls imap")
./scripts/deploy -i [email protected]
If you do not have public key access configured on the host, add "-k".
./scripts/deploy -i [email protected] -e "
instance_name=patchew-importer-example
patchew_server=http://patchew.example.com/
importer_user=importer
importer_pass=gotsomepatches
imap_server=imap.example.com
[email protected]
imap_pass=hunter2
imap_cert_fingerprint=00112233445566778899aabbccddeeff
imap_folders=INBOX
imap_delete_after_import=n"
systemctl status patchew-importer-dcaratti.service
The importer starts importing messages from the IMAP server to local storage and from there to git repo, watch it with
journalctl -f -u patchew-importer-dcaratti
Unlike the importer and server, the tester does not run in a container; it is simply a cron job on one or more hosts. Like the importer and server, however, testers are deployed with Ansible. The cron job runs as a user named "patchew".
./scripts/deploy -t [email protected] -e " instance_name=patchew-tester1 patchew_server=http://patchew.example.com/ tester_user=tester tester_pass=wantsomepatches tester_project=frobnicator
"More information about wpa_supplicant..." -> Login -> ...
(TODO)