Build for older macOS versions using bump-formula-pr process in a custom tap
#5779
Replies: 3 comments 13 replies
-
|
for the first part of your question,
if you want to build bottles for older versions of macos ie. 10.14, etc, etc. you'll need to setup a self-hosted runner running that macos version ie. macos 10.14. be advised though if you core tap uses that latest upstream homebrew-core you'll have to build bottles for each and every formula or point the homebrew-core tap to a specific revision which still contains bottles for that macos version. this will need to be done for each macos version you plan on supporting, as out of the box the workflows provided by homebrew are only setup to use github runners that are officially maintained by github. |
Beta Was this translation helpful? Give feedback.
-
|
Homebrew doesn't really support cross-builds at the moment, mainly because it is not something we support in homebrew-core and nobody has really requested or developed a solution for third-party taps. With that said we do use cross-builds for the Homebrew Portable Ruby tap, using an undocumented Homebrew environment variable to "fake" the host OS version to be the deployment OS. I'm not really sure if this approach scales well for third-party tap use cases - it was a quick hack solely tested for a Ruby build without much thought put into it. Someone should probably design a better system for these use cases. An alternative solution here could be to support "unversioned" macOS bottles like Right now the approach taken by some is to compile the binary externally and to just download & install the binary in the formula. I agree this is not great and anything that avoids those scenarios would be an improvement. |
Beta Was this translation helpful? Give feedback.
-
|
@Bo98 @MikeMcQuaid Tying the ability to distribute a bottle via Homebrew to a macOS version only if it can build on that version keeps causing issues for mas. Many of the features of Swift & its ecosystem can only be built on newer Xcode & macOS versions, but the binaries can be deployed on older macOS versions. The mas build settings require only Swift 5.9 (though I'd prefer to use Swift 6.0), which can be built by Xcode 15, which can run on macOS 13. Various bottling problems still arise, however, either because the Swift tooling doesn't properly ensure compatibility, or because some tool fails (e.g., the periphery formula, which mas uses for linting, won't install on macOS 13, breaking the bootstrapping for the lint check). I assume that allowing cross-building of bottles on a newer macOS version to be installed on older macOS versions isn't something that Homebrew will support anytime soon (or maybe even ever). If I'm wrong, please let me know. Assuming cross-building won't be supported, would it cause problems if mas transitioned from a formula to a cask? Is there any automated way to migrate users from a formula to a replacement cask? Would users trust a cask less than a bottle or formula, because of the lack of directly tying the code to the executable?
Either solution would avoid all the random Swift & macOS version compatibility issues I encounter, allow me to use newer versions of languages, frameworks, libraries, tools, etc., and generally simplify & improve things. Are they any other feasible ways to achieve similar results? Obviously, mas could technically be distributed via the homebrew-core formula to only a subset of the newest macOS versions that Homebrew supports, and distributed to older macOS versions via the mas custom tap, but that seems like an undesirable & impractical nightmare scenario, so I am not suggesting it, only noting its technical possibility. Also, mas could have both a homebrew-core formula & a homebrew-cask cask, if users on newer macOS versions really want the binaries tied to the source, but I imagine that having both would be suboptimal at best. Thanks for any help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a custom tap, is there a way to make the
bump-formula-prprocess (using apr-pulllabel, etc.) build for older macOS versions (like macOS 12, 11, 10.15, 10.14, …), either by:brew tap-newbrew tap-newIs there a way to easily have the custom tap formula upload bottles to a GitHub Release in the main project repo and either:
I prefer the former, but would settle for the latter if the former wouldn't be simple or advisable.
Beta Was this translation helpful? Give feedback.
All reactions