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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EA21513835A for ; Fri, 18 Jun 2021 09:16:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37090E0802; Fri, 18 Jun 2021 09:16:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1E851E0802 for ; Fri, 18 Jun 2021 09:16:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D7C95335DCB for ; Fri, 18 Jun 2021 09:16:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DBF557A1 for ; Fri, 18 Jun 2021 09:16:41 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1624007643.895e90ff6caf38ed0625ca12feb4f7230794947e.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/files/1.53.0-miri-vergen.patch dev-lang/rust/rust-1.53.0.ebuild X-VCS-Directories: dev-lang/rust/ dev-lang/rust/files/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 895e90ff6caf38ed0625ca12feb4f7230794947e X-VCS-Branch: master Date: Fri, 18 Jun 2021 09:16:41 +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: 5c3d8f16-4696-4cf3-8245-820e7d220d1f X-Archives-Hash: f269415472b75e9063f86fd044823771 commit: 895e90ff6caf38ed0625ca12feb4f7230794947e Author: Georgy Yakovlev gentoo org> AuthorDate: Fri Jun 18 08:34:35 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Fri Jun 18 09:14:03 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=895e90ff dev-lang/rust: add miri patch to 1.53.0 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/files/1.53.0-miri-vergen.patch | 53 ++++++++++++++++++++++++++++ dev-lang/rust/rust-1.53.0.ebuild | 1 + 2 files changed, 54 insertions(+) diff --git a/dev-lang/rust/files/1.53.0-miri-vergen.patch b/dev-lang/rust/files/1.53.0-miri-vergen.patch new file mode 100644 index 00000000000..347f147c994 --- /dev/null +++ b/dev-lang/rust/files/1.53.0-miri-vergen.patch @@ -0,0 +1,53 @@ +From 64f128c45687d18d64fc6856a30fde585b007e00 Mon Sep 17 00:00:00 2001 +From: Ralf Jung +Date: Sat, 15 May 2021 14:17:30 +0200 +Subject: [PATCH] support building Miri outside a git repo + +--- + cargo-miri/bin.rs | 14 ++++++++------ + cargo-miri/build.rs | 2 +- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/cargo-miri/bin.rs b/cargo-miri/bin.rs +index e29bdc771..84447b3a1 100644 +--- a/src/tools/miri/cargo-miri/bin.rs ++++ b/src/tools/miri/cargo-miri/bin.rs +@@ -6,6 +6,7 @@ use std::io::{self, BufRead, BufReader, BufWriter, Read, Write}; + use std::ops::Not; + use std::path::{Path, PathBuf}; + use std::process::Command; ++use std::fmt::{Write as _}; + + use serde::{Deserialize, Serialize}; + +@@ -90,12 +91,13 @@ fn show_help() { + } + + fn show_version() { +- println!( +- "miri {} ({} {})", +- env!("CARGO_PKG_VERSION"), +- env!("VERGEN_GIT_SHA_SHORT"), +- env!("VERGEN_GIT_COMMIT_DATE") +- ); ++ let mut version = format!("miri {}", env!("CARGO_PKG_VERSION")); ++ // Only use `option_env` on vergen variables to ensure the build succeeds ++ // when vergen failed to find the git info. ++ if let Some(sha) = option_env!("VERGEN_GIT_SHA_SHORT") { ++ write!(&mut version, " ({} {})", sha, option_env!("VERGEN_GIT_COMMIT_DATE").unwrap()).unwrap(); ++ } ++ println!("{}", version); + } + + fn show_error(msg: String) -> ! { +diff --git a/cargo-miri/build.rs b/cargo-miri/build.rs +index cff135fe4..ebd8e7003 100644 +--- a/src/tools/miri/cargo-miri/build.rs ++++ b/src/tools/miri/cargo-miri/build.rs +@@ -7,5 +7,5 @@ fn main() { + let mut gen_config = vergen::Config::default(); + *gen_config.git_mut().sha_kind_mut() = vergen::ShaKind::Short; + *gen_config.git_mut().commit_timestamp_kind_mut() = vergen::TimestampKind::DateOnly; +- vergen(gen_config).expect("Unable to generate vergen keys!"); ++ vergen(gen_config).ok(); // Ignore failure (in case we are built outside a git repo) + } diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild index e8b0c98a8c1..c48d00bb2a6 100644 --- a/dev-lang/rust/rust-1.53.0.ebuild +++ b/dev-lang/rust/rust-1.53.0.ebuild @@ -149,6 +149,7 @@ PATCHES=( "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch "${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425 + "${FILESDIR}"/1.53.0-miri-vergen.patch # https://github.com/rust-lang/rust/issues/84182 ) S="${WORKDIR}/${MY_P}-src"