Merge pull request #306277 from adamcstephens/ovs/fix-python313
openvswitch*: fix 3.13 compatibility, apply RFCs, add self
This commit is contained in:
commit
0b868df4ce
7 changed files with 59 additions and 41 deletions
|
@ -1,32 +1,35 @@
|
|||
{ version
|
||||
, hash
|
||||
, updateScriptArgs ? ""
|
||||
{
|
||||
version,
|
||||
hash,
|
||||
updateScriptArgs ? "",
|
||||
}:
|
||||
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, autoconf
|
||||
, automake
|
||||
, installShellFiles
|
||||
, iproute2
|
||||
, kernel ? null
|
||||
, libcap_ng
|
||||
, libtool
|
||||
, openssl
|
||||
, perl
|
||||
, pkg-config
|
||||
, procps
|
||||
, python3
|
||||
, sphinxHook
|
||||
, util-linux
|
||||
, which
|
||||
, writeScript
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoconf,
|
||||
automake,
|
||||
installShellFiles,
|
||||
iproute2,
|
||||
kernel ? null,
|
||||
libcap_ng,
|
||||
libtool,
|
||||
openssl,
|
||||
perl,
|
||||
pkg-config,
|
||||
procps,
|
||||
python3,
|
||||
sphinxHook,
|
||||
util-linux,
|
||||
which,
|
||||
writeScript,
|
||||
}:
|
||||
|
||||
let
|
||||
_kernel = kernel;
|
||||
in stdenv.mkDerivation rec {
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openvswitch";
|
||||
inherit version;
|
||||
|
||||
|
@ -45,6 +48,9 @@ in stdenv.mkDerivation rec {
|
|||
patches = [
|
||||
# 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
|
||||
./patches/disable-bash-arg-completion-test.patch
|
||||
|
||||
# https://github.com/openvswitch/ovs/commit/9185793e75435d890f18d391eaaeab0ade6f1415
|
||||
./patches/fix-python313.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -56,9 +62,7 @@ in stdenv.mkDerivation rec {
|
|||
sphinxHook
|
||||
];
|
||||
|
||||
sphinxBuilders = [
|
||||
"man"
|
||||
];
|
||||
sphinxBuilders = [ "man" ];
|
||||
|
||||
sphinxRoot = "./Documentation";
|
||||
|
||||
|
@ -78,7 +82,7 @@ in stdenv.mkDerivation rec {
|
|||
"--localstatedir=/var"
|
||||
"--sharedstatedir=/var"
|
||||
"--sbindir=$(out)/bin"
|
||||
] ++ (lib.optionals (_kernel != null) ["--with-linux"]);
|
||||
] ++ (lib.optionals (_kernel != null) [ "--with-linux" ]);
|
||||
|
||||
# Leave /var out of this!
|
||||
installFlags = [
|
||||
|
@ -102,13 +106,13 @@ in stdenv.mkDerivation rec {
|
|||
patchShebangs tests/
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
iproute2
|
||||
] ++ (with python3.pkgs; [
|
||||
netaddr
|
||||
pyparsing
|
||||
pytest
|
||||
]);
|
||||
nativeCheckInputs =
|
||||
[ iproute2 ]
|
||||
++ (with python3.pkgs; [
|
||||
netaddr
|
||||
pyparsing
|
||||
pytest
|
||||
]);
|
||||
|
||||
passthru.updateScript = writeScript "ovs-update.nu" ''
|
||||
${./update.nu} ${updateScriptArgs}
|
||||
|
@ -129,7 +133,11 @@ in stdenv.mkDerivation rec {
|
|||
'';
|
||||
homepage = "https://www.openvswitch.org/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ netixx kmcopper ];
|
||||
maintainers = with maintainers; [
|
||||
adamcstephens
|
||||
kmcopper
|
||||
netixx
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
12
pkgs/by-name/op/openvswitch/patches/fix-python313.patch
Normal file
12
pkgs/by-name/op/openvswitch/patches/fix-python313.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/tests/vlog.at b/tests/vlog.at
|
||||
index 785014956e7..efe91479a63 100644
|
||||
--- a/tests/vlog.at
|
||||
+++ b/tests/vlog.at
|
||||
@@ -8,6 +8,7 @@ AT_CHECK([$PYTHON3 $srcdir/test-vlog.py --log-file log_file \
|
||||
|
||||
AT_CHECK([sed -e 's/.*-.*-.*T..:..:..Z |//' \
|
||||
-e 's/File ".*", line [[0-9]][[0-9]]*,/File <name>, line <number>,/' \
|
||||
+-e '/\^\+/d' \
|
||||
stderr_log], [0], [dnl
|
||||
0 | module_0 | EMER | emergency
|
||||
1 | module_0 | ERR | error
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i nu -p nushell common-updater-scripts
|
||||
|
||||
def main [--lts: bool = false, --regex: string] {
|
||||
def main [--lts = false, --regex: string] {
|
||||
let tags = list-git-tags --url=https://github.com/openvswitch/ovs | lines | sort --natural | str replace v ''
|
||||
|
||||
let latest_tag = if $regex == null { $tags } else { $tags | find --regex $regex } | last
|
||||
|
@ -9,9 +9,9 @@ def main [--lts: bool = false, --regex: string] {
|
|||
|
||||
if $latest_tag != $current_version {
|
||||
if $lts {
|
||||
update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/lts.nix"
|
||||
update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/by-name/op/openvswitch/lts.nix"
|
||||
} else {
|
||||
update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/default.nix"
|
||||
update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/by-name/op/openvswitch/default.nix"
|
||||
}
|
||||
}
|
||||
|
|
@ -11543,9 +11543,7 @@ with pkgs;
|
|||
opentelemetry-collector = callPackage ../tools/misc/opentelemetry-collector { };
|
||||
opentelemetry-collector-contrib = callPackage ../tools/misc/opentelemetry-collector/contrib.nix { };
|
||||
|
||||
openvswitch = callPackage ../os-specific/linux/openvswitch { };
|
||||
|
||||
openvswitch-lts = callPackage ../os-specific/linux/openvswitch/lts.nix { };
|
||||
openvswitch-lts = callPackage ../by-name/op/openvswitch/lts.nix { };
|
||||
|
||||
ovn-lts = callPackage ../by-name/ov/ovn/lts.nix { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue