Out-of-tree module building (PoC) for Linux Distro's.
auke-jan.h.kok at intel.com
Mon Sep 30 18:46:02 UTC 2019
In Clear Linux OS, we generally prefer to build DSO modules separately
from the server code. We do this for e.g. php modules using `phpize`.
For nginx, this is 3/4 of the way there, except it fails on the last
part - modules instructions clearly indicate that modules, with all
their dependencies, need to build together. But in reality, there is no
technical reason for this.
For Clear Linux therefore, I've come up with the following approach and
it works really well, and therefore I'd like this to be considered as a
PoC for possible inclusion/consideration so other distributions can
benefit from the simplicity that it offers to Linux distributions.
Now, this script is mostly still a terrible hack. I'm not properly
fetching the nginx module names for instance. However, the method of
installing header files saves us from having to include nginx source
code in *every* nginx module, which will prevent lots of problems later on.
Obviously a permanent solution would be for the module build system to
properly -I/usr/include/nginx instead of copying headers, as well.
PS: Example of how an (automated) module build looks using this:
More information about the nginx-devel