Accepting request 342528 from home:mnhauke

update to 0.5.9

OBS-URL: https://build.opensuse.org/request/show/342528
OBS-URL: https://build.opensuse.org/package/show/network:utilities/netsniff-ng?expand=0&rev=17
This commit is contained in:
Andreas Stieger 2015-11-07 09:10:53 +00:00 committed by Git OBS Bridge
parent c5b7468d5f
commit f11d94bf43
9 changed files with 96 additions and 191 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab4e1ef6aadb00b998349aff66e4e1cec53910113344c53ac8eb947fd46b5e89
size 2957112

3
netsniff-ng-0.5.9.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0156074bdd146dd71edcd63fa3944b658a3bce5279e0a4128578636a9700b6c
size 541304

View File

@ -1,11 +0,0 @@
--- src/cmake/modules/Pod2Man.cmake.orig 2012-03-29 20:59:45.606959367 +0200
+++ src/cmake/modules/Pod2Man.cmake 2012-03-29 20:59:51.343959161 +0200
@@ -30,7 +30,7 @@
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
DEPENDS ${PODFILE}
COMMAND ${POD2MAN}
- ARGS --section ${SECTION} --center ${CMAKE_PROJECT_NAME} --release --stderr --name ${MANFILE}
+ ARGS --section ${SECTION} --center ${CMAKE_PROJECT_NAME} --release --name ${MANFILE}
${PODFILE} > ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
)

View File

@ -0,0 +1,13 @@
diff --git a/Template b/Template
index 3410769..7144981 100644
--- a/Template
+++ b/Template
@@ -10,7 +10,7 @@ define TOOL_templ
$(1)_do_install:
$(Q)$$(call INSTX,$(1)/$(1),$$(DESTDIR)$$(SBINDIR))
$(Q)$(GZIP) $(1).8 > $(1)/$(1).8.gz
- $(Q)$$(call INSTX,$(1)/$(1).8.gz,$$(DESTDIR)$$(MAN8DIR))
+ $(Q)$$(call INST,$(1)/$(1).8.gz,$$(DESTDIR)$$(MAN8DIR))
$(Q)$$(foreach file,$$($(1)-confs),$$(call INST,$$(file),$$(DESTDIR)$$(ETCDIRE));)
$(1)_install: $(1)_do_install $(1)_post_install
$(1)_uninstall: $(1)_uninstall_custom

View File

@ -1,24 +0,0 @@
diff -Naur netsniff-ng-0.5.7.orig/src/CMakeLists.txt netsniff-ng-0.5.7/src/CMakeLists.txt
--- netsniff-ng-0.5.7.orig/src/CMakeLists.txt 2012-06-29 20:07:57.000000000 +0200
+++ netsniff-ng-0.5.7/src/CMakeLists.txt 2013-06-10 09:43:32.014721956 +0200
@@ -15,12 +15,8 @@
INCLUDE(Pod2Man)
ADD_DEFINITIONS(
- -O3
- -fstack-protector
-fpie
-std=gnu99
- -fno-strict-aliasing
- -D_FORTIFY_SOURCE=2
-D_REENTRANT
-march=native
-mtune=native
@@ -57,6 +53,7 @@
-Wfloat-equal
-Wunknown-pragmas
-Wunused-function
+ ${OPTFLAGS}
)
IF (CMAKE_BUILD_TYPE STREQUAL profile)

View File

@ -0,0 +1,27 @@
diff --git a/configure b/configure
index b02eb18..cb79136 100755
--- a/configure
+++ b/configure
@@ -354,7 +354,7 @@ int main(void)
}
EOF
- $CC -o $TMPDIR/nfcttest $TMPDIR/nfcttest.c -lnetfilter_conntrack >> config.log 2>&1
+ $CC -o $TMPDIR/nfcttest $TMPDIR/nfcttest.c $(pkg-config libnetfilter_conntrack --cflags) -lnetfilter_conntrack >> config.log 2>&1
if [ ! -x $TMPDIR/nfcttest ] ; then
echo "[NO]"
MISSING_DEFS=1
diff --git a/flowtop/Makefile b/flowtop/Makefile
index 1bd5a0f..31d600a 100644
--- a/flowtop/Makefile
+++ b/flowtop/Makefile
@@ -29,7 +29,8 @@ flowtop-objs += geoip.o \
ioops.o
endif
-flowtop-eflags = $(shell $(PKG_CONFIG) --cflags ncurses)
+flowtop-eflags = $(shell $(PKG_CONFIG) --cflags ncurses) \
+ $(shell $(PKG_CONFIG) --cflags libnetfilter_conntrack)
flowtop-confs = tcp.conf \
udp.conf \

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Nov 4 21:36:20 UTC 2015 - mardnh@gmx.de
- update to 0.5.9
- fix source-url
- removed old patches (upstream no longer use CMake)
- netsniff-ng-optflags.patch
- netsniff-ng-cmake_pod2man_without_stderr.patch
- netsniff-pkgconfig.diff
- add patches
- netsniff-ng-pkgconfig.diff (handle libnetfilter_conntrack)
- netsniff-ng-fix-manpage-perms.diff (fix manpage permissions during install)
- now requires libnl-3 - removed all handling for different libnl versions
- build against libsodium instead of nacl
- ran speccleaner
-------------------------------------------------------------------
Thu Jun 20 09:40:09 UTC 2013 - joop.boonen@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package netsniff-ng
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
@ -18,47 +18,35 @@
Name: netsniff-ng
Version: 0.5.7
Version: 0.5.9
Release: 0
Summary: High Performance Network Sniffer for Packet Inspection
License: GPL-2.0+
Group: Productivity/Networking/Diagnostic
Url: http://netsniff-ng.org/
Source: http://www.netsniff-ng.org/pub/netsniff-ng/netsniff-ng-%{version}.tar.gz
# PATCH-FIX-SUSE netsniff-ng-cmake_pod2man_without_stderr.patch
Patch1: netsniff-ng-cmake_pod2man_without_stderr.patch
# PATCH-FIX-SUSE netsniff-ng-optflags.patch
Patch2: netsniff-ng-optflags.patch
Patch3: netsniff-pkgconfig.diff
BuildRequires: libGeoIP-devel
BuildRequires: ncurses-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1130
BuildRequires: libnetfilter_conntrack-devel
BuildRequires: liburcu-devel
BuildRequires: nacl-devel
%define with_nf 1
%else
%define with_nf 0
%endif
Source: http://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-%{version}.tar.xz
Patch0: netsniff-ng-pkgconfig.diff
Patch1: netsniff-ng-fix-manpage-perms.diff
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake >= 2.8
BuildRequires: flex
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: libGeoIP-devel
BuildRequires: libcli-devel
BuildRequires: libnet-devel
BuildRequires: libnetfilter_conntrack-devel
%if 0%{?suse_version} < 1210 || 0%{?suse_version} > 1230
BuildRequires: libnl-devel < 2.0
%else
BuildRequires: libnl-1_1-devel
%endif
BuildRequires: libnl3-devel
BuildRequires: libpcap-devel
BuildRequires: libsodium-devel
BuildRequires: liburcu-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: nacl-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
netsniff-ng is a high performance Linux network sniffer for packet inspection.
@ -70,49 +58,38 @@ network debugging, measurement of performance throughput, or network statistics
creation of incoming packets on central network nodes like routers or
firewalls.
The netsniff-ng toolkit consists of the following utilities:
* netsniff-ng, a fast zero-copy analyzer, pcap capturing and replaying tool
* trafgen, a multithreaded low-level zero-copy network packet generator
* mausezahn, high-level packet generator for HW/SW appliances with Cisco-CLI
* bpfc, a Berkeley Packet Filter compiler, Linux BPF JIT disassembler
* ifpps, a top-like kernel networking statistics tool
* flowtop, a top-like netfilter connection tracking tool
* curvetun, a lightweight curve25519-based IP tunnel
* astraceroute, an autonomous system (AS) trace route utility
%prep
%setup -q
%if 0%{?suse_version} < 1140
%patch1
%endif
%patch2 -p1
%patch -P 3 -p1
%patch0 -p1
%patch1 -p1
%build
install -d build
pushd build
cmake \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DOPTFLAGS="%{optflags}" -DNACL_INCLUDE_DIR=%{_includedir}/nacl -DNACL_LIB_DIR=%{_libdir} \
../src/
make %{?_smp_mflags} VERBOSE=1
popd
export NACL_LIB=sodium
export NACL_INC_DIR=/usr/include/sodium
%configure
make %{?_smp_mflags} ETCDIR=%{_sysconfdir} Q= STRIP=: CFLAGS="%{optflags}"
%install
pushd build
make DESTDIR=%{buildroot} install
popd
make install PREFIX=%{_prefix} ETCDIR=%{_sysconfdir} DESTDIR=%{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README REPORTING-BUGS
%doc Documentation
%config %{_sysconfdir}/netsniff-ng
%{_sbindir}/ashunt
%{_sbindir}/bpfc
%{_sbindir}/curvetun
%{_sbindir}/ifpps
%{_sbindir}/netsniff-ng
%{_sbindir}/trafgen
%doc %{_mandir}/man8/ashunt.8*
%doc %{_mandir}/man8/bpfc.8*
%doc %{_mandir}/man8/curvetun.8*
%doc %{_mandir}/man8/ifpps.8*
%doc %{_mandir}/man8/netsniff-ng.8*
%doc %{_mandir}/man8/trafgen.8*
%if %with_nf
%{_sbindir}/flowtop
%doc %{_mandir}/man8/flowtop.8*
%endif
%dir %{_sysconfdir}/netsniff-ng
%config(noreplace) %{_sysconfdir}/netsniff-ng/*
%{_sbindir}/*
%{_mandir}/man8/*
%changelog

View File

@ -1,93 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-06-16 14:35:24.498138986 +0200
Properly search for libraries using pkgconfig rather than
reinventing the error-prone hand-crafted search once again.
---
src/flowtop/CMakeLists.txt | 11 +++++++----
src/netsniff-ng/CMakeLists.txt | 6 ++++--
src/trafgen/CMakeLists.txt | 6 ++++--
3 files changed, 15 insertions(+), 8 deletions(-)
Index: netsniff-ng-0.5.7/src/flowtop/CMakeLists.txt
===================================================================
--- netsniff-ng-0.5.7.orig/src/flowtop/CMakeLists.txt
+++ netsniff-ng-0.5.7/src/flowtop/CMakeLists.txt
@@ -2,11 +2,12 @@ PROJECT(flowtop C)
SET(BUILD_STRING "generic")
+find_package(PkgConfig)
FIND_PACKAGE(LibGeoIP)
FIND_PACKAGE(Threads)
FIND_PACKAGE(Curses)
-FIND_PACKAGE(LibNetFilterConnTrack)
-FIND_PACKAGE(LibURCU)
+pkg_check_modules(LIBNETFILTER_CONNTRACK libnetfilter_conntrack)
+pkg_check_modules(LIBURCU liburcu)
INCLUDE(Pod2Man)
IF(CURSES_FOUND AND CMAKE_HAVE_PTHREAD_CREATE AND LIBGEOIP_FOUND AND LIBNETFILTER_CONNTRACK_FOUND AND LIBURCU_FOUND)
@@ -23,8 +24,10 @@ IF(CURSES_FOUND AND CMAKE_HAVE_PTHREAD_C
../flowtop.c)
ADD_DEFINITIONS(-DPROGNAME_STRING="${PROJECT_NAME}"
-DVERSION_STRING="${VERSION}"
- -DBUILD_STRING="${BUILD_STRING}")
- TARGET_LINK_LIBRARIES(flowtop ${CURSES_NCURSES_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${LIBNETFILTER_CONNTRACK_LIBRARY} ${LIBGEOIP_LIBRARY} ${LIBURCU_LIBRARY})
+ -DBUILD_STRING="${BUILD_STRING}"
+ ${LIBNETFILTER_CONNTRACK_CFLAGS}
+ ${LIBURCU_CFLAGS})
+ TARGET_LINK_LIBRARIES(flowtop ${CURSES_NCURSES_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${LIBNETFILTER_CONNTRACK_LIBRARIES} ${LIBGEOIP_LIBRARY} ${LIBURCU_LIBRARIES})
POD2MAN(${CMAKE_SOURCE_DIR}/flowtop.c flowtop 8)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXECUTABLE_INSTALL_PATH})
INSTALL(FILES ../conf/oui.conf
Index: netsniff-ng-0.5.7/src/netsniff-ng/CMakeLists.txt
===================================================================
--- netsniff-ng-0.5.7.orig/src/netsniff-ng/CMakeLists.txt
+++ netsniff-ng-0.5.7/src/netsniff-ng/CMakeLists.txt
@@ -1,8 +1,9 @@
PROJECT(netsniff-ng C)
SET(BUILD_STRING "generic")
+find_package(PkgConfig)
FIND_PACKAGE(Threads)
-FIND_PACKAGE(Libnl)
+pkg_check_modules(LIBNL libnl-1)
INCLUDE(Pod2Man)
IF (CMAKE_HAVE_PTHREAD_CREATE AND LIBNL_FOUND)
@@ -54,7 +55,8 @@ IF (CMAKE_HAVE_PTHREAD_CREATE AND LIBNL_
-D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE
- -D__WITH_PROTOS)
+ -D__WITH_PROTOS
+ ${LIBNL_CFLAGS})
# -D__WITH_HARDWARE_TIMESTAMPING)
POD2MAN(${CMAKE_SOURCE_DIR}/netsniff-ng.c netsniff-ng 8)
TARGET_LINK_LIBRARIES(netsniff-ng ${CMAKE_THREAD_LIBS_INIT} ${LIBNL_LIBRARIES})
Index: netsniff-ng-0.5.7/src/trafgen/CMakeLists.txt
===================================================================
--- netsniff-ng-0.5.7.orig/src/trafgen/CMakeLists.txt
+++ netsniff-ng-0.5.7/src/trafgen/CMakeLists.txt
@@ -3,7 +3,8 @@ PROJECT(trafgen C)
FIND_PACKAGE(FLEX)
FIND_PACKAGE(BISON)
FIND_PACKAGE(LibCLI)
-FIND_PACKAGE(Libnl)
+find_package(PkgConfig)
+pkg_check_modules(LIBNL libnl-1)
INCLUDE(Pod2Man)
SET(BUILD_STRING "generic")
@@ -23,7 +24,8 @@ IF(LIBCLI_FOUND AND FLEX_FOUND AND BISON
../trafgen.c)
ADD_DEFINITIONS(-DPROGNAME_STRING="${PROJECT_NAME}"
-DVERSION_STRING="${VERSION}"
- -DBUILD_STRING="${BUILD_STRING}")
+ -DBUILD_STRING="${BUILD_STRING}"
+ ${LIBNL_CFLAGS})
TARGET_LINK_LIBRARIES(trafgen ${LIBCLI_LIBRARY} ${LIBNL_LIBRARIES})
POD2MAN(${CMAKE_SOURCE_DIR}/trafgen.c trafgen 8)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXECUTABLE_INSTALL_PATH})