openvswitch: 2.7.12 -> 3.0.1

https://www.openvswitch.org/releases/NEWS-3.0.1.txt

- Generate manpages into separate output
- Enable test suite
- Disables a test re bash arg completion that I can't get to work
- Set up meta.changelog
- Some reformatting

+70 -23
+70 -23
pkgs/os-specific/linux/openvswitch/default.nix
··· 1 - { lib, stdenv, fetchurl, makeWrapper, pkg-config, util-linux, which 2 - , procps, libcap_ng, openssl, python3 , perl 3 - , kernel ? null }: 4 - 5 - with lib; 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , installShellFiles 5 + , iproute2 6 + , kernel ? null 7 + , libcap_ng 8 + , openssl 9 + , perl 10 + , pkg-config 11 + , procps 12 + , python3 13 + , sphinxHook 14 + , util-linux 15 + , which 16 + }: 6 17 7 18 let 8 19 _kernel = kernel; 9 - pythonEnv = python3.withPackages (ps: with ps; [ six ]); 10 20 in stdenv.mkDerivation rec { 11 - version = "2.17.2"; 21 + version = "3.0.1"; 12 22 pname = "openvswitch"; 13 23 24 + kernel = lib.optional (_kernel != null) _kernel.dev; 25 + 14 26 src = fetchurl { 15 - url = "https://www.openvswitch.org/releases/openvswitch-${version}.tar.gz"; 16 - sha256 = "sha256-ai4NtCutuMvK9/O+vVtemicBMZ3x0EKU6aennpRQTWk="; 27 + url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz"; 28 + hash = "sha256-5KEXFtCRn1syOSKLMrrcEJtWGl/maLlUfhQ7CxlbvWg="; 17 29 }; 18 30 19 - kernel = optional (_kernel != null) _kernel.dev; 31 + outputs = [ 32 + "out" 33 + "man" 34 + ]; 35 + 36 + patches = [ 37 + # 8: vsctl-bashcomp - argument completion FAILED (completion.at:664) 38 + ./patches/disable-bash-arg-completion-test.patch 39 + ]; 40 + 41 + nativeBuildInputs = [ 42 + installShellFiles 43 + pkg-config 44 + sphinxHook 45 + ]; 46 + 47 + sphinxBuilders = [ 48 + "man" 49 + ]; 20 50 21 - nativeBuildInputs = [ pkg-config makeWrapper ]; 51 + sphinxRoot = "./Documentation"; 52 + 22 53 buildInputs = [ 23 - util-linux openssl libcap_ng pythonEnv perl procps which 54 + libcap_ng 55 + openssl 56 + perl 57 + procps 58 + python3 59 + util-linux 60 + which 24 61 ]; 62 + 63 + preConfigure = "./boot.sh"; 25 64 26 65 configureFlags = [ 27 66 "--localstatedir=/var" 28 67 "--sharedstatedir=/var" 29 68 "--sbindir=$(out)/bin" 30 - ] ++ (optionals (_kernel != null) ["--with-linux"]); 69 + ] ++ (lib.optionals (_kernel != null) ["--with-linux"]); 31 70 32 71 # Leave /var out of this! 33 72 installFlags = [ ··· 36 75 "PKIDIR=$(TMPDIR)/dummy" 37 76 ]; 38 77 39 - postBuild = '' 40 - # fix tests 41 - substituteInPlace xenserver/opt_xensource_libexec_interface-reconfigure --replace '/usr/bin/env python' '${pythonEnv.interpreter}' 42 - substituteInPlace vtep/ovs-vtep --replace '/usr/bin/env python' '${pythonEnv.interpreter}' 78 + enableParallelBuilding = true; 79 + 80 + postInstall = '' 81 + installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash 82 + installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash 43 83 ''; 44 84 45 - enableParallelBuilding = true; 46 - doCheck = false; # bash-completion test fails with "compgen: command not found" 85 + doCheck = true; 86 + 87 + checkInputs = [ 88 + iproute2 89 + ] ++ (with python3.pkgs; [ 90 + netaddr 91 + pyparsing 92 + pytest 93 + ]); 47 94 48 95 meta = with lib; { 49 - platforms = platforms.linux; 96 + changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt"; 50 97 description = "A multilayer virtual switch"; 51 - longDescription = 52 - '' 98 + longDescription = '' 53 99 Open vSwitch is a production quality, multilayer virtual switch 54 100 licensed under the open source Apache 2.0 license. It is 55 101 designed to enable massive network automation through ··· 58 104 RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to 59 105 support distribution across multiple physical servers similar 60 106 to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V. 61 - ''; 107 + ''; 62 108 homepage = "https://www.openvswitch.org/"; 63 109 license = licenses.asl20; 64 110 maintainers = with maintainers; [ netixx kmcopper ]; 111 + platforms = platforms.linux; 65 112 }; 66 113 }