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
busybox: bump copybuf, disable utmp/wtmp when not supported (musl) #34207
Conversation
@@ -24,6 +24,10 @@ let | |||
} | |||
''; | |||
|
|||
libcConfig = lib.optionalString (useMusl || stdenv.cc.libc == "musl") '' |
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.
Can do useMusl ? stdenv.hostPlatform.libc == "musl"
in the arguments and assert stdenv.hostPlatform.libc == "musl" -> useMusl;
down below?
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.
Oh and that needs to be stdenv.hostPlatform.libc
. stdenv.cc.libc
is the actual derivation.
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.
d'oh! Changed is last minute--locally I have stdenv.isMusl
O:) which is slated to at least become hostPlatform.isMusl
(and similar) but I haven't done so yet O:).
Will fix, thank you!
(FWIW some form of isMusl
and isGlibc
would prevent this sort of mistake, since it would fail to evaluate if typo or whatnot O:))
But that's not what this PR is about!
1d072ca
to
d668e61
Compare
Fixed, sorry about that. Noticed too that this only matters when building bootstrapTools using |
Probably best for someone else to review too for the not cross/stdenv-related bits? But looks good to me. Eventually, when we've committed all your musl-cross stuff, I soon as well just get rid of |
@GrahamcOfBorg build 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.
Failure for system: x86_64-darwin
Package ‘busybox-1.28.0’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/busybox/default.nix:100 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
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.
Success for system: x86_64-linux
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0
shrinking /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0/bin/busybox
strip is /nix/store/vi79f177brsaqgiarjldil74cbryy3hn-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0/bin /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0/sbin
patching script interpreter paths in /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0
checking for references to /tmp/nix-build-busybox-1.28.0.drv-0 in /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0...
moving /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0/sbin/* to /nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0/bin
/nix/store/wjb94grmm51f4yz697bjg6xm2nlr50fg-busybox-1.28.0
@Ericson2314 yeah it's not very cross-related IMO :). Mostly saw the copybuf thing and figured I'd make sure we weren't getting unnecessarily poor performance in scenarios where the tools were used. Not a huge priority either, even on musl--it still builds it just creates bad tools :). |
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.
Success for system: aarch64-linux
/nix/store/phcvaw2p525izw6g0iqp36lr2p9p868p-busybox-1.28.0
Anyone else gonna review this? Or should I just merge? |
d668e61
to
329db7b
Compare
(rebased and fixed typo in setting copybuf value (!)) |
@GrahamcOfBorg build busybox |
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
64 is the value debian uses.
utmp/wtmp are used by who and last, and are currently misleading or broken
when building busybox with musl. Disabling is cleaner (and smaller).
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)