From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from yocto-www.yoctoproject.org (yocto-www.yoctoproject.org [140.211.169.56]) by mx.groups.io with SMTP id smtpd.web11.845.1577089390827538014 for ; Mon, 23 Dec 2019 00:23:10 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: windriver.com, ip: 140.211.169.56, mailfrom: yi.zhao@windriver.com) Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id AE690E0122E; Mon, 23 Dec 2019 00:23:10 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, * medium trust * [192.103.53.11 listed in list.dnswl.org] Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8D206E01163 for ; Mon, 23 Dec 2019 00:23:09 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id xBN8MBTC004697 (version=TLSv1 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 23 Dec 2019 00:22:22 -0800 Received: from localhost (128.224.162.174) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 23 Dec 2019 00:22:01 -0800 From: "Yi Zhao" To: , , Subject: [meta-selinux][PATCH 3/6] libsemanage: fix race issue in parallel build Date: Mon, 23 Dec 2019 16:21:49 +0800 Message-ID: <20191223082152.7706-3-yi.zhao@windriver.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223082152.7706-1-yi.zhao@windriver.com> References: <20191223082152.7706-1-yi.zhao@windriver.com> MIME-Version: 1.0 X-Originating-IP: [128.224.162.174] Content-Type: text/plain 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 --- 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