<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15090</bug_id>
          
          <creation_ts>2023-04-01 09:12:22 +0000</creation_ts>
          <short_desc>rust recipe zvariant is not reproducible</short_desc>
          <delta_ts>2023-08-14 07:12:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>14875</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Martinsons">frederic.martinsons</reporter>
          <assigned_to name="Frédéric Martinsons">frederic.martinsons</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</cc>
    
    <cc>sundeep.kokkonda</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95264</commentid>
    <comment_count>0</comment_count>
    <who name="Frédéric Martinsons">frederic.martinsons</who>
    <bug_when>2023-04-01 09:12:22 +0000</bug_when>
    <thetext>In the course of https://patchwork.yoctoproject.org/project/oe-core/list/?series=11635  it has been found that the zvariant is not reproductible :
  - https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2643/steps/12/logs/stdio
  - http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230331-65jkdy_c/packages/diff-html/

During discussion (see https://patchwork.yoctoproject.org/project/oe-core/patch/d0b6aff677d7e7a268b4c16a83ff3162e9c60dd1.1680238655.git.frederic.martinsons@gmail.com/#9704) it has been suggested to open a dedicated issue for this problem and set EXCLUDE_FROM_WORLD in the zvariant recipe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95306</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-06 14:36:43 +0000</bug_when>
    <thetext>Frederic, Can you work on this? There is another rust reproducibility issue that Sundeep is working so he&apos;s CCed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95308</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Martinsons">frederic.martinsons</who>
    <bug_when>2023-04-06 14:52:09 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95322</commentid>
    <comment_count>3</comment_count>
    <who name="Sundeep Kokkonda">sundeep.kokkonda</who>
    <bug_when>2023-04-09 15:36:50 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95324</commentid>
    <comment_count>4</comment_count>
    <who name="Frédéric Martinsons">frederic.martinsons</who>
    <bug_when>2023-04-10 09:49:36 +0000</bug_when>
    <thetext>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 ] &amp;&amp; { echo &quot;Waiting a binary name&quot;; 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&apos;t have enough RAM.
export TMPDIR=&quot;$HOME/tmp/repro-test&quot;
mkdir -p &quot;$TMPDIR&quot;

if [ -d &quot;./benches&quot; ]; then
    patt=&quot;Cargo.* src/ benches/&quot;
else
    patt=&quot;Cargo.* src/&quot;
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 &quot;$patt&quot; &apos;
    CARGO_HOME=&quot;$PWD/.cargo&quot; RUSTUP_HOME=&apos;&quot;$HOME/.rustup&quot;&apos; \
        RUSTFLAGS=&quot;--remap-path-prefix=$HOME=/remap-home --remap-path-prefix=$PWD=/remap-pwd&quot; \
        cargo build --release --verbose&apos; \
	  target/release/${1}
```

I ran this towards zvariant recipe and I didn&apos;t have issues (beside the faketime ones).
I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96252</commentid>
    <comment_count>5</comment_count>
    <who name="Frédéric Martinsons">frederic.martinsons</who>
    <bug_when>2023-08-14 07:12:26 +0000</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>