Welcome! Log In Create A New Profile

Advanced

Out-of-tree module building (PoC) for Linux Distro's.

Auke Kok
September 30, 2019 02:40PM
Hi folks,

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.

https://github.com/clearlinux-pkgs/nginx-mainline/blob/master/0003-Add-nginx-module-build-install-script.patch

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.

Cheers,

Auke


PS: Example of how an (automated) module build looks using this:

https://github.com/clearlinux-pkgs/ngx_brotli/blob/master/ngx_brotli.spec
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Out-of-tree module building (PoC) for Linux Distro's.

Auke Kok 331 September 30, 2019 02:40PM

Re: Out-of-tree module building (PoC) for Linux Distro's.

Maxim Dounin 166 September 30, 2019 03:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready