guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Treating patches as part of ‘origin’


From: Ludovic Courtès
Subject: Treating patches as part of ‘origin’
Date: Sun, 15 Sep 2013 23:05:25 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

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 ‘guix build --source’ returns
the unmodified upstream tarball.  This is a problem because that may not
correspond to what we’re effectively building, when there are patches;
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 ‘origin’ 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’s
build system; we would get rid get rid of the #:patches arguments to
‘gnu-build-system’.

I think the effect of having a non-null ‘patches’ list should 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 (‘guix build --source’ would always 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’s
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’s ‘getnonfreefonts’) preferably in the form of a
patch, rather than as a ‘substitute*’ statement or similar.

What do people think?

I’ll go ahead and implement that in ‘core-updates’ if there are no
objections.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]