From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Treating patches as part of =?utf-8?B?4oCYb3JpZ2lu4oCZ?= Date: Wed, 09 Oct 2013 00:18:26 +0200 Message-ID: <874n8rxv7x.fsf@gnu.org> References: <87zjrdkd7u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTfgl-0006Ql-Qm for guix-devel@gnu.org; Tue, 08 Oct 2013 18:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTfgg-0000bG-1N for guix-devel@gnu.org; Tue, 08 Oct 2013 18:23:35 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:60502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTfgf-0000b5-Oq for guix-devel@gnu.org; Tue, 08 Oct 2013 18:23:29 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E70641690 for ; Wed, 9 Oct 2013 00:18:26 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BuWTwZemUK6x for ; Wed, 9 Oct 2013 00:18:26 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 97ED114F5 for ; Wed, 9 Oct 2013 00:18:26 +0200 (CEST) In-Reply-To: <87zjrdkd7u.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 15 Sep 2013 23:05:25 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > To address that, I think we should move patch handling from the build > system to the =E2=80=98origin=E2=80=99 objects. That is, we would write: > > (package > ... > (source (origin > (uri ...) > (sha256 ...) ; hash of the upstream tarball > (patches (map search-path (list "foo.patch" ...))))) > ...) > > As a bonus, this would make patches work regardless of the package=E2=80= =99s > build system; we would get rid get rid of the #:patches arguments to > =E2=80=98gnu-build-system=E2=80=99. > > I think the effect of having a non-null =E2=80=98patches=E2=80=99 list sh= ould be to > fetch the upstream tarball, apply the patches, and re-pack the tarball. > That way, patching would be completely transparent to build systems > (they would always get a tarball, regardless of whether it has been > patched) and to the user (=E2=80=98guix build --source=E2=80=99 would alw= ays return a > tarball.) The only downside is the CPU cost of re-making the tarball, > which could be annoying when working on a package, but I think it=E2=80= =99s > reasonably low for most packages. Done in commits ac10e0e and 01eafd3. The latter triggers a number of rebuilds, which is unfortunate given that Hydra is currently down for maintenance/upgrade. The former changes the Scheme ABI, so make sure to run =E2=80=98make clean && make=E2=80=99! So the official way to introduce patches is now the form shown above. There=E2=80=99s still work in that area: in =E2=80=98core-updates=E2=80=99,= I=E2=80=99ll remove the =E2=80=98patch=E2=80=99 phase and #:patches argument from =E2=80=98gnu-buil= d-system=E2=80=99 & co., and update the core packages that still use #:patches. Comments & bug reports welcome! Ludo=E2=80=99.