diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2018-08-30 10:49:04 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2018-08-30 10:49:04 +0000 |
commit | cf9e8089f7d1022cf8d898f55530b0a83ddb7102 (patch) | |
tree | facc6856fe38069e5e2881cc8e72c8065de4bea6 /net/ndpi | |
parent | 1: Update to 0.12.6. (diff) |
- Update ndpi to 2.4 latest snapshot
- Update ntopng to 3.6 latest snapshot
Notes
Notes:
svn path=/head/; revision=478442
Diffstat (limited to 'net/ndpi')
-rw-r--r-- | net/ndpi/Makefile | 15 | ||||
-rw-r--r-- | net/ndpi/distinfo | 6 | ||||
-rw-r--r-- | net/ndpi/files/patch-dynlibfix | 218 | ||||
-rw-r--r-- | net/ndpi/files/patch-libndpi.pc.in | 8 | ||||
-rw-r--r-- | net/ndpi/files/patch-src_lib_ndpi__main.c | 12 | ||||
-rw-r--r-- | net/ndpi/pkg-plist | 22 |
6 files changed, 261 insertions, 20 deletions
diff --git a/net/ndpi/Makefile b/net/ndpi/Makefile index 3e778911e520..d100e2126400 100644 --- a/net/ndpi/Makefile +++ b/net/ndpi/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= ndpi -PORTVERSION= 2.2.2.d20180406 -PORTREVISION= 1 +PORTVERSION= 2.4.d20180830 PORTEPOCH= 1 CATEGORIES= net @@ -27,18 +26,22 @@ INSTALL_TARGET= install-strip USE_GITHUB= yes GH_ACCOUNT= ntop GH_PROJECT= nDPI -GH_TAGNAME= 0e11abc +GH_TAGNAME= 33c35f5 PLIST_SUB= MAJOR_VER=${PORTVERSION:R} post-patch: - @${REINPLACE_CMD} '/ndpi_config\.h/d' \ - ${WRKSRC}/src/include/ndpi_main.h - cd ${WRKSRC} && ${SH} autogen.sh + (cd ${WRKSRC} && ${SH} autogen.sh) post-configure: @${REINPLACE_CMD} -e 's/#define PACKAGE/#define NDPI_PACKAGE/g' \ -e 's/#define VERSION/#define NDPI_VERSION/g' \ ${WRKSRC}/configure +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R}.0 + ${RM} ${STAGEDIR}${PREFIX}/lib/libndpi.so + ${RLN} ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R}.0 \ + ${STAGEDIR}${PREFIX}/lib/libndpi.so + .include <bsd.port.mk> diff --git a/net/ndpi/distinfo b/net/ndpi/distinfo index ee9ddeaa276f..7292fba30397 100644 --- a/net/ndpi/distinfo +++ b/net/ndpi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1528128978 -SHA256 (ntop-nDPI-2.2.2.d20180406-0e11abc_GH0.tar.gz) = f59b8b4d960fb6fe3bbf8d67785c6798c34165e12c217105de3860d8fac5c372 -SIZE (ntop-nDPI-2.2.2.d20180406-0e11abc_GH0.tar.gz) = 20449092 +TIMESTAMP = 1535621920 +SHA256 (ntop-nDPI-2.4.d20180830-33c35f5_GH0.tar.gz) = 9481007a601cb5140d0269305b76abba79055a8d74363a7678d7a8db7c227781 +SIZE (ntop-nDPI-2.4.d20180830-33c35f5_GH0.tar.gz) = 19308026 diff --git a/net/ndpi/files/patch-dynlibfix b/net/ndpi/files/patch-dynlibfix new file mode 100644 index 000000000000..abad557ac3d9 --- /dev/null +++ b/net/ndpi/files/patch-dynlibfix @@ -0,0 +1,218 @@ +diff --git a/Makefile.am b/Makefile.am +index 17c67481..0642aec9 100644 +--- Makefile.am ++++ Makefile.am +@@ -1,8 +1,7 @@ + ACLOCAL_AMFLAGS = -I m4 +- + SUBDIRS = src/lib example tests + + pkgconfigdir = $(prefix)/libdata/pkgconfig + pkgconfig_DATA = libndpi.pc + +-EXTRA_DIST = libndpi.sym autogen.sh ++EXTRA_DIST = autogen.sh +diff --git a/autogen.sh b/autogen.sh +index ea5ed669..20bf400a 100755 +--- configure.seed ++++ 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@" +@@ -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 --git a/libndpi.sym b/libndpi.sym +deleted file mode 100644 +index 66cffbb1..00000000 +--- libndpi.sym ++++ /dev/null +@@ -1,75 +0,0 @@ +-ndpi_dump_protocols +-ndpi_strnstr +-ndpi_detection_giveup +-ndpi_get_proto_name +-ndpi_free +-ndpi_flow_free +-ndpi_guess_undetected_protocol +-ndpi_tfind +-ndpi_tsearch +-ndpi_set_protocol_detection_bitmask2 +-ndpi_detection_get_sizeof_ndpi_id_struct +-ndpi_detection_get_sizeof_ndpi_flow_struct +-ndpi_load_protocols_file +-ndpi_tdestroy +-ndpi_exit_detection_module +-ndpi_l4_detection_process_packet +-ndpi_detection_process_packet +-ndpi_process_extra_packet +-ndpi_twalk +-ndpi_tdelete +-ndpi_revision +-ndpi_init_detection_module +-ndpi_get_num_supported_protocols +-ndpi_set_proto_defaults +-ndpi_get_protocol_id +-ndpi_get_category_id +-ndpi_find_port_based_protocol +-ndpi_get_http_method +-ndpi_get_http_url +-ndpi_get_http_content_type +-ndpi_free_flow +-ndpi_get_proto_breed +-ndpi_get_proto_breed_name +-ndpi_get_proto_by_id +-ndpi_get_proto_by_name +-ndpi_get_protocol_id_master_proto +-ndpi_guess_protocol_id +-ndpi_protocol2name +-ndpi_get_lower_proto +-ndpi_is_proto +-ndpi_malloc +-ndpi_calloc +-ndpi_set_detected_protocol +-ndpi_match_string_subprotocol +-ndpi_init_automa +-ndpi_free_automa +-ndpi_add_string_value_to_automa +-ndpi_add_string_to_automa +-ndpi_finalize_automa +-ndpi_match_string +-ndpi_match_string_id +-set_ndpi_malloc +-set_ndpi_flow_malloc +-set_ndpi_free +-set_ndpi_flow_free +-set_ndpi_debug_function +-ndpi_category_str +-ndpi_get_proto_category +-ndpi_netbios_name_interpret +-ndpi_category_set_name +-ndpi_category_get_name +-ndpi_is_custom_category +-ndpi_is_subprotocol_informative +-ndpi_set_proto_category +-ndpi_get_api_version +-ndpi_network_ptree_match +-ndpi_check_flow_func +-ndpi_fill_protocol_category +-ndpi_load_hostname_category +-ndpi_enable_loaded_categories +-ndpi_set_detection_preferences +-ndpi_get_proto_defaults +-ndpi_get_ndpi_num_supported_protocols +-ndpi_get_ndpi_num_custom_protocols +-ndpi_get_ndpi_detection_module_size +diff --git a/src/lib/Makefile b/src/lib/Makefile +deleted file mode 100644 +index 19c6f1cf..00000000 +--- src/lib/Makefile ++++ /dev/null +@@ -1,26 +0,0 @@ +-# +-# Simple non-autotools dependent makefile +-# +-# ./autogen.sh +-# cd src/lib +-# make -f Makefile.simple +-# +-CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -g +-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) +- +-all: libndpi.a +- +-ndpi_main.c: ndpi_content_match.c.inc +- +-libndpi.a: $(OBJECTS) +- ar rc $@ $(OBJECTS) +- $(RANLIB) $@ +- +-%.o: %.c $(HEADERS) Makefile +- $(CC) $(CFLAGS) -c $< -o $@ +- +-clean: +- /bin/rm -f libndpi.a $(OBJECTS) +diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in +new file mode 100644 +index 00000000..1bbc4095 +--- /dev/null ++++ src/lib/Makefile.in +@@ -0,0 +1,49 @@ ++# ++# Simple non-autotools dependent makefile ++# ++# ./autogen.sh ++# cd src/lib ++# make Makefile ++# ++ ++# ++# Installation directories ++# ++prefix = /usr/local ++libdir = ${prefix}/lib ++includedir = ${prefix}/include/ndpi ++ ++CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -g ++RANLIB = ranlib ++ ++OBJECTS != ls protocols/*.c | sed 's/\(.*\)\.c$$/\1.o/' && ls third_party/src/*.c | sed 's/\(.*\)\.c$$/\1.o/' && echo ndpi_main.o ++HEADERS != ls ../include/*.h ++NDPI_LIB_STATIC = libndpi.a ++NDPI_LIB_SHARED_BASE = libndpi.so ++NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@ ++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 -Wl,-soname,$(NDPI_LIB_SHARED) -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 --git a/tests/result/ssdp-m-search.pcap.out b/tests/result/ssdp-m-search.pcap.out +new file mode 100644 +index 00000000..e975bfeb +--- /dev/null ++++ tests/result/ssdp-m-search.pcap.out +@@ -0,0 +1,3 @@ ++SSDP 19 1197 1 ++ ++ 1 UDP 192.168.242.8:42253 -> 192.168.242.255:32412 [proto: 12/SSDP][cat: System/18][19 pkts/1197 bytes -> 0 pkts/0 bytes] diff --git a/net/ndpi/files/patch-libndpi.pc.in b/net/ndpi/files/patch-libndpi.pc.in new file mode 100644 index 000000000000..70eba208a548 --- /dev/null +++ b/net/ndpi/files/patch-libndpi.pc.in @@ -0,0 +1,8 @@ +--- libndpi.pc.in.orig 2018-08-22 06:29:35 UTC ++++ libndpi.pc.in +@@ -7,4 +7,4 @@ Name: libndpi + Description: deep packet inspection library + Version: @VERSION@ + Libs: -L${libdir} -lndpi +-Cflags: -I${includedir}/libndpi-@VERSION@ ++Cflags: -I${includedir}/ndpi diff --git a/net/ndpi/files/patch-src_lib_ndpi__main.c b/net/ndpi/files/patch-src_lib_ndpi__main.c new file mode 100644 index 000000000000..5a735370b6b5 --- /dev/null +++ b/net/ndpi/files/patch-src_lib_ndpi__main.c @@ -0,0 +1,12 @@ +--- src/lib/ndpi_main.c.orig 2018-08-30 09:28:13 UTC ++++ 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 --git a/net/ndpi/pkg-plist b/net/ndpi/pkg-plist index 19080696848d..6361a9653972 100644 --- a/net/ndpi/pkg-plist +++ b/net/ndpi/pkg-plist @@ -1,15 +1,15 @@ bin/ndpiReader -include/libndpi-%%MAJOR_VER%%/libndpi/libcache.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_api.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_config.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_define.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_includes.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_main.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_protocol_ids.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_protocols.h -include/libndpi-%%MAJOR_VER%%/libndpi/ndpi_typedefs.h +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.1 -lib/libndpi.so.1.0.0 +lib/libndpi.so.%%MAJOR_VER%%.0 libdata/pkgconfig/libndpi.pc |