Hi SourceHut!
Thanks for this tremendous work.
I've noticed that mbox patchsets (that one gets with
https://lists.sr.ht/:user/:list/patches/:id/mbox) include timestamps,
which is bad for reproducibility.
Of course a patchset is never finished so we can never ensure
immutability so it's not that big of an issue, but reproducible input is
of paramount importance in nix/guix. We can create a function to remove
faulty timestamps on the guix side, but would you consider making these
patchsets independent from the time they are queried ?
Thanks!
As an example, only a few similar lines are faulty :
> diff mbox\(1\) mbox\(2\)
1c1
< From nobody Sun Feb 11 22:06:46 2024
---
> From nobody Sun Feb 11 22:30:18 2024
92c92
< From nobody Sun Feb 11 22:06:46 2024
---
> From nobody Sun Feb 11 22:30:18 2024
184c184
< From nobody Sun Feb 11 22:06:46 2024
---
> From nobody Sun Feb 11 22:30:18 2024
zsh: exit 1 diff --color=auto mbox\(1\) mbox\(2\)
--
Best regards,
Nicolas Graves
On 2024-02-12 10:39, Drew DeVault wrote:
> I'm not sure why you're using this URL as an input to anything?
Let's say you want to have a reproducible way to build a repository with
patches, rather than maintaining your own fork.
If you take the mbox, (strip the timestamps,) pass it through `b4 am`, you
have a way to apply an almost derminist way to do this, given that you
haven't made a mistake when sending the patches.
I know that there's also the /query/patchset/:id URL that seems
reproducible but this doesn't work from wget / curl / (guix http-client).
--
Best regards,
Nicolas Graves
Most distros when faced with this problem will vendor the patch, I think
this is generally a better solution. This page is not designed to be
load-bearing.
On nix you can use `fetchpatch` [1] instead of fetchurl. That should
strip out this nondeterminism.
IDK if GNU/Guix has an equivalent.
[1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchpatch/default.nix
Em seg., 12 de fev. de 2024 às 10:43, Drew DeVault <sir@cmpwn.com> escreveu:
>> Most distros when faced with this problem will vendor the patch, I think> this is generally a better solution. This page is not designed to be> load-bearing.
On 2024-02-12 11:20, Lucas Eduardo wrote:
> On nix you can use `fetchpatch` [1] instead of fetchurl. That should> strip out this nondeterminism.>> IDK if GNU/Guix has an equivalent.
Not to my knowledge, I've wrote one yesterday, but I'm still debugging
it, thanks ! With b4, it's actually really simple.
>> [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchpatch/default.nix>> Em seg., 12 de fev. de 2024 às 10:43, Drew DeVault <sir@cmpwn.com> escreveu:>>>> Most distros when faced with this problem will vendor the patch, I think>> this is generally a better solution. This page is not designed to be>> load-bearing.
--
Best regards,
Nicolas Graves
On 2024-02-12 14:43, Drew DeVault wrote:
> Most distros when faced with this problem will vendor the patch, I think> this is generally a better solution. This page is not designed to be> load-bearing.
Is there another way to simply get a working patchset without
authentication?
My use-case is developping for Guix, and using it with patches that
are not yet merged (so vendoring is not useful there), on two distinct
computers (thus I can't fully rely on a local fork). I don't see an easy
alternative to what I've currently done, but I'll add a revision
variable to my code to make this deterministic, thus I will need to
query only once per patchset revision.
--
Best regards,
Nicolas Graves