[oe] does specifying "--with-mpm=prefork" for apache2 require ugly manual hacking?
Derek Straka
derek at asterius.io
Tue Mar 7 13:40:43 UTC 2017
Since they call out the specific version of 2.4.16, I assume this is based
on the jethro branch. I suppose the multiprocessing module could probably
be a PACKAGECONFIG option[1]. There are several competing multiprocessing
modules that can be configured statically or as shared for dynamic loading
(event[1] vs worker[2] vs prefork[3]).
As far as the do_install_append goes, the installed configuration files for
apache get built up as part of the build from a set of templates in
./docs/conf/. The uncommenting of the mpm line might be part of a
PACAKGECONFIG, but the other lines appear to be specific to their use case
rather than generally applicable to using the prefork module: for example,
they are setting the port to 8081 from port 80 (You can also specify the
port at configure time with --port=PORT).
-Derek
[1] - https://httpd.apache.org/docs/2.4/mpm.html
[2] - https://httpd.apache.org/docs/2.4/mod/event.html
[3] - https://httpd.apache.org/docs/2.4/mod/worker.html
[4] - https://httpd.apache.org/docs/2.4/mod/prefork.html
On Tue, Mar 7, 2017 at 8:05 AM, Robert P. J. Day <rpjday at crashcourse.ca>
wrote:
>
> just ran across the following situation in that an OE build
> (actually, wind river linux, but that should make no difference) has a
> bbappend file, "apache2_2.4.16.bbappend", that appears to be going to
> a great deal of trouble to simply specify "--with-mpm=prefork":
>
> EXTRA_OECONF += " --with-mpm=prefork "
>
> do_install_append() {
> # Make a backup of the original httpd.conf file
> cp ${D}/${sysconfdir}/${BPN}/httpd.conf ${D}/${sysconfdir}/${BPN}/
> httpd.conf.orig
>
> # Remove the two offending lines (to be replaced with the correct
> ones), as well as uncommenting the mpm include directive.
> sed -r 's_^IncludeOptional\s+/etc/apache2/conf.d/\*.conf__' <
> ${D}/${sysconfdir}/${BPN}/httpd.conf.orig | sed -r
> 's_^IncludeOptional\s+/etc/apache2/modules.d/\*.conf__' | sed -r
> 's_^#Include\s+etc/apache2/extra/httpd-mpm.conf_Include
> etc/apache2/extra/httpd-mpm.conf_' | sed -r 's_^Listen 80$_Listen
> 80\n#Temporary use by minion\nListen 8081_' > ${D}/${sysconfdir}/${BPN}/
> httpd.conf
>
> # Replacing the two lines removed previously with the correct ones.
> Loading the modules first, then configure them.
> printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >>
> ${D}/${sysconfdir}/${BPN}/httpd.conf
> printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >>
> ${D}/${sysconfdir}/${BPN}/httpd.conf
> }
>
> i'm unclear on what is happening above, but it seems that asking for
> a simple configuration like that should be available with something as
> basic as adding an option, or selecting PACKAGECONFIG.
>
> am i missing something? is all of the above really necessary to do
> something that looks fairly straightforward?
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter: http://twitter.com/rpjday
> LinkedIn: http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
More information about the Openembedded-devel
mailing list