Bug 15090 - rust recipe zvariant is not reproducible
Summary: rust recipe zvariant is not reproducible
Status: RESOLVED DUPLICATE of bug 14875
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: Future
Assignee: Frédéric Martinsons
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-04-01 09:12 UTC by Frédéric Martinsons
Modified: 2023-08-14 07:12 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Randy MacLeod 2023-04-06 14:36:43 UTC
Frederic, Can you work on this? There is another rust reproducibility issue that Sundeep is working so he's CCed.
Comment 2 Frédéric Martinsons 2023-04-06 14:52:09 UTC
Hello Randy,

At least , I can try to ;)

I know nothing of reproducibility issue and at first look, it may buried deep in rust guts.
Anyway, feel free to assign me this problem and if Sundeep can share its progress too, it will be a great help.
Comment 3 Sundeep Kokkonda 2023-04-09 15:36:50 UTC
Hello Frédéric,

The reproducibility issue I am working is - https://bugzilla.yoctoproject.org/show_bug.cgi?id=14875

Initially we thought it was a bug in Yocto but later we found that this is an issue in upstream itself and now working to find a fix/workaround in rust. You can see the analysis in the issue comments.
Comment 4 Frédéric Martinsons 2023-04-10 09:49:36 UTC
Thanks sundeep, will take a look at this. I currently use reprotest (https://salsa.debian.org/reproducible-builds/reprotest) on zvariant by calling
the following wrapper (that has been taken from https://github.com/kpcyrd/sniffglue/blob/main/ci/reprotest.sh)

```
#!/bin/bash

set -xue

[ $# -ne 1 ] && { echo "Waiting a binary name"; exit 1; }

# by default, the build folder is located in /tmp, which is a tmpfs. The target/ folder
# can become quite large, causing the build to fail if we don't have enough RAM.
export TMPDIR="$HOME/tmp/repro-test"
mkdir -p "$TMPDIR"

if [ -d "./benches" ]; then
    patt="Cargo.* src/ benches/"
else
    patt="Cargo.* src/"
fi

# rustc segfault when using faketime:
#    https://github.com/rust-secure-code/cargo-repro/issues/4
#    https://github.com/rust-lang/rust/issues/60461
#
reprotest -vv --vary=-time --source-pattern "$patt" '
    CARGO_HOME="$PWD/.cargo" RUSTUP_HOME='"$HOME/.rustup"' \
        RUSTFLAGS="--remap-path-prefix=$HOME=/remap-home --remap-path-prefix=$PWD=/remap-pwd" \
        cargo build --release --verbose' \
	  target/release/${1}
```

I ran this towards zvariant recipe and I didn't have issues (beside the faketime ones).
I'll look at what yocto reproducible tests do differently to have a better picture of it and understand if it is a false positive or not.
Comment 5 Frédéric Martinsons 2023-08-14 07:12:26 UTC
Very likely to be the same as https://bugzilla.yoctoproject.org/show_bug.cgi?id=14875

Closing this one as duplicate.

*** This bug has been marked as a duplicate of bug 14875 ***