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
Introducing NetBSD userland #38822
Introducing NetBSD userland #38822
Conversation
Failure on x86_64-darwin (full log) Attempted: cvs The following builds were skipped because they don't evaluate on x86_64-darwin: musl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: cvs, musl Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! You're really pushing us in a more portable direction and it's fantastic.
Failure on x86_64-darwin (full log) Attempted: cvs The following builds were skipped because they don't evaluate on x86_64-darwin: musl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: cvs, musl Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: cvs, musl Partial log (click to expand)
|
pkgs/top-level/unix-tools.nix
Outdated
@@ -44,6 +44,15 @@ in rec { | |||
eject = singleBinary "eject" { | |||
linux = pkgs.utillinux; | |||
}; | |||
getconf = singleBinary "getconf" { | |||
linux = if (hostPlatform.libc == "glibc") then pkgs.glibc.bin | |||
else pkgs.netbsd.getconf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we the only one using getconf/getent
from netbsd? How does it compare to getent
from busybox?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alpine Linux uses netbsd sources. Didn’t know about busybox getent though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the busybox version is just a patched version of glibc’s.
e57aa31
to
8408893
Compare
Success on x86_64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: cvs Partial log (click to expand)
|
hacky wrapper handles ssh issues in nix builders
Adds a couple of useful NetBSD and OpenBSD derivations. Some of these will be integrated into Nixpkgs later. Noncomprehensive list: - netbsd.getent - netbsd.getconf - netbsd.fts - openbsd.mg - netbsd.compat (can replace libbsd)
Ok removed all of the unix-tools stuff. Right now this PR is just adding two attribute sets "openbsd" and "netbsd". Eventually this will replace some of the old BSD type stuff. Now nothing will change (outside netbsd & openbsd). Will follow Hydra results. @GrahamcOfBorg eval |
Success on x86_64-darwin (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: cvs Partial log (click to expand)
|
yay!! If you weren't already, can you make a PR with your unix-tools changes? I'd like to keep track of them and was planning to build on them once I have some time. Mark Woohoo re:NetBSD! |
Yeah definitely. I just need to make sure it builds okay on Hydra before proposing any (potential) mass rebuilds. |
Success on aarch64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: cvs Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: cvs Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: cvs Partial log (click to expand)
|
Just want to say great job! So much more maintainable than what Alpine linux does I gather. |
Hopefully! Still working my way through some of the initial failures though. |
Tried switching to using these (still might for getent/getconf), but ran into troubles with
Thoughts? |
Yeah we need to add nbcompat as a propagated build input. |
Hmm, looks like $ nix build -f . --arg localSystem '{config="x86_64-unknown-linux-musl";}' netbsd.install
error: build of '/nix/store/m11yvas0hcxzwsgpnzqxqv2lp3ri0xcl-xinstall-netbsd-7.1.2.drv' on 'ssh://wdietz2@presto' failed: builder for '/nix/store/m11yvas0hcxzwsgpnzqxqv2lp3ri0xcl-xinstall-netbsd-7.1.2.drv' failed with exit code 1
builder for '/nix/store/m11yvas0hcxzwsgpnzqxqv2lp3ri0xcl-xinstall-netbsd-7.1.2.drv' failed with exit code 1; last 10 log lines:
In file included from /build/cvs-export/usr.sbin/mtree/getid.c:81:0:
/build/cvs-export/usr.sbin/mtree/extern.h:43:10: fatal error: fts.h: No such file or directory
#include <fts.h>
^~~~~~~
compilation terminated.
*** Error code 1
Stop.
make: stopped in /build/cvs-export/usr.bin/xinstall
builder for '/nix/store/m11yvas0hcxzwsgpnzqxqv2lp3ri0xcl-xinstall-netbsd-7.1.2.drv' failed with exit code 1
[0 built (1 failed)]
error: build of '/nix/store/m11yvas0hcxzwsgpnzqxqv2lp3ri0xcl-xinstall-netbsd-7.1.2.drv' failed If you want to poke at it, the above command should work as a template for testing... |
Erm, I always forget the official binary cache doesn't have a musl toolchain.. yet O:). Well I don't think it does. Anyway, if that's a problem you can save some build time using something like: $ nix build --store $HOME/test-store --option binary-caches https://cache.allvm.org --option trusted-public-keys "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" -f ./nixpkgs-staging --arg localSystem '{config="x86_64-unknown-linux-musl";}' netbsd.getent Which I'll note:
|
Ok I think it's fixed in https://github.com/matthewbauer/nixpkgs/tree/netbsd. Can you test it out before I push it to master? |
Awesome, thanks! This looks better, here's what I found: $ h exit code 1
builder for '/nix/store/702rd74gxcj138hqcxj2ss6c54slkq9k-getent-netbsd-7.1.2.drv' failed with exit code 1; last 10 log lines:
install -l h -r -m 444 /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/share/man/html1/getent.html /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/share/man/html1/getcap.html
echo '# ' "install " /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getcap; echo "install -l h -r -o root -g wheel -m 555 /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getent /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getcap" && install -l h -r -o root -g wheel -m 555 /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getent /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getcap
# install /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getcap
install -l h -r -o root -g wheel -m 555 /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getent /nix/store/h2h1lxhnppz2vniijclidpzv5skxic24-getent-netbsd-7.1.2/bin/getcap
install: unknown group wheel
*** Error code 1
Stop.
make: stopped in /build/cvs-export/usr.bin/getent
builder for '/nix/store/702rd74gxcj138hqcxj2ss6c54slkq9k-getent-netbsd-7.1.2.drv' failed with exit code 1
[0 built (1 failed), 3 copied (3.0 MiB), 0.8 MiB DL]
error: build of '/nix/store/702rd74gxcj138hqcxj2ss6c54slkq9k-getent-netbsd-7.1.2.drv' failed But Also looking at the "compat" headers I'm not sure it's a good idea to propagate them-- or at least there are many more headers there than I think one might expect in order to use More actionable feedback is that the compat headers seem to have references to /build--haha they try to do something like |
Those files shouldn't be installed. We just install what that include goes to. I think I have fixed your issue though. It's weird that I'm not getting it. |
@dtzWill Have you been able to compare musl-getent & netbsd.getent? I think they are close but depending on your use case may have some differences. Anyway I would like to start looking into using some of the netbsd stuff in the wider nixpkgs. Has it been working properly for you since? I've committed a few different changes that I think have hit master by now. |
This adds some NetBSD userland into Nixpkgs. The main goal is to create some tools that will make adding more of NetBSD easier. The NetBSD tree is pulled from CVS directly and only needed paths are downloaded. FreeBSD and OpenBSD can use similar approaches.
This replaces the "musl-*" stuff that was really just hacked up versions of NetBSD sources. Hoping it doesn't break anything. It finally gave me an excuse to add my NetBSD work though.
/cc @dtzWill