Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub packages reference #214

Merged
merged 28 commits into from
Jan 29, 2025

Conversation

jaudiger
Copy link
Contributor

Prefer usage of gitCheckout() + Brioche.gitRef() instead of downloading directly the tarball file for packages available on Github. See this discussion for more information: #176

Two packages have not been migrated:

  • git
  • openssl

Since both are used for the command gitCheckout(), which make me wonder how we could resolve this circular dependency other than doing the solution (1) of the discussion.

@jaudiger jaudiger requested a review from kylewlacy January 28, 2025 12:24
Copy link
Member

@kylewlacy kylewlacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall! Caught one failure in jq though

For openssl, luckily it seems like the current URL structure we're using is stable. Like jq, it's a download from /releases/download/*, not /tags/archive/*, meaning it's a tarfile published by OpenSSL directly, not a git archive published by GitHub. Most likely, it too includes a pre-configured ./configure script generated by autoconf, meaning it wouldn't be a direct mirror for the git repo. This one should continue to be safe to download as-is.

As for git... that one is a git archive and I don't have a good answer for it. I don't really have a better plan than "cross our fingers GitHub doesn't change the hash on us", at least for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jq is another example like openssl where the URL here is a release download rather than a git archive, and one published by the jq project. Trying out brioche build -p packages/jq here fails because the upstream source doesn't have ./configure while the original tarfile does, so I think it'd be better to revert this one

(Longer term, it might be better to always use the autoconf build instead of the pre-packaged ./configure, but that's a different conversation IMO and shouldn't be in scope for this PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it quite strange that most of the release downloads contain the script ./configure whereas the git archive does not. I thought we always needed to generate the ./configure through tools as autoreconf. Let's leverage for now the possibility to use the pre-built one that comes with the release download. Indeed it makes things much easier for now.

This reverts commit 24ba4229acea5ca61a6324.
Copy link
Member

@kylewlacy kylewlacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I reverted the commit that updated jq, everything left looks good!

@kylewlacy kylewlacy merged commit 3c00718 into brioche-dev:main Jan 29, 2025
3 checks passed
@jaudiger jaudiger deleted the update-github-packages-reference branch January 29, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants