From patchwork Thu May 25 11:16:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 100479 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp711498qge; Thu, 25 May 2017 04:17:21 -0700 (PDT) X-Received: by 10.84.215.23 with SMTP id k23mr8708040pli.104.1495711041029; Thu, 25 May 2017 04:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495711041; cv=none; d=google.com; s=arc-20160816; b=nNldOdbTsuyKBsmeVjZnzbriS36QpW6UQjA9/8GwNc+w3EuknpmoVBKErcS0ishxcX /xt3jZ3R90zzwtAjuApbd7ThVERfxXfrctKUKcU5wwOJME1GsKSOtnc0OX5mISVzkgVv Y0J3kSemRa354ecaR+981qXr0mizXNRGz7e0vo4+AZoyfZKHLmDJ2m1QgiyN6RM7OBxr NBrx+qoICM0VJOBPnjt2KURCmacNUsmlgAJIKiS0AB3gePQgKye2GoKxEzuVDNtwfy/B fuH+9bEylCED7d09qC1S5+MlQQOXEW3sLgYihSn3n9ZCsTJsUfnlQvo6ap9RelBMDxE5 0mDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=6O5cPANVhiZssMr6xwn/zNg+VksDmWFIZJM3qFF5x4M=; b=cIepLKSjTQfk5aUqH445uv7W+4DYpzja538d5TilVsr1ibBlH3XHrfeCnoBHqkY8ZA gNkIgz4eiilunoeS/DqxMI7dRHi80S/0hbvEt2TskbjMPnHxV7QtwC+ydIJbzcjlR2r7 nVueTSEBqWRpRVR91Yv4xHztTQLxiaFwGNmOHIYJK32Kvos/6RBfreX9LrNCGCJHtv7M 2zmKP5qbyduD8WbrYgvRKs8CSnZpfuAqg82lBFt8EvcZCnCpUMLzM7KftMjERHO/EvdZ 5hdIV1fZYtqjWaJck4bQqzgrAMdMyCvn2dFovSuqCsFfzBnNTLzu+D3yeIgrlBl5U18Y rjVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s186si11010432pgb.374.2017.05.25.04.17.20; Thu, 25 May 2017 04:17:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 4F1697810A; Thu, 25 May 2017 11:17:18 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by mail.openembedded.org (Postfix) with ESMTP id 231F7780FD for ; Thu, 25 May 2017 11:16:58 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id d127so93065967wmf.0 for ; Thu, 25 May 2017 04:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=EndmnMq48xNPv1X/x1YuT8PMYCuw7Gao6DRLDI8Veis=; b=YRpXbvAxeyFGEjKtk7i7lpSuTGlEA6Xa17AHGFhZa17PNRHXlKuOeR4KXUn0X5Z3Sa fazQAKwcUI1SVIMXULDWNQeEI4qQdinB8FLdYH8/fztUkT0ijb492KADmep96Dk+3u0z ASVpcNpHnU2PEKpgyasf1BjSE01esgkaeMyQJhK2eQOCSWP1SJaRmsYpdny46QCeAc4v Duki12vIMKqpmIZJO/+Nu+LXCyeUuaHOTs6llJcN0U7hO0abqronWwEMqFPn0bnp+ARF XpZZ/6Ib4PV1Mf+UoXy+Qh9nI2seLTvNBdKqbKoXdikRTxgMtDxCBVL+copG/7n450cZ 8oKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EndmnMq48xNPv1X/x1YuT8PMYCuw7Gao6DRLDI8Veis=; b=n4wGDO/inDkhjt5Zt+ANtbnuNFbSTYUUp3N/op56oDtzmmA3SE/dNWIAJmBMtjyJsv nGkD24jBQn8Mo8gz9M4Wo8JhZigazbgR4lk4lw6q7bfQINQvcIJUrUiiDRmtOx1TPbXo KO/Uu2hVdrVRfNLlat0rjmnJ6UvhQkUyYyKwylZiPq93LwgeT5FIjTnVI87SAvL0a0ZF //J4mQMmB86f2OjT7FP2C52GhukP8yimYZjMVsUEvGAUm/v4mU9a+ylJ1azUidG2IsLn qm15WD0QeOYKlcECw3RIy/MX0c/5TUMYJhN5pInQB7UR6guMbi/PEp+NUHD/4BJg7ZSh NhgA== X-Gm-Message-State: AODbwcCDslu9yoSiHaClZFMA7ehpQY21TGPYmh4wh/6gFXPb9BvNsIO2 aOzERtiHwq99+XSM X-Received: by 10.223.135.50 with SMTP id a47mr23489615wra.138.1495711018549; Thu, 25 May 2017 04:16:58 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id d74sm8544169wmi.3.2017.05.25.04.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 May 2017 04:16:58 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 25 May 2017 12:16:50 +0100 Message-Id: <1495711012-6397-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 Subject: [OE-core] [PATCH][morty 1/3] insane: remove broken unsafe-references-in-binaries test X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This test aims to detect binaries in /bin which link to libraries in /usr/lib, for the case where the user has /usr on a separate filesystem to /. However it doesn't scan both image/ and the sysroot, so if a binary in /bin links to a library in /usr/lib that was built by the same recipe then it will error out. This test isn't enabled by default, and because of this serious bug I suspect nobody else is enabling it either. As /usr being on a separate partition to / is a very rare configuration these days I think we should delete the test: if someone cares sufficiently they should write a test that actually works. (From OE-Core rev: a6af5bbf3dad6f0951c67a0aae13ef86a8906893) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/insane.bbclass | 41 ----------------------------------------- 1 file changed, 41 deletions(-) -- 2.8.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 5ddb87b..e541c72 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -405,47 +405,6 @@ def package_qa_check_perm(path,name,d, elf, messages): """ return -QAPATHTEST[unsafe-references-in-binaries] = "package_qa_check_unsafe_references_in_binaries" -def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages): - """ - Ensure binaries in base_[bindir|sbindir|libdir] do not link to files under exec_prefix - """ - if unsafe_references_skippable(path, name, d): - return - - if elf: - import subprocess as sub - pn = d.getVar('PN', True) - - exec_prefix = d.getVar('exec_prefix', True) - sysroot_path = d.getVar('STAGING_DIR_TARGET', True) - sysroot_path_usr = sysroot_path + exec_prefix - - try: - ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read().decode("utf-8") - except bb.process.CmdError: - error_msg = pn + ": prelink-rtld aborted when processing %s" % path - package_qa_handle_error("unsafe-references-in-binaries", error_msg, d) - return False - - if sysroot_path_usr in ldd_output: - ldd_output = ldd_output.replace(sysroot_path, "") - - pkgdest = d.getVar('PKGDEST', True) - packages = d.getVar('PACKAGES', True) - - for package in packages.split(): - short_path = path.replace('%s/%s' % (pkgdest, package), "", 1) - if (short_path != path): - break - - base_err = pn + ": %s, installed in the base_prefix, requires a shared library under exec_prefix (%s)" % (short_path, exec_prefix) - for line in ldd_output.split('\n'): - if exec_prefix in line: - error_msg = "%s: %s" % (base_err, line.strip()) - package_qa_handle_error("unsafe-references-in-binaries", error_msg, d) - - return False QAPATHTEST[unsafe-references-in-scripts] = "package_qa_check_unsafe_references_in_scripts" def package_qa_check_unsafe_references_in_scripts(path, name, d, elf, messages):