include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=1.10.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.11.0
+PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/firehol/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0514fc002c5c5fb730156b3fe928965b22327833c6c17e22b7097eda657e77a2
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
+PKG_HASH:=c42c8411c22c72e3e52fed38d7b9537bcfaf568d01e9c1e35ec645490627619d
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)_rolling
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/netdata/description
netdata is a highly optimized Linux daemon providing real-time performance
monitoring for Linux systems, applications and SNMP devices over the web.
+
+ If you want to use Python plugins install python3, python3-yaml and
+ python3-urllib3 however urllib3 isn't packaged yet (needs a PR on GitHub)
endef
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
TARGET_LDFLAGS += -Wl,--gc-sections
-CONFIGURE_ARGS += --with-zlib --with-math --disable-x86-sse --disable-lto
+CONFIGURE_ARGS += \
+ --with-zlib \
+ --with-math \
+ --disable-x86-sse \
+ --enable-lto \
+ --without-libcap \
+ --disable-plugin-nfacct
define Package/netdata/conffiles
/etc/netdata/
endef
define Package/netdata/install
- mkdir -p $(1)/etc/netdata
+ $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
$(CP) ./files/netdata.conf $(1)/etc/netdata
- mkdir -p $(1)/etc/netdata/custom-plugins.d
-
- mkdir -p $(1)/usr/share/netdata
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
+ $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
+ $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml2
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml3
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/urllib3
+ $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/share/netdata
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
rm -rf $(1)/usr/share/netdata/web/images
rm -rf $(1)/usr/share/netdata/web/old
rm $(1)/usr/share/netdata/web/fonts/*.svg
rm $(1)/usr/share/netdata/web/fonts/*.ttf
rm $(1)/usr/share/netdata/web/fonts/*.woff
-
- mkdir -p $(1)/usr/lib/netdata
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
- rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh
- chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin
-
- mkdir -p $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
-
- mkdir -p $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
endef
$(eval $(call BuildPackage,netdata))
--- /dev/null
+diff --git a/collectors/charts.d.plugin/charts.d.conf b/collectors/charts.d.plugin/charts.d.conf
+index acb2a6f..8111859 100644
+--- a/collectors/charts.d.plugin/charts.d.conf
++++ b/collectors/charts.d.plugin/charts.d.conf
+@@ -30,7 +30,7 @@
+
+ # the default enable/disable for all charts.d collectors
+ # the default is "yes"
+-# enable_all_charts="yes"
++enable_all_charts="no"
+
+ # BY DEFAULT ENABLED MODULES
+ # ap=yes
+diff --git a/collectors/python.d.plugin/python.d.conf b/collectors/python.d.plugin/python.d.conf
+index 97f4cb8..001a3f1 100644
+--- a/collectors/python.d.plugin/python.d.conf
++++ b/collectors/python.d.plugin/python.d.conf
+@@ -7,7 +7,7 @@
+ #
+
+ # Enable / disable the whole python.d.plugin (all its modules)
+-enabled: yes
++enabled: no
+
+ # ----------------------------------------------------------------------
+ # Enable / Disable python.d.plugin modules
+++ /dev/null
---- a/conf.d/charts.d.conf
-+++ b/conf.d/charts.d.conf
-@@ -30,7 +30,7 @@
-
- # the default enable/disable for all charts.d collectors
- # the default is "yes"
--# enable_all_charts="yes"
-+enable_all_charts="no"
-
- # BY DEFAULT ENABLED MODULES
- # ap=yes
---- a/conf.d/python.d.conf
-+++ b/conf.d/python.d.conf
-@@ -7,7 +7,7 @@
- #
-
- # Enable / disable the whole python.d.plugin (all its modules)
--enabled: yes
-+enabled: no
-
- # Prevent log flood
- # Define how many log messages can be written to log file in one log_interval
--- /dev/null
+diff --git a/collectors/python.d.plugin/python.d.plugin.in b/collectors/python.d.plugin/python.d.plugin.in
+index 7ac03fd..d0a3f19 100755
+--- a/collectors/python.d.plugin/python.d.plugin.in
++++ b/collectors/python.d.plugin/python.d.plugin.in
+@@ -1,6 +1,4 @@
+-#!/usr/bin/env bash
+-'''':; exec "$(command -v python || command -v python3 || command -v python2 ||
+-echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
++#!/usr/bin/python3
+
+ # -*- coding: utf-8 -*-
+ # Description:
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/fd/a6/4ae8ec46a256444f65d745a92827c05fe6d4f3f4e1a40289a58ac37fe2b9
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-gnupg
PKG_HASH:=2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
PKG_NAME:=cyrus-sasl
PKG_VERSION_BASE:=2.1.27
PKG_VERSION:=$(PKG_VERSION_BASE)-rc8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
--- /dev/null
+From d2a7592b9884049d3da384c5c37f77629ce9ac56 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 6 Nov 2018 18:58:30 -0800
+Subject: [PATCH] openssl: Fix compilation without deprecated APIs
+
+bn.h was missing. Including engine.h does not work if OpenSSL was built
+without it. cyrus-sasl makes no use of it anyway.
+---
+ common/crypto-compat.c | 1 -
+ common/crypto-compat.h | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/crypto-compat.c b/common/crypto-compat.c
+index f4717b6..8195879 100644
+--- a/common/crypto-compat.c
++++ b/common/crypto-compat.c
+@@ -12,7 +12,6 @@
+ #if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ #include <string.h>
+-#include <openssl/engine.h>
+
+ static void *OPENSSL_zalloc(size_t num)
+ {
+diff --git a/common/crypto-compat.h b/common/crypto-compat.h
+index 73424ad..d3ffdca 100644
+--- a/common/crypto-compat.h
++++ b/common/crypto-compat.h
+@@ -15,6 +15,7 @@
+ #include <openssl/dh.h>
+ #include <openssl/evp.h>
+ #include <openssl/hmac.h>
++#include <openssl/bn.h>
+
+ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
+ int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
+--
+2.19.1
+
PKG_NAME:=libevhtp
PKG_VERSION:=1.1.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://chromium.googlesource.com/external/github.com/ellzey/libevhtp
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c9c4415539e78ac9021a8507cd16b9101564dd03286bc84428cc1ee11f0df1fd
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/criticalstack/libevhtp/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=725dd0a32237b2a097cdc2003d09278a082ccce310aaba7441a5fd8fa8f26635
PKG_INSTALL:=1
--- /dev/null
+diff --git a/evhtp.c b/evhtp.c
+index 24687be..b646925 100644
+--- a/evhtp.c
++++ b/evhtp.c
+@@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
+
+ #ifndef EVHTP_DISABLE_SSL
+ #ifndef EVHTP_DISABLE_EVTHR
+-static unsigned long
+-_evhtp_ssl_get_thread_id(void) {
+- return (unsigned long)pthread_self();
++static void
++_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
+ }
+
+ static void
+@@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
+ pthread_mutex_init(&(ssl_locks[i]), NULL);
+ }
+
+- CRYPTO_set_id_callback(_evhtp_ssl_get_thread_id);
++ CRYPTO_THREADID_set_callback(_evhtp_ssl_get_thread_id);
+ CRYPTO_set_locking_callback(_evhtp_ssl_thread_lock);
+
+ return 0;
PKG_NAME:=libndpi
PKG_VERSION:=2.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
PKG_LICENSE:=LGPLv3
PKG_FIXUP:=autoreconf
+PKG_BUILD_DEPENDS:=libpcap
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
endef
define Package/libndpi/description
- nDPI is an open source LGPLv3 library for deep-packet inspection.
+ nDPI is an open source LGPLv3 library for deep-packet inspection.
Based on OpenDPI it includes ntop extensions.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/include/ndpi \
+ $(PKG_INSTALL_DIR)/usr/local/include/ndpi \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
+ $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) \
- $(PKG_INSTALL_DIR)/usr/local/libdata/pkgconfig/libndpi.pc \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libndpi.pc \
$(1)/usr/lib/pkgconfig/
endef
define Package/libndpi/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
+ $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/local/bin/ndpiReader \
+ $(PKG_INSTALL_DIR)/usr/bin/ndpiReader \
$(1)/usr/bin/
endef
--- /dev/null
+From 91ac4e4beed953fc9d2185ca2e6813dde47e8d5a Mon Sep 17 00:00:00 2001
+From: Guido Falsi <mad@madpilot.net>
+Date: Mon, 27 Aug 2018 17:52:56 +0200
+Subject: [PATCH 1/9] Move the configure include file inclusion and code
+ depending on it in code protected by the NDPI_LIB_COMPILATION define, this
+ should avoid it polluting the environment when including this file from
+ ntopng, version against stable branch.
+
+---
+ src/include/ndpi_typedefs.h | 15 ++++++++++-----
+ src/lib/ndpi_main.c | 7 -------
+ 2 files changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
+index 6a61b44..386b217 100644
+--- a/src/include/ndpi_typedefs.h
++++ b/src/include/ndpi_typedefs.h
+@@ -26,9 +26,6 @@
+
+ #include "ndpi_define.h"
+
+-/* Needed to have access to HAVE_* defines */
+-#include "ndpi_config.h"
+-
+ /* NDPI_LOG_LEVEL */
+ typedef enum {
+ NDPI_LOG_ERROR,
+@@ -854,7 +851,17 @@ typedef struct ndpi_proto {
+ #define NUM_CUSTOM_CATEGORIES 5
+ #define CUSTOM_CATEGORY_LABEL_LEN 32
+
++#ifdef NDPI_LIB_COMPILATION
++
++/* Needed to have access to HAVE_* defines */
++#include "ndpi_define.h"
++
+ #ifdef HAVE_HYPERSCAN
++struct hs {
++ hs_database_t *database;
++ hs_scratch_t *scratch;
++};
++
+ struct hs_list {
+ char *expression;
+ unsigned int id;
+@@ -862,8 +869,6 @@ struct hs_list {
+ };
+ #endif
+
+-#ifdef NDPI_LIB_COMPILATION
+-
+ struct ndpi_detection_module_struct {
+ NDPI_PROTOCOL_BITMASK detection_bitmask;
+ NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index b002126..8061aa1 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -51,13 +51,6 @@
+ #include <hs/hs.h>
+ #endif
+
+-#ifdef HAVE_HYPERSCAN
+-struct hs {
+- hs_database_t *database;
+- hs_scratch_t *scratch;
+-};
+-#endif
+-
+ #define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
+
+ static int _ndpi_debug_callbacks = 0;
+--
+2.19.1
+
--- /dev/null
+From 6be5188ff93780a7f2acd48f41c4ac1846597091 Mon Sep 17 00:00:00 2001
+From: Luca <deri@ntop.org>
+Date: Tue, 11 Sep 2018 10:02:34 +0300
+Subject: [PATCH 2/9] Fixes #600 Backport of recent fixes (e.g. #601)
+
+---
+ Makefile.am | 5 ++-
+ autogen.sh | 2 +-
+ configure.seed | 13 +++++--
+ src/lib/Makefile | 26 --------------
+ src/lib/Makefile.in | 54 ++++++++++++++++++++++++++++++
+ src/lib/ndpi_main.c | 2 --
+ src/lib/protocols/ssl.c | 36 ++++++++++++++------
+ src/lib/third_party/include/hash.h | 1 +
+ 8 files changed, 94 insertions(+), 45 deletions(-)
+ delete mode 100644 src/lib/Makefile
+ create mode 100644 src/lib/Makefile.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 17c6748..37f0849 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+-
+ SUBDIRS = src/lib example tests
+
+-pkgconfigdir = $(libdir)/pkgconfig
++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 6596b2f..efeffc4 100755
+--- a/autogen.sh
++++ b/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)
+diff --git a/configure.seed b/configure.seed
+index 6b85c66..8f8817f 100644
+--- a/configure.seed
++++ b/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@"
+@@ -51,11 +52,16 @@ else
+ AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
+ fi
+
+-
++if test -z `which clang`; then
++CC=gcc
++else
++CC=clang
++fi
++
+ HS_LIB=
+ HS_INC=
+
+-AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
++AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
+
+ if test "${with_hyperscan+set}" = set; then
+ BKP=$LIBS
+@@ -127,12 +133,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/src/lib/Makefile b/src/lib/Makefile
+deleted file mode 100644
+index 19c6f1c..0000000
+--- a/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 0000000..ca29001
+--- /dev/null
++++ b/src/lib/Makefile.in
+@@ -0,0 +1,54 @@
++#
++# Simple non-autotools dependent makefile
++#
++# ./autogen.sh
++# cd src/lib
++# make Makefile
++#
++
++
++#
++# Installation directories
++#
++prefix = /usr/local
++libdir = ${prefix}/lib
++includedir = ${prefix}/include/ndpi
++CC = @CC@
++CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 # -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)
++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)
++
++ifeq ($(OS),Darwin)
++CC=clang
++endif
++
++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 -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/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 8061aa1..540e158 100644
+--- a/src/lib/ndpi_main.c
++++ b/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/src/lib/protocols/ssl.c b/src/lib/protocols/ssl.c
+index b8c3697..59aedcb 100644
+--- a/src/lib/protocols/ssl.c
++++ b/src/lib/protocols/ssl.c
+@@ -27,7 +27,7 @@
+
+ #include "ndpi_api.h"
+
+-/* #define CERTIFICATE_DEBUG 1 */
++// #define CERTIFICATE_DEBUG 1
+ #define NDPI_MAX_SSL_REQUEST_SIZE 10000
+
+ /* Skype.c */
+@@ -246,28 +246,43 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
+ u_int16_t compression_len;
+ u_int16_t extensions_len;
+
+- compression_len = packet->payload[offset+1];
+- offset += compression_len + 3;
++ offset++;
++ compression_len = packet->payload[offset];
++ offset++;
++
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [compression_len: %u]\n", compression_len);
++#endif
++
++ // offset += compression_len + 3;
++ offset += compression_len;
+
+ if(offset < total_len) {
+- extensions_len = packet->payload[offset];
++ extensions_len = ntohs(*((u_int16_t*)&packet->payload[offset]));
++ offset += 2;
++
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [extensions_len: %u]\n", extensions_len);
++#endif
+
+- if((extensions_len+offset) < total_len) {
++ if((extensions_len+offset) <= total_len) {
+ /* Move to the first extension
+ Type is u_int to avoid possible overflow on extension_len addition */
+- u_int extension_offset = 1;
++ u_int extension_offset = 0;
+
+ while(extension_offset < extensions_len) {
+ u_int16_t extension_id, extension_len;
+
+- memcpy(&extension_id, &packet->payload[offset+extension_offset], 2);
++ extension_id = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
+ extension_offset += 2;
+
+- memcpy(&extension_len, &packet->payload[offset+extension_offset], 2);
++ extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
+ extension_offset += 2;
+
+- extension_id = ntohs(extension_id), extension_len = ntohs(extension_len);
+-
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [extension_id: %u][extension_len: %u]\n", extension_id, extension_len);
++#endif
++
+ if(extension_id == 0) {
+ u_int begin = 0,len;
+ char *server_name = (char*)&packet->payload[offset+extension_offset];
+@@ -316,6 +331,7 @@ int sslTryAndRetrieveServerCertificate(struct ndpi_detection_module_struct *ndpi
+ if((packet->payload_packet_len > 9) && (packet->payload[0] == 0x16)) {
+ char certificate[64];
+ int rc;
++
+ certificate[0] = '\0';
+ rc = getSSLcertificate(ndpi_struct, flow, certificate, sizeof(certificate));
+ packet->ssl_certificate_num_checks++;
+diff --git a/src/lib/third_party/include/hash.h b/src/lib/third_party/include/hash.h
+index 4f53e5a..2251706 100644
+--- a/src/lib/third_party/include/hash.h
++++ b/src/lib/third_party/include/hash.h
+@@ -25,5 +25,6 @@ extern int ht_hash( hashtable_t *hashtable, char *key );
+ 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_ */
+--
+2.19.1
+
--- /dev/null
+From efd8348c3a5ace204410608f1805c9d5899096ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=A1=D0=BF=D0=B8=D0=BD=D0=B5?=
+ =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= <ispinenko@ideco.ru>
+Date: Thu, 13 Sep 2018 18:23:47 +0500
+Subject: [PATCH 3/9] Fixed duplicate protocol name. #607
+
+---
+ src/lib/ndpi_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 540e158..33ccbb1 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -1225,7 +1225,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+ ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_VIDTO,
+ no_master,
+- no_master, "PPStream", NDPI_PROTOCOL_CATEGORY_MEDIA,
++ no_master, "Vidto", NDPI_PROTOCOL_CATEGORY_MEDIA,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+
+--
+2.19.1
+
--- /dev/null
+From ba72865f23cd0d52f373573308e0e05c5bd37ba8 Mon Sep 17 00:00:00 2001
+From: Luca Deri <deri@ntop.org>
+Date: Wed, 19 Sep 2018 11:11:15 +0200
+Subject: [PATCH 4/9] Added missing ndpi_protocol2id() prototype Fixed error
+ when crearing symlink in Makefile
+
+---
+ src/include/ndpi_api.h | 15 ++++++++++++++-
+ src/lib/Makefile.in | 2 +-
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
+index 3fefc8e..56c5436 100644
+--- a/src/include/ndpi_api.h
++++ b/src/include/ndpi_api.h
+@@ -420,7 +420,7 @@ extern "C" {
+ char *bigram_to_match);
+
+ /**
+- * Write the protocol name in the buffer -buf- as master_protocol.protocol
++ * Write the protocol name in the buffer -buf- as master_protocol.protocol (string)
+ *
+ * @par ndpi_mod = the detection module
+ * @par proto = the struct ndpi_protocol contain the protocols name
+@@ -432,6 +432,19 @@ extern "C" {
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len);
+
++ /**
++ * Write the protocol name in the buffer -buf- as master_protocol.protocol (number)
++ *
++ * @par ndpi_mod = the detection module
++ * @par proto = the struct ndpi_protocol contain the protocols name
++ * @par buf = the buffer to write the name of the protocols
++ * @par buf_len = the length of the buffer
++ * @return the buffer contains the master_protocol and protocol name
++ *
++ */
++ char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len);
++
+ /**
+ * Find out if a given category is custom/user-defined
+ *
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+index ca29001..cbbc54b 100644
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
+@@ -38,7 +38,7 @@ $(NDPI_LIB_STATIC): $(OBJECTS)
+
+ $(NDPI_LIB_SHARED): $(OBJECTS)
+ $(CC) -shared -fPIC -o $@ $(OBJECTS)
+- ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
++ ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
+
+ %.o: %.c $(HEADERS) Makefile
+ $(CC) $(CFLAGS) -c $< -o $@
+--
+2.19.1
+
--- /dev/null
+From 54fd7face86f3d5287bc8d0f2633bd13c66498cf Mon Sep 17 00:00:00 2001
+From: Vitaly Lavrov <vel21ripn@gmail.com>
+Date: Sun, 30 Sep 2018 22:49:18 +0300
+Subject: [PATCH 5/9] Do not use the available clang as the default compiler.
+ Use the CC environment variable when running autogen.sh and configure.
+
+---
+ configure.seed | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/configure.seed b/configure.seed
+index 8f8817f..b150fdb 100644
+--- a/configure.seed
++++ b/configure.seed
+@@ -51,12 +51,6 @@ if test $SHORT_MACHINE = "arm"; then
+ else
+ AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
+ fi
+-
+-if test -z `which clang`; then
+-CC=gcc
+-else
+-CC=clang
+-fi
+
+ HS_LIB=
+ HS_INC=
+--
+2.19.1
+
--- /dev/null
+From 6dcf1f3fbab782804339db5a3fe8cd0c88c07795 Mon Sep 17 00:00:00 2001
+From: lucaderi <deri@ntop.org>
+Date: Thu, 4 Oct 2018 21:36:46 +0200
+Subject: [PATCH 6/9] Backported ndpi_protocol2id
+
+---
+ src/include/ndpi_api.h | 17 +++++++++++++++--
+ src/lib/ndpi_main.c | 17 +++++++++++++++++
+ 2 files changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
+index 56c5436..ccbad73 100644
+--- a/src/include/ndpi_api.h
++++ b/src/include/ndpi_api.h
+@@ -274,7 +274,7 @@ extern "C" {
+ */
+ u_int16_t ndpi_get_flow_masterprotocol(struct ndpi_detection_module_struct *ndpi_struct,
+ struct ndpi_flow_struct *flow);
+-
++
+ /**
+ * API call that is called internally by ndpi_detection_process_packet or by apps
+ * that want to avoid calling ndpi_detection_process_packet as they have already
+@@ -432,6 +432,19 @@ extern "C" {
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len);
+
++ /**
++ * Same as ndpi_protocol2name() with the difference that the numeric protocol
++ * name is returned
++ *
++ * @par ndpi_mod = the detection module
++ * @par proto = the struct ndpi_protocol contain the protocols name
++ * @par buf = the buffer to write the name of the protocols
++ * @par buf_len = the length of the buffer
++ * @return the buffer contains the master_protocol and protocol name
++ *
++ */
++ char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len);
+ /**
+ * Write the protocol name in the buffer -buf- as master_protocol.protocol (number)
+ *
+@@ -746,7 +759,7 @@ extern "C" {
+ u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod);
+ u_int ndpi_get_ndpi_detection_module_size();
+ void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l);
+-
++
+ /**
+ * Add a string to match to an automata
+ *
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 33ccbb1..e1cf577 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -5319,6 +5319,23 @@ ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct
+
+ /* ****************************************************** */
+
++char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len) {
++ if((proto.master_protocol != NDPI_PROTOCOL_UNKNOWN)
++ && (proto.master_protocol != proto.app_protocol)) {
++ if(proto.app_protocol != NDPI_PROTOCOL_UNKNOWN)
++ snprintf(buf, buf_len, "%u.%u",
++ proto.master_protocol, proto.app_protocol);
++ else
++ snprintf(buf, buf_len, "%u", proto.master_protocol);
++ } else
++ snprintf(buf, buf_len, "%u", proto.app_protocol);
++
++ return(buf);
++}
++
++/* ****************************************************** */
++
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len) {
+ if((proto.master_protocol != NDPI_PROTOCOL_UNKNOWN)
+--
+2.19.1
+
--- /dev/null
+From a1f6cbb6c9a212b5b3b6605254ae35bead5c43df Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 18:17:30 -0600
+Subject: [PATCH 7/9] Symlink the shared library to pwd.
+
+DESTDIR is used, for instance, by distros to facilitate installing
+to a temp path for testing / package-building.
+
+In general nDPI supports DESTDIR (yay!), but using an absolute path
+for the target of the library link has two problems:
+
+1) If DESTDIR is set to /some/tmp/path, we end up with a link that
+points to /some/tmp/path/usr/lib/libndpi-x.y.z, which is definitely
+not what is intended - once the package is installed, the link is
+broken.
+
+2) Absolute links are problematic for distributions; pointing to
+/usr/lib/libndpi-x.y.z during package build-and-test would point to
+either a nonexistent file, or an old and possibly wrong one.
+
+Both of these are avoided if we just link to the target with no path
+at all.
+---
+ src/lib/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+index cbbc54b..dc1e34b 100644
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
+@@ -49,6 +49,6 @@ clean:
+ 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)
++ ln -Fs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
+ mkdir -p $(DESTDIR)$(includedir)
+ cp ../include/*.h $(DESTDIR)$(includedir)
+--
+2.19.1
+
--- /dev/null
+From cfd97bbbca6afddb1bcedb407cb21127d7cb5d53 Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 19:08:51 -0600
+Subject: [PATCH 8/9] Use a more standard path for pkg-config files.
+
+The Linuxes I've checked all seem to use /usr/{,local/}lib*/pkgconfig,
+not /usr/libdata/. I think FreeBSD does use /usr/libdata/ but also
+supports /usr/lib*/pkgconfig, although I have not tested this change
+on a FreeBSD system.
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 37f0849..4090817 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = src/lib example tests
+
+-pkgconfigdir = $(prefix)/libdata/pkgconfig
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libndpi.pc
+
+ EXTRA_DIST = autogen.sh
+--
+2.19.1
+
--- /dev/null
+From b4b7a810697145b718a9a3b6d8a39e700613a640 Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 21:22:41 -0600
+Subject: [PATCH 9/9] Correct the include file path in -I CFLAGS argument.
+
+src/lib/Makefile.in install headers into ${prefix}/include/ndpi,
+but the shipped libndpi.pc.in specifies a different path. Therefore
+anything trying to build using $(pkg-config --cflags libndpi) will
+fail to find the nDPI headers.
+
+This patch simply makes libndpi.pc.in agree with src/lib/Makefile.in.
+---
+ libndpi.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libndpi.pc.in b/libndpi.pc.in
+index 291429c..5e1cde7 100644
+--- a/libndpi.pc.in
++++ b/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
+--
+2.19.1
+
+++ /dev/null
-From 0e09c2b5c573ad1fce7c8f13b6bf255e1f21d390 Mon Sep 17 00:00:00 2001
-From: Luca <deri@ntop.org>
-Date: Tue, 11 Sep 2018 10:02:34 +0300
-Subject: [PATCH] Fixes #600 Backport of recent fixes (e.g. #601)
-
----
- Makefile.am | 5 ++-
- autogen.sh | 2 +-
- configure.seed | 13 +++++--
- src/lib/Makefile.in | 54 ++++++++++++++++++++++++++++++
- src/lib/ndpi_main.c | 2 --
- src/lib/protocols/ssl.c | 36 ++++++++++++++------
- src/lib/third_party/include/hash.h | 1 +
- 7 files changed, 94 insertions(+), 19 deletions(-)
- create mode 100644 src/lib/Makefile.in
-
-diff --git a/Makefile.am b/Makefile.am
-index 17c6748..37f0849 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,8 +1,7 @@
- ACLOCAL_AMFLAGS = -I m4
--
- SUBDIRS = src/lib example tests
-
--pkgconfigdir = $(libdir)/pkgconfig
-+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 6596b2f..efeffc4 100755
---- a/autogen.sh
-+++ b/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)
-diff --git a/configure.seed b/configure.seed
-index 6b85c66..8f8817f 100644
---- a/configure.seed
-+++ b/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@"
-@@ -51,11 +52,16 @@ else
- AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
- fi
-
--
-+if test -z `which clang`; then
-+CC=gcc
-+else
-+CC=clang
-+fi
-+
- HS_LIB=
- HS_INC=
-
--AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
-+AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
-
- if test "${with_hyperscan+set}" = set; then
- BKP=$LIBS
-@@ -127,12 +133,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/src/lib/Makefile.in b/src/lib/Makefile.in
-new file mode 100644
-index 0000000..ca29001
---- /dev/null
-+++ b/src/lib/Makefile.in
-@@ -0,0 +1,54 @@
-+#
-+# Simple non-autotools dependent makefile
-+#
-+# ./autogen.sh
-+# cd src/lib
-+# make Makefile
-+#
-+
-+
-+#
-+# Installation directories
-+#
-+prefix = /usr
-+libdir = ${prefix}/lib
-+includedir = ${prefix}/include/ndpi
-+CC = @CC@
-+CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 # -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)
-+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)
-+
-+ifeq ($(OS),Darwin)
-+CC=clang
-+endif
-+
-+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 -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/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
-index b002126..5beb6b4 100644
---- a/src/lib/ndpi_main.c
-+++ b/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/src/lib/protocols/ssl.c b/src/lib/protocols/ssl.c
-index b8c3697..59aedcb 100644
---- a/src/lib/protocols/ssl.c
-+++ b/src/lib/protocols/ssl.c
-@@ -27,7 +27,7 @@
-
- #include "ndpi_api.h"
-
--/* #define CERTIFICATE_DEBUG 1 */
-+// #define CERTIFICATE_DEBUG 1
- #define NDPI_MAX_SSL_REQUEST_SIZE 10000
-
- /* Skype.c */
-@@ -246,28 +246,43 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
- u_int16_t compression_len;
- u_int16_t extensions_len;
-
-- compression_len = packet->payload[offset+1];
-- offset += compression_len + 3;
-+ offset++;
-+ compression_len = packet->payload[offset];
-+ offset++;
-+
-+#ifdef CERTIFICATE_DEBUG
-+ printf("SSL [compression_len: %u]\n", compression_len);
-+#endif
-+
-+ // offset += compression_len + 3;
-+ offset += compression_len;
-
- if(offset < total_len) {
-- extensions_len = packet->payload[offset];
-+ extensions_len = ntohs(*((u_int16_t*)&packet->payload[offset]));
-+ offset += 2;
-+
-+#ifdef CERTIFICATE_DEBUG
-+ printf("SSL [extensions_len: %u]\n", extensions_len);
-+#endif
-
-- if((extensions_len+offset) < total_len) {
-+ if((extensions_len+offset) <= total_len) {
- /* Move to the first extension
- Type is u_int to avoid possible overflow on extension_len addition */
-- u_int extension_offset = 1;
-+ u_int extension_offset = 0;
-
- while(extension_offset < extensions_len) {
- u_int16_t extension_id, extension_len;
-
-- memcpy(&extension_id, &packet->payload[offset+extension_offset], 2);
-+ extension_id = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
- extension_offset += 2;
-
-- memcpy(&extension_len, &packet->payload[offset+extension_offset], 2);
-+ extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
- extension_offset += 2;
-
-- extension_id = ntohs(extension_id), extension_len = ntohs(extension_len);
--
-+#ifdef CERTIFICATE_DEBUG
-+ printf("SSL [extension_id: %u][extension_len: %u]\n", extension_id, extension_len);
-+#endif
-+
- if(extension_id == 0) {
- u_int begin = 0,len;
- char *server_name = (char*)&packet->payload[offset+extension_offset];
-@@ -316,6 +331,7 @@ int sslTryAndRetrieveServerCertificate(struct ndpi_detection_module_struct *ndpi
- if((packet->payload_packet_len > 9) && (packet->payload[0] == 0x16)) {
- char certificate[64];
- int rc;
-+
- certificate[0] = '\0';
- rc = getSSLcertificate(ndpi_struct, flow, certificate, sizeof(certificate));
- packet->ssl_certificate_num_checks++;
-diff --git a/src/lib/third_party/include/hash.h b/src/lib/third_party/include/hash.h
-index 4f53e5a..2251706 100644
---- a/src/lib/third_party/include/hash.h
-+++ b/src/lib/third_party/include/hash.h
-@@ -25,5 +25,6 @@ extern int ht_hash( hashtable_t *hashtable, char *key );
- 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_ */
---
-2.19.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libuv
-PKG_VERSION:=1.20.3
+PKG_VERSION:=1.23.2
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=3bb7aad916c7a5fd0053dcb6adee49905360a2a160f4a59bc62dbe4370328579
+PKG_HASH:=8ab472ed816bb70c147ddbdfa7b9becfa10921df8a03faf2c87a54eac642c355
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_NAME:=openldap
PKG_VERSION:=2.4.46
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
--- /dev/null
+From d7a778004b0e0c7453075f1c7d429537162df436 Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Fri, 21 Sep 2018 18:41:20 +0100
+Subject: [PATCH] ITS#8809 add missing includes
+
+---
+ libraries/libldap/tls_o.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c
+index 010f311d7..99626ec15 100644
+--- a/libraries/libldap/tls_o.c
++++ b/libraries/libldap/tls_o.c
+@@ -43,6 +43,9 @@
+ #include <openssl/err.h>
+ #include <openssl/rand.h>
+ #include <openssl/safestack.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dh.h>
+ #elif defined( HAVE_SSL_H )
+ #include <ssl.h>
+ #endif
+--
+2.19.1
+
PKG_NAME:=unbound
PKG_VERSION:=1.8.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+diff --git a/daemon/daemon.c b/daemon/daemon.c
+index 4c3d5f1..50f5060 100644
+--- a/daemon/daemon.c
++++ b/daemon/daemon.c
+@@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon)
+ # endif
+ # ifdef HAVE_OPENSSL_CONFIG
+ EVP_cleanup();
+-# if OPENSSL_VERSION_NUMBER < 0x10100000
++# if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE)
+ ENGINE_cleanup();
+ # endif
+ CONF_modules_free();
+diff --git a/util/net_help.c b/util/net_help.c
+index 91368c8..a932010 100644
+--- a/util/net_help.c
++++ b/util/net_help.c
+@@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
+ static lock_basic_type *ub_openssl_locks = NULL;
+
+ /** callback that gets thread id for openssl */
+-static unsigned long
+-ub_crypto_id_cb(void)
++static void
++ub_crypto_id_cb(CRYPTO_THREADID *id)
+ {
+- return (unsigned long)log_thread_get();
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
+ }
+
+ static void
+@@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void)
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_init(&ub_openssl_locks[i]);
+ }
+- CRYPTO_set_id_callback(&ub_crypto_id_cb);
++ CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
+ CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
+ #endif /* OPENSSL_THREADS */
+ return 1;
+@@ -1047,7 +1047,7 @@ void ub_openssl_lock_delete(void)
+ int i;
+ if(!ub_openssl_locks)
+ return;
+- CRYPTO_set_id_callback(NULL);
++ CRYPTO_THREADID_set_callback(NULL);
+ CRYPTO_set_locking_callback(NULL);
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_destroy(&ub_openssl_locks[i]);
PKG_NAME:=znc
PKG_VERSION:=1.7.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://znc.in/releases \
--disable-perl \
--enable-poll \
--disable-python \
- --enable-ssl \
+ --enable-openssl \
--disable-swig \
--disable-tcl \
--enable-tdns \
--- /dev/null
+diff --git a/configure b/configure
+index 18c5005..908fc09 100755
+--- a/configure
++++ b/configure
+@@ -4746,6 +4746,7 @@ $as_echo_n "checking whether openssl is usable... " >&6; }
+
+
+ #include <openssl/ssl.h>
++ #include <openssl/dh.h>
+
+ int
+ main ()
+diff --git a/configure.ac b/configure.ac
+index c94833e..b46a53d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -368,6 +368,7 @@ if test "x$SSL" != "xno"; then
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+ #include <openssl/ssl.h>
++ #include <openssl/dh.h>
+ ]], [[
+ SSL_CTX* ctx = SSL_CTX_new(TLSv1_method());
+ SSL* ssl = SSL_new(ctx);
+diff --git a/src/Utils.cpp b/src/Utils.cpp
+index cced568..425831a 100644
+--- a/src/Utils.cpp
++++ b/src/Utils.cpp
+@@ -27,6 +27,8 @@
+ #include <znc/Message.h>
+ #ifdef HAVE_LIBSSL
+ #include <openssl/ssl.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
+ #endif /* HAVE_LIBSSL */
+ #include <memory>
+ #include <unistd.h>
+diff --git a/src/main.cpp b/src/main.cpp
+index 7d4e209..8d458a9 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -46,8 +46,8 @@ static void locking_callback(int mode, int type, const char* file, int line) {
+ }
+ }
+
+-static unsigned long thread_id_callback() {
+- return (unsigned long)pthread_self();
++static void thread_id_callback(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
+ }
+
+ static CRYPTO_dynlock_value* dyn_create_callback(const char* file, int line) {
+@@ -78,7 +78,7 @@ static void thread_setup() {
+ for (std::unique_ptr<CMutex>& mtx : lock_cs)
+ mtx = std::unique_ptr<CMutex>(new CMutex());
+
+- CRYPTO_set_id_callback(&thread_id_callback);
++ CRYPTO_THREADID_set_callback(&thread_id_callback);
+ CRYPTO_set_locking_callback(&locking_callback);
+
+ CRYPTO_set_dynlock_create_callback(&dyn_create_callback);
+diff --git a/third_party/Csocket/Csocket.cc b/third_party/Csocket/Csocket.cc
+index 46a3bfd..017d22f 100644
+--- a/third_party/Csocket/Csocket.cc
++++ b/third_party/Csocket/Csocket.cc
+@@ -47,10 +47,16 @@
+ #include <stdio.h>
+ #include <openssl/ssl.h>
+ #include <openssl/conf.h>
+-#include <openssl/engine.h>
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/dsa.h>
++#include <openssl/rsa.h>
+ #ifndef OPENSSL_NO_COMP
+ #include <openssl/comp.h>
+ #endif
++#ifndef OPENSSL_NO_ENGINE
++#include <openssl/engine.h>
++#endif
+ #define HAVE_ERR_REMOVE_STATE
+ #ifdef OPENSSL_VERSION_NUMBER
+ # if OPENSSL_VERSION_NUMBER >= 0x10000000
include $(TOPDIR)/rules.mk
PKG_NAME:=hplip
-PKG_VERSION:=3.18.9
+PKG_VERSION:=3.18.10
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/hplip
-PKG_HASH:=20093830994de16bb36c049c1fdb688569531525fb994f7e605e66266a2d783c
+PKG_HASH:=50d3c645f4ba5ae4a10c0f87cedcd0c0fd1598b412c9511476a9bb3b13101901
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0 GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=jq
-PKG_VERSION:=1.5
-PKG_RELEASE:=2
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
PKG_LICENSE:=BSD
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/stedolan/jq/releases/download/jq-$(PKG_VERSION)/
-PKG_HASH:=c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c
+PKG_HASH:=9625784cf2e4fd9842f1d407681ce4878b5b0dcddbcd31c6135114a30c71e6a8
PKG_INSTALL:=1
TARGET_CFLAGS += -std=c99
+CONFIGURE_ARGS+= \
+ --disable-docs \
+ --disable-valgrind \
+ --without-oniguruma
+
define Package/jq
SECTION:=utils
CATEGORY:=Utilities
+++ /dev/null
-From 2d38a12d686a5156d4e7afb1fed7851805590582 Mon Sep 17 00:00:00 2001
-From: W-Mark Kubacki <wmark@hurrikane.de>
-Date: Fri, 19 Aug 2016 19:50:39 +0200
-Subject: [PATCH] Skip printing at MAX_DEPTH and deeper
-
-This addresses #1136, and mitigates a stack exhaustion when printing
-a very deeply nested term.
----
- src/jv_print.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/src/jv_print.c b/src/jv_print.c
-index 5f4f234..cf6651b 100644
---- src/jv_print.c
-+++ src/jv_print.c
-@@ -13,6 +13,10 @@
- #include "jv_dtoa.h"
- #include "jv_unicode.h"
-
-+#ifndef MAX_DEPTH
-+#define MAX_DEPTH 256
-+#endif
-+
- #define ESC "\033"
- #define COL(c) (ESC "[" c "m")
- #define COLRESET (ESC "[0m")
-@@ -150,7 +154,9 @@ static void jv_dump_term(struct dtoa_context* C, jv x, int flags, int indent, FI
- }
- }
- }
-- switch (jv_get_kind(x)) {
-+ if (indent > MAX_DEPTH) {
-+ put_str("<stripped: exceeds max depth>", F, S, flags & JV_PRINT_ISATTY);
-+ } else switch (jv_get_kind(x)) {
- default:
- case JV_KIND_INVALID:
- if (flags & JV_PRINT_INVALID) {
+++ /dev/null
-From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001
-From: Nicolas Williams <nico@cryptonector.com>
-Date: Sat, 24 Oct 2015 17:24:57 -0500
-Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105)
-
-This was an off-by one: the NUL terminator byte was not allocated on
-resize. This was triggered by JSON-encoded numbers longer than 256
-bytes.
----
- src/jv_parse.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/jv_parse.c b/src/jv_parse.c
-index 3102ed4..84245b8 100644
---- src/jv_parse.c
-+++ src/jv_parse.c
-@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) {
-
- static void tokenadd(struct jv_parser* p, char c) {
- assert(p->tokenpos <= p->tokenlen);
-- if (p->tokenpos == p->tokenlen) {
-+ if (p->tokenpos >= (p->tokenlen - 1)) {
- p->tokenlen = p->tokenlen*2 + 256;
- p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen);
- }
-@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) {
- TRY(value(p, v));
- } else {
- // FIXME: better parser
-- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid
-+ p->tokenbuf[p->tokenpos] = 0;
- char* end = 0;
- double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end);
- if (end == 0 || *end != 0)
include $(TOPDIR)/rules.mk
PKG_NAME:=rng-tools
-PKG_VERSION:=5
-PKG_RELEASE:=6
+PKG_VERSION:=6.6
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/gkernel/rng-tools/$(PKG_VERSION)/
-PKG_HASH:=60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools.git
+PKG_SOURCE_VERSION:=4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee
+PKG_MIRROR_HASH:=d942283b7482337d40a4933f7b24a5d1361518dacf9c87928f5ea06d492e95b0
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Daemon for adding entropy to kernel entropy pool
- URL:=http://sourceforge.net/projects/gkernel/
+ URL:=https://github.com/nhorman/rng-tools
+ DEPENDS:=+libsysfs
endef
define Package/rng-tools/description
endif
CONFIGURE_ARGS += \
- --without-libgcrypt
+ --without-libgcrypt \
+ --without-nistbeacon
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ (cd $(PKG_BUILD_DIR); ln -s README.md README)
+endef
define Package/rng-tools/install
$(INSTALL_DIR) $(1)/etc/init.d
+++ /dev/null
-From d401b23149a89fc14806dc8c347f2a85205a95cd Mon Sep 17 00:00:00 2001
-From: Philip Prindeville <philipp@redfish-solutions.com>
-Date: Mon, 26 Jun 2017 18:34:04 -0600
-Subject: [PATCH v1 1/1] Cleanup calls to message() containing newlines
-To: Philipp Rumpf <prumpf@mandrakesoft.com>, Jeff Garzik <jgarzik@pobox.com>, Henrique de Moraes Holschuh <hmh@debian.org>, Andrew Morton <akpm@linux-foundation.org>
-Cc: Philip Prindeville <philipp@redfish-solutions.com>
-
-Newlines are added automatically by logging daemons, and having
-embedded newlines can cause extra blank lines in syslog-ng,
-busybox, etc.
-
-Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
----
- rngd.c | 8 ++++----
- rngd_entsource.c | 6 +++---
- rngd_linux.c | 2 +-
- rngd_rdrand.c | 6 +++---
- 4 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/rngd.c b/rngd.c
-index 0205d40e0abb970fb126460306398388bd7462a0..f10198682a14f2f1460100a1d274ad0d724cb326 100644
---- a/rngd.c
-+++ b/rngd.c
-@@ -271,7 +271,7 @@ static void do_loop(int random_step)
- } else if (iter->failures >= MAX_RNG_FAILURES) {
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "too many FIPS failures, disabling entropy source\n");
-+ "too many FIPS failures, disabling entropy source");
- iter->disabled = true;
- }
- }
-@@ -282,7 +282,7 @@ static void do_loop(int random_step)
-
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "No entropy sources working, exiting rngd\n");
-+ "No entropy sources working, exiting rngd");
- }
-
- static void term_signal(int signo)
-@@ -317,7 +317,7 @@ int main(int argc, char **argv)
- message(LOG_DAEMON|LOG_ERR,
- "can't open any entropy source");
- message(LOG_DAEMON|LOG_ERR,
-- "Maybe RNG device modules are not loaded\n");
-+ "Maybe RNG device modules are not loaded");
- }
- return 1;
- }
-@@ -337,7 +337,7 @@ int main(int argc, char **argv)
- && (rc_tpm || !arguments->enable_tpm)) {
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "No entropy source available, shutting down\n");
-+ "No entropy source available, shutting down");
- return 1;
- }
-
-diff --git a/rngd_entsource.c b/rngd_entsource.c
-index f0e219d7af674204e5bdcf96e9045c40717872c3..8c1d7cb33159c9a0e03a4ea83f3a3358c706e2e3 100644
---- a/rngd_entsource.c
-+++ b/rngd_entsource.c
-@@ -64,7 +64,7 @@ int xread(void *buf, size_t size, struct rng *ent_src)
- }
-
- if (size) {
-- message(LOG_DAEMON|LOG_ERR, "read error\n");
-+ message(LOG_DAEMON|LOG_ERR, "read error");
- return -1;
- }
- return 0;
-@@ -114,7 +114,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
- sizeof(rng_cmd) - r);
- if (retval < 0) {
- message(LOG_ERR|LOG_INFO,
-- "Error writing %s\n",
-+ "Error writing %s",
- ent_src->rng_name);
- retval = -1;
- goto error_out;
-@@ -123,7 +123,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
- }
- if (r < sizeof(rng_cmd)) {
- message(LOG_ERR|LOG_INFO,
-- "Error writing %s\n", ent_src->rng_name);
-+ "Error writing %s", ent_src->rng_name);
- retval = -1;
- goto error_out;
- }
-diff --git a/rngd_linux.c b/rngd_linux.c
-index c4f45dedecad0fd3bf80a35d7c240b917bf5ffdd..481c6bb15def3f06989766988b61f35d91207b58 100644
---- a/rngd_linux.c
-+++ b/rngd_linux.c
-@@ -131,7 +131,7 @@ void random_add_entropy(void *buf, size_t size)
- memcpy(entropy.data, buf, size);
-
- if (ioctl(random_fd, RNDADDENTROPY, &entropy) != 0) {
-- message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s\n",
-+ message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s",
- strerror(errno));
- exit(1);
- }
-diff --git a/rngd_rdrand.c b/rngd_rdrand.c
-index 4d7a5a7b3f52c3af8e677d3c4d758d4d235f1dd6..c1919d538428a8647dbce88d7d76384761e5b6cc 100644
---- a/rngd_rdrand.c
-+++ b/rngd_rdrand.c
-@@ -162,7 +162,7 @@ static inline int gcrypt_mangle(unsigned char *tmp)
-
- if (gcry_error) {
- message(LOG_DAEMON|LOG_ERR,
-- "gcry_cipher_encrypt error: %s\n",
-+ "gcry_cipher_encrypt error: %s",
- gcry_strerror(gcry_error));
- return -1;
- }
-@@ -257,7 +257,7 @@ static int init_gcrypt(const void *key)
-
- if (!gcry_check_version(MIN_GCRYPT_VERSION)) {
- message(LOG_DAEMON|LOG_ERR,
-- "libgcrypt version mismatch: have %s, require >= %s\n",
-+ "libgcrypt version mismatch: have %s, require >= %s",
- gcry_check_version(NULL), MIN_GCRYPT_VERSION);
- return 1;
- }
-@@ -278,7 +278,7 @@ static int init_gcrypt(const void *key)
-
- if (gcry_error) {
- message(LOG_DAEMON|LOG_ERR,
-- "could not set key or IV: %s\n",
-+ "could not set key or IV: %s",
- gcry_strerror(gcry_error));
- gcry_cipher_close(gcry_cipher_hd);
- return 1;
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=sysstat
-PKG_VERSION:=11.6.4
+PKG_VERSION:=12.0.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
-PKG_HASH:=6aa6398b200f09a2874fffc9c31eb943aea64d707a4afe5f5f1751d876157b09
+PKG_HASH:=2d30947c8fabbb5015c229fbc149f2891db4926cdf165e5f099310795d8dac80
PKG_INSTALL:=1