public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/3] [RFC] www-nginx/ category and nginx-module.eclass
@ 2021-02-14 16:20 jonas.licht
  2021-02-14 16:20 ` [gentoo-dev] [PATCH 1/3] profiles/categories: add www-nginx jonas.licht
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: jonas.licht @ 2021-02-14 16:20 UTC (permalink / raw
  To: gentoo-dev; +Cc: Jonas Licht

From: Jonas Licht <jonas.licht@fem.tu-ilmenau.de>

Hi,

as my personal need and which I read from Bugs #573710 and #648334 is to add support for external 3rd party modules to nginx.
Currently all modules a included in the www-server/nginx ebuild and are build in into the nginx binary.
Since around 5 years ago nginx added support for dynamic modules.
These modules are build with the nginx build system and generates a shared object which can be loaded on runtime.
The build config file of the module needs support for that too.
To build a module as a dynamic module you need the nginx source code.
On the configure step you add --add-dynamic-module=<path-to-module-src> to the configure command.
In the src_compile step you can use the Maketarget modules to only build the module.

I have created an eclass which uses the nginx source code and the source code of the module.
To use the same configure options as the running nginx, I obtain them by parsing nginx -V.
After compiling and linking the eclass reads the config file of the module to get the correct so file name for installing.
I've chossen /usr/$(get_libdir)/nginx/modules as installation path.
If you now want to load the kaltura/nginx-vod-module, you simple add load_module lib64/nginx/modules/ngx_http_vod_module.so; to your nginx.conf file.
As the module must be build for a specific version of nginx, my idea is to
set the concatenation of the versions from nginx and the module as version of the
module ebuild. I can simply parse that with ver_cut.

The patches contains a new category www-nginx, to be the place for nginx module ebuilds, the nginx-module eclass and a sample consumer.
I've also opened PR #16053 on Github.

Best regards,
Jonas

Jonas Licht (3):
  profiles/categories: add www-nginx
  Add nginx-module.eclass
  www-nginx/nginx-vod-module: add new package

 eclass/nginx-module.eclass                    | 73 +++++++++++++++++++
 profiles/categories                           |  1 +
 www-nginx/metadata.xml                        |  7 ++
 www-nginx/nginx-vod-module/Manifest           |  2 +
 www-nginx/nginx-vod-module/metadata.xml       | 12 +++
 .../nginx-vod-module-1.18.0.1.25.ebuild       | 21 ++++++
 6 files changed, 116 insertions(+)
 create mode 100644 eclass/nginx-module.eclass
 create mode 100644 www-nginx/metadata.xml
 create mode 100644 www-nginx/nginx-vod-module/Manifest
 create mode 100644 www-nginx/nginx-vod-module/metadata.xml
 create mode 100644 www-nginx/nginx-vod-module/nginx-vod-module-1.18.0.1.25.ebuild

-- 
2.26.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-15 18:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-14 16:20 [gentoo-dev] [PATCH 0/3] [RFC] www-nginx/ category and nginx-module.eclass jonas.licht
2021-02-14 16:20 ` [gentoo-dev] [PATCH 1/3] profiles/categories: add www-nginx jonas.licht
2021-02-14 16:20 ` [gentoo-dev] [PATCH 2/3] Add nginx-module.eclass jonas.licht
2021-02-14 17:56   ` Michał Górny
2021-02-14 16:20 ` [gentoo-dev] [PATCH 3/3] www-nginx/nginx-vod-module: add new package jonas.licht
2021-02-28 17:36 ` [gentoo-dev] [PATCH v2 0/3] Version 2 jonas.licht
2021-02-28 17:36   ` [gentoo-dev] [PATCH v2 1/3] profiles/categories: add www-nginx jonas.licht
2021-02-28 17:36   ` [gentoo-dev] [PATCH v2 2/3] Add nginx-module.eclass jonas.licht
2021-02-28 17:36   ` [gentoo-dev] [PATCH v2 3/3] www-nginx/nginx-vod-module: add new package jonas.licht
2021-12-13 21:12   ` [gentoo-dev] [PATCH v2 0/3] Version 2 Jonas Licht
2021-12-15 18:02     ` Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox