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

Darwin platform support #202

Closed
LEI opened this issue Jul 23, 2018 · 8 comments
Closed

Darwin platform support #202

LEI opened this issue Jul 23, 2018 · 8 comments
Assignees
Milestone

Comments

@LEI
Copy link

LEI commented Jul 23, 2018

First of all while attempting to use jobber on macOS Sierra, I had to create common/su_cmd_darwin.go for it to compile successfully (osx man su almost matches freebsd).

Then after some more fiddling I realised jobbermaster couldn't properly list users since Apple's /etc/passwd does not contain this information. It would require an alternative listUsers method for GOOS=darwin.

By the way you might be aware of this but Go build constraints are useful for cross-platform programs, maybe it's worth integrating in the build system (if not already?).

Are you planning to fully support this OS, or are there too many other corner cases?
I would gladly help however I can, may it be contributing or testing.

Also as addressed in #200, running rootless would be nice.

@LEI LEI changed the title Darwin platform Darwin platform support Jul 23, 2018
@LEI
Copy link
Author

LEI commented Jul 23, 2018

Just stumbled upon #67: if jobber can run on macOS after some modifications, one could package it with Homebrew and leverage its services to daemonize the program. Almost all files installed with brew live under /usr/local to allow non-root execution.

@dshearer
Copy link
Owner

dshearer commented Jul 24, 2018 via email

@LEI
Copy link
Author

LEI commented Jul 24, 2018

The most reliable way seems to be dscl . list /Users | grep -v '^_' which outputs something like:

daemon
Guest
User1
nobody
root

For now I added an alternative listUsers function in jobbermaster/users_darwin.go.

@johnson7788
Copy link

Hi bigman
is it support Mac now?

@dshearer dshearer added this to the 1.4 milestone Oct 27, 2018
@dshearer
Copy link
Owner

Not yet. I'll add it in next release.

@dshearer dshearer self-assigned this Nov 3, 2018
dshearer added a commit that referenced this issue Nov 12, 2018
dshearer added a commit that referenced this issue Nov 12, 2018
dshearer added a commit that referenced this issue Nov 12, 2018
dshearer added a commit that referenced this issue Nov 21, 2018
@dshearer
Copy link
Owner

Pr #220

@johnson7788
Copy link

Perfect job!

@dshearer dshearer modified the milestones: 1.4, 1.5 Feb 2, 2019
@dshearer dshearer modified the milestones: 1.5, 1.4 Jun 29, 2019
@dshearer
Copy link
Owner

Don't know why this is still open. It was done in 1.4.

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

No branches or pull requests

3 participants