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

Migrate to homebrew-core for Linux #566

Open
5 of 6 tasks
MikeMcQuaid opened this issue Oct 21, 2021 · 23 comments
Open
5 of 6 tasks

Migrate to homebrew-core for Linux #566

MikeMcQuaid opened this issue Oct 21, 2021 · 23 comments
Labels
help wanted Extra attention is needed

Comments

@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Oct 21, 2021

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):

  • 1. the remote used for generating/describing/linking Linux formulae needs to be homebrew-core rather than linuxbrew-core
  • 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)
    • this requires updating the formula API to differentiate between macOS and Linux dependencies, conflicting formulae, keg_only / deprecated / disabled status, and (possibly) caveat text
  • 4. the Linux analytics URLs should reference "homebrew-core" not "linuxbrew-core"
  • 5. use the Jekyll redirect_from plugin 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 ❤️

@MikeMcQuaid MikeMcQuaid added the help wanted Extra attention is needed label Oct 21, 2021
@SMillerDev
Copy link
Member

2 is already done, see: https://formulae.brew.sh/formula/php

@MikeMcQuaid
Copy link
Member Author

@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.

@issyl0
Copy link
Member

issyl0 commented Oct 21, 2021

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.

@MikeMcQuaid
Copy link
Member Author

Awesome thanks @issyl0 🎉

@EricFromCanada
Copy link
Member

EricFromCanada commented Oct 21, 2021

☝️Same for me.

@Bo98
Copy link
Member

Bo98 commented Oct 21, 2021

  1. the remote used for generating/describing/linking Linux formulae needs to be homebrew-core rather than linuxbrew-core

This seems to have already happened: a30c1b1.

The links and textual references however still need updating, though that'll be handled by deleting the Linux specific pages.

@Rylan12
Copy link
Member

Rylan12 commented Oct 22, 2021

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?

@issyl0
Copy link
Member

issyl0 commented Oct 23, 2021

@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.

@EricFromCanada
Copy link
Member

This seems like a good spot for a shameless plug of my Liquid language module for BBEdit 😃

@EricFromCanada
Copy link
Member

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.

@MikeMcQuaid
Copy link
Member Author

@EricFromCanada makes sense for me!

@SMillerDev
Copy link
Member

Isn't nr. 3 done by @Rylan12 for the Homebrew API?

@MikeMcQuaid
Copy link
Member Author

@SMillerDev unsure!

@Bo98
Copy link
Member

Bo98 commented Dec 5, 2022

I think the HTML pages still need updating at least.

@EricFromCanada
Copy link
Member

☝️ Updating the Liquid templates is on my list

@Rylan12
Copy link
Member

Rylan12 commented Dec 5, 2022

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.

@osalbahr
Copy link

Which page is # 3?

@SMillerDev
Copy link
Member

Any page with "Linux/macOS dependencies, analytics (and perhaps: caveats, anything else?)"

@osalbahr
Copy link

osalbahr commented Aug 1, 2023

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?

@SMillerDev
Copy link
Member

That sounds like it wouldn't work for the vast majority of formulae that support both macOS and Linux

@MikeMcQuaid
Copy link
Member Author

@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-linux in dependencies under variations)
  • HEAD (already present as "Depends on when building from source:": extra autoconf, automate, xz in build_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?

@osalbahr
Copy link

osalbahr commented Aug 1, 2023

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.

@MikeMcQuaid
Copy link
Member Author

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.

👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants
@MikeMcQuaid @issyl0 @Bo98 @SMillerDev @EricFromCanada @Rylan12 @osalbahr and others