Your message dated Mon, 20 Apr 2020 12:49:13 +0000
with message-id <[email protected]>
and subject line Bug#958301: fixed in cargo 0.43.1-2
has caused the Debian Bug report #958301,
regarding dh-cargo: please make the output reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
958301: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958301
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: dh-cargo
Version: 23
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath toolchain
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
dh-cargo generates/installs non-reproducible output. For example,
here is rust-difference 2.0.0-1:

│ │ │ ├── ./usr/.crates2.json
│ │ │ │ │ @@ -1,10 +1,10 @@
│ │ │ │ │  {
│ │ │ │ │      "installs": {
│ │ │ │ │ -        "difference 2.0.0 
(path+file:///build/1st/rust-difference-2.0.0)": {
│ │ │ │ │ +        "difference 2.0.0 
(path+file:///build/2/rust-difference-2.0.0/2nd)": {

Proof-of-concept patch attached that strips all these files. It might
be better to do this elsewhere, up to you.

  --- a/cargo.pm
  +++ b/cargo.pm
  @@ -170,6 +170,7 @@ sub install {
           my $destdir = $ENV{'DESTDIR'} || $this->get_sourcepath("debian/" . 
$this->{binpkg});
           doit("env", "DESTDIR=$destdir",
                "/usr/share/cargo/bin/cargo", "install", @_);
  +        doit('find', $destdir, '-name', '.crates2.json', '-exec', 'rm', 
'{}', '+');
           # generate Built-Using fields         

Note that this file is being installed to /usr (!) which is likely a
pretty severe bug here or in rust-difference, but I'll leave that
with you.


  [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
diff --git a/cargo.pm b/cargo.pm
index 013785e..53507b1 100644
--- a/cargo.pm
+++ b/cargo.pm
@@ -170,6 +170,7 @@ sub install {
         my $destdir = $ENV{'DESTDIR'} || $this->get_sourcepath("debian/" . 
$this->{binpkg});
         doit("env", "DESTDIR=$destdir",
              "/usr/share/cargo/bin/cargo", "install", @_);
+        doit('find', $destdir, '-name', '.crates2.json', '-exec', 'rm', '{}', 
'+');
         # generate Built-Using fields
         doit("/usr/share/cargo/bin/dh-cargo-built-using", $this->{binpkg});
     }

--- End Message ---
--- Begin Message ---
Source: cargo
Source-Version: 0.43.1-2
Done: Ximin Luo <[email protected]>

We believe that the bug you reported is fixed in the latest version of
cargo, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ximin Luo <[email protected]> (supplier of updated cargo package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 20 Apr 2020 13:30:57 +0100
Source: cargo
Architecture: source
Version: 0.43.1-2
Distribution: unstable
Urgency: medium
Maintainer: Rust Maintainers <[email protected]>
Changed-By: Ximin Luo <[email protected]>
Closes: 958301
Changes:
 cargo (0.43.1-2) unstable; urgency=medium
 .
   * cargo-debian-wrapper: don't install /usr/.crates2.json. (Closes: #958301)
Checksums-Sha1:
 8af3c857613273f08a5a04bc9a444b58bada8363 1980 cargo_0.43.1-2.dsc
 00b9616de0bf6e418cc02ac6add696dba9487a0c 40460 cargo_0.43.1-2.debian.tar.xz
 7af0414d412e9627b73a24a517b4ad7e6ad1f574 7221 cargo_0.43.1-2_source.buildinfo
Checksums-Sha256:
 31ed2a4254f0904ed2ebb2688f127eed8529a6023b3c923709f39a15abf10bb1 1980 
cargo_0.43.1-2.dsc
 72d99026a22b151c4e66aa94cc478bf4c60610f8aad32e437bd60ede1d494d6b 40460 
cargo_0.43.1-2.debian.tar.xz
 5b23a66264c502d8d407f47f808d19479fdb98f902e19c186a46c8c44775ba04 7221 
cargo_0.43.1-2_source.buildinfo
Files:
 351c4a57d620444a2a8eb181a92eebe1 1980 devel optional cargo_0.43.1-2.dsc
 ee82fe0f8d83fee1b1fa4db48e1e2f56 40460 devel optional 
cargo_0.43.1-2.debian.tar.xz
 51a81287d189c545a308b28e3d34bb56 7221 devel optional 
cargo_0.43.1-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQReYinNQ9GpZ9TYcRrrH8jaRfspMAUCXp2WLgAKCRDrH8jaRfsp
MB8pAP91m7ckS6s6/VLLN1zl5e9OJQcVqQZd18UkuQ/8/GauBwD+IP21Bwf9IVUg
d/baONfMEKmBSl+NK2iEGL4nI40oWAY=
=t+/r
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to