* [Buildroot] Nginx package
@ 2015-12-26 9:27 Geoffrey Ragot
2015-12-26 9:58 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Geoffrey Ragot @ 2015-12-26 9:27 UTC (permalink / raw)
To: buildroot
Hello,
I have a question related to packages dependencies.
I have a case where i want to compile nginx with some additionnal
modules (luajit).
I can define modules paths in the nginx config, but i don't find a way
to say buildroot to compile these additional modules before nginx,
otherwise than modifying nginx dependencies.
Is there a way to override dependencies of a package where a package is
selected?
Regards,
Geoffrey Ragot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Nginx package
2015-12-26 9:27 [Buildroot] Nginx package Geoffrey Ragot
@ 2015-12-26 9:58 ` Thomas Petazzoni
2015-12-26 12:14 ` Geoffrey Ragot
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-12-26 9:58 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 26 Dec 2015 10:27:58 +0100, Geoffrey Ragot wrote:
> I have a question related to packages dependencies.
>
> I have a case where i want to compile nginx with some additionnal
> modules (luajit).
> I can define modules paths in the nginx config, but i don't find a way
> to say buildroot to compile these additional modules before nginx,
> otherwise than modifying nginx dependencies.
Well, look at nginx.mk, there are plenty of examples:
ifeq ($(BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE),y)
NGINX_DEPENDENCIES += zlib
NGINX_CONF_OPTS += --with-http_spdy_module
endif
If BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE is enabled, then zlib is
guaranteed to be built before nginx, and the option
--with-http_spdy_module will be passed to the nginx configure script.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Nginx package
2015-12-26 9:58 ` Thomas Petazzoni
@ 2015-12-26 12:14 ` Geoffrey Ragot
2015-12-26 14:42 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Geoffrey Ragot @ 2015-12-26 12:14 UTC (permalink / raw)
To: buildroot
Hello,
the pb is that luajit (in the context) is not a builtin module of nginx.
It has to be built in a directory and nginx has to be compiled with
"--add-module <path_to_luajit>".
The nginx package has an option to specify "--add-module" arguments but
in this case, the dependency is not clearly mentionned in nginx.mk.
I have to care about build luajit before nginx to ensure that
<path_to_luajit> contains required files.
On 12/26/2015 10:58 AM, Thomas Petazzoni wrote:
> Hello,
>
> On Sat, 26 Dec 2015 10:27:58 +0100, Geoffrey Ragot wrote:
>
>> I have a question related to packages dependencies.
>>
>> I have a case where i want to compile nginx with some additionnal
>> modules (luajit).
>> I can define modules paths in the nginx config, but i don't find a way
>> to say buildroot to compile these additional modules before nginx,
>> otherwise than modifying nginx dependencies.
> Well, look at nginx.mk, there are plenty of examples:
>
> ifeq ($(BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE),y)
> NGINX_DEPENDENCIES += zlib
> NGINX_CONF_OPTS += --with-http_spdy_module
> endif
>
> If BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE is enabled, then zlib is
> guaranteed to be built before nginx, and the option
> --with-http_spdy_module will be passed to the nginx configure script.
>
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Nginx package
2015-12-26 12:14 ` Geoffrey Ragot
@ 2015-12-26 14:42 ` Thomas Petazzoni
2015-12-26 15:46 ` Danomi Manchego
2015-12-26 16:58 ` Geoffrey Ragot
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2015-12-26 14:42 UTC (permalink / raw)
To: buildroot
Geoffrey,
On Sat, 26 Dec 2015 13:14:31 +0100, Geoffrey Ragot wrote:
> the pb is that luajit (in the context) is not a builtin module of nginx.
> It has to be built in a directory and nginx has to be compiled with
> "--add-module <path_to_luajit>".
>
> The nginx package has an option to specify "--add-module" arguments but
> in this case, the dependency is not clearly mentionned in nginx.mk.
> I have to care about build luajit before nginx to ensure that
> <path_to_luajit> contains required files.
I see two options here:
(1) If you really need to have the source of the Nginx Lua module
extracted before building nginx in order to use the --add-module
option, then you will have to create a package like nginx-lua,
that only downloads/extracts the module source code (and does not
build/install it). Then you change the nginx package to depend on
this nginx-lua package, and you pass --add-module=$(NGINX_LUA_DIR).
(2) If however, it is possible to build nginx-lua after nginx, then
you can do a better and more traditional packaging. Even though
they document --add-module as being the way of building nginx-lua,
all it seems to do during nginx configure is calling the "config"
script from nginx-lua, and then the "config.make" script. So I am
pretty sure it is possible to build nginx-lua after nginx.
If it is possible, (2) would be preferred.
Note that this is clearly not a trivial package to create.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Nginx package
2015-12-26 14:42 ` Thomas Petazzoni
@ 2015-12-26 15:46 ` Danomi Manchego
2015-12-26 16:58 ` Geoffrey Ragot
1 sibling, 0 replies; 6+ messages in thread
From: Danomi Manchego @ 2015-12-26 15:46 UTC (permalink / raw)
To: buildroot
On Sat, Dec 26, 2015 at 9:42 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Geoffrey,
>
> On Sat, 26 Dec 2015 13:14:31 +0100, Geoffrey Ragot wrote:
>
>> the pb is that luajit (in the context) is not a builtin module of nginx.
>> It has to be built in a directory and nginx has to be compiled with
>> "--add-module <path_to_luajit>".
>>
>> The nginx package has an option to specify "--add-module" arguments but
>> in this case, the dependency is not clearly mentionned in nginx.mk.
>> I have to care about build luajit before nginx to ensure that
>> <path_to_luajit> contains required files.
>
> I see two options here:
>
> (1) If you really need to have the source of the Nginx Lua module
> extracted before building nginx in order to use the --add-module
> option, then you will have to create a package like nginx-lua,
> that only downloads/extracts the module source code (and does not
> build/install it). Then you change the nginx package to depend on
> this nginx-lua package, and you pass --add-module=$(NGINX_LUA_DIR).
>
> (2) If however, it is possible to build nginx-lua after nginx, then
> you can do a better and more traditional packaging. Even though
> they document --add-module as being the way of building nginx-lua,
> all it seems to do during nginx configure is calling the "config"
> script from nginx-lua, and then the "config.make" script. So I am
> pretty sure it is possible to build nginx-lua after nginx.
>
> If it is possible, (2) would be preferred.
>
> Note that this is clearly not a trivial package to create.
FWIW: I had to do option 1 for a few ngx-* packages, as Thomas
described: for each one. I made an ngx-xxx package that simply
extracts, added a sub-option to nginx's Config.in file, and then added
lines to the end of nginx.mk to add ngx-xxx to NGINX_DEPENDENCIES, and
the additional --add-module term. The result is that the additional
source files are built and linked in to the one single nginx
executable - no .so option.
That was maybe six months ago. At around that time, I heard that
nginx would eventually be introducing better support to have these
things be more like plugins or shared objects so that this mechanism
wouldn't be needed. That sounded hopeful, but we needed an immediate
solution. Even if the feature had been ready, we would have preferred
to use a "stable" nginx release rather than depending on a brand new
feature in the "mainline" release.
Danomi -
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Nginx package
2015-12-26 14:42 ` Thomas Petazzoni
2015-12-26 15:46 ` Danomi Manchego
@ 2015-12-26 16:58 ` Geoffrey Ragot
1 sibling, 0 replies; 6+ messages in thread
From: Geoffrey Ragot @ 2015-12-26 16:58 UTC (permalink / raw)
To: buildroot
Ok.
I will try the second way, it seems to be more straightforward if it works.
Thks for help.
Regards,
Geoffrey Ragot
On 12/26/2015 03:42 PM, Thomas Petazzoni wrote:
> Geoffrey,
>
> On Sat, 26 Dec 2015 13:14:31 +0100, Geoffrey Ragot wrote:
>
>> the pb is that luajit (in the context) is not a builtin module of nginx.
>> It has to be built in a directory and nginx has to be compiled with
>> "--add-module <path_to_luajit>".
>>
>> The nginx package has an option to specify "--add-module" arguments but
>> in this case, the dependency is not clearly mentionned in nginx.mk.
>> I have to care about build luajit before nginx to ensure that
>> <path_to_luajit> contains required files.
> I see two options here:
>
> (1) If you really need to have the source of the Nginx Lua module
> extracted before building nginx in order to use the --add-module
> option, then you will have to create a package like nginx-lua,
> that only downloads/extracts the module source code (and does not
> build/install it). Then you change the nginx package to depend on
> this nginx-lua package, and you pass --add-module=$(NGINX_LUA_DIR).
>
> (2) If however, it is possible to build nginx-lua after nginx, then
> you can do a better and more traditional packaging. Even though
> they document --add-module as being the way of building nginx-lua,
> all it seems to do during nginx configure is calling the "config"
> script from nginx-lua, and then the "config.make" script. So I am
> pretty sure it is possible to build nginx-lua after nginx.
>
> If it is possible, (2) would be preferred.
>
> Note that this is clearly not a trivial package to create.
>
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-26 16:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-26 9:27 [Buildroot] Nginx package Geoffrey Ragot
2015-12-26 9:58 ` Thomas Petazzoni
2015-12-26 12:14 ` Geoffrey Ragot
2015-12-26 14:42 ` Thomas Petazzoni
2015-12-26 15:46 ` Danomi Manchego
2015-12-26 16:58 ` Geoffrey Ragot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox