All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rust: reproducibility issue fix
@ 2023-10-11  4:05 Sundeep KOKKONDA
  2023-10-11  8:28 ` [OE-core] " Alexander Kanavin
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Sundeep KOKKONDA @ 2023-10-11  4:05 UTC (permalink / raw)
  To: openembedded-core
  Cc: randy.macleod, naveen.gowda, shivaprasad.moodalappa, yash.shinde,
	deepthi.hemraj, umesh.kallapa

[Yocto#14875]
The '--remap-path-prefix' option removes all references to build directory structure in the debug information within the compiled output for Cargo dependencies and the project's binary.
However, some references to build directories remains in the final binary in .rustc section in the form of compressed metadata and this makes the build output dependent on the folder structure of the computer it's compiled on.
So, for reproducible builds, use the configuration option 'remap-debuginfo = true' along with the '--remap-path-prefix'.

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
---
 meta/lib/oeqa/selftest/cases/reproducible.py | 2 --
 meta/recipes-devtools/rust/rust_1.70.0.bb    | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 84c6c3a05f..9b4a0887dd 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -16,8 +16,6 @@ import os
 import datetime
 
 exclude_packages = [
-	'rust',
-	'rust-dbg'
 	]
 
 def is_excluded(package):
diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb b/meta/recipes-devtools/rust/rust_1.70.0.bb
index 3b9c05a19f..16d433910f 100644
--- a/meta/recipes-devtools/rust/rust_1.70.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.70.0.bb
@@ -130,6 +130,7 @@ python do_configure() {
     # [rust]
     config.add_section("rust")
     config.set("rust", "rpath", e(True))
+    config.set("rust", "remap-debuginfo", e(True))
     config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}")))
 
     # Whether or not to optimize the compiler and standard library
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-10-12  8:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11  4:05 [PATCH] rust: reproducibility issue fix Sundeep KOKKONDA
2023-10-11  8:28 ` [OE-core] " Alexander Kanavin
2023-10-11  8:45 ` Richard Purdie
2023-10-11  9:18 ` Ross Burton
2023-10-11 11:03 ` Alex Kiernan
2023-10-11 12:27   ` Frédéric Martinsons
     [not found]   ` <178D0D506C537908.9719@lists.openembedded.org>
2023-10-11 12:37     ` Frédéric Martinsons
2023-10-11 14:05       ` Richard Purdie
2023-10-11 14:32       ` Sundeep KOKKONDA
2023-10-11 14:59         ` [OE-core] " Frédéric Martinsons
2023-10-12  6:37 ` Richard Purdie
2023-10-12  8:59   ` Frédéric Martinsons

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.