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

libusb1: Fix for pkgsMusl #88692

Merged
merged 2 commits into from Jun 8, 2020
Merged

libusb1: Fix for pkgsMusl #88692

merged 2 commits into from Jun 8, 2020

Conversation

@Aver1y
Copy link
Contributor

Aver1y commented May 23, 2020

This reintroduces the changes from 370d483 after they were probably accidentally
removed in b3862e2.

Motivation for this change

Without this nix-build . -A pkgsMusl.libusb results in an infinite recursion.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
# We use `isLinux` here only to avoid mass rebuilds for Darwin, where
# disabling udev happens automatically. Remove `isLinux` at next big change!
stdenv.lib.optional (stdenv.isLinux && !enableSystemd) "--disable-udev";
Comment on lines 37 to 39

This comment has been minimized.

Copy link
@emilazy

emilazy May 23, 2020

Member

Should probably not re-add the stdenv.isLinux here, per the comment.

This comment has been minimized.

Copy link
@Aver1y

Aver1y May 23, 2020

Author Contributor

I wasn't sure what next big change is or whether now is a big change. Should I remove it?

This comment has been minimized.

Copy link
@emilazy

emilazy May 23, 2020

Member

The mass rebuilds of udev and everything depending on it referred to here are caused by the configuration options changing. Since this logic was already removed in b3862e2, the mass Darwin rebuild will have already happened then, and reintroducing the unnecessary option would instead result in another mass rebuild.

This comment has been minimized.

Copy link
@emilazy

emilazy May 23, 2020

Member

In other words, the big change already accidentally(?) happened :)

This comment has been minimized.

Copy link
@Aver1y

Aver1y May 23, 2020

Author Contributor

That makes sense. I changed it.

This comment has been minimized.

Copy link
@Aver1y

Aver1y May 23, 2020

Author Contributor

Or actually, in b3862e2 all of the logic was removed, so Darwin wouldn't use the --disable-udev rule, as it did before b3862e2 and 370d483.

@Aver1y Aver1y force-pushed the Aver1y:libusb-pkgsMusl branch 2 times, most recently from fbfa724 to 6a6fc79 May 23, 2020
This reintroduces the changes from 370d483 after they were probably accidentally
removed in b3862e2.
Copy link
Member

emilazy left a comment

Looks good to me. Not sure if ofborg will be able to handle the stdenv bootstrap, but let's see.

@GrahamcOfBorg build pkgsMusl.libusb1

@emilazy
Copy link
Member

emilazy commented May 23, 2020

ugh, forgot ofborg can't see review comments

@ofborg build pkgsMusl.libusb1

@emilazy
Copy link
Member

emilazy commented May 23, 2020

This should probably go to the staging branch due to the high number of rebuilds. (Though I'm actually not sure why it's causing mass rebuilds, since it should only affect the pkgsMusl case...)

Edit: Oh, because it's just rebootstrapping the musl toolchain; that makes sense. I don't think Hydra builds pkgsMusl anyway, so this should be fine, but I feel out of my depth at this point and this entire post could be full of lies.

@utdemir
Copy link
Member

utdemir commented Jun 4, 2020

I tested that this evaluates & builds on NixOS, however I do not know a way to check functionality.

I was hoping that this would fix the issue #89246, but seems like it doesn't. Just posting here because there is a chance that it still is relevant, because libusb is on the traceback.

libselinux pulls in openssh transitively, so can’t use fido here

Fixes #89246
@matthewbauer matthewbauer merged commit 6231dc7 into NixOS:master Jun 8, 2020
1 check was pending
1 check was pending
grahamcofborg-eval Checking original out paths
Details
@B4dM4n B4dM4n mentioned this pull request Jul 2, 2020
5 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.