apache-2.eclass
Description
This eclass handles apache-2.x
ebuild functions such as LoadModule
generation and inter-module dependency checking.
Functions
- setup_mpm
-
This internal function makes sure that only one of
APACHE2_MPMS
was selected or a default based onUSE=threads
is selected ifAPACHE2_MPMS
is empty - check_module_critical
-
This internal function warns the user about modules critical for the default apache configuration.
- setup_modules
-
This internal function selects all built-in modules based on USE flags and
APACHE2_MODULES
USE_EXPAND
flags - generate_load_module
-
This internal function generates the
LoadModule
lines forhttpd.conf
based on the current module selection andMODULE_DEFINES
- check_upgrade
-
This internal function checks if the previous configuration file for built-in modules exists in
ROOT
and prevents upgrade in this case. Users are supposed to convert this file to the newAPACHE2_MODULES
USE_EXPAND
variable and remove it afterwards. - apache-2_pkg_setup
-
This function selects built-in modules, the MPM and other configure options, creates the apache user and group and informs about
CONFIG_SYSVIPC
being needed (we don't depend on kernel sources and therefore cannot check). - apache-2_src_prepare
-
This function applies patches, configures a custom file-system layout and rebuilds the configure scripts.
- apache-2_src_configure
-
This function adds compiler flags and runs econf and emake based on
MY_MPM
andMY_CONF
- apache-2_src_install
-
This function runs
emake install
and generates, installs and adapts the gentoo specific configuration files found in the tarball - apache-2_pkg_postinst
-
This function creates test certificates if SSL is enabled and installs the default
index.html
to/var/www/localhost
if it does not exist. We do this here because the default webroot is a copy of the files that exist elsewhere and we don't want them to be managed/removed by portage when apache is upgraded.
Variables
- GENTOO_PATCHNAME ?= gentoo-${PF}
-
This internal variable contains the prefix for the patch tarball. Defaults to the full name and version (including revision) of the package. If you want to override this in an ebuild, use:
ORIG_PR="(revision of Gentoo stuff you want)" GENTOO_PATCHNAME="gentoo-${PN}-${PV}${ORIG_PR:+-${ORIG_PR}}"
- GENTOO_PATCHDIR ?= ${WORKDIR}/${GENTOO_PATCHNAME}
-
This internal variable contains the working directory where patches and config files are located. Defaults to the patchset name appended to the working directory.
- MY_MPM
-
This internal variable contains the selected MPM after a call to
setup_mpm()
- MY_CONF
-
This internal variable contains the
econf
options for the current module selection after a call tosetup_modules
- MY_MODS
-
This internal variable contains a sorted, space separated list of currently selected modules after a call to
setup_modules
Function Variables
- GENTOO_DEVELOPER
-
This variable needs to be set in the ebuild and contains the name of the gentoo developer who created the patch tarball
- GENTOO_PATCHSTAMP
-
This variable needs to be set in the ebuild and contains the date the patch tarball was created at in YYYYMMDD format
- GENTOO_PATCH_A
-
This variable should contain the entire filename of patch tarball. Defaults to the name of the patchset, with a datestamp.
- IUSE_MPMS_FORK
-
This variable needs to be set in the ebuild and contains a list of forking (i.e. non-threaded) MPMs
- IUSE_MPMS_THREAD
-
This variable needs to be set in the ebuild and contains a list of threaded MPMs
- IUSE_MODULES
-
This variable needs to be set in the ebuild and contains a list of available built-in modules
- MODULE_DEPENDS
-
This variable needs to be set in the ebuild and contains a space-separated list of dependency tokens each with a module and the module it depends on separated by a colon
- MODULE_CRITICAL
-
This variable needs to be set in the ebuild and contains a space-separated list of modules critical for the default apache. A user may still disable these modules for custom minimal installation at their own risk.
- MODULE_DEFINES
-
This variable needs to be set in the ebuild and contains a space-separated list of tokens each mapping a module to a runtime define which can be specified in
APACHE2_OPTS
in/etc/conf.d/apache2
to enable this particular module.
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/