pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/ndpi ndpi: updated to 2.4
details: https://anonhg.NetBSD.org/pkgsrc/rev/7ae843c9ccef
branches: trunk
changeset: 386415:7ae843c9ccef
user: adam <adam%pkgsrc.org@localhost>
date: Thu Oct 18 16:24:29 2018 +0000
description:
ndpi: updated to 2.4
2.4 Stable:
New Supported Protocols and Services
------------------------------------
Showmax.com
Musical.ly
RapidVideo
VidTO streaming service
Apache JServ Protocol
Facebook Messenger
FacebookZero protocol
Improvements
------------
Improved YouTube support
Improved Netflix support
Updated Google Hangout detection
Updated Twitter address range
Updated Viber ports, subnet and domain
Updated AmazonVideo detection
Updated list of FaceBook sites
Initial Skype in/out support
Improved Tor detection
Improved hyperscan support and category definition
Custom categories loading, extended ndpiReader (-c <file>) for loading name-based categories
Fixes
-----
Fixes for Instagram flows classified as Facebook
Fixed Spotify detection
Fixed minimum packet payload length for SSDP
Fixed length check in MSN, x-steam-sid, Tor certificate name
Increase client's maximum payload length for SSH
Fixed end-of-line bounds handling
Fixed substring matching
Fix for handling IP address based custom categories
Repaired wrong timestamp calculation
Fixed memory leak
Optimized memory usage
Other/Changes
-------------
New API calls:
ndpi_set_detection_preferences()
ndpi_load_hostname_category()
ndpi_enable_loaded_categories()
ndpi_fill_protocol_category()
ndpi_process_extra_packet()
Skype CallIn/CallOut are now set as Skype.SkypeCallOut Skype.SkypeCallIn
Added support for SMTPS on port 587
Changed RTP from VoIP to Media category
Added site unavailable category
Added custom categories CUSTOM_CATEGORY_MINING, CUSTOM_CATEGORY_MALWARE, CUSTOM_CATEGORY_ADVERTISEMENT, CUSTOM_CATEGORY_BANNED_SITE
Implemented hash-based categories
Converted some not popular protocols to NDPI_PROTOCOL_GENERIC with category detection
diffstat:
net/ndpi/Makefile | 15 +-
net/ndpi/PLIST | 23 +++--
net/ndpi/distinfo | 16 ++-
net/ndpi/patches/patch-autogen.sh | 21 ++++
net/ndpi/patches/patch-configure.ac | 15 ---
net/ndpi/patches/patch-configure.seed | 39 ++++++++
net/ndpi/patches/patch-src_lib_Makefile.in | 61 ++++++++++++++
net/ndpi/patches/patch-src_lib_ndpi__main.c | 16 +++
net/ndpi/patches/patch-src_lib_third__party_include_hash.h | 13 ++
9 files changed, 181 insertions(+), 38 deletions(-)
diffs (278 lines):
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/Makefile
--- a/net/ndpi/Makefile Thu Oct 18 16:17:25 2018 +0000
+++ b/net/ndpi/Makefile Thu Oct 18 16:24:29 2018 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2017/11/06 13:29:38 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2018/10/18 16:24:29 adam Exp $
-DISTNAME= ntopng-2.4-stable
-PKGNAME= ndpi-1.8.0
+DISTNAME= nDPI-2.4
+PKGNAME= ${DISTNAME:tl}
CATEGORIES= net
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ntop/}
+MASTER_SITES= ${MASTER_SITE_GITHUB:=ntop/}
+GITHUB_PROJECT= nDPI
MAINTAINER= adam%NetBSD.org@localhost
HOMEPAGE= https://www.ntop.org/
@@ -15,9 +16,7 @@
USE_TOOLS+= autoconf automake gmake pkg-config
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE= libndpi.pc.in
-
-EXTRACT_ELEMENTS= ${DISTNAME}/nDPI
-WRKSRC= ${WRKDIR}/${DISTNAME}/nDPI
+MAKE_ENV+= OS=${OPSYS}
# Portable types
CFLAGS.SunOS+= -Du_int8_t=uint8_t
@@ -26,7 +25,7 @@
CFLAGS.SunOS+= -Du_int64_t=uint64_t
pre-configure:
- cd ${WRKSRC} && autoreconf -fiv
+ cd ${WRKSRC} && ./autogen.sh
.include "../../net/libpcap/buildlink3.mk"
.include "../../textproc/json-c/buildlink3.mk"
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/PLIST
--- a/net/ndpi/PLIST Thu Oct 18 16:17:25 2018 +0000
+++ b/net/ndpi/PLIST Thu Oct 18 16:24:29 2018 +0000
@@ -1,11 +1,16 @@
-@comment $NetBSD: PLIST,v 1.1 2016/04/08 16:51:23 adam Exp $
+@comment $NetBSD: PLIST,v 1.2 2018/10/18 16:24:29 adam Exp $
bin/ndpiReader
-include/libndpi-${PKGVERSION}/libndpi/ndpi_api.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_define.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_includes.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_main.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_protocol_ids.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_protocols.h
-include/libndpi-${PKGVERSION}/libndpi/ndpi_typedefs.h
-lib/libndpi.la
+include/ndpi/ndpi_api.h
+include/ndpi/ndpi_config.h
+include/ndpi/ndpi_define.h
+include/ndpi/ndpi_includes.h
+include/ndpi/ndpi_main.h
+include/ndpi/ndpi_protocol_ids.h
+include/ndpi/ndpi_protocols.h
+include/ndpi/ndpi_typedefs.h
+include/ndpi/ndpi_unix.h
+include/ndpi/ndpi_win32.h
+lib/libndpi.a
+lib/libndpi.so
+lib/libndpi.so.${PKGVERSION}.0
lib/pkgconfig/libndpi.pc
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/distinfo
--- a/net/ndpi/distinfo Thu Oct 18 16:17:25 2018 +0000
+++ b/net/ndpi/distinfo Thu Oct 18 16:24:29 2018 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.3 2017/06/15 10:06:39 fhajny Exp $
+$NetBSD: distinfo,v 1.4 2018/10/18 16:24:29 adam Exp $
-SHA1 (ntopng-2.4-stable.tar.gz) = ceb08377f98e8d149e39f5546a62e2f6ca980a31
-RMD160 (ntopng-2.4-stable.tar.gz) = 14940d0ea398cd43d7c31868f34b833b214386e7
-SHA512 (ntopng-2.4-stable.tar.gz) = 515dd7889ae3aaf2482371bb2c55ab7300cf4207fe07f37029b7529bfb710379c19a54f58cf6df87e42454c0c99d15291af334adff676252301d9edd0acf3c7a
-Size (ntopng-2.4-stable.tar.gz) = 134074662 bytes
-SHA1 (patch-configure.ac) = 4f509a80de16094e7e9df50bfd4ba9505f4b73ff
+SHA1 (nDPI-2.4.tar.gz) = 6ff0d034a2badade2e1deb835594a42fc297646a
+RMD160 (nDPI-2.4.tar.gz) = 5f022327354c55a773d17e83f76d50cc68fa3c78
+SHA512 (nDPI-2.4.tar.gz) = 7c746c167ab3ebafbe8646f752c95e32d66237a0a86adeec9ded1ec7e20f62170a9b1c4e5d25594f6459f5c0f616c27c5b393151d936471590f16df3fa3fa884
+Size (nDPI-2.4.tar.gz) = 19308586 bytes
+SHA1 (patch-autogen.sh) = 61dbff4cce826994726da317667de9534030c5c1
+SHA1 (patch-configure.seed) = 885956b856b37d3f77e2c05630eee60af8ba5759
SHA1 (patch-src_include_ndpi__includes.h) = db5da9ca24ecf32fd8c264e193af280814dc74c6
+SHA1 (patch-src_lib_Makefile.in) = 60b03e8e6daaa9d882732c6fcf9897f5d843c3de
+SHA1 (patch-src_lib_ndpi__main.c) = 6a10a5318a033ce686b7fef37b0f2bf597b4eb06
+SHA1 (patch-src_lib_third__party_include_hash.h) = af82b9a7b418a5cba0c678c40d331dc5bffc0f0b
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-autogen.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ndpi/patches/patch-autogen.sh Thu Oct 18 16:24:29 2018 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-autogen.sh,v 1.1 2018/10/18 16:24:29 adam Exp $
+
+Do not remove src/lib/Makefile.in.
+Do not lauch 'configure'.
+
+--- autogen.sh.orig 2018-08-22 06:29:35.000000000 +0000
++++ autogen.sh
+@@ -5,7 +5,7 @@ NDPI_MINOR="4"
+ NDPI_PATCH="0"
+ NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
+
+-rm -f configure config.h config.h.in src/lib/Makefile.in
++rm -f configure config.h config.h.in
+
+ AUTOCONF=$(command -v autoconf)
+ AUTOMAKE=$(command -v automake)
+@@ -45,4 +45,3 @@ cat configure | sed "s/#define PACKAGE/#
+ cat configure.tmp > configure
+
+ chmod +x configure
+-./configure $*
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-configure.ac
--- a/net/ndpi/patches/patch-configure.ac Thu Oct 18 16:17:25 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-configure.ac,v 1.1 2016/07/01 04:51:57 adam Exp $
-
-Portability fix.
-
---- configure.ac.orig 2016-06-28 16:05:04.000000000 +0000
-+++ configure.ac
-@@ -67,7 +67,7 @@ AC_ARG_ENABLE([json-c],
- AS_IF([test "x$enable_json_c" != "xno"], [
- PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
- pkg-config --exists json-c
-- AS_IF([test "$?" == "0"],
-+ AS_IF([test "$?" = "0"],
- [
- CFLAGS="$CFLAGS $(pkg-config --cflags json-c)"
- LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-configure.seed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ndpi/patches/patch-configure.seed Thu Oct 18 16:24:29 2018 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-configure.seed,v 1.1 2018/10/18 16:24:29 adam Exp $
+
+Fixes from https://github.com/ntop/nDPI/issues/600
+Portability fix.
+
+--- configure.seed.orig 2018-08-22 06:29:35.000000000 +0000
++++ configure.seed
+@@ -10,6 +10,7 @@ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AX_PTHREAD
+
++NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@"
+ NDPI_MAJOR="@NDPI_MAJOR@"
+ NDPI_MINOR="@NDPI_MINOR@"
+ NDPI_PATCH="@NDPI_PATCH@"
+@@ -104,7 +105,7 @@ AC_ARG_ENABLE([json-c],
+ AS_IF([test "x$enable_json_c" != "xno"], [
+ PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
+ pkg-config --exists json-c
+- AS_IF([test "$?" == "0"],
++ AS_IF([test "$?" = "0"],
+ [
+ CFLAGS="$CFLAGS $(pkg-config --cflags json-c)"
+ LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
+@@ -127,12 +128,13 @@ AC_ARG_ENABLE([debug-messages],
+
+ AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
+
+-AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
++AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile])
+ AC_CONFIG_HEADERS(src/include/ndpi_config.h)
+ AC_SUBST(GIT_RELEASE)
+ AC_SUBST(NDPI_MAJOR)
+ AC_SUBST(NDPI_MINOR)
+ AC_SUBST(NDPI_PATCH)
++AC_SUBST(NDPI_VERSION_SHORT)
+ AC_SUBST(SVN_DATE)
+ AC_SUBST(JSON_C_LIB)
+ AC_SUBST(PCAP_INC)
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-src_lib_Makefile.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ndpi/patches/patch-src_lib_Makefile.in Thu Oct 18 16:24:29 2018 +0000
@@ -0,0 +1,61 @@
+$NetBSD: patch-src_lib_Makefile.in,v 1.1 2018/10/18 16:24:29 adam Exp $
+
+Add missing src/lib/Makefile.in
+
+--- /dev/null 2018-10-18 13:00:10.000000000 +0000
++++ src/lib/Makefile.in
+@@ -0,0 +1,54 @@
++#
++# Simple non-autotools dependent makefile
++#
++# ./autogen.sh
++# cd src/lib
++# make Makefile
++#
++
++
++#
++# Installation directories
++#
++libdir = ${PREFIX}/lib
++includedir = ${PREFIX}/include/ndpi
++CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION
++RANLIB = ranlib
++
++OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
++HEADERS = $(wildcard ../include/*.h)
++NDPI_LIB_STATIC = libndpi.a
++ifeq ($(OS),Darwin)
++NDPI_LIB_SHARED_BASE = libndpi.dylib
++NDPI_LIB_SHARED = libndpi.@NDPI_VERSION_SHORT@.dylib
++LDFLAGS += -install_name ${PREFIX}/lib/${NDPI_LIB_SHARED}
++else
++NDPI_LIB_SHARED_BASE = libndpi.so
++NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
++endif
++NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
++
++all: $(NDPI_LIBS)
++
++ndpi_main.c: ndpi_content_match.c.inc
++
++$(NDPI_LIB_STATIC): $(OBJECTS)
++ ar rc $@ $(OBJECTS)
++ $(RANLIB) $@
++
++$(NDPI_LIB_SHARED): $(OBJECTS)
++ $(CC) -shared -fPIC ${LDFLAGS} -o $@ $(OBJECTS)
++ ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
++
++%.o: %.c $(HEADERS) Makefile
++ $(CC) $(CFLAGS) -c $< -o $@
++
++clean:
++ /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo
++
++install: $(NDPI_LIBS)
++ mkdir -p $(DESTDIR)$(libdir)
++ cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
++ ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
++ mkdir -p $(DESTDIR)$(includedir)
++ cp ../include/*.h $(DESTDIR)$(includedir)
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-src_lib_ndpi__main.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ndpi/patches/patch-src_lib_ndpi__main.c Thu Oct 18 16:24:29 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_lib_ndpi__main.c,v 1.1 2018/10/18 16:24:29 adam Exp $
+
+Fix build (https://github.com/ntop/nDPI/issues/600).
+
+--- src/lib/ndpi_main.c.orig 2018-10-08 10:11:40.000000000 +0000
++++ src/lib/ndpi_main.c
+@@ -43,9 +43,7 @@
+
+ #include "ndpi_content_match.c.inc"
+ #include "third_party/include/ndpi_patricia.h"
+-#include "third_party/src/ndpi_patricia.c"
+ #include "third_party/include/hash.h"
+-#include "third_party/src/hash.c"
+
+ #ifdef HAVE_HYPERSCAN
+ #include <hs/hs.h>
diff -r b3b1004cc68a -r 7ae843c9ccef net/ndpi/patches/patch-src_lib_third__party_include_hash.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ndpi/patches/patch-src_lib_third__party_include_hash.h Thu Oct 18 16:24:29 2018 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lib_third__party_include_hash.h,v 1.1 2018/10/18 16:24:29 adam Exp $
+
+Fix build (https://github.com/ntop/nDPI/issues/600).
+
+--- src/lib/third_party/include/hash.h.orig 2018-10-08 10:12:59.000000000 +0000
++++ src/lib/third_party/include/hash.h
+@@ -25,5 +25,6 @@ extern int ht_hash( hashtable_t *hashtab
+ extern entry_t *ht_newpair( char *key, u_int16_t value );
+ extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value );
+ extern u_int16_t ht_get( hashtable_t *hashtable, char *key );
++extern void ht_free( hashtable_t *hashtable );
+
+ #endif /* _HASH_H_ */
Home |
Main Index |
Thread Index |
Old Index