From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: =?utf-8?B?4oCYc25pcHBldOKAmQ==?= in Date: Thu, 07 Nov 2013 23:43:24 +0100 Message-ID: <87a9hfq1df.fsf_-_@gnu.org> References: <87ob6gpd5k.fsf@karetnikov.org> <20131023115728.GA17339@debian.eduroam.u-bordeaux.fr> <87iow8km91.fsf_-_@karetnikov.org> <87eh6tk75p.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]:47683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeYKa-00026E-08 for guix-devel@gnu.org; Thu, 07 Nov 2013 17:46:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeYIQ-0008Qd-Eg for guix-devel@gnu.org; Thu, 07 Nov 2013 17:45:39 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:40534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeYIQ-0008Ph-8T for guix-devel@gnu.org; Thu, 07 Nov 2013 17:43:26 -0500 In-Reply-To: <87eh6tk75p.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 06 Nov 2013 14:10:26 +0100") 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: Nikita Karetnikov Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > + ;; See . > + 'configure 'remove-non-free-files > > It=E2=80=99s a case where =E2=80=98guix build -S=E2=80=99 will return the= source including the > non-free files, which is clearly not what we want (though I gather that > the next upstream version of LAPACK will be fixed, right?). > > Two things we could do: (1) add a =E2=80=98snippet=E2=80=99 field in =E2= =80=98origin=E2=80=99, which is > where the =E2=80=98remove-file=E2=80=99 calls would appear, (2) host a fr= eed version > under alpha.gnu.org/gnu/guix/mirror. Commit f9cc897 in master adds a =E2=80=98snippet=E2=80=99 field in = , which in this particular case is used like this (commit 6a99575): (origin (method url-fetch) (uri (string-append "http://www.netlib.org/lapack/lapack-" version ".tgz")) (sha256 (base32 "1w7sf8888m7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0")) (snippet ;; Remove non-free files. ;; See . '(for-each (lambda (file) (format #t "removing '~a'~%" file) (delete-file file)) '("lapacke/example/example_DGESV_rowmajor.c" "lapacke/example/example_ZGESV_rowmajor.c" "DOCS/psfig.tex")))) Problem solved. :-) This change breaks the ABI; make sure to run =E2=80=98make clean-go && make= =E2=80=99! Note that things occur in this order: 1. The upstream source is unpacked. 2. We chdir to the first directory created by that step (normally there is exactly one.) 3. Patches are applied. 4. The snippet is run. 5. The directory is repacked. Of course we get less flexibility by having things hardcoded this way, but the goal is to keep it much simpler than what is done for . Mark: how well would this scheme apply to the mit-krb5 case? Comments welcome! Ludo=E2=80=99.