Apache2: Add libselinux dependency and Disable parallel install
PATCH 1/1 Apache2: Add libselinux dependency and Disable parallel install
From: Roy.Li <[email protected]>
1. Add conditional dependency on libselinux to apache2.
2. Disable parallel make install
apache2 supports parallel make install, before installation, it will firstly call build/mkdir.sh to create needed directories. build/mkdir.sh first checks if a directory exists or not, if not, it will create this directory, when mkdir.sh is called by many instances parallel, it will introduce race, namely the result of checking says one directory does not exist, but when it tries to mkdir, this directory has been created by other instance.
--- .../recipes-httpd/apache2/apache2_2.4.2.bb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb +6 -0
@@ -52,6 +52,12 @@ EXTRA_OECONF = "--enable-ssl \ --enable-mpms-shared \ ac_cv_have_threadsafe_pollset=no" +PARALLEL_MAKEINST = "" + +PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" +PACKAGECONFIG[selinux] = "ac_cv_lib_selinux_is_selinux_enabled=yes, \ + ac_cv_lib_selinux_is_selinux_enabled=no, libselinux," + do_configure_prepend() { # FIXME: this hack is required to work around an issue with apr/apr-util # Can be removed when fixed in OE-Core (also revert --with-* options above)
Signature · 1 line
1.7.4.1
Quoted 9 lines · On Tue, Nov 6, 2012 at 10:57 PM, <[email protected]> wrote:
2. Disable parallel make install
apache2 supports parallel make install, before installation, it will firstly callbuild/mkdir.shto create needed directories.build/mkdir.shfirst checks if a directory exists or not, if not, it will create this directory, whenmkdir.shis called by many instances parallel, it will introduce race, namely the result of checking says one directory does not exist, but when it tries to mkdir, this directory has been created by other instance.
How much work would it be to change it to run 'mkdir -p' rather than build/mkdir.sh, e.g. via a variable in EXTRA_OEMAKE?
Signature · 1 line
Christopher Larson
Quoted 12 lines · Chris Larson
Quoted 9 lines · On Tue, Nov 6, 2012 at 10:57 PM, <[email protected]> wrote:
2. Disable parallel make install
apache2 supports parallel make install, before installation, it will firstly callbuild/mkdir.shto create needed directories.build/mkdir.shfirst checks if a directory exists or not, if not, it will create this directory, whenmkdir.shis called by many instances parallel, it will introduce race, namely the result of checking says one directory does not exist, but when it tries to mkdir, this directory has been created by other instance.
Quoted 3 lines
How much work would it be to change it to run 'mkdir -p' rather than
build/mkdir.sh, e.g. via a variable inEXTRA_OEMAKE?
"mkdir -p", plus ignoring return result of mkdir should be worked, but it can not be passed in by variable in EXTRA_OEMAKE, maybe need a patch.
Since this bug is hard to reproduce, so I simply disable the parallel install.
Signature · 2 lines
Best Reagrds, Roy | RongQing Li