From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: bug#32347: gzip cannot be patched Date: Wed, 3 Oct 2018 11:01:41 +0300 Message-ID: <20181003080141.GA11380@macbook41> References: <87muu56m31.fsf@fastmail.com> <20180802115718.GD13776@macbook41> <87a7piii22.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7c6h-0001SV-26 for bug-guix@gnu.org; Wed, 03 Oct 2018 04:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7c6d-0004MX-0S for bug-guix@gnu.org; Wed, 03 Oct 2018 04:02:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7c6c-0004MN-Ri for bug-guix@gnu.org; Wed, 03 Oct 2018 04:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g7c6c-0006kI-LI for bug-guix@gnu.org; Wed, 03 Oct 2018 04:02:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87a7piii22.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 32347@debbugs.gnu.org --hQiwHBbRI9kgIhsi Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" Content-Disposition: inline --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 19, 2018 at 03:48:05PM +0200, Ludovic Court=C3=A8s wrote: > Hello, >=20 > Efraim Flashner skribis: >=20 > > On Thu, Aug 02, 2018 at 01:32:02PM +0200, Marius Bakke wrote: > >> Hello! > >>=20 > >> I'm trying to add a patch to 'gzip', but it causes an infinite loop and > >> eventually the system runs out of memory. > >>=20 > >> It can be reproduced by adding this hunk: > >>=20 > > > >> modified gnu/packages/compression.scm > >> @@ -215,6 +215,7 @@ adding and extracting files to/from a tar archive.= ") > >> (method url-fetch) > >> (uri (string-append "mirror://gnu/gzip/gzip-" > >> version ".tar.xz")) > >> + (snippet '(#t)) > >> (sha256 > >> (base32 > >> "16h8g4acy7fgfxcjacr3wijjsnixwsfd2jhz3zwdi2qrzi262l5f")= ))) > >>=20 > >> [back] > >>=20 > >> I guess this is because gzip itself is a patch input. Is this somethi= ng > >> that can be fixed, or do we have to use "patching phases" in these cas= es? > > > > Its also in commencement.scm, so that might be the loop instead. You > > could try "unpatching" it there. It looks like it has a pseudo-package > > inside of glibc-utf8-locales-final, with grep-final a few packages lower > > being potential inspiration for undoing the modifications in "real > > gzip". >=20 > Indeed. The =E2=80=98bootstrap-origin=E2=80=99 procedure, defined in (gn= u packages > bootstrap), arranges to use the bootstrap binaries of gzip, patch, > guile, etc. when patching origins. >=20 > Perhaps we=E2=80=99re missing a use of =E2=80=98bootstrap-origin=E2=80=99= somewhere in (gnu > packages commencement)? >=20 Looks like it in the end. the gzip for glibc-utf8-locales-final uses the bootstrap guile for its building, but doesn't get the input rewriting that comes from package-with-bootstrap-guile. With this patch adding the trivial snippet to gzip doesn't cause an infinite loop anymore. Since the patch doesn't change the hash of glibc-utf8-locales-final it should be OK for master. --=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 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-glibc-utf8-locales-final-Wrap-inputs-with-packag.patch" Content-Transfer-Encoding: quoted-printable =46rom a3b7f9851e121fd3eb5f52ff4197923553032ec7 Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Wed, 3 Oct 2018 10:33:23 +0300 Subject: [PATCH] gnu: glibc-utf8-locales-final: Wrap inputs with 'package-with-bootstrap-guile'. * gnu/packages/commencement.scm (glibc-utf8-locales-final)[inputs]: Wrap gzip with 'package-with-bootstrap-guile'. --- gnu/packages/commencement.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 30a0ffcec..6c0f4e310 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -870,9 +870,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/= ~a \"$@\"~%" (inherit glibc-utf8-locales) (inputs `(("glibc" ,glibc-final) ("gzip" - ,(package-with-explicit-inputs gzip %boot4-inputs - (current-source-location) - #:guile %bootstrap-guile))))= )) + ,(package-with-bootstrap-guile + (package-with-explicit-inputs gzip %boot4-inputs + (current-source-location) + #:guile %bootstrap-guile))= ))))) =20 (define-public ld-wrapper ;; The final 'ld' wrapper, which uses the final Guile and Binutils. --=20 2.19.0 --rwEMma7ioTxnRzrJ-- --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlu0d2EACgkQQarn3Mo9 g1GO8xAAp2dxPPLrPUbNO9PnbZ8qFU5QWLF3V3kezAxVxcfPXkcbPGdZmC0nlqZg rbWU2vSh/aP/EAAHujCbUdQuMSsIio438Mc82BV0xpm2pirxSxz+p434GYRO6ojn BE75XIKYcnxMFQZbjYMgNwSgtvoqYdoPVOu9iZtXMIpZmMtImQu3672hmc4aXp8f MJedD306XmWww9P1+hi3OHWunJoUkgpSJkplazCLKNxMWXsp93068/1lF19jTafA xUAfn5VNn3xvnRAtIVqm8tP7uUqnd2fiZssnlzhZuAKviXJtVregYjB6eM097xK4 MbccIxFqEjFwC97mpyXS3mRYIQA7umvZQMz++CmSaV23Jli0li0A2sQ7H8WrEHv7 QJY7jtBmdt+MwrBoUEWZR3lT34/LlEjP/u1kSv35QoKffnW6Abk/daxfwUuxh5Bx g5qY4kHIx57mkLhWrlUBC+DvFYAx+wwutP4G+H/q+of9CwMOi3Kx2cgjO2UNyK0S b0++9G0KNy0/q9FkXTJcMtU0jVpZIkUascLFs8RKiXuevrVjcnGsb6CNT8BbREyw 4Os3Jase7yoqJpwbNmUrfb5nsutDgC4pXqE6drWGWQFYpX9AxMET9H4IrQobz1Wu fW8+mz73deUB442JxfbMyXx1jstFCHFtsLpgOK53p7i1/WKoixE= =JGhu -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--