From 586b0b3f2c8a1513cb00e34ed69e7d405fd21974 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Tue, 8 Feb 2022 23:12:07 +0800 Subject: ntopng: upgrade 5.0 -> 5.2.1 change configure.seed to configure.ac.in refresh 0001-Makefile.in-don-t-use-the-internal-lua.patch Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- ...01-Makefile.in-don-t-use-the-internal-lua.patch | 12 ++-- .../0001-configure.ac.in-fix-configure-error.patch | 42 +++++++++++ ...01-configure.ac.in-fix-host-contamination.patch | 82 ++++++++++++++++++++++ ...1-configure.ac.in-not-check-clang-on-host.patch | 44 ++++++++++++ .../0001-configure.seed-fix-configure-error.patch | 42 ----------- ...001-configure.seed-fix-host-contamination.patch | 82 ---------------------- ...01-configure.seed-not-check-clang-on-host.patch | 44 ------------ .../recipes-support/ntopng/ntopng_5.0.bb | 49 ------------- .../recipes-support/ntopng/ntopng_5.2.1.bb | 49 +++++++++++++ 9 files changed, 223 insertions(+), 223 deletions(-) create mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch create mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch create mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-configure-error.patch delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-host-contamination.patch delete mode 100644 meta-networking/recipes-support/ntopng/files/0001-configure.seed-not-check-clang-on-host.patch delete mode 100644 meta-networking/recipes-support/ntopng/ntopng_5.0.bb create mode 100644 meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb diff --git a/meta-networking/recipes-support/ntopng/files/0001-Makefile.in-don-t-use-the-internal-lua.patch b/meta-networking/recipes-support/ntopng/files/0001-Makefile.in-don-t-use-the-internal-lua.patch index 0f1ca8d324..bb5bcfbd63 100644 --- a/meta-networking/recipes-support/ntopng/files/0001-Makefile.in-don-t-use-the-internal-lua.patch +++ b/meta-networking/recipes-support/ntopng/files/0001-Makefile.in-don-t-use-the-internal-lua.patch @@ -15,18 +15,18 @@ Signed-off-by: Mingli Yu 1 file changed, 2 deletions(-) diff --git a/Makefile.in b/Makefile.in -index e67623bec..99cb9f06e 100755 +index d737e74..a611b16 100755 --- a/Makefile.in +++ b/Makefile.in -@@ -31,7 +31,6 @@ MONGOOSE_INC=-I$(MONGOOSE_HOME) - LUA_PLATFORM=generi - LUA_HOME=${PWD}/third-party/lua-5.3.5 +@@ -36,7 +36,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_LIB=$(LUA_HOME)/src/liblua.a ifeq ($(OS),Linux) LUA_PLATFORM=linux -@@ -123,7 +122,6 @@ RPM_PKG = $(TARGET)-$(NTOPNG_VERSION)-@REVISION@.$(PLATFORM).rpm +@@ -102,7 +101,6 @@ RPM_PKG = $(TARGET)-$(NTOPNG_VERSION)-@REVISION@.$(PLATFORM).rpm RPM_DATA_PKG = $(TARGET)-data-$(NTOPNG_VERSION)-@REVISION@.noarch.rpm ###### @@ -35,5 +35,5 @@ index e67623bec..99cb9f06e 100755 ifneq ($(HAS_ZEROMQ), 0) LIB_TARGETS += $(ZEROMQ_LIB) -- -2.17.1 +2.25.1 diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch new file mode 100644 index 0000000000..d4908e3227 --- /dev/null +++ b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-configure-error.patch @@ -0,0 +1,42 @@ +From 29797dd037009d38e4976249ed21b2076240751e Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Wed, 4 Nov 2020 04:36:46 +0000 +Subject: [PATCH] configure.ac.in: fix configure error + +fix the below error: +configure: error: cannot run test program while cross compiling + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Mingli Yu +--- + configure.ac.in | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/configure.ac.in b/configure.ac.in +index a321f9bbf..03f9a31b0 100644 +--- a/configure.ac.in ++++ b/configure.ac.in +@@ -642,18 +642,7 @@ if test x$radcli = xtrue; then + fi + fi + +-AC_CACHE_CHECK([if pthread rwlocks are supported], [my_cv_rw_locks_supported], [ +- AC_TRY_RUN([ +- #include +- +- int main() { +- pthread_rwlock_t t; +- return 0; +- } +-] +-, [my_cv_rw_locks_supported=yes], [my_cv_rw_locks_supported=no]) +-] +-) ++AC_CACHE_CHECK([if pthread rwlocks are supported], [my_cv_rw_locks_supported]) + + if test "$my_cv_rw_locks_supported" = yes; then + AC_DEFINE_UNQUOTED(HAVE_RW_LOCK, 1, [pthread rwlocks supported]) +-- +2.26.2 + diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch new file mode 100644 index 0000000000..5e1440b3d6 --- /dev/null +++ b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch @@ -0,0 +1,82 @@ +From d9458227ddb4bbb8c63c607202a6854886d66090 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Wed, 4 Nov 2020 06:28:28 +0000 +Subject: [PATCH] configure.ac.in: fix host contamination + +Fix below error: +This autoconf log indicates errors, it looked at host include and/or +library paths while determining system capabilities. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Mingli Yu +--- + configure.ac.in | 43 +++---------------------------------------- + 1 file changed, 3 insertions(+), 40 deletions(-) + +diff --git a/configure.ac.in b/configure.ac.in +index 1d6380c..beffc6c 100644 +--- a/configure.ac.in ++++ b/configure.ac.in +@@ -167,31 +167,6 @@ fi + # + REVISION=`git log --pretty=oneline | wc -l` + +-if test -d "/usr/local/include"; then +- CFLAGS="${CFLAGS} -I/usr/local/include" +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include" +-fi +- +-if test -d "/usr/local/lib"; then +- LIBS="${LIBS} -L/usr/local/lib" +-fi +- +-if test -d /opt/local/include; then : +- CFLAGS="${CFLAGS} -I/opt/local/include" +- CPPFLAGS="${CPPFLAGS} -I/opt/local/include" +-fi +- +-if test -d /opt/local/lib; then : +- LIBS="${LIBS} -L/opt/local/lib" +-fi +- +-if [ test -f /usr/bin/lsb_release ]; then +- CODENAME=`/usr/bin/lsb_release -c|cut -f 2` +- if [[ $CODENAME == "wheezy" ]]; then : +- CPPFLAGS="${CPPFLAGS} -DOLD_NETFILTER_INTERFACE=1" +- fi +-fi +- + SHORT_MACHINE=`uname -m | cut -b1-3` + + GIT_RELEASE="@GIT_RELEASE@" +@@ -300,23 +275,11 @@ fi + pkg-config --exists libssl + if test "$?" -ne 1; then + AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) +- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl" ++ SSL_INC="`pkg-config --cflags libssl`" + SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto" + else +- dnl Workaround for MacOS Brew +- if test -d "/usr/local/opt/openssl/lib"; then +- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) +- SSL_INC="-I/usr/local/opt/openssl/include" +- SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto" +- dnl Workaround for FreeBSD +- elif test -f "/usr/lib/libssl.so"; then +- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) +- SSL_INC="-I/usr/include" +- SSL_LIB="-L/usr/lib -lssl -lcrypto" +- else +- echo "Please install openssl-dev(el) package prerequisite" +- exit -1 +- fi ++ echo "Please install openssl-dev(el) package prerequisite" ++ exit -1 + fi + + AC_CHECK_LIB([gcrypt], [gcry_cipher_checktag], [LIBS="${LIBS} -lgcrypt"]) +-- +2.25.1 + diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch new file mode 100644 index 0000000000..ffb106723c --- /dev/null +++ b/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-not-check-clang-on-host.patch @@ -0,0 +1,44 @@ +From 5867be19e53a3cc09730b83282c83bdd26147cc3 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Mon, 9 Nov 2020 04:05:25 +0000 +Subject: [PATCH] configure.ac.in: not check clang on host + +Don't check clang on host to avoid host contamination. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Mingli Yu +--- + configure.ac.in | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/configure.ac.in b/configure.ac.in +index 55bd49678..94bc0bc48 100644 +--- a/configure.ac.in ++++ b/configure.ac.in +@@ -90,22 +90,6 @@ if test $SYSTEM = "FreeBSD" || test $SYSTEM = "Darwin"; then + CFLAGS="-fno-color-diagnostics $CFLAGS" + fi + fi +-else +- if test $SYSTEM = "Linux"; then +- if [ test -f /usr/bin/clang++ ]; then +- CC=clang +- CXX=clang++ +- AC_MSG_RESULT(Using clang++ compiler) +- fi +- +- if [ test -f /etc/redhat-release ]; then +- OS=`cat /etc/redhat-release` +- else +- if [ test -f /usr/bin/lsb_release ]; then +- OS=`/usr/bin/lsb_release -d|cut -d ':' -f 2` +- fi +- fi +- fi + fi + + dnl> Remove spaces +-- +2.17.1 + diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-configure-error.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-configure-error.patch deleted file mode 100644 index dffab24ca2..0000000000 --- a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-configure-error.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 29797dd037009d38e4976249ed21b2076240751e Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Wed, 4 Nov 2020 04:36:46 +0000 -Subject: [PATCH] configure.seed: fix configure error - -fix the below error: -configure: error: cannot run test program while cross compiling - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Mingli Yu ---- - configure.seed | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -diff --git a/configure.seed b/configure.seed -index a321f9bbf..03f9a31b0 100644 ---- a/configure.seed -+++ b/configure.seed -@@ -642,18 +642,7 @@ if test x$radcli = xtrue; then - fi - fi - --AC_CACHE_CHECK([if pthread rwlocks are supported], [my_cv_rw_locks_supported], [ -- AC_TRY_RUN([ -- #include -- -- int main() { -- pthread_rwlock_t t; -- return 0; -- } --] --, [my_cv_rw_locks_supported=yes], [my_cv_rw_locks_supported=no]) --] --) -+AC_CACHE_CHECK([if pthread rwlocks are supported], [my_cv_rw_locks_supported]) - - if test "$my_cv_rw_locks_supported" = yes; then - AC_DEFINE_UNQUOTED(HAVE_RW_LOCK, 1, [pthread rwlocks supported]) --- -2.26.2 - diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-host-contamination.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-host-contamination.patch deleted file mode 100644 index 02cd94a06c..0000000000 --- a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-fix-host-contamination.patch +++ /dev/null @@ -1,82 +0,0 @@ -From d9458227ddb4bbb8c63c607202a6854886d66090 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Wed, 4 Nov 2020 06:28:28 +0000 -Subject: [PATCH] configure.seed: fix host contamination - -Fix below error: -This autoconf log indicates errors, it looked at host include and/or -library paths while determining system capabilities. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Mingli Yu ---- - configure.seed | 43 +++---------------------------------------- - 1 file changed, 3 insertions(+), 40 deletions(-) - -diff --git a/configure.seed b/configure.seed -index a148c530a..55bd49678 100644 ---- a/configure.seed -+++ b/configure.seed -@@ -144,31 +144,6 @@ fi - # - REVISION=`git log --pretty=oneline | wc -l` - --if test -d "/usr/local/include"; then -- CFLAGS="${CFLAGS} -I/usr/local/include" -- CPPFLAGS="${CPPFLAGS} -I/usr/local/include" --fi -- --if test -d "/usr/local/lib"; then -- LDFLAGS="${LDFLAGS} -L/usr/local/lib" --fi -- --if test -d /opt/local/include; then : -- CFLAGS="${CFLAGS} -I/opt/local/include" -- CPPFLAGS="${CPPFLAGS} -I/opt/local/include" --fi -- --if test -d /opt/local/lib; then : -- LDFLAGS="${LDFLAGS} -L/opt/local/lib" --fi -- --if [ test -f /usr/bin/lsb_release ]; then -- CODENAME=`/usr/bin/lsb_release -c|cut -f 2` -- if [[ $CODENAME == "wheezy" ]]; then : -- CPPFLAGS="${CPPFLAGS} -DOLD_NETFILTER_INTERFACE=1" -- fi --fi -- - SHORT_MACHINE=`uname -m | cut -b1-3` - - GIT_RELEASE="@GIT_RELEASE@" -@@ -293,23 +268,11 @@ fi - pkg-config --exists libssl - if test "$?" -ne 1; then - AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) -- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl" -+ SSL_INC="`pkg-config --cflags libssl`" - SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto" - else -- dnl Workaround for MacOS Brew -- if test -d "/usr/local/opt/openssl/lib"; then -- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) -- SSL_INC="-I/usr/local/opt/openssl/include" -- SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto" -- dnl Workaround for FreeBSD -- elif test -f "/usr/lib/libssl.so"; then -- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) -- SSL_INC="-I/usr/include" -- SSL_LIB="-L/usr/lib -lssl -lcrypto" -- else -- echo "Please install openssl-dev(el) package prerequisite" -- exit -1 -- fi -+ echo "Please install openssl-dev(el) package prerequisite" -+ exit -1 - fi - - AC_CHECK_LIB([gcrypt], [gcry_cipher_checktag], [LDFLAGS="${LDFLAGS} -lgcrypt"]) --- -2.17.1 - diff --git a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-not-check-clang-on-host.patch b/meta-networking/recipes-support/ntopng/files/0001-configure.seed-not-check-clang-on-host.patch deleted file mode 100644 index 80761abd53..0000000000 --- a/meta-networking/recipes-support/ntopng/files/0001-configure.seed-not-check-clang-on-host.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5867be19e53a3cc09730b83282c83bdd26147cc3 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Mon, 9 Nov 2020 04:05:25 +0000 -Subject: [PATCH] configure.seed: not check clang on host - -Don't check clang on host to avoid host contamination. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Mingli Yu ---- - configure.seed | 16 ---------------- - 1 file changed, 16 deletions(-) - -diff --git a/configure.seed b/configure.seed -index 55bd49678..94bc0bc48 100644 ---- a/configure.seed -+++ b/configure.seed -@@ -90,22 +90,6 @@ if test $SYSTEM = "FreeBSD" || test $SYSTEM = "Darwin"; then - CFLAGS="-fno-color-diagnostics $CFLAGS" - fi - fi --else -- if test $SYSTEM = "Linux"; then -- if [ test -f /usr/bin/clang++ ]; then -- CC=clang -- CXX=clang++ -- AC_MSG_RESULT(Using clang++ compiler) -- fi -- -- if [ test -f /etc/redhat-release ]; then -- OS=`cat /etc/redhat-release` -- else -- if [ test -f /usr/bin/lsb_release ]; then -- OS=`/usr/bin/lsb_release -d|cut -d ':' -f 2` -- fi -- fi -- fi - fi - - dnl> Remove spaces --- -2.17.1 - diff --git a/meta-networking/recipes-support/ntopng/ntopng_5.0.bb b/meta-networking/recipes-support/ntopng/ntopng_5.0.bb deleted file mode 100644 index c4b8db3889..0000000000 --- a/meta-networking/recipes-support/ntopng/ntopng_5.0.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Web-based Traffic and Security Network Traffic Monitoring" -DESCRIPTION = "ntopng is a web-based network traffic monitoring application \ -released under GPLv3. It is the new incarnation of the original \ -ntop written in 1998, and now revamped in terms of performance, \ -usability, and features." - -SECTION = "console/network" - -DEPENDS = "curl libmaxminddb libpcap lua mariadb ndpi json-c rrdtool zeromq" -RDEPENDS:${PN} = "bash redis" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRCREV = "85867090d92df4365c0af8d47f54ab3106117e59" -SRC_URI = "git://github.com/ntop/ntopng.git;protocol=https;branch=5.0-stable \ - file://0001-configure.seed-fix-configure-error.patch \ - file://0001-configure.seed-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.seed-not-check-clang-on-host.patch \ - file://ntopng.service \ -" - -S = "${WORKDIR}/git" - -# don't use the lua under thirdparty as it supports cross compiling badly -export LUA_LIB = "${STAGING_LIBDIR}/liblua.a" - -LDFLAGS:append:mipsarch = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" -inherit autotools-brokensep gettext pkgconfig systemd - -do_install:append() { - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/ntopng.service ${D}${systemd_unitdir}/system -} - -FILES:${PN} += "\ - ${systemd_unitdir}/system/ntopng.service" - -FILES:${PN}-doc += "\ - /usr/man/man8/ntopng.8" - -do_configure:prepend() { - ${S}/autogen.sh -} - -SYSTEMD_SERVICE:${PN} = "ntopng.service" diff --git a/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb b/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb new file mode 100644 index 0000000000..63046e730e --- /dev/null +++ b/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb @@ -0,0 +1,49 @@ +SUMMARY = "Web-based Traffic and Security Network Traffic Monitoring" +DESCRIPTION = "ntopng is a web-based network traffic monitoring application \ +released under GPLv3. It is the new incarnation of the original \ +ntop written in 1998, and now revamped in terms of performance, \ +usability, and features." + +SECTION = "console/network" + +DEPENDS = "curl libmaxminddb libpcap lua mariadb ndpi json-c rrdtool zeromq" +RDEPENDS:${PN} = "bash redis" +LICENSE = "GPLv3" +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 \ + 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://ntopng.service \ + " + +S = "${WORKDIR}/git" + +# don't use the lua under thirdparty as it supports cross compiling badly +export LUA_LIB = "${STAGING_LIBDIR}/liblua.a" + +LDFLAGS:append:mipsarch = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" +inherit autotools-brokensep gettext pkgconfig systemd + +do_install:append() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ntopng.service ${D}${systemd_unitdir}/system +} + +FILES:${PN} += "\ + ${systemd_unitdir}/system/ntopng.service" + +FILES:${PN}-doc += "\ + /usr/man/man8/ntopng.8" + +do_configure:prepend() { + ${S}/autogen.sh +} + +SYSTEMD_SERVICE:${PN} = "ntopng.service" -- cgit v1.2.3-54-g00ecf