From 3895d6f09e760091e7dacc675cb3e5e26a75d1d99ab7454ee6a16d910dc896fb Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Thu, 15 Nov 2018 20:26:25 +0000 Subject: [PATCH] Accepting request 649346 from home:elvigia:branches:network:utilities - netsniff-ng-ncursesw.patch replaces netsniff-ng-fix-ncurses.diff choose ncurses6w and not ncurses5 for build. OBS-URL: https://build.opensuse.org/request/show/649346 OBS-URL: https://build.opensuse.org/package/show/network:utilities/netsniff-ng?expand=0&rev=28 --- netsniff-ng-fix-ncurses.diff | 39 ------------------------- netsniff-ng-ncursesw.patch | 55 ++++++++++++++++++++++++++++++++++++ netsniff-ng.changes | 6 ++++ netsniff-ng.spec | 14 ++++----- 4 files changed, 66 insertions(+), 48 deletions(-) delete mode 100644 netsniff-ng-fix-ncurses.diff create mode 100644 netsniff-ng-ncursesw.patch diff --git a/netsniff-ng-fix-ncurses.diff b/netsniff-ng-fix-ncurses.diff deleted file mode 100644 index 009b198..0000000 --- a/netsniff-ng-fix-ncurses.diff +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/configure b/configure -index d5fe7e6..56148ac 100755 ---- a/configure -+++ b/configure -@@ -428,9 +428,9 @@ int main(void) - EOF - - $CC \ -- $($PKG_CONFIG --cflags ncurses 2>> config.log) \ -+ $(ncurses5-config --cflags 2>> config.log) \ - -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \ -- $($PKG_CONFIG --libs ncurses 2>> config.log \ -+ $(ncurses5-config --libs 2>> config.log \ - || echo '-lncurses' ) \ - >> config.log 2>&1 - if [ ! -x $TMPDIR/ncursestest ] ; then -diff --git a/flowtop/Makefile b/flowtop/Makefile -index e001ce8..bffd86e 100644 ---- a/flowtop/Makefile -+++ b/flowtop/Makefile -@@ -1,8 +1,7 @@ - flowtop-libs = -lurcu \ - $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \ -- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \ -+ $(shell ncurses5-config --libs 2> /dev/null \ - || echo '-lncurses') \ -- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \ - -lpthread - - ifeq ($(CONFIG_GEOIP), 1) -@@ -30,7 +29,7 @@ flowtop-objs += geoip.o \ - ioops.o - endif - --flowtop-eflags = $(shell $(PKG_CONFIG) --cflags ncurses) \ -+flowtop-eflags = $(shell ncurses5-config --cflags) \ - $(shell $(PKG_CONFIG) --cflags libnetfilter_conntrack) - - flowtop-confs = tcp.conf \ diff --git a/netsniff-ng-ncursesw.patch b/netsniff-ng-ncursesw.patch new file mode 100644 index 0000000..011f725 --- /dev/null +++ b/netsniff-ng-ncursesw.patch @@ -0,0 +1,55 @@ +Index: netsniff-ng-0.6.4/flowtop/Makefile +=================================================================== +--- netsniff-ng-0.6.4.orig/flowtop/Makefile ++++ netsniff-ng-0.6.4/flowtop/Makefile +@@ -1,6 +1,6 @@ + flowtop-libs = -lurcu \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \ +- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \ ++ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncursesw 2> /dev/null \ + || echo '-lncurses') \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \ + -lpthread +@@ -30,7 +30,7 @@ flowtop-objs += geoip.o \ + ioops.o + endif + +-flowtop-eflags = $(shell $(PKG_CONFIG) --cflags ncurses) \ ++flowtop-eflags = $(shell $(PKG_CONFIG) --cflags ncursesw) \ + $(shell $(PKG_CONFIG) --cflags libnetfilter_conntrack) + + flowtop-confs = tcp.conf \ +Index: netsniff-ng-0.6.4/ifpps/Makefile +=================================================================== +--- netsniff-ng-0.6.4.orig/ifpps/Makefile ++++ netsniff-ng-0.6.4/ifpps/Makefile +@@ -1,4 +1,4 @@ +-ifpps-libs = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \ ++ifpps-libs = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncursesw 2> /dev/null \ + || echo '-lncurses') \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) + +@@ -14,6 +14,6 @@ ifpps-objs = xmalloc.o \ + sysctl.o \ + ifpps.o + +-ifpps-eflags = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags ncurses 2> /dev/null) ++ifpps-eflags = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags ncursesw 2> /dev/null) + + ifpps-confs = +Index: netsniff-ng-0.6.4/configure +=================================================================== +--- netsniff-ng-0.6.4.orig/configure ++++ netsniff-ng-0.6.4/configure +@@ -428,9 +428,9 @@ int main(void) + EOF + + $CC \ +- $($PKG_CONFIG --cflags ncurses 2>> config.log) \ ++ $($PKG_CONFIG --cflags ncursesw 2>> config.log) \ + -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \ +- $($PKG_CONFIG --libs ncurses 2>> config.log \ ++ $($PKG_CONFIG --libs ncursesw 2>> config.log \ + || echo '-lncurses' ) \ + >> config.log 2>&1 + if [ ! -x $TMPDIR/ncursestest ] ; then diff --git a/netsniff-ng.changes b/netsniff-ng.changes index 62575ea..ba76e97 100644 --- a/netsniff-ng.changes +++ b/netsniff-ng.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 15 19:18:00 UTC 2018 - Cristian Rodríguez + +- netsniff-ng-ncursesw.patch replaces netsniff-ng-fix-ncurses.diff + choose ncurses6w and not ncurses5 for build. + ------------------------------------------------------------------- Fri Jan 5 21:54:23 UTC 2018 - mardnh@gmx.de diff --git a/netsniff-ng.spec b/netsniff-ng.spec index 7fb3fd0..d863b1e 100644 --- a/netsniff-ng.spec +++ b/netsniff-ng.spec @@ -13,7 +13,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -21,11 +21,10 @@ Name: netsniff-ng Version: 0.6.4 Release: 0 Summary: Network Sniffer for Packet Inspection -License: GPL-2.0 +License: GPL-2.0-only Group: Productivity/Networking/Diagnostic Url: http://netsniff-ng.org/ Source: http://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-%{version}.tar.xz -Patch0: netsniff-ng-fix-ncurses.diff BuildRequires: autoconf BuildRequires: automake BuildRequires: bison @@ -42,13 +41,10 @@ BuildRequires: libsodium-devel BuildRequires: libtool BuildRequires: liburcu-devel BuildRequires: make -%if 0%{?suse_version} > 1320 -BuildRequires: ncurses5-devel -%else -BuildRequires: ncurses-devel -%endif BuildRequires: pkgconfig BuildRequires: zlib-devel +BuildRequires: pkgconfig(ncursesw) +Patch0: netsniff-ng-ncursesw.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -72,7 +68,7 @@ The netsniff-ng toolkit consists of the following utilities: %prep %setup -q -%patch0 -p1 +%patch0 -p1 %build export NACL_LIB=sodium