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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C29A915808B for ; Mon, 30 Sep 2024 06:55:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE7B7E2A4D; Mon, 30 Sep 2024 06:55:57 +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 BE8D3E2A4D for ; Mon, 30 Sep 2024 06:55:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 C54CC342FA7 for ; Mon, 30 Sep 2024 06:55:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D224D14CA for ; Mon, 30 Sep 2024 06:55:54 +0000 (UTC) From: "Matt Jolly" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Jolly" Message-ID: <1727679251.6e7857db57a841f28066459ece787800f2a28f2a.kangie@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/chromium/chromium-129.0.6668.70.ebuild www-client/chromium/chromium-130.0.6723.19.ebuild X-VCS-Directories: www-client/chromium/ X-VCS-Committer: kangie X-VCS-Committer-Name: Matt Jolly X-VCS-Revision: 6e7857db57a841f28066459ece787800f2a28f2a X-VCS-Branch: master Date: Mon, 30 Sep 2024 06:55:54 +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: 6aaaf858-2bb1-40ce-bc75-c13ed4232092 X-Archives-Hash: f92999496d20e4bb457f7a739e113461 commit: 6e7857db57a841f28066459ece787800f2a28f2a Author: Matt Jolly gentoo org> AuthorDate: Mon Sep 30 06:53:09 2024 +0000 Commit: Matt Jolly gentoo org> CommitDate: Mon Sep 30 06:54:11 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e7857db www-client/chromium: `die` if rust profiler not found Chromium's build system explicitly looks for `libprofiler_builtins-*.rlib` when using a prebuilt / system Rust. While we could patch this out so that users don't _need_ USE=profiler if not doing PGO, the Rust upstream default is to ship the profiler; conditionally changing the Chromium build logic to account for an untested and unsupported build is not desirable. Instead we will rely on existing dependency checks (which ensure that a Rust slot with the profiler is installed) and do a sanity check on the selected Rust implementation before unpacking Chromium's enormous tarball so that we can fail early and prompt the user to `eselect` the correct version / slot. Closes: https://bugs.gentoo.org/937161 Signed-off-by: Matt Jolly gentoo.org> www-client/chromium/chromium-129.0.6668.70.ebuild | 14 ++++++++++++++ www-client/chromium/chromium-130.0.6723.19.ebuild | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/www-client/chromium/chromium-129.0.6668.70.ebuild b/www-client/chromium/chromium-129.0.6668.70.ebuild index 16059a00a6bc..23624456867c 100644 --- a/www-client/chromium/chromium-129.0.6668.70.ebuild +++ b/www-client/chromium/chromium-129.0.6668.70.ebuild @@ -416,7 +416,21 @@ pkg_setup() { einfo "Using rust ${rustc_ver} to build" fi + # Chromium requires the Rust profiler library while setting up its build environment. + # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) + # we'll just do a sanity check on the selected slot. + if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then + local arch=$(uname -m) + local rust_lib_path="${EPREFIX}/usr/lib/rust/${rustc_ver}/lib/rustlib/${arch}-unknown-linux-gnu/lib" + local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) + if [[ -z "${profiler_lib}" ]]; then + eerror "Rust ${rustc_ver} is missing the profiler library." + eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." + die "Please \`eselect\` a Rust slot that has the profiler." + fi + fi fi + # Users should never hit this, it's purely a development convenience if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium" diff --git a/www-client/chromium/chromium-130.0.6723.19.ebuild b/www-client/chromium/chromium-130.0.6723.19.ebuild index 1f07aceefef6..4247ea726933 100644 --- a/www-client/chromium/chromium-130.0.6723.19.ebuild +++ b/www-client/chromium/chromium-130.0.6723.19.ebuild @@ -416,7 +416,21 @@ pkg_setup() { einfo "Using rust ${rustc_ver} to build" fi + # Chromium requires the Rust profiler library while setting up its build environment. + # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) + # we'll just do a sanity check on the selected slot. + if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then + local arch=$(uname -m) + local rust_lib_path="${EPREFIX}/usr/lib/rust/${rustc_ver}/lib/rustlib/${arch}-unknown-linux-gnu/lib" + local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) + if [[ -z "${profiler_lib}" ]]; then + eerror "Rust ${rustc_ver} is missing the profiler library." + eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." + die "Please \`eselect\` a Rust slot that has the profiler." + fi + fi fi + # Users should never hit this, it's purely a development convenience if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"