Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427946 - apache-2.eclass: Proposed enhancement: USE_EXPAND of APACHE2_MODULES should support IUSE-DEFAULTS
Summary: apache-2.eclass: Proposed enhancement: USE_EXPAND of APACHE2_MODULES should s...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-07-24 21:28 UTC by Stefan Kuhn
Modified: 2018-02-04 13:02 UTC (History)
3 users (show)

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


Attachments
apache-2.eclass.patch (apache-2.eclass.patch,832 bytes, patch)
2012-07-24 21:34 UTC, Stefan Kuhn
Details | Diff
apache-2.eclass.MODULE_DEFAULTS.patch (bug-427946.MODULE_DEFAULTS.txt,271 bytes, patch)
2012-07-26 11:31 UTC, Stefan Kuhn
Details | Diff
apache-2.eclass.MODULE_DEFAULTS.patch (apache-2.eclass.MODULE_DEFAULTS.patch,934 bytes, patch)
2012-07-26 11:34 UTC, Stefan Kuhn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kuhn 2012-07-24 21:28:08 UTC
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
Comment 1 Stefan Kuhn 2012-07-24 21:34:44 UTC
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 ...
Comment 2 Stefan Kuhn 2012-07-24 22:02:31 UTC
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.
Comment 3 Jeroen Roovers gentoo-dev 2012-07-25 01:34:43 UTC
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
Comment 4 Stefan Kuhn 2012-07-26 11:31:52 UTC
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.
Comment 5 Stefan Kuhn 2012-07-26 11:32:35 UTC
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.
Comment 6 Stefan Kuhn 2012-07-26 11:34:29 UTC
Created attachment 319294 [details, diff]
apache-2.eclass.MODULE_DEFAULTS.patch

Wrong file, sorry
Comment 7 Stoian Ivanov 2012-09-04 08:13:23 UTC
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
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-04 13:02:43 UTC
(reassigning to the current maintainer of the eclass)