From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:51651) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsLB6-0007gh-TZ for guix-patches@gnu.org; Tue, 30 Jul 2019 02:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsLB5-0000ry-Fs for guix-patches@gnu.org; Tue, 30 Jul 2019 02:00:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsLB5-0000rk-CZ for guix-patches@gnu.org; Tue, 30 Jul 2019 02:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hsLB5-0001HF-9I for guix-patches@gnu.org; Tue, 30 Jul 2019 02:00:03 -0400 Subject: bug#36841: [PATCH] build/cargo-build-system: Patch cargo checksums. Resent-To: guix-patches@gnu.org Resent-Message-ID: Date: Tue, 30 Jul 2019 08:59:03 +0300 From: Efraim Flashner Message-ID: <20190730055903.GA21431@E2140> References: <20190729190422.6834-1-efraim@flashner.co.il> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ivan Petkov Cc: 36841-done@debbugs.gnu.org --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 29, 2019 at 06:44:31PM -0700, Ivan Petkov wrote: > Hi Efraim, >=20 > > On Jul 29, 2019, at 12:04 PM, Efraim Flashner w= rote: > >=20 > > +;; After patching the 'patch-generated-file-shebangs phase any vendore= d crates > > +;; will have a mismatch on their checksum. > > +(define* (patch-cargo-checksums #:key > > + (vendor-dir "guix-vendor") > > + #:allow-other-keys) >=20 > [snip] >=20 > > + (replace 'install install) > > + (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums p= atch-cargo-checksums))) >=20 > I can=E2=80=99t 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 tha= t way=E2=80=A6 >=20 > =E2=80=94Ivan 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. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl0/3KcACgkQQarn3Mo9 g1H3aQ//akdxq8W2TFkmjCSevYDslzd5TFDYjI5t0elrF+Pt7mMCVSBjIcD5vhII SVqVEJNti0vHcSC9KpeiFmsnK66wWBivJFP53Wkt3zBfcJvykwX2PjdQd7eEzzt5 SPosX9QHcwstUunbeWNagYEv2N1RH/9CSts9QqzUOBC9R/MYwtQ9Hv06Bdt93wgt iXsUrfsGW5071LRNt3Abo9oKwiSiftAtk4aJw72wuwo5BQrxPGLQjHs5zvkpRwGt SbrNiQJVDv3XA+C2U2Z4B9m5EhIQL4jHL5gP2K4Ugogc1f9+wZGVEnZ4sKQkPeXv EBnLrNj1vaAf/N+fE5HRzeJcE12pNkgvT16ykARzPOGdeWQqOZTv2rc1RsfcExH1 UNUqgx8iKuhmzS687vsNTC0pFVDEM8/Kd7mdWqJdeJUA8Im4p4UbUWp97bE2S45X pHZt1kX3A1O16bEqbfnRBvohKSZYKLE+K1LHFhWwCpNi7d51/nB4u1S6EEurPAgJ vFHblmunO4hzHI/TnF43N8g3FwNvIkia8jA7P3t0Vtg71LXH1RscadohvNyW12Vw dsNGXb8/ZqE9VGHE67PbBjnw1S3RDadccheEK+Kplwt5rubMl/NADvpcV8XjuXaJ wq/WGKV2jgFXSoZWTer/Cebc602+OKf7bChcBJqo4EtuSU6EI1o= =DmXb -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--