diff --git a/netsniff-ng-0.6.4-trafgen-fix-stdin.patch b/netsniff-ng-0.6.4-trafgen-fix-stdin.patch new file mode 100644 index 0000000..8a7b944 --- /dev/null +++ b/netsniff-ng-0.6.4-trafgen-fix-stdin.patch @@ -0,0 +1,31 @@ +From ba5f7aecf33d62670f20021b4bc3679e6c50e6fc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Sat, 20 Oct 2018 22:35:28 +0200 +Subject: [PATCH] trafgen: fixed '--in -' to work again with STDIN +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This has been broken by commit 4e47fd021a6945aa626eaef4446c5b547d8c2a85. + +Signed-off-by: Jaroslav Škarvada +--- + trafgen_parser.y | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/trafgen_parser.y b/trafgen_parser.y +index 7fffdd9..53723dd 100644 +--- a/trafgen_parser.y ++++ b/trafgen_parser.y +@@ -1513,7 +1513,7 @@ void compile_packets(char *file, bool verbose, unsigned int cpu, + char tmp_file[128]; + int ret = -1; + +- if (access(file, R_OK)) { ++ if (strncmp("-", file, strlen("-")) && access(file, R_OK)) { + fprintf(stderr, "Cannot access %s: %s!\n", file, strerror(errno)); + die(); + } +-- +2.14.4 + diff --git a/netsniff-ng.spec b/netsniff-ng.spec index 6dc7777..f5162d4 100644 --- a/netsniff-ng.spec +++ b/netsniff-ng.spec @@ -1,6 +1,6 @@ Name: netsniff-ng Version: 0.6.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Packet sniffing beast Group: Applications/Internet License: GPLv2 @@ -13,6 +13,8 @@ BuildRequires: libsodium-devel # rhbz#1111779, this should be probably dropped in f23 or later Provides: mausezahn = 0.40-9 Obsoletes: mausezahn < 0.40-9 +# https://github.com/netsniff-ng/netsniff-ng/pull/199 +Patch0: netsniff-ng-0.6.4-trafgen-fix-stdin.patch %description netsniff-ng is a high performance Linux network sniffer for packet inspection. @@ -32,6 +34,7 @@ netsniff-ng toolkit currently consists of the following utilities: %prep %setup -q +%patch0 -p1 -b .trafgen-fix-stdin %build export NACL_INC_DIR=$(pkg-config --variable=includedir libsodium )/sodium @@ -53,6 +56,10 @@ make install PREFIX=%{_prefix} ETCDIR=%{_sysconfdir} DESTDIR="%{buildroot}" %{_mandir}/man8/* %changelog +* Sat Oct 20 2018 Jaroslav Škarvada - 0.6.4-5 +- Fixed trafgen '--in -' to work again with the STDIN + Resolves: rhbz#1641273 + * Fri Jul 20 2018 Jaroslav Škarvada - 0.6.4-4 - Fixed FTBFS by adding gcc requirement Resolves: rhbz#1604949