Splitting amavis: The master plan ;-)

Markus Benning ich at markusbenning.de
Tue Mar 26 20:32:36 CET 2019


Hi Patrick,

i already implemented it in that branch:

https://gitlab.com/amavis/amavis/tree/convert-cpan-distribution

Am Montag, den 25.03.2019, 08:35 +0100 schrieb Patrick Ben Koetter:
> = What do we split amavis into?

It converts the source into an CPAN Distribution using the
Dist::Zilla module builder.
Dependencies are listed in the cpanfile.

So you can install dependencies in the local/ folder by using

$ carton install

Then you can generate an Distribution tarball with:

$ carton exec dzil build

> = How do we split amavis?

I did some scripting and extracted the packages into their
load path according to the package name.

Additional the Templates where converted into Templates.pm.

> = Who will be affected?

As the CPAN distribution lists all dependencies it can be simply
be installed with cpanm including dependency resolution.
Packager can use the defaults for packaging of perl-* modules.

> = Where will we push the splitted version to?

It can be released to CPAN using

$ dzil release

But there is still a lot of work left.

There is still a lot of logic that relies on the order that was applied
by the all-in-one approach. A lot of initialization happens at compile
time inside of BEGIN. This should be refactored to do an explicit
initialization in regular code execution.

There are no tests.

There should be some basic unit tests.

And there should be a test suite for acceptance testing.
I would suggest using cucumber to describe the tests in gherkin.
A tests can start up amavis with a test configuration, then interact
with the server using the Test::SMTP client and then check the output
by using Test::Mock::Net::Server::Mail.

At the time i did the changes above i got almost no feedback if that
changes would be welcome or likly to be merged so stopped working on
it.
Unfortunately currently i'm busy with other projects.
I dont know if or when i find time to work on it.


Markus




More information about the amavis-devel mailing list