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

zfs: add unstable variant #21578

Merged
merged 1 commit into from Jan 5, 2017
Merged

zfs: add unstable variant #21578

merged 1 commit into from Jan 5, 2017

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jan 2, 2017

Until now nixos only delivered the latest zfs release. This release is often not
compatible with the latest mainline kernel. Therefor an unstable variant is
added, which might be based on testing releases or git revisions.

fixes #21359

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Mic92, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @wkennington and @fpletz to be potential reviewers.

@edolstra
Copy link
Member

edolstra commented Jan 3, 2017

I'm not fond of the callPackage ./generic.nix style. IMHO it's cleaner to put all variants in one file and use callPackages in all-packages.nix. See for example https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sql/postgresql/default.nix.

@Mic92
Copy link
Member Author

Mic92 commented Jan 3, 2017

done.

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

👍 on all your other changes. Thanks!

splKernelPkg = kernel.spl;
zfsKernelPkg = kernel.zfs;
zfsUserPkg = pkgs.zfs;
packages = if lib.versionAtLeast kernel.kernel.version "4.9" then {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should install an unstable version of ZFS automatically and without warning if a stable Linux kernel is to be installed.

Copy link
Member Author

@Mic92 Mic92 Jan 4, 2017

Choose a reason for hiding this comment

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

This is indeed questionable.
I will replace it by an assert and a feature flag, to lead people to the right direction.

@Mic92
Copy link
Member Author

Mic92 commented Jan 5, 2017

I have added a version check with a human readable error message.

Until now nixos only delivered the latest zfs release. This release is often not
compatible with the latest mainline kernel. Therefor an unstable variant is
added, which might be based on testing releases or git revisions.

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

Successfully merging this pull request may close these issues.

None yet

4 participants