push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,177 @@
{
withDPDK ? false,
lib,
stdenv,
autoconf,
automake,
dpdk,
fetchFromGitHub,
installShellFiles,
iproute2,
libcap_ng,
libpcap,
libtool,
makeWrapper,
nix-update-script,
nixosTests,
numactl,
openssl,
perl,
pkg-config,
procps,
python3,
sphinxHook,
tcpdump,
util-linux,
which,
}:
stdenv.mkDerivation rec {
pname = if withDPDK then "openvswitch-dpdk" else "openvswitch";
version = "3.6.0";
src = fetchFromGitHub {
owner = "openvswitch";
repo = "ovs";
tag = "v${version}";
hash = "sha256-zzEE1H0fjFOZY3KXFPb91Bmk3irPL1mHEbEBsumPlkw=";
};
outputs = [
"out"
"dev"
"lib"
"man"
"tools"
];
patches = [
# 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
./patches/disable-bash-arg-completion-test.patch
];
nativeBuildInputs = [
autoconf
automake
installShellFiles
libtool
pkg-config
sphinxHook
makeWrapper
];
sphinxBuilders = [ "man" ];
sphinxRoot = "./Documentation";
buildInputs = [
libcap_ng
openssl
perl
procps
python3
util-linux
which
]
++ (lib.optionals withDPDK [
dpdk
numactl
libpcap
]);
preConfigure = "./boot.sh";
configureFlags = [
"--localstatedir=/var"
"--sharedstatedir=/var"
"--sbindir=$(out)/bin"
]
++ (lib.optionals withDPDK [ "--with-dpdk=shared" ]);
# Leave /var out of this!
installFlags = [
"LOGDIR=$(TMPDIR)/dummy"
"RUNDIR=$(TMPDIR)/dummy"
"PKIDIR=$(TMPDIR)/dummy"
];
enableParallelBuilding = true;
postInstall = ''
# Install bash completions in correct location
rm -f $out/etc/bash_completion.d/ovs-*.bash
installShellCompletion utilities/ovs-appctl-bashcomp.bash
installShellCompletion utilities/ovs-vsctl-bashcomp.bash
mkdir -p $tools/{bin,share/openvswitch/scripts}
mv $out/share/openvswitch/bugtool-plugins $tools/share/openvswitch
mv $out/share/openvswitch/scripts/ovs-{bugtool*,check-dead-ifs,monitor-ipsec,vtep} $tools/share/openvswitch/scripts
mv $out/share/openvswitch/scripts/usdt $tools/share/openvswitch/scripts
mv $out/bin/ovs-{bugtool,dpctl-top,l3ping,parse-backtrace,pcap,tcpdump,tcpundump,test,vlan-test} $tools/bin
wrapProgram $tools/bin/ovs-l3ping \
--prefix PYTHONPATH : $out/share/openvswitch/python
wrapProgram $tools/bin/ovs-tcpdump \
--prefix PATH : ${lib.makeBinPath [ tcpdump ]} \
--prefix PYTHONPATH : $out/share/openvswitch/python
'';
doCheck = true;
preCheck = ''
export TESTSUITEFLAGS="-j$NIX_BUILD_CORES"
export RECHECK=yes
patchShebangs tests/
'';
nativeCheckInputs = [
iproute2
]
++ (with python3.pkgs; [
netaddr
pyparsing
pytest
setuptools
]);
passthru = {
tests = {
default = nixosTests.openvswitch;
incus = nixosTests.incus-lts.openvswitch;
};
updateScript = nix-update-script { };
};
meta = {
changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
description = "Multilayer virtual switch";
longDescription = ''
Open vSwitch is a production quality, multilayer virtual switch
licensed under the open source Apache 2.0 license. It is
designed to enable massive network automation through
programmatic extension, while still supporting standard
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
support distribution across multiple physical servers similar
to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
'';
homepage = "https://www.openvswitch.org/";
license = with lib.licenses; [
asl20
lgpl21Plus # ovs-bugtool
sissl11 # lib/sflow
];
maintainers = with lib.maintainers; [
adamcstephens
booxter
kmcopper
netixx
xddxdd
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/tests/completion.at b/tests/completion.at
index b6155af25..6367cb545 100644
--- a/tests/completion.at
+++ b/tests/completion.at
@@ -425,6 +425,7 @@ AT_CLEANUP
AT_SETUP([vsctl-bashcomp - argument completion])
+AT_SKIP_IF([true])
AT_SKIP_IF([test -z ${BASH_VERSION+x}])
AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4'])
OVS_VSWITCHD_START(