Skip to content

Add macos support#96

Open
ovo-Tim wants to merge 21 commits intoGerharddc:mainfrom
ovo-Tim:macos-support
Open

Add macos support#96
ovo-Tim wants to merge 21 commits intoGerharddc:mainfrom
ovo-Tim:macos-support

Conversation

@ovo-Tim
Copy link
Copy Markdown

@ovo-Tim ovo-Tim commented May 4, 2026

#95
Adds macOS host support by gating Linux-only features and dependencies behind cfg(target_os = "linux").

Changes

  • Make Landlock optional on non-Linux (no-op on macOS) and move landlock dependency to Linux-only target deps.
  • Gate Linux-only nix usage (prctl, inotify, major/minor) and add non-Linux-safe behavior where needed.
  • Refactor devices.rs into clean platform-specific implementations; non-Linux now returns a clear unsupported error for device attachment.
  • Update README to document macOS support and clarify Linux-only features (Landlock, litterbox device).

Do not merge for now. The test is still going.

@ovo-Tim
Copy link
Copy Markdown
Author

ovo-Tim commented May 4, 2026

image It's good to go now

Copy link
Copy Markdown
Owner

@Gerharddc Gerharddc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! As indicated in my comments, I would prefer if this change be much smaller and not have so much platform-conditional code. I believe that is possible by approaching things differently.

Comment thread litterbox/scripts/litterbox-helper.sh Outdated
Comment thread litterbox/src/settings.rs Outdated
Comment thread litterbox/src/commands/entrypoint.rs
Comment thread litterbox/src/devices.rs
Comment thread litterbox/src/commands/entrypoint.rs Outdated
Comment thread litterbox/src/devices.rs Outdated
binary. This will make cross-compliation easier to support other
platforms.
@Gerharddc
Copy link
Copy Markdown
Owner

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

@ovo-Tim
Copy link
Copy Markdown
Author

ovo-Tim commented May 6, 2026

image Good to go again 🎉

@Gerharddc
Copy link
Copy Markdown
Owner

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

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

Successfully merging this pull request may close these issues.

2 participants