Skip to contentSkip to conversation

ntopng: Upgrade to 6.6

PATCH In review Khem Raj 2 participants 3 messages Mar 22

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ntopng: Upgrade to 6.6

Fix build with Lua 5.5
Add fixes to build with ndpi 5.0

---
 .../0001-Follow-rrd-post-1.8-change.patch     |  32 ---
 ...kefile.in-don-t-use-the-internal-lua.patch |  36 +--
 ...utogen.sh-generate-configure.ac-only.patch |  36 ---
 ...Allow-dynamic-linking-against-ndpi-3.patch |  51 ++--
 ...-configure.ac.in-fix-configure-error.patch |  42 ---
 ...nfigure.ac.in-fix-host-contamination.patch | 188 +++++++++++--
 ...figure.ac.in-not-check-clang-on-host.patch |  44 ----
 ...a-5.5-API-signature-for-lua_newstate.patch | 247 ++++++++++++++++++
 .../recipes-support/ntopng/ndpi_5.0.bb        |   4 +
 .../ntopng/{ntopng_5.2.1.bb => ntopng_6.6.bb} |  19 +-
 10 files changed, 478 insertions(+), 221 deletions(-)
 delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch
 delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-autogen.sh-generate-configure.ac-only.patch
 delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch
 delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch
 create mode 100644 meta-networking/recipes-support/ntopng/files/0001-luaengine-Use-lua-5.5-API-signature-for-lua_newstate.patch
 rename meta-networking/recipes-support/ntopng/{ntopng_5.2.1.bb => ntopng_6.6.bb} (76%)
meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch deleted +0 -32
deleted file mode 100644
index eefd4e1ab2..0000000000
@@ -1,32 +0,0 @@
-From a3bd9efe78f9c381f19b99c8ceb7f52b4c2a52b8 Mon Sep 17 00:00:00 2001
-From: Dmitry Baryshkov <[email protected]>
-Date: Wed, 5 Jun 2024 09:40:17 +0300
-Subject: [PATCH] Follow rrd post-1.8 change
-
-Git version of rrdtool has changed rrd_tune argument from char pointer
-to const char pointer. GCC 14 is more strict regarding the pointer
-constantness checks and errors out in such a case. Update rrd_tune
-invokation.
-
-Signed-off-by: Dmitry Baryshkov <[email protected]>
-Upstream-Status: Pending [CLA is not signed on our side]
----
- src/LuaEngineNtop.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/LuaEngineNtop.cpp b/src/LuaEngineNtop.cpp
-index bd2de79e3021..dd00f1608f78 100644
---- a/src/LuaEngineNtop.cpp
-+++ b/src/LuaEngineNtop.cpp
-@@ -5427,7 +5427,7 @@ static int ntop_rrd_tune(lua_State* vm) {
-   filename = argv[1];
-
-   reset_rrd_state();
--  status = rrd_tune(argc, (char**)argv);
-+  status = rrd_tune(argc, (const char**)argv);
-
-   if(status != 0) {
-     char *err = rrd_get_error();
---
-2.39.2
-
meta-networking/recipes-support/ntopng/files/0001-Makefile.in-don-t-use-the-internal-lua.patch +21 -15
index bb5bcfbd63..402d679a90 100644
@@ -14,26 +14,32 @@ Signed-off-by: Mingli Yu <[email protected]>
  Makefile.in | 2 --
  1 file changed, 2 deletions(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index d737e74..a611b16 100755
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -36,7 +36,6 @@ MONGOOSE_INC=-I$(MONGOOSE_HOME)
+@@ -31,8 +31,6 @@ MONGOOSE_INC=-I$(MONGOOSE_HOME)
+
  LUA_PLATFORM=generic
- LUA_HOME=${PWD}/third-party/lua-5.4.3
- LUA_INC=-I$(LUA_HOME)/src
+ LUA_HOME=${PWD}/third-party/lua-5.4.6
+-LUA_INC=-I$(LUA_HOME)/src
 -LUA_LIB=$(LUA_HOME)/src/liblua.a
 
- ifeq ($(OS),Linux)
- 	LUA_PLATFORM=linux
-@@ -102,7 +101,6 @@ RPM_PKG = $(TARGET)-$(NTOPNG_VERSION)-@REVISION@.$(PLATFORM).rpm
- RPM_DATA_PKG = $(TARGET)-data-$(NTOPNG_VERSION)-@[email protected]
+ HAVE_CLICKHOUSE=@HAVE_CLICKHOUSE@
+ CLICKHOUSE_HOME=
+@@ -52,7 +50,7 @@ else ifeq ($(OS),Darwin)
+ 	LUA_PLATFORM=macosx
+ else ifeq ($(OS), $(filter $(OS), FreeBSD))
+ 	LUA_PLATFORM=freebsd
+-	LUA_LIB=/usr/local/lib/liblua-5.3.a
++	LUA_LIB=liblua.a
+ endif
+
  ######
+@@ -138,7 +136,7 @@ HEADERS = $(wildcard include/*.h) $(wild
+ INC     = $(wildcard src/*.inc)
+ OBJECTS_NO_MAIN := $(filter-out src/main.o,$(OBJECTS))
 
--LIB_TARGETS = $(LUA_LIB)
+-TEST_FILES = $(wildcard tests/src/*.cpp)
++TEST_FILES = $(wildcard tests/src/*.cpp)
+ TEST_HEADERS = $(wildcard tests/include/*.h)
 
- ifneq ($(HAS_ZEROMQ), 0)
- LIB_TARGETS += $(ZEROMQ_LIB)
---
-2.25.1
-
+ %.o: %.c $(HEADERS) $(INC) Makefile
meta-networking/recipes-support/ntopng/files/0001-autogen.sh-generate-configure.ac-only.patch deleted +0 -36
deleted file mode 100644
index 8d62147b9e..0000000000
@@ -1,36 +0,0 @@
-From 22f0bec462763f1b0b92daa33133e274d3b45f4f Mon Sep 17 00:00:00 2001
-From: Mingli Yu <[email protected]>
-Date: Thu, 5 Nov 2020 00:05:21 -0800
-Subject: [PATCH] autogen.sh: generate configure.ac only
-
-The autogen.sh should only generate configure.ac and the
-logic used to generate configure script should follow the
-autotools.bbclass in oe. Otherwise there may comes below
-do_configure error:
- | checking whether we are cross compiling... configure: error: in `/path/tmp/work/core2-64-poky-linux/ndpi/3.4-r0/git':
- | configure: error: cannot run C compiled programs.
- | If you meant to cross compile, use `--host'.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Mingli Yu <[email protected]>
----
- autogen.sh | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/autogen.sh b/autogen.sh
-index 73f8d0ebe..15ff0aa84 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -73,8 +73,3 @@ cat configure.seed | sed \
-     > configure.ac
-
- rm -f config.h config.h.in *~ #*
--
--echo "Wait please..."
--autoreconf -if
--echo ""
--echo "Now run ./configure"
---
-2.17.1
-
meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-Allow-dynamic-linking-against-ndpi-3.patch +35 -16

58 lines not on this page · raw message

meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch deleted +0 -42

42 lines not on this page · raw message

meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch +161 -27

225 lines not on this page · raw message

meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch deleted +0 -44

44 lines not on this page · raw message

meta-networking/recipes-support/ntopng/files/0001-luaengine-Use-lua-5.5-API-signature-for-lua_newstate.patch new file +247 -0

247 lines not on this page · raw message

meta-networking/recipes-support/ntopng/ndpi_5.0.bb +4 -0
index e2040eda18..6eadf8ba62 100644
@@ -21,6 +21,10 @@ do_configure:prepend() {
     (cd ${S} && ${S}/autogen.sh)
 }
 
+do_install:append() {
+    install -Dm 0644 ${B}/src/include/ndpi_define.h ${D}${includedir}/ndpi/ndpi_define.h
+}
+
 EXTRA_OEMAKE = " \
     libdir=${libdir} \
 "
meta-networking/recipes-support/ntopng/ntopng_6.6.bb renamed from meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb +10 -9
similarity index 76%
rename from meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb
rename to meta-networking/recipes-support/ntopng/ntopng_6.6.bb
index 014706893a..3c039781d8 100644
@@ -11,27 +11,28 @@ RDEPENDS:${PN} = "bash redis"
 LICENSE = "GPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRCREV = "d3ce78948e8d81dc1e2c5298ce556f9f2247aac1"
-SRC_URI = "git://github.com/ntop/ntopng.git;protocol=https;branch=5.2-stable \
-           file://0001-configure.ac.in-fix-configure-error.patch \
+SRCREV = "d3a1229954dd783af06c9fd2dcd9ce926826a228"
+SRC_URI = "gitsm://github.com/ntop/ntopng;protocol=https;branch=6.6-stable \
            file://0001-configure.ac.in-fix-host-contamination.patch \
            file://0001-Makefile.in-don-t-use-the-internal-lua.patch \
-           file://0001-autogen.sh-generate-configure.ac-only.patch \
-           file://0001-configure.ac.in-not-check-clang-on-host.patch \
            file://0001-configure.ac.in-Allow-dynamic-linking-against-ndpi-3.patch \
-           file://0001-Follow-rrd-post-1.8-change.patch \
+           file://0001-luaengine-Use-lua-5.5-API-signature-for-lua_newstate.patch \
            file://ntopng.service \
            "
 
-
 # don't use the lua under thirdparty as it supports cross compiling badly
-export LUA_LIB = "${STAGING_LIBDIR}/liblua.a"
-
+export LUA_LIB = "-llua"
+export LUA_INC = "-I${STAGING_INCDIR}"
+export NDPI_CUST_INC = "-I${STAGING_INCDIR}/ndpi"
+export NDPI_CUST_LIB = "-lndpi"
 LDFLAGS:append:mipsarch = " -latomic"
 LDFLAGS:append:powerpc = " -latomic"
 LDFLAGS:append:riscv32 = " -latomic"
+
 inherit autotools-brokensep gettext pkgconfig systemd
 
+EXTRA_OECONF += "--with-dynamic-ndpi"
+
 do_install:append() {
     install -d ${D}${systemd_unitdir}/system/
     install -m 0644 ${UNPACKDIR}/ntopng.service ${D}${systemd_unitdir}/system
#1 lore raw
Quoted 4 lines · Khem Raj via lists.openembedded.org

Fix build with Lua 5.5
Add fixes to build with ndpi 5.0

Quoted 9 lines
---
 .../0001-Follow-rrd-post-1.8-change.patch     |  32 ---
 ...kefile.in-don-t-use-the-internal-lua.patch |  36 +--
 ...utogen.sh-generate-configure.ac-only.patch |  36 ---
 ...Allow-dynamic-linking-against-ndpi-3.patch |  51 ++--
 ...-configure.ac.in-fix-configure-error.patch |  42 ---
 ...nfigure.ac.in-fix-host-contamination.patch | 188 +++++++++++--
 ...figure.ac.in-not-check-clang-on-host.patch |  44 ----
 ...a-5.5-API-signature-for-lua_newstate.patch | 247 ++++++++++++++++++

Could this patch be trimmed? It is 200+ lines long, but it changes only 1 line, the rest seems to be whitespace change.

author
#2 lore raw
Quoted 24 lines · Gyorgy Sarvari
Quoted 4 lines · Khem Raj via lists.openembedded.org

Fix build with Lua 5.5
Add fixes to build with ndpi 5.0

Quoted 9 lines
---
 .../0001-Follow-rrd-post-1.8-change.patch     |  32 ---
 ...kefile.in-don-t-use-the-internal-lua.patch |  36 +--
 ...utogen.sh-generate-configure.ac-only.patch |  36 ---
 ...Allow-dynamic-linking-against-ndpi-3.patch |  51 ++--
 ...-configure.ac.in-fix-configure-error.patch |  42 ---
 ...nfigure.ac.in-fix-host-contamination.patch | 188 +++++++++++--
 ...figure.ac.in-not-check-clang-on-host.patch |  44 ----
 ...a-5.5-API-signature-for-lua_newstate.patch | 247 ++++++++++++++++++

Could this patch be trimmed? It is 200+ lines long, but it changes only 1 line, the rest seems to be whitespace change.

Yeah my editor had linter on