Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/apache-module.eclass | 1 +
1 file changed, 1 insertion(+)
...
# @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: depend.apache
On Thu, 2021-09-02 at 12:46 +0200, Michał Górny wrote:
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/apache-module.eclass | 1 +
1 file changed, 1 insertion(+)
...
# @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: depend.apache
I'm not sure about this one. The depend.apache eclass is junk and we
should be encouraging people to move away from it (bug 616612):
* If you want to depend on apache, depend on apache.
* If you need paths like APACHE_MODULESDIR, the "apxs" tool is now
in PATH so you can get it from $(apxs -q libexecdir)
* If you need paths like APACHE_MODULES_CONFDIR, the eclass doesn't
work anyway. You can hard-code those paths yourself (relative to
apxs -q sysconfdir), or if anyone feels up to the task, they could
write a greatly simplified apache-paths.eclass that provides these
paths via functions that are to be called outside of global scope.
If people are using anything in depend.apache, I think a warning is appropriate. Making a promise that apache-module (which is not junk)
provides depend.apache will moreover make it harder to disentangle them
in the future if anyone decides to fix things.
Apparently, need_apache* is the problem. Most of the ebuilds in www- apache/* are calling it:
On Thu, 2021-09-02 at 14:58 +0200, Michał Górny wrote:
Apparently, need_apache* is the problem. Most of the ebuilds in www- apache/* are calling it:
The apache-module eclass tells you to do that because it needs some of
those APACHE_* paths. It should really be figuring them out itself
rather than telling the user to call a function that does it in global
scope. It's an easy fix:
APXS=apxs
APACHE_MODULESDIR=$(apxs -q libexecdir)
APACHE_MODULES_CONFDIR=$(apxs -q sysconfdir)/modules.d
APACHE_VHOSTS_CONFDIR=$(apxs -q sysconfdir)/vhosts.d
On the one hand, we probably don't want ebuild maintainers trying to
solve that themselves when the eclass could do it. But for whatever
such a promise is worth, it also feels wrong to promise that apache-
module will provide all of depend.apache -- what if we someday apply
the fix above to apache-module and want to drop the depend.apache
inherit?
If we do ever update apache-module, updating ebuilds and retiring depend.apache would be a lot easier if you could find the candidates
with `git grep depend.apache`, rather than having to look through all consumers of apache-module for implicit uses of depend.apache.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 219:49:52 |
Calls: | 6,622 |
Calls today: | 4 |
Files: | 12,171 |
Messages: | 5,317,875 |