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-tools: 0.0.20190123 -> 0.0.20190227 #57534

Merged
merged 2 commits into from Mar 15, 2019

Conversation

elseym
Copy link
Member

@elseym elseym commented Mar 12, 2019

Motivation for this change

update wireguard-tools

/cc @kirelagin

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@dywedir
Copy link
Member

dywedir commented Mar 12, 2019

@GrahamcOfBorg build wireguard-tools linuxPackages.wireguard

@xeji
Copy link
Contributor

xeji commented Mar 13, 2019

@GrahamcOfBorg build wireguard-tools linuxPackages.wireguard

@xeji
Copy link
Contributor

xeji commented Mar 13, 2019

build failures look like a missing dependency

@Ma27
Copy link
Member

Ma27 commented Mar 15, 2019

@elseym when bumping wireguard-tools, the kernel module will be affected as well as they share the same source (see pkgs/os-specific/linux/wireguard/default.nix for further reference).

I tried to fix the breaking build with the following patch locally:

diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix
index e103de3e1b7..e13828d018a 100644
--- a/pkgs/os-specific/linux/wireguard/default.nix
+++ b/pkgs/os-specific/linux/wireguard/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, kernel, wireguard-tools, perl }:
+{ stdenv, kernel, wireguard-tools, perl, libmnl }:
 
 # module requires Linux >= 3.10 https://www.wireguard.io/install/#kernel-requirements
 assert stdenv.lib.versionAtLeast kernel.version "3.10";
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ perl ] ++ kernel.moduleBuildDependencies;
 
+  buildInputs = [ libmnl ];
+
   buildPhase = "make module";
 
   meta = with stdenv.lib; {

However it breaks with the following error then:

CC      /build/source/src/tools/config.o
  LD      /build/source/src/tools/wg
install: cannot create directory '/usr': Permission denied
make[1]: *** [Makefile:76: install] Error 1
make: *** [Makefile:62: tools-install] Error 2
builder for '/nix/store/r9qpzhaw823c2jq2pz0a7fdv5g2a5956-wireguard-0.0.20190227.drv' failed with exit code 2
error: build of '/nix/store/r9qpzhaw823c2jq2pz0a7fdv5g2a5956-wireguard-0.0.20190227.drv' on 'ssh://builder' failed: builder for '/nix/store/r9qpzhaw823c2jq2pz0a7fdv5g2a5956-wireguard-0.0.20190227.drv' failed with exit code 2
builder for '/nix/store/r9qpzhaw823c2jq2pz0a7fdv5g2a5956-wireguard-0.0.20190227.drv' failed with exit code 1
error: build of '/nix/store/r9qpzhaw823c2jq2pz0a7fdv5g2a5956-wireguard-0.0.20190227.drv' failed

This is probaly related to some make script missing the proper install prefix. Unless you're faster, I'll have another look at it this weekend :)

@elseym
Copy link
Member Author

elseym commented Mar 15, 2019

thank you, @Ma27 ! 🙇
i'd very much appreciate your help on this.

Ensure that only module-related targets from the project's Makefile are
built.

Co-authored-by: elseym <elseym@me.com>
Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
@fpletz
Copy link
Member

fpletz commented Mar 15, 2019

@GrahamcOfBorg build wireguard-tools linuxPackages.wireguard

@fpletz fpletz merged commit eec84d5 into NixOS:master Mar 15, 2019
@fpletz fpletz deleted the wireguard-tools branch March 15, 2019 22:01
@Ma27 Ma27 mentioned this pull request Mar 17, 2019
10 tasks
Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Mar 17, 2019
After working on the last wireguard bump (NixOS#57534), we figured that it's
probably a good idea to have a basic test which confirms that a simple
VPN with wireguard still works.

This test starts two peers with a `wg0` network interface and adds a v4
and a v6 route that goes through `wg0`.
fpletz pushed a commit that referenced this pull request Apr 2, 2019
After working on the last wireguard bump (#57534), we figured that it's
probably a good idea to have a basic test which confirms that a simple
VPN with wireguard still works.

This test starts two peers with a `wg0` network interface and adds a v4
and a v6 route that goes through `wg0`.

(cherry picked from commit 0c4e9e3)
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