formulae.brew.sh
formulae.brew.sh copied to clipboard
Migrate to homebrew-core for Linux
We've now migrated Linux formulae from linuxbrew-core to homebrew-core. Unfortunately, this breaks a non-trivial number of assumptions in this codebase.
Things that need to be updated (in a rough order, combining/jumping steps is fine):
- [x] 1. the remote used for generating/describing/linking Linux formulae needs to be homebrew-core rather than linuxbrew-core
- [x] 2. the Linux formulae should share a formula page with macOS formulae and the Linux bottle used to detect Linux support
- [ ] 3. the Linux/macOS dependencies (and perhaps: caveats, anything else?) should be separated when they differ between OSs (but still displayed on the same page)
- [x] this requires updating the formula API to differentiate between macOS and Linux dependencies, conflicting formulae,
keg_only/ deprecated / disabled status, and (possibly) caveat text
- [x] this requires updating the formula API to differentiate between macOS and Linux dependencies, conflicting formulae,
- [x] 4. the Linux analytics URLs should reference "homebrew-core" not "linuxbrew-core"
- [x] 5. use the Jekyll
redirect_fromplugin to ensure that we don't break any links that used to work (e.g. migrate API JSON, formula/analytics/index pages)
Things that don't need updating:
- analytics data: macOS and Linux are still (for now) using separate analytics data
CC @EricFromCanada @Rylan12 @issyl0 for folks who have done Linux work here previously and may be interested in volunteering ❤️
2 is already done, see: https://formulae.brew.sh/formula/php
@SMillerDev somewhat but I think it could be cleaned up. It still references "Bottle (binary package) installation support provided for macOS releases:" and then goes on to list Linux in there. I think Linux support would ideally be a separate table or at least use a different prefix.
I am interested in doing at least some of this, so I'll try to carve out time. With packing and moving house in the next few weeks I'm not sure how much time is left.
Awesome thanks @issyl0 🎉
☝️Same for me.
- the remote used for generating/describing/linking Linux formulae needs to be homebrew-core rather than linuxbrew-core
This seems to have already happened: a30c1b1c2775bd169f2fc9bcf008089d0d0ea752.
The links and textual references however still need updating, though that'll be handled by deleting the Linux specific pages.
I've got time today to work on some of this but I don't want to duplicate work other people are doing (or take it from them). @issyl0, are there any parts of this that you're not working on that you would like some help with?
@Rylan12 Figuring out how we'd use redirect_from would be a good one, given the amount of templating and auto-generation going on here.
This seems like a good spot for a shameless plug of my Liquid language module for BBEdit 😃
Since each formula's JSON file will need to also contain the Linux statistics from its correpsonding formula-linux JSON file, I'm going to assume tacking them on as an analytics-linux key is the best approach.
@EricFromCanada makes sense for me!
Isn't nr. 3 done by @Rylan12 for the Homebrew API?
@SMillerDev unsure!
I think the HTML pages still need updating at least.
☝️ Updating the Liquid templates is on my list
The only part that I know has not been updated in the json files yet are macOS version differences for casks. We haven't fully removed the old if MacOS.version <= :monterey syntax.
Which page is # 3?
Any page with "Linux/macOS dependencies, analytics (and perhaps: caveats, anything else?)"
Ok. Is it referring to having a separate table for formulae that are macOS-only, and another table for the ones that are Linux-only?
That sounds like it wouldn't work for the vast majority of formulae that support both macOS and Linux
@osalbahr @SMillerDev I think the ideal outcome would be:
- if all macOS versions and Linux dependencies are the same: things are the same as what we have today
- if there's any differences: there's one or more separate tables for those differences e.g. a Linux-only table, a macOS-only table, a macOS-older-than-High Sierra table or a new single table for all which has a column explaining what the conditional for the dependencies are
For a relatively simple example, check out the (truncated, relevant) output from brew info --json --variations wget:
[
{
"build_dependencies": [
"pkg-config"
],
"dependencies": [
"libidn2",
"openssl@3"
],
"test_dependencies": [],
"recommended_dependencies": [],
"optional_dependencies": [],
"head_dependencies": {
"build_dependencies": [
"autoconf",
"automake",
"xz",
"pkg-config"
],
"dependencies": [
"gettext",
"libidn2",
"openssl@3"
],
"test_dependencies": [],
"recommended_dependencies": [],
"optional_dependencies": [],
"uses_from_macos": [],
"uses_from_macos_bounds": []
},
"variations": {
"x86_64_linux": {
"dependencies": [
"libidn2",
"openssl@3",
"util-linux"
],
"head_dependencies": {
"build_dependencies": [
"autoconf",
"automake",
"xz",
"pkg-config"
],
"dependencies": [
"gettext",
"libidn2",
"openssl@3",
"util-linux"
],
"test_dependencies": [],
"recommended_dependencies": [],
"optional_dependencies": [],
"uses_from_macos": [],
"uses_from_macos_bounds": []
}
}
},
"name": "wget"
}
]
You can notice here there's essentially 3 configurations we care about (for dependencies):
- Linux x86_64 (extra
util-linuxindependenciesundervariations) - HEAD (already present as "Depends on when building from source:": extra
autoconf,automate,xzinbuild_dependencies) - the default (already present as "Depends on:": i.e. macOS, non-HEAD in this case)
so this would be either 1 additional table (for Linux) on https://formulae.brew.sh/formula/wget with something like "Depends on (Linux): util-linux".
Make sense?
That sounds like it wouldn't work for the vast majority of formulae that support both macOS and Linux
I was trying to propose 3 tables in https://formulae.brew.sh/analytics/install/30d/.
so this would be either 1 additional table (for Linux) on https://formulae.brew.sh/formula/wget with something like "Depends on (Linux): util-linux".
Oh, I see. I was looking at the wrong website maybe (hence my original question). If this is about dependency information, then yeah I think qualifying with “Depends on (Linux) :” is better than having a separate table but both seem fine.
That sounds like it wouldn't work for the vast majority of formulae that support both macOS and Linux
I was trying to propose 3 tables in https://formulae.brew.sh/analytics/install/30d/.
I've removed the analytics mention from the original issue body, there's no real need to have separation there.
If this is about dependency information, then yeah I think qualifying with “Depends on (Linux) :” is better than having a separate table but both seem fine.
👍🏻