public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: jonas.licht@fem.tu-ilmenau.de
To: gentoo-dev@lists.gentoo.org
Cc: Jonas Licht <jonas.licht@fem.tu-ilmenau.de>
Subject: [gentoo-dev] [PATCH 0/3] [RFC] www-nginx/ category and nginx-module.eclass
Date: Sun, 14 Feb 2021 17:20:34 +0100	[thread overview]
Message-ID: <20210214162035.16786-1-jonas.licht@fem.tu-ilmenau.de> (raw)

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



             reply	other threads:[~2021-02-14 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 16:20 jonas.licht [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210214162035.16786-1-jonas.licht@fem.tu-ilmenau.de \
    --to=jonas.licht@fem.tu-ilmenau.de \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox