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

nixops: Fix build by disabling the libvirt backend #112407

Merged
merged 3 commits into from Feb 8, 2021

Conversation

adisbladis
Copy link
Member

Motivation for this change

NixOps currently does not build because of a dependency that's marked as insecure.

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.

…as insecure

With this change it's possible to override the libvirt package used if you absolutely need it.
Even Nixops 1.7 is unmaintained at this point, let's remove this old cruft.
This removes the generic expression
@flokli flokli merged commit 4e8fc13 into NixOS:master Feb 8, 2021
@Ma27
Copy link
Member

Ma27 commented Feb 12, 2021

@flokli @adisbladis is there any specific reason why this wasn't backported to release-20.09? I can do it by myself of course, I just want to make sure that there are no reasons against that which I may be missing :)

@adisbladis
Copy link
Member Author

@Ma27 No reason, feel free to create a backport PR.

@Ma27 Ma27 mentioned this pull request Feb 12, 2021
10 tasks
@Mic92
Copy link
Member

Mic92 commented Feb 17, 2021

For some reason it tries to import libvirt, even so we don't use it in nix-community

[nix-shell:~/git/infra]$ ./deploy
Traceback (most recent call last):
  File "/nix/store/6yf9ysc1k9bpiwfcpkw5gfy7hy15sr7d-nixops-1.7/bin/..nixops-wrapped-wrapped", line 5, in <module>
    from nixops import deployment
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 1281, in <module>
    _load_modules_from("backends")
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 1279, in _load_modules_from
    importlib.import_module("nixops." + dir + "." + module[:-3])
  File "/nix/store/yws041px65cq9l9s03jv3hv18wwkfmaz-python-2.7.18/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/backends/libvirtd.py", line 11, in <module>
    import libvirt
ImportError: No module named libvirt
Traceback (most recent call last):
  File "/nix/store/6yf9ysc1k9bpiwfcpkw5gfy7hy15sr7d-nixops-1.7/bin/..nixops-wrapped-wrapped", line 5, in <module>
    from nixops import deployment
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 1281, in <module>
    _load_modules_from("backends")
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 1279, in _load_modules_from
    importlib.import_module("nixops." + dir + "." + module[:-3])
  File "/nix/store/yws041px65cq9l9s03jv3hv18wwkfmaz-python-2.7.18/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/nix/store/vby2ym4vfwapvikwms26l1i7y6b8m0hg-nixops-1.7/lib/python2.7/site-packages/nixops/backends/libvirtd.py", line 11, in <module>
    import libvirt
ImportError: No module named libvirt

@flokli
Copy link
Contributor

flokli commented Feb 18, 2021

@Mic92 is this sure the right version of nixops, with that patch? I built nixops on nixpkgs-master, and get another hash at least.

@Mic92
Copy link
Member

Mic92 commented Feb 20, 2021

Yes. It was a false alarm. And old nixops version sneaked in a weird way.

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

6 participants