Proposed Enhancement: --------------------- Change the behavior of APACHE2_MODULES USE_EXPAND in apache-2.eclass to support IUSE-DEFAULTS, so we can define default modules in the ebuild. Example: -------- IUSE_MODULES="+foo" would become IUSE="+apache2_modules_foo" Reason: ------- Currently default modules for www-servers/apache are only defined as APACHE2_MODULES in the base profile at /usr/portage/profiles/base/make.defaults There is no other way to set defaults with current apache-2.eclass, I tried hard. Now apache-2.4 replaced/renamed some modules, split up modules, etc. So the defaults would need an update. Current strategy in the ebuild/eclass is also to allow installation without critical modules, only a warning in apache-2-pkg_setup() is displayed. This is fine, as long as the default modules are compliant. So with apache-2.4, every user will run into errors about missing packages and then has to set some flags manually. Other Solutions: ---------------- I played with the ebuild/eclass a while and see only these other solutions, none satisfying: a) Display warnings: Either the current way with MODULE_CRITICAL or special warnings in pkg_postinst(). Every user will still have to set flags manually. b) Hard disabling installations without critical modules Still an error for everyone, earlier and possible with smarter warning message. c) Hard enabling new/critical modules Possible by abusing the eclass-internal MY_MODS in the ebuild as in MY_MODS="${MY_MODS} foo" d) Continuous updates of default modules in the profile
Created attachment 319136 [details, diff] apache-2.eclass.patch I'm sure there are better ways to code this, but it's simple and works in my tests ...
If that is not compliant with definition of USE_EXPAND in the PMS, then I would propose introducing a new variable to the eclass "MODULE_DEFAULTS" with the same effect.
Bugzilla says: Assignee: apache-devs@gentoo.org did not match anything --- apache-2.eclass 23 May 2012 03:24:44 -0000 1.29 +++ apache-2.eclass 25 Jul 2012 01:34:01 -0000 @@ -4,7 +4,7 @@ # @ECLASS: apache-2.eclass # @MAINTAINER: -# apache-devs@gentoo.org +# apache-bugs@gentoo.org # @BLURB: Provides a common set of functions for apache-2.x ebuilds # @DESCRIPTION: # This eclass handles apache-2.x ebuild functions such as LoadModule generation
Created attachment 319292 [details, diff] apache-2.eclass.MODULE_DEFAULTS.patch Other solution: New eclass variable MODULE_DEFAULTS --------------------------------------------------- The attached diff contains a tested patch to the eclass. The effect is the same: => we can set sane default modules/flags in the ebuild without touching the profile.
Sidenote: EAPI >2 throws QA-notice: ebeep not defined -------------------------------------------- I would also like to use REQUIRED_USE for apache-2.4, thus lifting EAPI from 2 to 4. But imho, the eclass is not completly conform with EAPI >2. This QA-notice shows up in apache-2_pkg_setup(). * QA Notice: ebeep is not defined in EAPI=4, please file a bug at * http://bugs.gentoo.org * Please note that you need SysV IPC support in your kernel. * Make sure CONFIG_SYSVIPC=y is set.
Created attachment 319294 [details, diff] apache-2.eclass.MODULE_DEFAULTS.patch Wrong file, sorry
I'm willing to test anything. Can we have apache-24.eclass that best suits your thoughts and probably a new slot for 2.4? I think this will isolate 2.4 well enough but I'm not a ebuild dev
(reassigning to the current maintainer of the eclass)