-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 bottling Linux distribution to Ubuntu 22.04 #13619
Comments
Ubuntu 18.04 is EOL next year, so I strongly advise against switching to that since I don't want us to be having this discussion again so soon. Moving forward, I think it would be helpful to formalise and document the process of upgrading our bottling infrastructure, so it can be done more easily the next time we need to do it. Ideally, I'd like for it to be just changing some variables stored somewhere, but that might be asking for too much. |
Note that LTS releases have security updates for ten years, and so Ubuntu 18.04 would continue to receive security updates until 2028.
|
I'm not as concerned about security updates as I am about being able to build new software. My impression is that a given Ubuntu version going into ESM is a nail in the coffin of that version's compiler: developers are less likely to consider it a target platform and are therefore more likely to adopt features that require a newer GCC. That said, I won't oppose using Ubuntu 18.04 if we agree to not bottle any formulae that don't build with GCC 7. To be clear, I think that we shouldn't bottle anything that doesn't build with the host compiler on Linux, regardless of the Ubuntu version. The intensity of this opinion is decreasing in the distro version we decide to use. |
Thanks for opening @sjackman!
@sjackman @danielnachun @iMichka can you spell out what you see as the pros and cons of e.g. Ubuntu vs. Debian vs. Centos? I'm interested in evaluations based on how up-to-date they are, how long they are supported for, etc.
Might be worth adding to these a column for when they are supported/EOL/security updates only?
Does this mean "the default
What happens on OS versions that e.g. ship with an older GCC?
Some suggested additions from me:
Strongly agree with all of this. I'd like us to have a macOS-like process that involves us making small and regular updates to the host system we use.
@carlocab i.e. never |
Well, not never, but probably closer to it than where we are now. I think we need to grapple with the tradeoff between portability (i.e. working on older Linux distros) and bottle coverage. Trying to have them both results in Homebrew/core being too difficult to maintain, so I suggest we decide which one is more important to us. |
Now that I've gotten The only factor I now think we need to consider in how we decide on the upgrade schedule for CI is how many users we want to have to use brewed While doing this will mean a larger percentage of our users will be relying on brewed There may also be some failures even in CI when building older C++ packages with a newer GCC, but as one of the maintainers who has probably spent the most time dealing C++ API issues recently, I can say from personal experience that I would overwhelmingly prefer spending my time fixing older code to work with newer versions of GCC. These fixes usually entail nothing more than adding a few missing The advantage of more aggressive updating is that it makes maintenance much easier. If we're updating our compiler toolchain every 2 years to what is basically the latest version, this will mean our support for C++ standards on Linux will be on par with if not even better than what we have on macOS. In my view we should prioritize maintainer free time/sanity over saving users some disk space. However, I may be overlooking some other downsides to more aggressive updating and am open to hearing other opinions. |
@sjackman you might also want to add that we need to change the preferred gcc in https://github.com/Homebrew/brew/blob/9c03493774500cf16ced8938e1eb4eeae8216b20/Library/Homebrew/extend/os/linux/compilers.rb to your list? |
I think it might be worth us allowing
Agreed. To me bottle coverage is unambiguously higher priority.
Strongly agreed with all of this. I think we should aim to have similar C++ support on macOS and Linux. I don't mind if we have a longer build-from-source tail on both but we should be clearer with our installation and runtime messaging when we expect things may break and that people should submit PRs on Linux rather than filing issues (like we do with older macOS versions). |
This would help to clarify things a lot and is very simple to implement.
Fortunately there is no tension between portability and bottle coverage now that we better understand the
Once this migration is done I am going to work on finishing the CI part of binary prefix patching. Based on the testing I've already done, about 95% of non-relocatable formulae worked with no issues (and only some of the 5% that don't work even use C++), so I think the long tail will actually become very short, making even this concern mostly irrelevant. In the near future I expect that the only difference most Linux users will have if they are on an older system is the presence of the |
Note: my earlier claim about the tradeoff between portability and bottle coverage is slightly more nuanced. To rephrase it a bit: there is portability, bottle coverage, and maintainability of Homebrew and homebrew-core. Choose two. The proposed solution for maintaining both portability and bottle coverage has introduced a lot of complexity into I've also opened a PR to try to ease the pain from this transition: #13631 |
This is an important point 👍 |
If the complexity is concentrated in the |
Actually |
On 2022-07-29 I wrote…
If we use Ubuntu 22.04 and Glibc 2.35 to build bottles, only 23% of our users will have a new enough version of Glibc on their host system to use our bottles, and the rest will need to install the brewed That said, I'm open to using either Ubuntu 20.04 or Ubuntu 22.04 for building bottles, whichever we settle on. I'd be curious to know how many bottles cannot be built using the compiler provided by Ubuntu 20.04 (GCC 9.4.0), but could be built by Ubuntu 22.04 (GCC 11.2.0). #13625 (comment)
This timeline seems reasonable to me. |
Can you elaborate on this? I don't want to totally dismiss this concern but I think it would be great to have more concrete examples of how this a problem. Speaking from personal experience, the only times I've seen problems with brewed
The even harder question to answer here is: how many bottles will not be able to built with GCC 9 but can be built with GCC 11 in 2 years when we would be preparing to transition to 22.04? It's very difficult to predict this but my concern is that if it gets too large, we will be stuck back at the same issue we've struggled with before. While I strongly oppose completely blocking the use of brewed GCC for any formulae in Linux, I think we should do everything we can to keep the number of formulae that need this as small as possible to maximize maintainability. |
|
I should clarify. What I mean is that the precise timing of how the PRs are merged is important. |
Yup, good with me 👍🏻 What I'd suggest is that we have a single "Homebrew on Linux 3.6.0" homebrew-core PR that we can get green and merge at exactly the same time as we tag. How''s that sound? |
As far as I know, all blocking PRs have been merged so once we've settled the issues in #13733 and Homebrew/homebrew-core#108590 we can ship them! |
I'd want to work out what is happening here first, as it's an early trial of the new |
I gave a much longer answer there but the TLDR is that it was caused by mixing brewed and system libraries when brewed |
While the process is fresh in your minds -- could someone write up a guide for updating the bottling distribution, so we're not making it up as we go along next time? |
I am happy to work on a guide. Where should it be added? |
Could be added as a maintainer guide at https://github.com/Homebrew/brew/tree/master/docs#maintainers. |
That's user-facing documentation. They don't need to see the details of how we update the distro there (but they can read it in the other docs if they're interested). |
This would make sense to me as it already references e.g. versions. |
But anywhere in docs.brew.sh works for me 👍🏻 |
Use Ubuntu 22.04 rather than Ubuntu 16.04 to build bottles. - Homebrew/brew#13619
Use Ubuntu 22.04 rather than Ubuntu 16.04 to build bottles. - Homebrew/brew#13619
All Linux-only GCC dependencies have been removed from homebrew-core, so I think we can officially declare the migration complete! |
Great work, thanks @danielnachun and everyone! |
Provide a detailed description of the proposed feature
The current bottling distribution is Ubuntu 16.04. I propose updating the bottling distribution to a more recent version of Ubuntu.
See https://ubuntu.com/about/release-cycle
What is the motivation for the feature?
Linux bottles ought to be built using the GCC provided by the bottling infrastructure. Some ~300 bottles fail to build using the GCC 5.4.0 provided by Ubuntu 16.04, because they require C++17 or C++20.
How will the feature be relevant to at least 90% of Homebrew users?
These ~300 bottles that currently depend on brewed GCC will no longer depend on brewed GCC.
What alternatives to the feature have been considered?
No good alternatives exist. It is widely accepted that we must upgrade the bottling infrastructure OS.
Tasks and open PRs
Please sort these tasks and PRs in the order that they ought to be completed and merged.
homebrew/ubuntu16.04:master
image deprecation #13819The text was updated successfully, but these errors were encountered: