From: "Ludovic Courtès" <ludo@gnu.org>
To: mirai <mirai@makinata.eu>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Improving how NGINX modules are used and built
Date: Mon, 09 Jan 2023 11:51:37 +0100 [thread overview]
Message-ID: <87pmborneu.fsf@gnu.org> (raw)
In-Reply-To: <dbd69b6b-4558-ec65-7efb-ec8a9cf22d74@makinata.eu> (mirai@makinata.eu's message of "Thu, 29 Dec 2022 02:10:27 +0000")
Hello!
mirai <mirai@makinata.eu> skribis:
> An oddity of how nginx modules are packaged in guix is that they all place
> the .so file under /etc/nginx/modules which is an odd directory to place library object files.
To me that should be treated as a bug. Those .so files should go to
$PKG/lib/nginx instead, or something similar.
> Looking at how network-manager-configuration handles its vpn-plugins field, it seems doable
> that a similar approach can be used here.
> The existing nginx-modules should be changed to install their .so files under lib{64}/nginx
> instead and they should drop a etc/nginx/modules/foo_module.conf file responsible for loading
> the module from the .so file. Including modules through a .conf should be preferred as
> there's no guarantee that a module is a .so file or that it is always a
> _single_ .so file but in general this file should typically be a one-line .conf file containing:
>
> load_module "/gnu/store/......nginx-foo-module/usr/lib64/nginx/ngx_foo_module.so";
>
>
> And nginx-configuration should serialize the modules field as a series of lines including
> the module .conf files, that is:
>
> include "/gnu/store/......nginx-foo-module/etc/nginx/modules/ngx_foo_module.conf";
> include "/gnu/store/......nginx-bar-module/etc/nginx/modules/ngx_bar_module.conf";
> ...
>
> (note: a directory union could be used here as an alternative)
I’d say that ideally, one could extend <nginx-configuration> with
modules, and that would automatically create the ‘load_module’
statements.
> On a related note, given how nginx-modules are expected to be built and linked against the
> same nginx build, a new nginx-build-system for nginx modules could be considered as the few
> existing nginx modules in guix are for the most part a copy-paste of each other with some
> modifications here-and-there.
That would be an improvement, indeed!
Thanks,
Ludo’.
next prev parent reply other threads:[~2023-01-09 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 2:10 Improving how NGINX modules are used and built mirai
2023-01-09 10:51 ` Ludovic Courtès [this message]
2023-01-11 11:58 ` Bruno Victal
2023-01-17 15:58 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmborneu.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mirai@makinata.eu \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).