openvswitch: 2.5.4 -> 2.12.0

Openvswitch was upgraded to the latest
stable version (currenty 2.12.0). This remove ovs-monitor-ipsec
commands.

LTS version is still available using
`config.virtualisation.vswitch.package = pkgs.openvswitch-lts`
it has been upgraded to 2.5.6.

This commit is a split from the original PR #35127.
This commit is contained in:
Netix (Espinet François)
2019-10-04 08:12:04 +02:00
parent 7d5375ebf4
commit e8e980e0e7
4 changed files with 97 additions and 21 deletions
+7 -19
View File
@@ -6,19 +6,20 @@ with stdenv.lib;
let
_kernel = kernel;
python = python27.withPackages (ps: with ps; [ six ]);
in stdenv.mkDerivation rec {
version = "2.5.4";
version = "2.12.0";
pname = "openvswitch";
src = fetchurl {
url = "http://openvswitch.org/releases/${pname}-${version}.tar.gz";
sha256 = "1lji87wg953lqcdf02f1zv2m54vhd2x9jd03bb91lnlb4qlhifiv";
sha256 = "1y78ix5inhhcvicbvyy2ij38am1215nr55vydhab3d4065q45z8k";
};
kernel = optional (_kernel != null) _kernel.dev;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ makeWrapper utillinux openssl libcap_ng python27
buildInputs = [ makeWrapper utillinux openssl libcap_ng python
perl procps which ];
configureFlags = [
@@ -36,27 +37,13 @@ in stdenv.mkDerivation rec {
postBuild = ''
# fix tests
substituteInPlace xenserver/opt_xensource_libexec_interface-reconfigure --replace '/usr/bin/env python' '${python27.interpreter}'
substituteInPlace vtep/ovs-vtep --replace '/usr/bin/env python' '${python27.interpreter}'
substituteInPlace xenserver/opt_xensource_libexec_interface-reconfigure --replace '/usr/bin/env python' '${python.interpreter}'
substituteInPlace vtep/ovs-vtep --replace '/usr/bin/env python' '${python.interpreter}'
'';
enableParallelBuilding = true;
doCheck = false; # bash-completion test fails with "compgen: command not found"
postInstall = ''
cp debian/ovs-monitor-ipsec $out/share/openvswitch/scripts
makeWrapper \
$out/share/openvswitch/scripts/ovs-monitor-ipsec \
$out/bin/ovs-monitor-ipsec \
--prefix PYTHONPATH : "$out/share/openvswitch/python"
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
--replace "UnixctlServer.create(None)" "UnixctlServer.create(os.environ['UNIXCTLPATH'])"
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
--replace "self.psk_file" "root_prefix + self.psk_file"
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
--replace "self.cert_dir" "root_prefix + self.cert_dir"
'';
meta = with stdenv.lib; {
platforms = platforms.linux;
description = "A multilayer virtual switch";
@@ -73,5 +60,6 @@ in stdenv.mkDerivation rec {
'';
homepage = http://openvswitch.org/;
license = licenses.asl20;
maintainers = [ maintainers.netixx ];
};
}