nghttp2: split libraries into separate libnghttp2 formula#86291
nghttp2: split libraries into separate libnghttp2 formula#86291Bo98 wants to merge 11 commits intoHomebrew:masterfrom
Conversation
Formula/libnghttp2.rb
Outdated
There was a problem hiding this comment.
How much does building only the libraries speed up build time? I worry this adds some extra maintenance work without really all that much benefit.
There was a problem hiding this comment.
In terms of the actual build of nghttp2 itself: probably not much.
This is purely with the idea that we can kill 3 dependencies from the curl dep tree so it might speed up that because you have to install less. And there was a couple of nghttp2 dependencies which I could not find plain HTTP mirrors for.
One benefit this might have is relocatable bottles, which will definitely improve install time. (Double check CI output in case I'm wrong.)
There was a problem hiding this comment.
Yeah it is:
==> Bottling libnghttp2--1.45.1.arm64_big_sur.bottle.tar.gz...
/opt/homebrew/opt/gnu-tar/bin/gtar --create --numeric-owner --format pax --owner 0 --group 0 --sort name --pax-option globexthdr.name=/GlobalHead.%n,exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --file /Users/brew/actions-runner-x86_64/_work/homebrew-core/homebrew-core/bottles/libnghttp2--1.45.1.arm64_big_sur.bottle.tar libnghttp2/1.45.1
./libnghttp2--1.45.1.arm64_big_sur.bottle.tar.gz
bottle do
sha256 cellar: :any, arm64_big_sur: "b6a81d7be284f3619e6d36551143152dc31a69e01e060e659397f5228f71fe89"
end
Writing libnghttp2--1.45.1.arm64_big_sur.bottle.json
==> Bottling nghttp2--1.45.1_1.arm64_big_sur.bottle.tar.gz...
/opt/homebrew/opt/gnu-tar/bin/gtar --create --numeric-owner --format pax --owner 0 --group 0 --sort name --pax-option globexthdr.name=/GlobalHead.%n,exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --file /Users/brew/actions-runner-x86_64/_work/homebrew-core/homebrew-core/bottles/nghttp2--1.45.1_1.arm64_big_sur.bottle.tar nghttp2/1.45.1_1
/opt/homebrew/Cellar/nghttp2/1.45.1_1/bin/nghttpx
--> match '/opt/homebrew/Cellar/nghttp2/1.45.1_1/share/nghttp2/fetch-ocsp-response' at offset 0x8d601
Warning: String '/opt/homebrew/Cellar' still exists in these files:
./nghttp2--1.45.1_1.arm64_big_sur.bottle.tar.gz
bottle do
sha256 arm64_big_sur: "c3465c3d63b3dcd3c826db8fad58c6eb9c75dbb5e0f4c82ea6196d36f7217685"
end
Writing nghttp2--1.45.1_1.arm64_big_sur.bottle.json
|
@Homebrew/core Thoughts on the approach? This relates to trimming the dependency tree for curl, which soon everyone on macOS <= 10.15.5 will be forced to install. Alternative is to just keep the dep tree as it is and find mirrors for a few more formulae, but I haven't managed to do this so far. FreeBSD does a very similar approach to what I'm doing here. Arch Linux seems like it just does a full install and then deletes the libs (but that only works if the two packages install in the same place - which it will be in the keg-less world over there). |
|
Ah, a pretty bad chicken & egg issue in Mojave CI. |
|
I suggest dropping all changes except for the ones dealing with The order in which test-bot does downloads and builds might still be a problem though... |
|
I feel like it's always going to be an issue when we update any part of the dep tree. Even when we get past the |
|
And then once we've created the curl bottle, we uninstall the dependencies so it's completely broken from then on: We had this issue with Git and the solution was to enforce |
|
Yea, this clearly needs a more comprehensive fix. I'm just thinking splitting up |
|
This is a bit of a major shift in the direction we were going to take but it's an idea I just thought of that'll work better in CI and be much quicker to install for users: How about we don't set |
|
Sounds much nicer, yea. |
Formula/nghttp2.rb
Outdated
There was a problem hiding this comment.
Why don't we want audit_result = true here?
There was a problem hiding this comment.
I'm doing a glob over all Makefiles and some won't have this.
There was a problem hiding this comment.
That seems worth documenting in a comment.
There was a problem hiding this comment.
Ok. Don't really want to start another build unless I need to but I can do it on merge.
There was a problem hiding this comment.
Yup, no need to restart the build for it.
There was a problem hiding this comment.
The pattern I've seen used for this (that I like) is doing if s.include? here
There was a problem hiding this comment.
I'm not entirely sure what extra safety that adds?
There was a problem hiding this comment.
No safety but feels more self-documenting IMO.
There was a problem hiding this comment.
Yeh, it'd need some work but may be worth doing eventually. Also worth thinking about this being possible for e.g. using a formula's url/sha in a resource.
|
The ARM audit failure is annoying, especially since it prevents dependent tests. |
|
Oh I didn't even realise it bailed out like that. |
|
Yea, I'm not a fan of this behaviour: #82220 |
|
Hmm there's a chicken egg problem here so I might need to do this after shipping Homebrew/brew#12167, which is annoying. The test-bot workaround equally broke things. |
|
Ok pushed the curl mirror separately: 4ee61bd, since that was an important blocker. I will remove the mirror from |
|
Linux failed because... it's not using the latest brew for some reason:
|
|
It's 5.45am so I'm done for now. I hoped to have gotten this finished before I went to bed but this build's going to take a few hours, particularly since I didn't even realise dependents were skipped. If this works, and no one has any objections to the approach taken here, the plan is:
|
|
Thanks for working so hard on this, @Bo98! Sleep well—you deserve it 😅 |
|
I have absolutely no idea why Linux has failed - it has built all bottles successfully. It's now unfortunately going to skip dependent testing... |
|
I'm tempted to still merge this when it's done and then maybe open another PR to try get the dependent testing on Linux working. |
Works for me; but ping me when you do, as I'll need to rebase #85898 (also rev-bumps |
My guess is some missing Edit: Ah, wait, here's something: |
|
Wow that's hard to notice - nice find! This is a The reason but I think we should be removing the |
|
We could maybe just gate |
|
Mojave failure from |
|
That'll likely be pre-existing from the general Let's Encrypt situation but worth noting as something to look at fixing. |
|
No Linux bottle. Probably actually needs (new-ish?) |
|
Yeah probably a |
|
|
|
This isn't great: The problem is that |
|
That's annoying because I don't know a quick fix for that. |
|
|
|
Ah yes, good idea. Let's do that. |
brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingbrew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?This is a bit hacky, but it does work.
This reduces the dependency tree of
curl.