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

Make sure that things work on PureDarwin #112

Open
ryao opened this issue Sep 27, 2022 · 11 comments
Open

Make sure that things work on PureDarwin #112

ryao opened this issue Sep 27, 2022 · 11 comments

Comments

@ryao
Copy link
Contributor

ryao commented Sep 27, 2022

When this is merged into OpenZFS, a buildbot would need to be added. If the build process and test suite could be run on puredarwin, that would simplify the process of making a buildbot.

http://www.puredarwin.org/

@lundman
Copy link
Contributor

lundman commented Sep 27, 2022

At the moment we have appveyor run buildbot for us, as it has SIP-disabled macOS. I believe GH also did a SIP-disabled image, but I've yet to try it. However, we can at least run project-"builds tests" on regular macOS buildbots to at least stop builds from being broken by code changes.

@andrewc12
Copy link
Contributor

I can probably look into doing this in a couple of months time.

I've already played around with getting a macosx build compiled on GitHub . I just couldn't load it due to the SIP issue.

@ryao
Copy link
Contributor Author

ryao commented Sep 29, 2022

While some things use GH’s infrastructure, the buildbot primarily runs on ZFSOnLinux infrastructure. GitHub limits GitHub actions to something like 3000 minutes per month. If the ZTS were run through GitHub infrastructure, we could exhaust that in a few days.

I imagine @behlendorf should join the conversation since if I recall, he maintains the CI infrastructure. I suspect it would be easier for him to setup Pure Darwin VMs than MacOS VMs given that the MacOS license requires that MacOS VMs run on Apple hardware.

@andrewc12
Copy link
Contributor

@ryao I made a PR for building for a mac on GitHub openzfsonosx/openzfs-fork#3
It takes about 15 minutes since it doesn't do anything other than build.
@behlendorf do you have comments on what you would like these to end up like?

@andrewc12
Copy link
Contributor

I don't think pure darwin is going to be something we can use.
It might be missing large parts of operating system.

@ryao
Copy link
Contributor Author

ryao commented Sep 29, 2022

PureDarwin has the XNU kernel and enough of the userland that I would expect building and running the ZTS against it to reflect how things work on MacOS, much like how building and running the ZTS against CentOS applies to Ubuntu (not that we do not test on Ubuntu). PureDarwin is built from Apple's published sources:

https://opensource.apple.com/

Apple used to publish Darwin images for developers to use for the precise use case we have, but they stopped doing that years ago, which is why we now have PureDarwin (and previously, OpenDarwin), to fill in the gaps to continue publishing images.

I imagine we could use github's infrastructure for build tests, but we would still need to use ZoL's infrastructure for running the ZTS and it strikes me as easier to do that on PureDarwin. That said, @behlendorf is the one that would set that up, so he might think differently here.

@behlendorf
Copy link
Contributor

I made a PR for building for a mac on GitHub openzfsonosx/openzfs-fork#3

That's great. My preference would be to leverage the GitHub hosted runners for testing if possible, and it looks like you've proven that it is. We'd of course want to enable that functionality when merging in the MacOS support.

@ryao
Copy link
Contributor Author

ryao commented Sep 29, 2022

@behlendorf Does Github gives us enough time per month for github hosted runners to run the ZTS on more platforms? If they do, then that is great.

@andrewc12
Copy link
Contributor

That's great. My preference would be to leverage the GitHub hosted runners for testing if possible, and it looks like you've proven that it is. We'd of course want to enable that functionality when merging in the MacOS support.

@behlendorf It is absolutely not possible to install ZFS and run the ZTS on the github runners due to https://en.wikipedia.org/wiki/System_Integrity_Protection

@behlendorf
Copy link
Contributor

GitHub does support self hosted runners which might be an option if SIP can be disabled on self managed hardware. I believe this would also have the advantage that the usual GitHub time limits don't apply.

@yurikoles
Copy link

  1. PureDarwin is barely alive. Their efforts are around macOS 10.12 (Sierra) that is 6 years/releases behind.
  2. I have doubt that the recent macOS SDK will work on top of it.
  3. They didn't achieve dogfooding, i.e. working macOS with Xcode is needed to build PureDarwin, so it seems that even older SDKs doesn't work natively on PureDarwin.

I vote for native self-hosted runner. We may rent some Mac mini to start. Hetzner offers M1 Mac mini as cheap as €64.02/mo. Intel one may rent from MacStadium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants