Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 578658 - www-servers/nginx: should use REQUIRED_USE for http-modules rather than silently ignoring USE=http
Summary: www-servers/nginx: should use REQUIRED_USE for http-modules rather than silen...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-31 05:22 UTC by Sam Jorna (wraeth) (RETIRED)
Modified: 2023-07-16 21:51 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Jorna (wraeth) (RETIRED) gentoo-dev 2016-03-31 05:22:13 UTC
At present, nginx defines a 'http' flag in IUSE, however as noted in the ebuild:

> # - any http-module activates the main http-functionality and overrides USE=-http

This then goes on to set a 'http_enabled' variable during configure and uses that as the status of the http flag:

> # HTTP modules
> for mod in $NGINX_MODULES_STD; do
>     if use nginx_modules_http_${mod}; then
>         http_enabled=1
>     else
>         myconf+=( --without-http_${mod}_module )
>     fi
> done

And finally:

> if [ $http_enabled ]; then
>     use http-cache || myconf+=( --without-http-cache )
>     use ssl && myconf+=( --with-http_ssl_module )
> else
>     myconf+=( --without-http --without-http-cache )
> fi

This should instead be handled with a REQUIRED_USE rather than silently ignoring the USE flag. This could be done with something like:

> for mod in $NGINX_MODULES_STD; do
>     REQUIRED_USE="${REQUIRED_USE}
>         nginx_modules_http_${mod}? ( http )"
> done
> for mod in $NGINX_MODULES_OPT; do
>     REQUIRED_USE="${REQUIRED_USE}
>         nginx_modules_http_${mod}? ( http )"
> done
> for mod in $NGINX_MODULES_3RD; do
>     # all current 3rd-party mods are http-*
>     REQUIRED_USE="${REQUIRED_USE}
>         nginx_modules_${mod}? ( http )"
> done

The setting/checking of ${http_enabled} would also then need to be reworked.