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

Unix-tools: Cleanup and more tweaks #38712

Merged
merged 4 commits into from Apr 11, 2018
Merged

Conversation

matthewbauer
Copy link
Member

This should hopefully improve things. Hope to merge it quickly. Please comment if any objections!

@matthewbauer
Copy link
Member Author

Eventually I want to rename "musl-getconf" and "musl-getent" to something like "bsd-getconf" and "bsd-getent" and change to upstream (NetBSD provides these files but they work on Linux as well).

@Profpatsch
Copy link
Member

After much confusion from my side: If singleBinary does what I think it does, this seems like a sensible patch.

@matthewbauer
Copy link
Member Author

Ok thanks! Note that this will go into staging and could take a while to finally get merged back into master.

@matthewbauer matthewbauer merged commit ce5455b into NixOS:staging Apr 11, 2018
linux = pkgs.musl-getconf;
darwin = pkgs.darwin.system_cmds;
};
getent = singleBinary "getconf" {
Copy link
Member

Choose a reason for hiding this comment

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

This should be "getent".

Also, the musl-getconf/musl-getent (or bsd-getent/bsd-getconf)
a) Don't build w/glibc currently due to use of strlcpy, which means as-is this breaks all the things :(. We may be able to pull in libbsd or something to fix.
b) May not be appropriate for use with glibc, I cannot say. It may be worthwhile to compare getconf -a, and investigate getent differences. I don't know if these differences matter in practice/our usage or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay addressed in 27dd872.

So my hope is that any unix tools would just depend on the "kernel" - not the Libc. Definitely want to investigate whether there is a way to patch musl-* to work with glibc.

We should probably change the condition from hostPlatform.isMusl to !hostPlatform.libc.isGNU but leaving it for now so we don't accidentally break anything more.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, TYVM for the quick fix! I very much support the motivation/direction, thanks for pursuing it!

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

Successfully merging this pull request may close these issues.

None yet

4 participants