Gentoo Archives: gentoo-dev

From: jonas.licht@××××××××××××××.de
To: gentoo-dev@l.g.o
Cc: Jonas Licht <jonas.licht@××××××××××××××.de>
Subject: [gentoo-dev] [PATCH 0/3] [RFC] www-nginx/ category and nginx-module.eclass
Date: Sun, 14 Feb 2021 16:21:21
1 From: Jonas Licht <jonas.licht@××××××××××××××.de>
3 Hi,
5 as my personal need and which I read from Bugs #573710 and #648334 is to add support for external 3rd party modules to nginx.
6 Currently all modules a included in the www-server/nginx ebuild and are build in into the nginx binary.
7 Since around 5 years ago nginx added support for dynamic modules.
8 These modules are build with the nginx build system and generates a shared object which can be loaded on runtime.
9 The build config file of the module needs support for that too.
10 To build a module as a dynamic module you need the nginx source code.
11 On the configure step you add --add-dynamic-module=<path-to-module-src> to the configure command.
12 In the src_compile step you can use the Maketarget modules to only build the module.
14 I have created an eclass which uses the nginx source code and the source code of the module.
15 To use the same configure options as the running nginx, I obtain them by parsing nginx -V.
16 After compiling and linking the eclass reads the config file of the module to get the correct so file name for installing.
17 I've chossen /usr/$(get_libdir)/nginx/modules as installation path.
18 If you now want to load the kaltura/nginx-vod-module, you simple add load_module lib64/nginx/modules/; to your nginx.conf file.
19 As the module must be build for a specific version of nginx, my idea is to
20 set the concatenation of the versions from nginx and the module as version of the
21 module ebuild. I can simply parse that with ver_cut.
23 The patches contains a new category www-nginx, to be the place for nginx module ebuilds, the nginx-module eclass and a sample consumer.
24 I've also opened PR #16053 on Github.
26 Best regards,
27 Jonas
29 Jonas Licht (3):
30 profiles/categories: add www-nginx
31 Add nginx-module.eclass
32 www-nginx/nginx-vod-module: add new package
34 eclass/nginx-module.eclass | 73 +++++++++++++++++++
35 profiles/categories | 1 +
36 www-nginx/metadata.xml | 7 ++
37 www-nginx/nginx-vod-module/Manifest | 2 +
38 www-nginx/nginx-vod-module/metadata.xml | 12 +++
39 .../nginx-vod-module- | 21 ++++++
40 6 files changed, 116 insertions(+)
41 create mode 100644 eclass/nginx-module.eclass
42 create mode 100644 www-nginx/metadata.xml
43 create mode 100644 www-nginx/nginx-vod-module/Manifest
44 create mode 100644 www-nginx/nginx-vod-module/metadata.xml
45 create mode 100644 www-nginx/nginx-vod-module/nginx-vod-module-
47 --
48 2.26.2


Subject Author
[gentoo-dev] [PATCH 1/3] profiles/categories: add www-nginx jonas.licht@××××××××××××××.de
[gentoo-dev] [PATCH 2/3] Add nginx-module.eclass jonas.licht@××××××××××××××.de
[gentoo-dev] [PATCH 3/3] www-nginx/nginx-vod-module: add new package jonas.licht@××××××××××××××.de
[gentoo-dev] [PATCH v2 0/3] Version 2 jonas.licht@××××××××××××××.de