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 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.

Comment on lines 37 to 39
# 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";
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Member

@emilazy emilazy May 23, 2020

Choose a reason for hiding this comment

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

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.

Copy link
Member

@emilazy emilazy May 23, 2020

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. I changed it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 libusb-pkgsMusl branch 2 times, most recently from fbfa724 to 6a6fc79 Compare May 23, 2020 16:32
This reintroduces the changes from 370d483 after they were probably accidentally
removed in b3862e2.
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

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 NixOS#89246
@matthewbauer matthewbauer merged commit 6231dc7 into NixOS:master Jun 8, 2020
@B4dM4n B4dM4n mentioned this pull request Jul 2, 2020
10 tasks
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