From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: Re: Generated patches change over time
Date: Sun, 02 Dec 2018 11:38:53 +0100 [thread overview]
Message-ID: <87zhtop60y.fsf@gnu.org> (raw)
In-Reply-To: <87zhto3mnz.fsf@netris.org> (Mark H. Weaver's message of "Sat, 01 Dec 2018 17:29:57 -0500")
Mark H Weaver <mhw@netris.org> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>>>> ludo@gnu.org (Ludovic Courtès) writes:
>>>
>>>>Lesson learned: we should not rely at all on generated patches because
>>>>they are bound to change frequently (version string at the end, length
>>>>of commit hash prefixes, etc.) It’s probably worse than tarballs
>>>>generated by Git hosting services.
>>>>
>>>>So we should probably work towards using local copies of patches,
>>>>unless
>>>>we find that the generated patches do not include any variable bits.
>>>>
>>>
>>> Maybe we could pass the patches through some sanitizer to strip any metadata? I guess the content itself shouldn't change?
>>
>> We can’t really do that, or the downloads would no longer be
>> fixed-output derivations and thus we wouldn’t be solving the problem.
>
> Can you elaborate on why it cannot be done? If I understand correctly,
> our 'git-fetch' origin type deletes the .git subdirectory after fetching
> it, and yet it still creates fixed-output derivations, no? I don't see
> why stripping metadata from a patch is fundamentally any different.
You’re right, along the same lines, it could be a fixed-output
derivation.
The problem is rather that the workflow would be a bit awkward: ‘guix
download’ would download the raw, unprocessed patch, and thus it would
give you the “wrong” hash.
In essence you’d have to put a random hash in your package definition,
run “guix build -S”, copy the correct hash from the error message,
manually look at the patch, etc.
It’s possible, but it’s a bit awkward IMO.
Or we would need to add a ‘--strip-patch-metadata’ option to ‘guix
download’ so that it applies the exact same transformation when
downloading.
Thoughts?
Ludo’.
next prev parent reply other threads:[~2018-12-02 10:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181124183051.23027.37347@vcs0.savannah.gnu.org>
[not found] ` <20181124183052.9A76B209A2@vcs0.savannah.gnu.org>
2018-11-25 16:24 ` 01/02: gnu: rhythmbox: Update hash of patch Ludovic Courtès
2018-11-25 21:31 ` Mark H Weaver
2018-11-28 11:04 ` Generated patches change over time Ludovic Courtès
2018-11-28 17:59 ` Mark H Weaver
2018-12-02 0:24 ` Ludovic Courtès
2018-11-29 14:48 ` Maxim Cournoyer
2018-12-01 21:37 ` Ludovic Courtès
2018-12-01 22:29 ` Mark H Weaver
2018-12-02 10:38 ` Ludovic Courtès [this message]
2018-12-02 19:36 ` Maxim Cournoyer
2018-12-02 20:33 ` Mark H Weaver
2018-12-31 2:12 ` Maxim Cournoyer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhtop60y.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=maxim.cournoyer@gmail.com \
--cc=mhw@netris.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.