GNU bug report logs -
#36841
[PATCH] build/cargo-build-system: Patch cargo checksums.
Previous Next
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Mon, 29 Jul 2019 19:05:01 UTC
Severity: normal
Tags: patch
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 36841-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Jul 29, 2019 at 06:44:31PM -0700, Ivan Petkov wrote:
> Hi Efraim,
>
> > On Jul 29, 2019, at 12:04 PM, Efraim Flashner <efraim <at> flashner.co.il> wrote:
> >
> > +;; After patching the 'patch-generated-file-shebangs phase any vendored crates
> > +;; will have a mismatch on their checksum.
> > +(define* (patch-cargo-checksums #:key
> > + (vendor-dir "guix-vendor")
> > + #:allow-other-keys)
>
> [snip]
>
> > + (replace 'install install)
> > + (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums patch-cargo-checksums)))
>
> I can’t quite remember the order the phases run in off the top of my head. Would it be possible to
> make the configure/checksum generation phase run after shebang-patching (or ensure the patching
> happens first)? It would avoid having to checksum all the files twice that way…
>
> —Ivan
I thought about it a bit more after I sent the patch, and I'm pretty
sure this is only needed when there's a Cargo.lock file in the build
directory. So in actuality it should be more like:
(when (file-exists? "Cargo.lock")
(begin
(delete-file "Cargo.lock")
(invoke "cargo" "generate-lockfile")
(patch-cargo-checksums ...)))
I'm going to close this bug/patch and re-submit it when I've given it a
bit more work so it doesn't do the expensive compute-checksums
computation on all builds.
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 5 years and 297 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.