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

Bug: Not deterministic builds on macOS #1209

Open
1 task done
alexandru0-dev opened this issue Aug 24, 2024 · 0 comments
Open
1 task done

Bug: Not deterministic builds on macOS #1209

alexandru0-dev opened this issue Aug 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.

Comments

@alexandru0-dev
Copy link

alexandru0-dev commented Aug 24, 2024

Requirements

Describe the bug

karabiner-driverkit uses sw_vers command at runtime for macos which leads to not being reproducible and build can fail in sandboxed environments.
I've already created an issue on karabiner-driverkit repo (relevant issue).

This is problematic for systems like nix. (see relevant comment, )

Proposed solution

Not relying in runtime commands as sw_vers making it possible to build 2 version kanata based on macos version

A proposed solution would be using feature flags
An example would be using driverkit by default (macos version > 10) and usable with (macos version <= 10) building with --no-default-features --features karabiner_kext for example

Draft example of how I "patched" feature flags:
Draft kanata diff
Draft karabiner_driverkit diff

If you have any ideas do not mind sharing them

Relevant kanata config

No response

To Reproduce

Use a packaging/build system that does sandboxing
(I know this happens with Nix, but I assume this could happen with other methods/occasions, for example if sw_vers is not installed/exposed)

Expected behavior

driverkit building correctly

Kanata version

any kanata version >= 1.6.0

Debug logs

No response

Operating system

macOS

Additional context

No response

@alexandru0-dev alexandru0-dev added the bug Something isn't working label Aug 24, 2024
@jtroo jtroo added macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it. PRs welcome jtroo has no plans to work on this at present, but PRs are welcome labels Aug 25, 2024
@jtroo jtroo removed the PRs welcome jtroo has no plans to work on this at present, but PRs are welcome label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.
Projects
None yet
Development

No branches or pull requests

2 participants