Add macos support#96
Conversation
|
Please rebase this on #101 and check how well it works on macOS. This change should make support much easier because now there is a dedicated "lbx-init" binary which goes inside the container and can easily be cross-compiled |
|
Sorry for the delay, but great to see the Linux lbx-init binary now works on MacOS! I've now merged my large PR after making a few more tweaks. Unfortunately it seems you will now have to rebase again after those changes, sorry about that |
binary. This will make cross-compliation easier to support other platforms.
Co-authored-by: Copilot <copilot@github.com>
44d084e to
b1e5c9f
Compare
Gerharddc
left a comment
There was a problem hiding this comment.
Thanks for all the hard work on this! And my apologies for being pedantic, but I prefer to keep PRs clean and concise. I prefer when a PR has one specific goal and does not touch other parts of the code along the way
There was a problem hiding this comment.
Are these changes required for macOS support?
| let _ = symlink("/lbx-init", format!("/usr/bin/{su_bin}")); | ||
| let _ = symlink("/litterbox", format!("/usr/bin/{su_bin}")); |
There was a problem hiding this comment.
This does not look right, are you sure this works?
| use shared::entrypoint::{CommonEntrypointOptions, WaitBehaviour}; | ||
| use shared::env; |
There was a problem hiding this comment.
I suspect this file has been changed by accident. It believe it should not need to be changed at all
|
Really sorry for all the mess. I'm a bit overloaded this week. I'm testing the code after reverting all the "unnecessary" changes as you required. But I constantly get: After inspecting the code carefully, I found that we are using |
|
Sometimes I get this error while rebuilding: It seems to occur randomly. I failed to find the cause. |
|
@ovo-Tim I appreciate all the work you have done on this, but after seeing how the solution is working out and the shortcomings involved, I just don't think macOS support makes sense anymore. I sincerely apologise that it has taken me so long to reach this conclusion. Given that neither graphics nor the ssh agent work on macOS, I really don't see the point of using Litterbox on macOS over just using Podman directly. The little bit of convenience Litterbox may add can easily be replicated with a simpler program (likely even just some shell script). There is also not much portability for Litterbox users between Linux and macOS since most of the features will be missing. Hence, the minimal reward does not justify the additional maintenance burden of trying to support macOS. I think it will also be misleading to users to pretend that there is really support for macOS. I believe that making Litterbox truly cross platform will require re-implementing it from scratch to use microVMs instead of simple Linux containers. I'm not working on this now, but it is something that I'm considering in the distant future (should I ever find time for it). For now however, if you really want to use Litterbox on macOS, I would suggest using it inside a full blown Linux VM so that you can take advantage of the features it offers. Alternatively, just use Podman directly. Or feel free to maintain a fork, that's totally cool too :) |


#95
Adds macOS host support by gating Linux-only features and dependencies behind
cfg(target_os = "linux").Changes
Do not merge for now. The test is still going.