In EAPI 9, NGINX_MOD_S is completely removed/banned and
NGINX_MOD_INSTALL_CONF_STUB is enabled unconditionally.
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
In EAPI 9, NGINX_SUPPORT_MODULE_STUBS is enabled unconditionally.
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit improves the UX of nginx-module.eclass by adding automatic
generation of NGINX configurations stubs which load their repsective
modules. The stub is only generated if NGINX_MOD_INSTALL_CONF_STUB is
set.
With the stub installed, only one invocation of `ln` is necessary to
enable the module. There is current work in progress on a more
convenient way to toggle modules, i.e. eselect module.
Bug: https://bugs.gentoo.org/967022
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This directory layout allows for more flexible dynamic module
management. nginx-module.eclass generates `load_module` .conf stubs for
every module and installs them into /etc/nginx/modules-available. Then,
modules can be enabled or disabled by adding or removing symlinks from
/etc/nginx/modules-enabled to /etc/nginx/modules-available, potentially
with an eselect module. See bug 967022 for background information.
This commit adds a new eclass variable NGINX_SUPPORT_MODULE_STUBS that
must be turned on to create the directories and add the include into
shipped nginx.conf. Also, the live NGINX version is bumped setting the
new variable.
Bug: https://bugs.gentoo.org/967022
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Since the introduction of this eclass to the tree, ${S} has always
pointed to the fake NGINX build system directory (i.e. the directory
with symlinks 'src/', 'configure' and 'auto/').
This caused problems in the past, e.g. see commit
fffbf942fc "nginx-module.eclass: Add
NGINX_MOD_CONFIG_DIR, fixup www-nginx/ngx-naxsi". Additionally, ${S} not
pointing to real sources required manual integration for live ebuilds
using git-r3 and Mercurial eclasses alike.
Following Sam's advice on IRC, this commit swaps ${S} and ${NGINX_MOD_S}
to ${NGINX_S} and ${S} respectively. Now, ${S} points to the actual
module's source, easing integration with other eclasses, and ${NGINX_S}
points to our fake build environment. Each phase function, when needed,
obviously pushd'es into ${NGINX_S}.
${NGINX_MOD_S} is now an alias to ${S}; it is deprecated and will be out
of the door in EAPI 9. No ebuilds listed on gpo.zugaina.org reference
${NGINX_MOD_S} so it is safe to not synchronise its value with ${S}.
git-r3 and mercurial eclasses may now be used with nginx-module.eclass
as in every other ebuild: set the relevant E(GIT|HG)_REPO_URI, inherit
the required eclass, and you are good to go!
Closes: https://bugs.gentoo.org/967171
Suggested-by: Sam James <sam@gentoo.org>
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Previously, the arguments were appended into the patched-in environment
variable that would feed its contents into the build system of NGINX,
which caused many funny issues that can be discovered, for example, by
looking this commit's diff.
This commit instead makes use of the awesome response files, which allow
putting arguments in a file and have the compiler interpret them
directly without 4 layers of eval and a very helpful Make
interpretation. Thank you.
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Previously, contrary to what was written, the function exited with the
exit code of ./configure (which is 1 if --help is passed). This commit
makes the function return 0 explicitly.
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This is needed to satisfy the build system, but does not affect the
installed multilib artifacts (libudev).
This dependency was made optional after the 259 release.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>