• [gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Sep 2 12:50:01 2021
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/apache-module.eclass | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
    index 2594445c8b4f..16ebed9faa96 100644
    --- a/eclass/apache-module.eclass
    +++ b/eclass/apache-module.eclass
    @@ -5,6 +5,7 @@
    # @MAINTAINER:
    # apache-bugs@gentoo.org
    # @SUPPORTED_EAPIS: 5 6 7
    +# @PROVIDES: depend.apache
    # @BLURB: Provides a common set of functions for apache modules
    # @DESCRIPTION:
    # This eclass handles apache modules in a sane way.
    --
    2.33.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to All on Thu Sep 2 15:10:01 2021
    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.

    Disclaimer: I'm not the apache maintainer.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Michael Orlitzky on Thu Sep 2 15:10:03 2021
    On Thu, 2021-09-02 at 08:50 -0400, Michael Orlitzky wrote:
    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:

    libapreq2/libapreq2-2.15-r1.ebuild:need_apache2 libapreq2/libapreq2-2.16.ebuild:need_apache2 mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild:need_apache2 mod_auth_radius/mod_auth_radius-1.5.8.ebuild:need_apache2 mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild:need_apache2 mod_authnz_external/mod_authnz_external-3.3.2.ebuild:need_apache2_4
    ...

    Ofc, I'm fine with leaving it as-is, i.e. assuming they all need to
    inherit depend.apache explicitly.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to All on Thu Sep 2 16:10:01 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Michael Orlitzky on Thu Sep 2 16:40:03 2021
    On Thu, 2021-09-02 at 09:50 -0400, Michael Orlitzky wrote:
    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.


    Ok, I've removed this commit from my branch. If maintainers want it
    otherwise, it's easy enough to do it again.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)