Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 511658

Summary: >=www-servers/apache-2.4: multiple MPMs not supported
Product: Gentoo Linux Reporter: Michael Orlitzky <mjo>
Component: Current packagesAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: CONFIRMED ---    
Severity: normal CC: arthur, grknight, leho, pacho, slawomir.nizio
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://httpd.apache.org/docs/2.4/mpm.html
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 551078    
Attachments: apache-2.eclsas.patch

Description Michael Orlitzky gentoo-dev 2014-05-28 01:46:58 UTC
In apache 2.4, multiple MPMs are supported when compiled as shared modules. The choice of MPM is then made at runtime using LoadModule (see URL).

This doesn't work in Gentoo:

  $ APACHE2_MPMS="worker prefork" emerge -1 apache
  ...
   * You have selected more then one mpm USE-flag.
   * Only one MPM is supported.
   * ERROR: www-servers/apache-2.4.9-r3::gentoo failed (setup phase):
   *   more then one mpm was specified

There's a restriction in the eclass, but to support more than one, the --enable-shared-mpms configure option will need to be used.

Note: at the moment, this gives us a correspondence between USE=threads and APACHE2_MPMS; i.e. I can tell if the user has a threaded MPM selected by the presence of USE=threads, since he can have only one MPM selected. I'm going to abuse that fact in the mpm_itk ebuild, so if we ever allow multiple MPMs, please ping me to update the USE depencency.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-05-28 06:20:35 UTC
Woah... this will require quite some changes in apache-2.eclass. I cannot promise a quick fix.
Comment 2 Michael Orlitzky gentoo-dev 2014-05-28 13:12:00 UTC
No problem, I'm not asking for one. Nobody else missed it, and it can't affect upgraders.

I opened this mostly so I wouldn't feel guilty depending on apache[-threads] in mpm_itk.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2016-10-11 19:00:07 UTC
Created attachment 449894 [details, diff]
apache-2.eclsas.patch

Here are small changes to apache-2.eclass to support multiple MPMs by a variable in the ebuild