From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 284D5158086 for ; Thu, 28 Oct 2021 04:52:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5AE32E0882; Thu, 28 Oct 2021 04:52:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D6A2E0882 for ; Thu, 28 Oct 2021 04:52:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 28FC5343B00 for ; Thu, 28 Oct 2021 04:52:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BCC02164 for ; Thu, 28 Oct 2021 04:52:38 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1635396742.98a8a4af2c77477c327b22621b8a0aed6d15f574.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/doebuild.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 98a8a4af2c77477c327b22621b8a0aed6d15f574 X-VCS-Branch: master Date: Thu, 28 Oct 2021 04:52:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e9f6e79c-694d-4171-93a6-0da4a048870f X-Archives-Hash: 0c5c76fcc4746aeea6bf903422d49de0 commit: 98a8a4af2c77477c327b22621b8a0aed6d15f574 Author: Sam James gentoo org> AuthorDate: Thu Oct 28 04:40:09 2021 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 28 04:52:22 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=98a8a4af doebuild.py: check for inconsistent PROVIDES/image post-src_install This is part of a series of fixes for the linked bug (failure to preserve libraries in some situations). At the point of installation (even if not merging), we need to detect inconsistent metadata: PROVIDES should be populated if we're installing any dynamic libraries. This suggests that e.g. scanelf malfunctioned or some corruption occurred. Bug: https://bugs.gentoo.org/811462 Signed-off-by: Sam James gentoo.org> lib/portage/package/ebuild/doebuild.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py index 9650a8444..96e56b277 100644 --- a/lib/portage/package/ebuild/doebuild.py +++ b/lib/portage/package/ebuild/doebuild.py @@ -3,6 +3,7 @@ __all__ = ["doebuild", "doebuild_environment", "spawn", "spawnebuild"] +import glob import grp import gzip import errno @@ -118,6 +119,7 @@ from portage.util.futures import asyncio from portage.util.futures.executor.fork import ForkExecutor from portage.util.path import first_existing from portage.util.socks5 import get_socks5_proxy +from portage.util._dyn_libs.dyn_libs import check_dyn_libs_inconsistent from portage.versions import _pkgsplit from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor from _emerge.EbuildBuildDir import EbuildBuildDir @@ -126,7 +128,6 @@ from _emerge.EbuildSpawnProcess import EbuildSpawnProcess from _emerge.Package import Package from _emerge.RootConfig import RootConfig - _unsandboxed_phases = frozenset( [ "clean", @@ -3091,6 +3092,16 @@ def _post_src_install_soname_symlinks(mysettings, out): errors="strict", ) as f: f.write(soname_deps.provides) + else: + if check_dyn_libs_inconsistent(image_dir, soname_deps.provides): + self._writemsg_level( + colorize( + "BAD", + "!!! Error! Installing dynamic libraries (.so) with blank PROVIDES!", + ), + noiselevel=-1, + level=logging.ERROR, + ) if unrecognized_elf_files: qa_msg = ["QA Notice: Unrecognized ELF file(s):"]