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

wireguard: 1.0.20200401 -> 1.0.20200413 #85984

Merged
merged 3 commits into from Apr 26, 2020
Merged

wireguard: 1.0.20200401 -> 1.0.20200413 #85984

merged 3 commits into from Apr 26, 2020

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Apr 25, 2020

Motivation for this change
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.

Copy link
Contributor

@d-xo d-xo left a comment

Choose a reason for hiding this comment

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

lgtm ✨.

Just for my understanding, what is the issue with calling depmod as part of the install process?

pkgs/os-specific/linux/wireguard/default.nix Show resolved Hide resolved
Copy link
Contributor

@d-xo d-xo left a comment

Choose a reason for hiding this comment

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

Tests are failing on this branch for me with babmn015k8ymmnb4v973bmv3shpd20zd-unit-script-wireguard-wg0-start[678]: modprobe: FATAL: Module wireguard not found in directory /run/current-system/kernel-modules/lib/modules/5.4.35.

Tests are passing on master.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

The tests are failing since the kernel module isn't installed into $out here.

I fixed it locally with the following changes on top of your branch:

diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix
index 2781a8279d9..28dc4c7beb7 100644
--- a/pkgs/os-specific/linux/wireguard/default.nix
+++ b/pkgs/os-specific/linux/wireguard/default.nix
@@ -14,17 +14,19 @@ stdenv.mkDerivation rec {
     sha256 = "11dpw1inszbc3qjcfnap74kgjxkyyrx90vxv6wmsgkbp8lsl4p66";
   };
 
+  preConfigure = ''
+    cd src
+    sed -i '/depmod/,+1d' Makefile
+  '';
+
   hardeningDisable = [ "pic" ];
 
   KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
 
   nativeBuildInputs = [ perl bc ] ++ kernel.moduleBuildDependencies;
 
-  preBuild = "cd src";
   buildFlags = [ "module" ];
 
-  installFlags = [ "-C" KERNELDIR "M=$(PWD)" "WIREGUARD_VERSION=${version}"];
-  installTargets = [ "modules_install" ];
   INSTALL_MOD_PATH = placeholder "out";
 
   meta = with stdenv.lib; {

@Mic92
Copy link
Member Author

Mic92 commented Apr 25, 2020

The sed patch did not work for me. I found a different way.

Copy link
Contributor

@d-xo d-xo left a comment

Choose a reason for hiding this comment

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

tests passing for me now. 👍 😺 ✨

pkgs/tools/networking/wireguard-tools/default.nix Outdated Show resolved Hide resolved
Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

Should be mergable now. @Mic92 should we backport this?

@ofborg ofborg bot requested review from Ma27 and d-xo April 25, 2020 18:38
@Mic92 Mic92 merged commit ef959a1 into NixOS:master Apr 26, 2020
@Mic92 Mic92 deleted the wireguard branch April 26, 2020 10:28
@Mic92
Copy link
Member Author

Mic92 commented Apr 26, 2020

@Ma27 yes.

@Ma27
Copy link
Member

Ma27 commented Apr 26, 2020

Backported as 24cf10d, a49a2fb (only two commits since I squashed the two passthru.tests changes together and removed the wg-quick test since it's not available on 20.03).

@Ma27 Ma27 added the 8.has: port to stable A PR already has a backport to the stable release. label Apr 26, 2020
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