[oe] does specifying "--with-mpm=prefork" for apache2 require ugly manual hacking?

Robert P. J. Day rpjday at crashcourse.ca
Tue Mar 7 13:05:40 UTC 2017


  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
========================================================================




More information about the Openembedded-devel mailing list