commit:     b0040ec9a6bb90d0390b7cf1e663f8f211cc147a
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Jul 24 19:27:29 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Jul 24 19:27:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b0040ec9

dev-lang/rust: sync ::gentoo

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-lang/rust/files/1.71.0-lint-docs-libpath.patch | 39 ++++++++++++++++++++++
 dev-lang/rust/files/rehash-crate.sh                |  2 +-
 dev-lang/rust/rust-1.71.0.ebuild                   |  1 +
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch 
b/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch
new file mode 100644
index 0000000..27c6738
--- /dev/null
+++ b/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/910595
+https://github.com/rust-lang/rust/issues/113678
+
+https://github.com/rust-lang/rust/commit/67b5990472e3cac643d8cf90f45fe42201ddec3c
+From: jyn <git...@jyn.dev>
+Date: Mon, 10 Jul 2023 15:59:30 -0500
+Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
+ enabled"
+
+This was not the correct fix. The problem was two-fold:
+- `download-rustc` didn't respect `llvm.assertions`
+- `rust-dev` was missing a bump to `download-ci-llvm-stamp`
+
+The first is fixed in this PR and the latter was fixed a while ago. Revert 
this change to avoid breaking `rpath = false`.
+--- a/src/tools/lint-docs/src/groups.rs
++++ b/src/tools/lint-docs/src/groups.rs
+@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> {
+     fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> {
+         let mut result = BTreeMap::new();
+         let mut cmd = Command::new(self.rustc_path);
+-        cmd.env_remove("LD_LIBRARY_PATH");
+         cmd.arg("-Whelp");
+         let output = cmd.output().map_err(|e| format!("failed to run command 
{:?}\n{}", cmd, e))?;
+         if !output.status.success() {
+--- a/src/tools/lint-docs/src/lib.rs
++++ b/src/tools/lint-docs/src/lib.rs
+@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> {
+         fs::write(&tempfile, source)
+             .map_err(|e| format!("failed to write {}: {}", 
tempfile.display(), e))?;
+         let mut cmd = Command::new(self.rustc_path);
+-        // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs 
itself.
+-        // Unfortunately, lint-docs is a bootstrap tool while rustc is built 
from source,
+-        // and sometimes the paths conflict. In particular, when using 
`download-rustc`,
+-        // the LLVM versions can differ between `ci-llvm` and 
`ci-rustc-sysroot`.
+-        // Unset LD_LIBRARY_PATH here so it doesn't interfere with running 
the compiler.
+-        cmd.env_remove("LD_LIBRARY_PATH");
+         if options.contains(&"edition2015") {
+             cmd.arg("--edition=2015");
+         } else {

diff --git a/dev-lang/rust/files/rehash-crate.sh 
b/dev-lang/rust/files/rehash-crate.sh
index 1ffd775..c43f542 100644
--- a/dev-lang/rust/files/rehash-crate.sh
+++ b/dev-lang/rust/files/rehash-crate.sh
@@ -5,7 +5,7 @@ set -euf
 
 cargo='.cargo-checksum.json'
 
-grep -- '+++' "${1:?}" | while read -r _ f; do
+grep -- '^[+][+][+] ' "${1:?}" | while read -r _ f; do
        file="${f#*/}"
        orig_sum="$(grep -Eo "\"${file}\":\"[0-9a-fA-F]+\"" "${cargo}" |
                cut -d':' -f2 | tr -d '"')"

diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 180a20f..be3e2a9 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -163,6 +163,7 @@ 
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
 
 PATCHES=(
        "${FILESDIR}"/1.71.0-fix-bashcomp-installation.patch
+       "${FILESDIR}"/1.71.0-lint-docs-libpath.patch
        "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
        "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
        "${FILESDIR}"/1.67.0-doc-wasm.patch

Reply via email to