unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: Re: Treating patches as part of ‘origin’
Date: Wed, 09 Oct 2013 00:18:26 +0200	[thread overview]
Message-ID: <874n8rxv7x.fsf@gnu.org> (raw)
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")

ludo@gnu.org (Ludovic Courtès) skribis:

> 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.

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 ‘make clean && make’!

So the official way to introduce patches is now the form shown above.

There’s still work in that area: in ‘core-updates’, I’ll remove the
‘patch’ phase and #:patches argument from ‘gnu-build-system’ & co., and
update the core packages that still use #:patches.

Comments & bug reports welcome!

Ludo’.

  parent reply	other threads:[~2013-10-08 22:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15 21:05 Treating patches as part of ‘origin’ Ludovic Courtès
2013-09-15 23:05 ` Alex Sassmannshausen
2013-09-16 10:31   ` Ludovic Courtès
2013-09-18  7:35 ` Andreas Enge
2013-09-18 21:36   ` Ludovic Courtès
2013-10-08 22:18 ` Ludovic Courtès [this message]
2013-10-09 21:39   ` Ludovic Courtès
2013-10-10 21:19   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874n8rxv7x.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).