-
Notifications
You must be signed in to change notification settings - Fork 47
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
Switch build system to Meson #304
Conversation
ok so I think a switch to meson is something we can consider, but it would have to be a full switch, definitely not going to maintain the same stuff in parallel in two places FYI ignore debian, macos test failures for now they got the broken NSS 3.94; Anyway for a change like this we'd have to wait until debian and macos upgrade to 3.95 in a month because we definitely need to ensure all the platforms work end-to-end |
b6ffc75
to
6d17aed
Compare
489db39
to
e971bff
Compare
04b88dd
to
0da508b
Compare
@simo5 I think this is almost ready, though I would need to take a closer look at the current CI failures (macOS build, address sanitizer with Debian, scan-build, and check style). After the xz backdoor, it seems to be more relevant to switch to a simpler build system that doesn't allow extensions in a implicit/obfuscated way. |
Given you are removing the old build system, can you provide a Makefile with targets that correspond to today high level targets that just turn around and run meson commands? At least:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, just some nitpicks
This removes checks for <string.h> and strpbrk as they are used unconditionally and unlikely to be absent on any supported platforms. This also makes it error out when <dlfcn.h> is not found. Signed-off-by: Daiki Ueno <[email protected]>
For better support for out-of-tree builds, this removes assumption in which directory the test scripts are running. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
This adds a basic support for building and installing the provider with Meson. To test: ```console meson setup build meson compile -C build meson test -C build ``` Note that parallel execution of tests are currently disabled, as the same port number is used in multiple tests. Signed-off-by: Daiki Ueno <[email protected]>
8cfc386
to
de08d11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I think we are really close.
The bind test failure is a regression in bind and we will waive it.
However I just realized that this PR will break the coverity scan.
Coverity relies on the command "make" to generate a build, it may even pass variables there.
Unfortunately it cannot be easily tested on a PR as the coverity scan can only run against an action already merged in the main tree.
But I can attempt a test in a local checkout to confirm that just providing a make :all target that call meson compile will work
So I think coverity depends only on a PATH change, injecting a different gcc in a coverity/bin path or similar. How will meson interact with that ? When I run |
I did find his post though: Which means you may need to tweak the .github/workflows/coverity-scan.yml steps before we can merge this PR, sorry for not realizing this earlier. |
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Loadable modules on macOS should use .so as extension, but both NSS softokn and OpenSSL providers do not follow this rule. Modify shlext accordingly so that NSS softokn can be found for the tests. Note that p11-kit correctly names its loadable modules with .so, so this variable should be used carefully as it may be incorrect depending on your use case. Signed-off-by: Clemens Lang <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
This suppresses a couple of dead assignments and unlikely null pointer dereferences. Signed-off-by: Daiki Ueno <[email protected]>
Thank you for the pointer. I added |
Ok, I will merge this, once it is merged I will know soon enough if the covbuild fails. If it does I will experiment with it on a in tree branch until we get it right. |
@dueno we sill need a Makefile all target to call meson compile as the covscan build just calls |
While coverity-scan-action supports meson/ninja directly, as we have a maintainer Makefile in the top-level, it requires the standard make rules (make all, etc.). Signed-off-by: Daiki Ueno <[email protected]>
Sure we can avoid that if you want, but then you should add a |
I am going to ignore the MacOS failure as it seems a homebrew screwup, as all of this was working until today. |
The macOS CI failure is a Homebrew screw-up, see Homebrew/homebrew-core#169728. I can locally reproduce:
^ there's a |
This adds a basic support for building and installing the provider
with Meson. To test:
Note that parallel execution of tests are currently not working, as
the same port number is used in multiple tests.
Here is some benchmark: