serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Ports: Port gn

Open ADKaster opened this issue 2 years ago • 5 comments

This requires allowing ports to override fetch() since tar.gz sha256sums from googlesource.com are not deterministic.

ADKaster avatar Jul 10 '23 00:07 ADKaster

Given

https://github.com/google/gitiles/issues/217

and

https://github.com/google/gitiles/issues/84

It seems like the response from the owners of the google service that drives googlesource.com is "if you want a stable tarball store it yourself".

@timschumi @alimpfard @gmta what do we think about enabling overriding fetch() to allow ports hosted on googlesource to use git? Or should we add a "git" method that's actually supported by the Port infrastructure?

ADKaster avatar Jul 10 '23 02:07 ADKaster

Patch submitted upstream at https://gn-review.googlesource.com/c/gn/+/15660/1

ADKaster avatar Jul 10 '23 03:07 ADKaster

what do we think about enabling overriding fetch() to allow ports hosted on googlesource to use git? Or should we add a "git" method that's actually supported by the Port infrastructure?

I do have a perpetual TODO list item of "invent a new files syntax" that would include other transport methods. If we don't want to wait for that, then overriding fetch is probably the best solution for now.

timschumi avatar Jul 10 '23 07:07 timschumi

what do we think about enabling overriding fetch() to allow ports hosted on googlesource to use git? Or should we add a "git" method that's actually supported by the Port infrastructure?

Either sounds alright to me, though I'll add that I think a git+https:// scheme for files would be a little nicer than overriding fetch() every time we want to pull from git (and we have a lot of those, they're just hidden as archive downloads).

alimpfard avatar Jul 11 '23 05:07 alimpfard

Aight, I'll fix this up to not be quite as jank and open an issue to discuss the future design of pulling from git

ADKaster avatar Jul 11 '23 06:07 ADKaster

Or should we add a "git" method that's actually supported by the Port infrastructure?

This would be my preferred solution, and similar to the sha256 hash we'd then be able to fixate on a specific commit ID.

gmta avatar Jul 12 '23 19:07 gmta

All right, I cleaned this Port up.

The upstream patch was accepted, at https://gn.googlesource.com/gn/+/fae280eabe5d31accc53100137459ece19a7a295. Amusingly it was accepted by Nico, Nico, Brett and Brett. Apparently chromium.org emails are no bueno for approvals on that instance if the commit author is not a google employee 🤷‍♂️ .

I created #20004 to document the desire for a proper git download method.

ADKaster avatar Jul 13 '23 19:07 ADKaster