From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Treating patches as part of =?utf-8?B?4oCYb3JpZ2lu4oCZ?= Date: Sun, 15 Sep 2013 23:05:25 +0200 Message-ID: <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]:49904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLJaV-0004Je-Sb for guix-devel@gnu.org; Sun, 15 Sep 2013 17:10:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLJaO-0001qX-Cn for guix-devel@gnu.org; Sun, 15 Sep 2013 17:10:35 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:60446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLJaO-0001qK-63 for guix-devel@gnu.org; Sun, 15 Sep 2013 17:10:28 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 043F815A5 for ; Sun, 15 Sep 2013 23:05: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 SJAoza5Hs+ta for ; Sun, 15 Sep 2013 23:05:25 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id AA6B51544 for ; Sun, 15 Sep 2013 23:05:25 +0200 (CEST) List-Id: 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 Hello! We had an interesting discussion on the gnu-linux-libre list [0], where we identified an issue wrt. honoring the free system distribution guidelines (FSDG). The problem boils down to the fact that =E2=80=98guix build --source=E2=80= =99 returns the unmodified upstream tarball. This is a problem because that may not correspond to what we=E2=80=99re effectively building, when there are patch= es; also, we may be delivering non-FSDG-compliant software source to the user. 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 shou= ld 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 alway= s 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. >From an FSDG perspective, that means that we should do things like removing non-free software (as in netpbm) and software that does not comply (like TeX Live=E2=80=99s =E2=80=98getnonfreefonts=E2=80=99) preferab= ly in the form of a patch, rather than as a =E2=80=98substitute*=E2=80=99 statement or similar. What do people think? I=E2=80=99ll go ahead and implement that in =E2=80=98core-updates=E2=80=99 = if there are no objections. Thanks, Ludo=E2=80=99.