diff mbox series

[3/3] rust: reproducibility issue fix with v1.75

Message ID 20240229163242.1415066-3-Yash.Shinde@windriver.com
State Accepted, archived
Commit a80ce6e3c023809d1ec13d19e8acb25770b54737
Headers show
Series [1/3] rust: Upgrade 1.74.1 -> 1.75.0 | expand

Commit Message

Yash Shinde Feb. 29, 2024, 4:32 p.m. UTC
From: Yash Shinde <Yash.Shinde@windriver.com>

With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues.
This change will fix the path name format back to '/rust/$hash' as in earlier versions.

Below are the links for detailed bug description & discusssion with upstream rust.
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../files/repro-issue-fix-with-v175.patch     | 23 +++++++++++++++++++
 meta/recipes-devtools/rust/rust-source.inc    |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/repro-issue-fix-with-v175.patch

Comments

Yash Shinde Feb. 29, 2024, 4:36 p.m. UTC | #1
*Reproducibility:*
Below targets are tested-
- x86_64
- x86
- arm
- arm64

Remaining targets yet to be tested.
Richard Purdie March 1, 2024, 9:33 a.m. UTC | #2
On Thu, 2024-02-29 at 08:32 -0800, Shinde, Yash via
lists.openembedded.org wrote:
> From: Yash Shinde <Yash.Shinde@windriver.com>
> 
> With 1.75 rust release, the '.rustc' section of shared object libs
> are embedded with absolute path names which is casuing
> reproducibiluty issues.
> This change will fix the path name format back to '/rust/$hash' as in
> earlier versions.
> 
> Below are the links for detailed bug description & discusssion with
> upstream rust.
> https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
> https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656
> 
> Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
> Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>

Thanks, it is really great to get to the bottom of this issue!

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/files/repro-issue-fix-with-v175.patch b/meta/recipes-devtools/rust/files/repro-issue-fix-with-v175.patch
new file mode 100644
index 0000000000..6840bafff8
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/repro-issue-fix-with-v175.patch
@@ -0,0 +1,23 @@ 
+rust: reproducibility issue fix with v1.75
+
+With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues.
+This change will fix the path name format back to '/rust/$hash' as in earlier versions.
+
+Below are the links for detailed bug description & discusssion with upstream rust.
+https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
+https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656
+
+Upstream-Status: Inappropriate [patches need rework]
+Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
+---
+--- a/compiler/rustc_session/src/session.rs	2023-12-21 08:55:28.000000000 -0800
++++ b/compiler/rustc_session/src/session.rs	2024-02-26 07:29:15.527577022 -0800
+@@ -1269,7 +1269,7 @@
+                 | CrateType::Rlib
+                 | CrateType::Staticlib
+                 | CrateType::Cdylib => continue,
+-                CrateType::ProcMacro => return false,
++                CrateType::ProcMacro => return true,
+             }
+         }
+ 
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 8ae8add495..6bef99039d 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -12,6 +12,7 @@  SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://rustc-bootstrap.patch;patchdir=${RUSTSRC} \
             file://target-build-value.patch;patchdir=${RUSTSRC} \
             file://0001-Handle-vendored-sources-when-remapping-paths.patch;patchdir=${RUSTSRC} \
+            file://repro-issue-fix-with-v175.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "4526f786d673e4859ff2afa0bab2ba13c918b796519a25c1acce06dba9542340"