Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Yi Zhao" <yi.zhao@windriver.com>
To: <yocto@yoctoproject.org>, <joe@deserted.net>, <Joe_MacDonald@mentor.com>
Subject: [meta-selinux][PATCH 3/6] libsemanage: fix race issue in parallel build
Date: Mon, 23 Dec 2019 16:21:49 +0800	[thread overview]
Message-ID: <20191223082152.7706-3-yi.zhao@windriver.com> (raw)
In-Reply-To: <20191223082152.7706-1-yi.zhao@windriver.com>

The install-pywarp target doesn't depend on swigify target because the
semanage.py is not generated by swigify target but pywrap target.
Here is the dependency chain:
  install-pywrap -> pywrap -> $(SWIGSO) -> $(SWIGLOBJ) -> $(SWIGCOUT)
  -> semanage.py

But in the recipe, the swigify target is added explicitly in do_install:
  do_install_append() {
    oe_runmake install-pywrap swigify \
    [snip]
  }

This target will regenerate the semanage.py when do_install. So there
will be a potential race issue in parallel build. The install-pywrap
target is trying to install semanage.py when swigify target is
generating the file. Then an empty semanage.py will be installed. Remove
the target swigify to fix this issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 recipes-security/selinux/libsemanage.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-security/selinux/libsemanage.inc b/recipes-security/selinux/libsemanage.inc
index 9dc1095..81a3eda 100644
--- a/recipes-security/selinux/libsemanage.inc
+++ b/recipes-security/selinux/libsemanage.inc
@@ -32,7 +32,7 @@ do_compile_append() {
 }
 
 do_install_append() {
-    oe_runmake install-pywrap swigify \
+    oe_runmake install-pywrap \
             PYCEXT='.so' \
             PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
             PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
-- 
2.17.1


  parent reply	other threads:[~2019-12-23  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23  8:21 [meta-selinux][PATCH 1/6] python-ipy: remove recipe Yi Zhao
2019-12-23  8:21 ` [meta-selinux][PATCH 2/6] libselinux-python: fix race issue in parallel build Yi Zhao
2019-12-23  8:21 ` Yi Zhao [this message]
2019-12-23  8:21 ` [meta-selinux][PATCH 4/6] selinux-initsh.inc: install selinux-init.sh and selinux-labeldev.sh when using systemd Yi Zhao
2019-12-24 14:22   ` Joe MacDonald
2019-12-25  7:44     ` Yi Zhao
2019-12-23  8:21 ` [meta-selinux][PATCH 5/6] refpolicy: add UPSTREAM_CHECK_GITTAGREGEX Yi Zhao
2019-12-23  8:21 ` [meta-selinux][PATCH 6/6] refpolicy: switch to python3 Yi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191223082152.7706-3-yi.zhao@windriver.com \
    --to=yi.zhao@windriver.com \
    --cc=Joe_MacDonald@mentor.com \
    --cc=joe@deserted.net \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox