From 5d87db84aa4bbaede7b9b4455739c9b85815a71e Mon Sep 17 00:00:00 2001 From: Nojus Date: Fri, 27 Sep 2024 18:09:44 +0200 Subject: [PATCH 1/4] wireshark: 4.2.6 -> 4.4.2 --- .../networking/sniffers/wireshark/default.nix | 8 +++---- .../patches/lookup-dumpcap-in-path.patch | 24 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index fe8bc2e32290..3dbd7aa1b947 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -25,7 +25,7 @@ , libpcap , libsmi , libssh -, lua5 +, lua5_4 , lz4 , makeWrapper , minizip @@ -57,7 +57,7 @@ assert withQt -> qt6 != null; stdenv.mkDerivation rec { pname = "wireshark-${if withQt then "qt" else "cli"}"; - version = "4.2.8"; + version = "4.4.2"; outputs = [ "out" "dev" ]; @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { repo = "wireshark"; owner = "wireshark"; rev = "v${version}"; - hash = "sha256-QnBETFkYoeBTQFV8g2c/dZjgCXaMtFi1MQUgmkOool8="; + hash = "sha256-qeMaj8kRGG1NlDb5j4M/Za2M2Ohh2qhXbzBtQGjrCSo="; }; patches = [ @@ -107,7 +107,7 @@ stdenv.mkDerivation rec { libpcap libsmi libssh - lua5 + lua5_4 lz4 minizip nghttp2 diff --git a/pkgs/applications/networking/sniffers/wireshark/patches/lookup-dumpcap-in-path.patch b/pkgs/applications/networking/sniffers/wireshark/patches/lookup-dumpcap-in-path.patch index 4285541bbfa9..5670e9b29704 100644 --- a/pkgs/applications/networking/sniffers/wireshark/patches/lookup-dumpcap-in-path.patch +++ b/pkgs/applications/networking/sniffers/wireshark/patches/lookup-dumpcap-in-path.patch @@ -19,19 +19,21 @@ EDITED by esclear for wireshark 4.0 EDITED by paveloom for wireshark 4.2 +EDITED by pabloaul for wireshark 4.4 + Signed-off-by: Franz Pletz --- capture/capture_sync.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/capture/capture_sync.c b/capture/capture_sync.c -index 01e9510a27..e439098298 100644 +index 946dc810db..ef0b6e12cd 100644 --- a/capture/capture_sync.c +++ b/capture/capture_sync.c -@@ -225,8 +225,15 @@ init_pipe_args(int *argc) { +@@ -243,8 +243,15 @@ init_pipe_args(int *argc) { char *exename; char **argv; - + - /* Find the absolute path of the dumpcap executable. */ - exename = get_executable_path("dumpcap"); + /* NixOS patch: Look for dumpcap in PATH first, because there may be a @@ -46,14 +48,12 @@ index 01e9510a27..e439098298 100644 if (exename == NULL) { return NULL; } -@@ -533,7 +540,7 @@ sync_pipe_open_command(char* const argv[], int *data_read_fd, - dup2(sync_pipe[PIPE_WRITE], 2); - ws_close(sync_pipe[PIPE_READ]); - ws_close(sync_pipe[PIPE_WRITE]); +@@ -596,7 +603,7 @@ sync_pipe_open_command(char **argv, int *data_read_fd, + snprintf(sync_id, ARGV_NUMBER_LEN, "%d", sync_pipe[PIPE_WRITE]); + argv = sync_pipe_add_arg(argv, &argc, sync_id); + #endif - execv(argv[0], argv); + execvp(argv[0], argv); - sync_pipe_write_int_msg(2, SP_EXEC_FAILED, errno); - - /* Exit with "_exit()", so that we don't close the connection --- -2.42.0 + sync_pipe_write_int_msg(sync_pipe[PIPE_WRITE], SP_EXEC_FAILED, errno); + + /* Exit with "_exit()", so that we don't close the connection \ No newline at end of file From 4ebd9725e1aa051b4eb57fd1552027fcce7643a1 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 30 Nov 2024 06:15:01 +0100 Subject: [PATCH 2/4] wireshark: switch to zlib-ng --- pkgs/applications/networking/sniffers/wireshark/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 3dbd7aa1b947..b895ae83d7d6 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -44,7 +44,7 @@ , speexdsp , SystemConfiguration , wrapGAppsHook3 -, zlib +, zlib-ng , zstd , withQt ? true @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { snappy spandsp3 speexdsp - zlib + zlib-ng zstd ] ++ lib.optionals withQt (with qt6; [ qt5compat From 7214855ea4221ef0194a1146312152a99c049199 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 30 Nov 2024 06:21:49 +0100 Subject: [PATCH 3/4] pythonPackages.pyshark: fix capture test --- pkgs/development/python-modules/pyshark/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/pyshark/default.nix b/pkgs/development/python-modules/pyshark/default.nix index 7e4cff21d181..9dfa464a4139 100644 --- a/pkgs/development/python-modules/pyshark/default.nix +++ b/pkgs/development/python-modules/pyshark/default.nix @@ -4,6 +4,7 @@ appdirs, buildPythonPackage, fetchFromGitHub, + fetchpatch, lxml, packaging, py, @@ -30,6 +31,14 @@ buildPythonPackage rec { # `stripLen` does not seem to work here patchFlags = [ "-p2" ]; + patches = [ + # fixes capture test + (fetchpatch { + url = "https://github.com/KimiNewt/pyshark/commit/7142c5bf88abcd4c65c81052a00226d6155dda42.patch"; + hash = "sha256-Ti7cwRyYSbF4a4pEEV9FntNevkV/JVXNqACQWzoma7g="; + }) + ]; + sourceRoot = "${src.name}/src"; # propagate wireshark, so pyshark can find it when used From 90c4ec91e35d300930aa6e632cea052608ee7788 Mon Sep 17 00:00:00 2001 From: Nojus Date: Tue, 3 Dec 2024 02:35:56 +0100 Subject: [PATCH 4/4] credslayer: mark as broken --- pkgs/by-name/cr/credslayer/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/cr/credslayer/package.nix b/pkgs/by-name/cr/credslayer/package.nix index f09a86bc613a..b6ed44c4f6ef 100644 --- a/pkgs/by-name/cr/credslayer/package.nix +++ b/pkgs/by-name/cr/credslayer/package.nix @@ -55,5 +55,8 @@ python3.pkgs.buildPythonApplication rec { homepage = "https://github.com/ShellCode33/CredSLayer"; license = with licenses; [ gpl3Only ]; maintainers = with maintainers; [ fab ]; + # broken due to wireshark 4.4 bump + # see: https://github.com/NixOS/nixpkgs/pull/344914 + broken = true; }; }