Splitting amavis: The master plan ;-)

Patrick Ben Koetter p at sys4.de
Tue Mar 26 22:14:42 CET 2019


Hi Markus,

* Markus Benning <ich at markusbenning.de>:
> 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.

OK.


> There are no tests.

I take it this simply because amavis was born in a time before unit tests etc.
came popular.


> There should be some basic unit tests.

ACK

IIRC Alexander Wirt mentioned his company had developed a test suite and he
wanted to contribute it.


> And there should be a test suite for acceptance testing.
> I would suggest using cucumber to describe the tests in gherkin.

Funny you mention that. It BDD seems to be all over the place nowadays. :)


> 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.

I apologize. I became maintainer and was stuck with other work to do. When I
finally got to pick up the loose ends quite some time had passed.


> Unfortunately currently i'm busy with other projects.
> I dont know if or when i find time to work on it.

We're in no hurry at the moment. Presuming others on amavis-devel agree we
will prepare a bug fix release first and then go for a major release that
brings the CPAN changes we discuss in this mail and reworked documentation.

p at rick


-- 
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 


More information about the amavis-devel mailing list