diff options
| author | Mingli Yu <mingli.yu@windriver.com> | 2020-11-10 09:51:21 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-11-09 20:49:52 -0800 |
| commit | 127e50b45612ac94839d2f03a05e4f427627c1a6 (patch) | |
| tree | a28106679d628201ce3493f35b9a7428180c8f8b | |
| parent | f5b9e4ecd2cbcb4b6eae894a78cba8e72481c3a3 (diff) | |
| download | meta-openembedded-127e50b45612ac94839d2f03a05e4f427627c1a6.tar.gz | |
ntop: remove the recipe
The ntop project is inactive and there is no new version
since 2012 [1] and it has been replaced by ntopng.
[1] https://sourceforge.net/projects/ntop/files/ntop/Stable/
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 files changed, 0 insertions, 760 deletions
diff --git a/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch deleted file mode 100644 index 81ffeec21b..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 30 Aug 2017 13:56:24 -0700 | ||
| 4 | Subject: [PATCH] nDPI: Include sys/types.h | ||
| 5 | |||
| 6 | Needed for uint_t types | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | nDPI/src/include/ipq_api.h | 1 + | ||
| 13 | 1 file changed, 1 insertion(+) | ||
| 14 | |||
| 15 | Index: ntop-5.0.1/nDPI/src/include/ipq_api.h | ||
| 16 | =================================================================== | ||
| 17 | --- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h | ||
| 18 | +++ ntop-5.0.1/nDPI/src/include/ipq_api.h | ||
| 19 | @@ -24,6 +24,7 @@ | ||
| 20 | #ifndef __IPOQUE_API_INCLUDE_FILE__ | ||
| 21 | #define __IPOQUE_API_INCLUDE_FILE__ | ||
| 22 | |||
| 23 | +#include <sys/types.h> | ||
| 24 | |||
| 25 | #if defined(HAVE_NTOP) && defined(WIN32) | ||
| 26 | #include <winsock2.h> | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch b/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch deleted file mode 100644 index d6f7eb5554..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | From d22ddc73f00ed056032a635ee8379305ec83bf81 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Wed, 11 Jul 2018 12:02:50 +0800 | ||
| 4 | Subject: [PATCH] plugins/Makefile.am: fix for automake 1.16.1 | ||
| 5 | |||
| 6 | Fixed: | ||
| 7 | | i586-poky-linux-gcc: error: netflowPlugin.o: No such file or directory | ||
| 8 | | i586-poky-linux-gcc: error: unrecognized command line option '-flat_namespace'; did you mean '-Wnamespaces'? | ||
| 9 | | i586-poky-linux-gcc: fatal error: no input files | ||
| 10 | |||
| 11 | The previous code make things complicated, but we don't have to, let libtool do | ||
| 12 | most of the things can fix the problem. | ||
| 13 | |||
| 14 | Upstream-Status: Pending [ntop is not longer maintained any more, we need consider moving to ntopng] | ||
| 15 | |||
| 16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 17 | --- | ||
| 18 | plugins/Makefile.am | 34 ++++++---------------------------- | ||
| 19 | 1 file changed, 6 insertions(+), 28 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/plugins/Makefile.am b/plugins/Makefile.am | ||
| 22 | index 64492e0..bcd0c10 100644 | ||
| 23 | --- a/plugins/Makefile.am | ||
| 24 | +++ b/plugins/Makefile.am | ||
| 25 | @@ -69,40 +69,18 @@ libsflowPlugin_la_CFLAGS = $(AM_CFLAGS) | ||
| 26 | # by default ntop looks for plugins in the plugins/ subdirectory | ||
| 27 | # | ||
| 28 | |||
| 29 | - | ||
| 30 | -.libs/libnetflowPlugin.so@SO_VERSION_PATCH@: | ||
| 31 | - @if test -f libnetflowPlugin_la-netflowPlugin.o; then \ | ||
| 32 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ libnetflowPlugin_la-netflowPlugin.o; \ | ||
| 33 | - else \ | ||
| 34 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ netflowPlugin.o; \ | ||
| 35 | - fi | ||
| 36 | - | ||
| 37 | -netflowPlugin.so$(EXEEXT): .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ | ||
| 38 | - @$(LN_S) .libs/libnetflowPlugin.so netflowPlugin.so | ||
| 39 | +netflowPlugin.so$(EXEEXT): libnetflowPlugin.la | ||
| 40 | + @$(LN_S) -f .libs/libnetflowPlugin.so netflowPlugin.so | ||
| 41 | |||
| 42 | ############### | ||
| 43 | |||
| 44 | -.libs/librrdPlugin.so@SO_VERSION_PATCH@: | ||
| 45 | - @if test -f librrdPlugin_la-rrdPlugin.o; then \ | ||
| 46 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ librrdPlugin_la-rrdPlugin.o; \ | ||
| 47 | - else \ | ||
| 48 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ rrdPlugin.o; \ | ||
| 49 | - fi | ||
| 50 | - | ||
| 51 | -rrdPlugin.so$(EXEEXT): .libs/librrdPlugin.so@SO_VERSION_PATCH@ | ||
| 52 | - @$(LN_S) .libs/librrdPlugin.so rrdPlugin.so | ||
| 53 | +rrdPlugin.so$(EXEEXT): librrdPlugin.la | ||
| 54 | + @$(LN_S) -f .libs/librrdPlugin.so rrdPlugin.so | ||
| 55 | |||
| 56 | ############### | ||
| 57 | |||
| 58 | -.libs/libsflowPlugin.so@SO_VERSION_PATCH@: | ||
| 59 | - @if test -f libsflowPlugin_la-sflowPlugin.o; then \ | ||
| 60 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ libsflowPlugin_la-sflowPlugin.o; \ | ||
| 61 | - else \ | ||
| 62 | - $(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ sflowPlugin.o; \ | ||
| 63 | - fi | ||
| 64 | - | ||
| 65 | -sflowPlugin.so$(EXEEXT): .libs/libsflowPlugin.so@SO_VERSION_PATCH@ | ||
| 66 | - @$(LN_S) .libs/libsflowPlugin.so sflowPlugin.so | ||
| 67 | +sflowPlugin.so$(EXEEXT): libsflowPlugin.la | ||
| 68 | + @$(LN_S) -f .libs/libsflowPlugin.so sflowPlugin.so | ||
| 69 | |||
| 70 | ############### | ||
| 71 | |||
| 72 | -- | ||
| 73 | 2.7.4 | ||
| 74 | |||
diff --git a/meta-networking/recipes-support/ntop/ntop/embed-libs.patch b/meta-networking/recipes-support/ntop/ntop/embed-libs.patch deleted file mode 100644 index 2d1ab73717..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/embed-libs.patch +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | Use --embed option so that it can return libpython as well | ||
| 2 | |||
| 3 | % ../recipe-sysroot-native/usr/bin/python3-native/python3-config --libs --embed | ||
| 4 | -lpython3.8 -lcrypt -lpthread -ldl -lutil -lm -lm | ||
| 5 | [kraj@apollo /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/ntop/5.0.1-r0/ntop-5.0.1] | ||
| 6 | % ../recipe-sysroot-native/usr/bin/python3-native/python3-config --libs | ||
| 7 | -lcrypt -lpthread -ldl -lutil -lm -lm | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- a/configure.in | ||
| 11 | +++ b/configure.in | ||
| 12 | @@ -1463,7 +1463,7 @@ dnl> | ||
| 13 | fi | ||
| 14 | |||
| 15 | if test "x$PYTHON_CONFIG" != "x"; then | ||
| 16 | - PYTHON_LIBS="`$PYTHON_CONFIG --libs`" | ||
| 17 | + PYTHON_LIBS="`$PYTHON_CONFIG --libs --embed`" | ||
| 18 | if test "x$PYTHON_LIBS" = "x"; then | ||
| 19 | AC_MSG_RESULT(Python[-devel] support is present but misconfigured) | ||
| 20 | else | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch b/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch deleted file mode 100644 index e627e59a59..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | Fix following error: | ||
| 2 | |||
| 3 | netflowPlugin.c: In function 'netflowUtilsLoop': | ||
| 4 | netflowPlugin.c:2144:1: error: no return statement in function returning non-void [-Werror=return-type] | ||
| 5 | 2144 | } | ||
| 6 | | ^ | ||
| 7 | |||
| 8 | Return NULL like netflowMainLoop does. | ||
| 9 | |||
| 10 | --- ntop-5.0.1.orig/plugins/netflowPlugin.c 2012-03-09 17:44:17.000000000 +0000 | ||
| 11 | +++ ntop-5.0.1/plugins/netflowPlugin.c 2019-08-09 10:25:40.878799852 +0000 | ||
| 12 | @@ -2141,6 +2141,7 @@ | ||
| 13 | waitCondvar(&myGlobals.device[deviceId].netflowGlobals->ifStatsQueueCondvar); | ||
| 14 | } | ||
| 15 | } | ||
| 16 | + return(NULL); | ||
| 17 | } | ||
| 18 | #endif | ||
| 19 | |||
diff --git a/meta-networking/recipes-support/ntop/ntop/ntop.service b/meta-networking/recipes-support/ntop/ntop/ntop.service deleted file mode 100644 index 1ead2a0c5f..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/ntop.service +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=A network traffic probe similar to the UNIX top command | ||
| 3 | Requires=network.target | ||
| 4 | |||
| 5 | ConditionPathExists=@SYSCONFDIR@/ntop.conf | ||
| 6 | After=syslog.target network.target | ||
| 7 | |||
| 8 | [Service] | ||
| 9 | Type=oneshot | ||
| 10 | RemainAfterExit=yes | ||
| 11 | ExecStart=@LIBEXECDIR@/ntop-helper start | ||
| 12 | ExecStop=@LIBEXECDIR@/ntop-helper stop | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch b/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch deleted file mode 100644 index 392cb082b7..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch +++ /dev/null | |||
| @@ -1,164 +0,0 @@ | |||
| 1 | 1)add --with-pcap-config option to use libpcap's pcap-config | ||
| 2 | 2)add AC_CHECK_LIB if user didn't specify PCAP_ROOT and pcap-config | ||
| 3 | put it before host check to make cross-compiling easier. | ||
| 4 | pcap doesn't need extra include and libs so it is fine. | ||
| 5 | 3)remove old rrd configure code but use pkg-config to config rrd | ||
| 6 | rrdtool should have the pkg-config file installed. | ||
| 7 | 4)fix python-config | ||
| 8 | 5)change AC_TRY_RUN to AC_COMPILE_IFELSE for pthread_rwlock_t checking | ||
| 9 | 6)fix a net-snmp-config bug | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
| 14 | --- | ||
| 15 | diff --git a/configure.in b/configure.in | ||
| 16 | index 0c7c0a5..cad40be 100644 | ||
| 17 | --- a/configure.in | ||
| 18 | +++ b/configure.in | ||
| 19 | @@ -230,14 +230,14 @@ dnl> | ||
| 20 | AC_ARG_WITH(void, | ||
| 21 | [ +-External-source-locations:-------------------------------------------------+]) | ||
| 22 | |||
| 23 | -AC_ARG_WITH( rrd-home, | ||
| 24 | - [ --with-rrd-home=DIR Usually /usr/local/rrdtool-1.2.x], | ||
| 25 | - RRD_HOME="$withval", | ||
| 26 | - RRD_HOME=/usr/local/rrdtool-1.2.19) | ||
| 27 | AC_ARG_WITH( pcap-root, | ||
| 28 | [ --with-pcap-root=DIR LBNL pcap located in DIR], | ||
| 29 | PCAP_ROOT="$withval", | ||
| 30 | PCAP_ROOT=) | ||
| 31 | +AC_ARG_WITH( pcap-config, | ||
| 32 | + [ --with-pcap-config=path/pcap-config where to find pcap-config], | ||
| 33 | + PCAP_CONFIG="$withval", | ||
| 34 | + PCAP_CONFIG=) | ||
| 35 | AC_ARG_WITH( gdbm-root, | ||
| 36 | [ --with-gdbm-root=DIR gdbm located in DIR], | ||
| 37 | GDBM_DIRECTORY="$withval", | ||
| 38 | @@ -556,6 +556,7 @@ if test ".${PCAPRING_DIR}" != .; then | ||
| 39 | else | ||
| 40 | |||
| 41 | TMP_ROOT=${HOME}/PF_RING/userland/libpcap/ | ||
| 42 | +FOUND_PCAP=1 | ||
| 43 | if test ".${PCAP_ROOT}" == . && | ||
| 44 | test -d ${TMP_ROOT} && | ||
| 45 | test -r ${TMP_ROOT}/libpcap.a; then | ||
| 46 | @@ -563,6 +564,18 @@ if test ".${PCAP_ROOT}" == . && | ||
| 47 | CORELIBS="${CORELIBS} -L${TMP_ROOT} -L${HOME}/PF_RING/userland/lib -lpfring -lpcap " | ||
| 48 | INCS="${INCS} -I ${PCAP_ROOT}" | ||
| 49 | AC_MSG_RESULT([found in $PCAP_ROOT]) | ||
| 50 | +elif test -n "${PCAP_CONFIG}" && test -x "${PCAP_CONFIG}"; then | ||
| 51 | + CORELIBS="${CORELIBS} $(${PCAP_CONFIG} --libs)" | ||
| 52 | + INCS="${INCS} $(${PCAP_CONFIG} --cflags)" | ||
| 53 | + AC_DEFINE_UNQUOTED(HAVE_LIBPCAP, 1, [have libpcap ]) | ||
| 54 | + AC_MSG_RESULT([found pcap-config: $PCAP_CONFIG, libs:$(${PCAP_CONFIG} --libs) cflags:$(${PCAP_CONFIG} --cflags)]) | ||
| 55 | +else | ||
| 56 | + AC_CHECK_LIB(pcap, pcap_lookupdev, , | ||
| 57 | + [FOUND_PCAP=]) | ||
| 58 | +fi | ||
| 59 | + | ||
| 60 | +if test -n "$FOUND_PCAP"; then | ||
| 61 | + : | ||
| 62 | elif test ".${PCAP_ROOT}" != .; then | ||
| 63 | if test -d $PCAP_ROOT && | ||
| 64 | test -r $PCAP_ROOT/lib/libpcap.a && | ||
| 65 | @@ -880,44 +893,11 @@ AC_CHECK_LIB([z], [zlibVersion], [], [ | ||
| 66 | exit -1 | ||
| 67 | ]) | ||
| 68 | |||
| 69 | -# RRD | ||
| 70 | -if test -d "$RRD_HOME"; then | ||
| 71 | - AC_MSG_RESULT(checking for RRD home... yes) | ||
| 72 | -else | ||
| 73 | - RRD_HOME=/usr/local/rrdtool | ||
| 74 | - if test -d "$RRD_HOME"; then | ||
| 75 | - AC_MSG_RESULT(Checking rrdtool in $RRD_HOME) | ||
| 76 | - else | ||
| 77 | - RRD_HOME=/usr/local | ||
| 78 | - fi | ||
| 79 | -fi | ||
| 80 | - | ||
| 81 | -RRD_LIB="-L${RRD_HOME}/lib -lrrd_th" | ||
| 82 | - | ||
| 83 | -if test -f "$RRD_HOME/lib/librrd_th.so"; then | ||
| 84 | - AC_MSG_RESULT(checking for rrdtool... yes) | ||
| 85 | -else | ||
| 86 | - if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX | ||
| 87 | - AC_MSG_RESULT(checking for rrdtool... yes) | ||
| 88 | - else | ||
| 89 | - if test -f "$RRD_HOME/lib/librrd_th.a"; then | ||
| 90 | - AC_MSG_RESULT(checking for rrdtool... yes) | ||
| 91 | - else | ||
| 92 | - AC_CHECK_LIB([rrd_th], [main]) | ||
| 93 | - if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then | ||
| 94 | - AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR); | ||
| 95 | - AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/); | ||
| 96 | - else | ||
| 97 | - RRD_LIB= | ||
| 98 | - fi | ||
| 99 | - fi | ||
| 100 | - fi | ||
| 101 | -fi | ||
| 102 | - | ||
| 103 | -RRD_INC= | ||
| 104 | -if test -d "${RRD_HOME}/include"; then | ||
| 105 | - RRD_INC="-I${RRD_HOME}/include" | ||
| 106 | -fi | ||
| 107 | +PKG_CHECK_MODULES( [RRD], [librrd] ) | ||
| 108 | +AC_SUBST(RRD_CFLAGS) | ||
| 109 | +AC_SUBST(RRD_LIBS) | ||
| 110 | +RRD_INC=$RRD_FLAGS | ||
| 111 | +RRD_LIB=$RRD_LIBS | ||
| 112 | |||
| 113 | dnl> The failed recheck stuff below is courtesy of Chris Turbeville [turbo@verio.net] | ||
| 114 | dnl> Chris developed this for Solaris 9, confirming work I had done earlier for FreeBSD | ||
| 115 | @@ -1041,7 +1021,7 @@ AC_CHECK_HEADERS([sched.h sys/sched.h]) | ||
| 116 | AC_CHECK_HEADERS([pthread.h]) | ||
| 117 | |||
| 118 | AC_MSG_CHECKING([if r/w locks are supported]) | ||
| 119 | -AC_TRY_RUN([ | ||
| 120 | +AC_COMPILE_IFELSE([ | ||
| 121 | #include <pthread.h> | ||
| 122 | |||
| 123 | int main() | ||
| 124 | @@ -1443,15 +1423,15 @@ dnl> NET-SNMP | ||
| 125 | dnl> | ||
| 126 | if test ".${ac_disable_snmp}" != ".yes"; then | ||
| 127 | AC_CHECK_TOOL(NETSNMP, net-snmp-config) | ||
| 128 | - if test "x$ac_cv_prog_ac_ct_NETSNMP" = "xnet-snmp-config"; then | ||
| 129 | + if test -n "$NETSNMP"; then | ||
| 130 | AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported]) | ||
| 131 | - SNMPLIBS="`net-snmp-config --libs`" | ||
| 132 | + SNMPLIBS="`$NETSNMP --libs`" | ||
| 133 | SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`" | ||
| 134 | echo "net-snmp libs: ${SNMPLIBS}" | ||
| 135 | LIBS="${LIBS} ${SNMPLIBS}" | ||
| 136 | dnl remove unecessary path | ||
| 137 | LIBS=`echo ${LIBS}|sed -e s,'-R../lib',,g` | ||
| 138 | - INCS="${INCS} `net-snmp-config --cflags`" | ||
| 139 | + INCS="${INCS} `$NETSNMP --cflags`" | ||
| 140 | else | ||
| 141 | AC_MSG_RESULT(NETSNMP is not present: SNMP support is disabled) | ||
| 142 | fi | ||
| 143 | @@ -1464,10 +1444,9 @@ SAVED_LIBS=$LIBS | ||
| 144 | dnl> | ||
| 145 | dnl> PYTHON | ||
| 146 | dnl> | ||
| 147 | - AC_CHECK_TOOL(PYTHON, python-config) | ||
| 148 | - PYTHON_CONFIG="" | ||
| 149 | + AC_CHECK_TOOL(PYTHON_CONFIG, python-config) | ||
| 150 | |||
| 151 | - if test "x$ac_cv_prog_ac_ct_PYTHON" != "xpython-config"; then | ||
| 152 | + if test -z "$PYTHON_CONFIG"; then | ||
| 153 | if test -f "/etc/debian_version"; then | ||
| 154 | AC_MSG_RESULT(Please install python-dev and rerun configure) | ||
| 155 | exit 1 | ||
| 156 | @@ -1481,8 +1460,6 @@ dnl> | ||
| 157 | PYTHON_CONFIG="python-config" | ||
| 158 | fi | ||
| 159 | fi | ||
| 160 | - else | ||
| 161 | - PYTHON_CONFIG="python-config" | ||
| 162 | fi | ||
| 163 | |||
| 164 | if test "x$PYTHON_CONFIG" != "x"; then | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch b/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch deleted file mode 100644 index 269138df93..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | Check net-snmp-config's existence in case user specified the | ||
| 2 | ac_cv_prog_NETSNMP to avoid HAVE_SNMP defined if the specified | ||
| 3 | net-snmp-config doesn't exist. | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [Embedded specific] | ||
| 6 | |||
| 7 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
| 8 | --- | ||
| 9 | diff --git a/configure.in b/configure.in | ||
| 10 | index 6f3e88f..8ddf017 100755 | ||
| 11 | --- a/configure.in | ||
| 12 | +++ b/configure.in | ||
| 13 | @@ -1423,7 +1423,7 @@ dnl> NET-SNMP | ||
| 14 | dnl> | ||
| 15 | if test ".${ac_disable_snmp}" != ".yes"; then | ||
| 16 | AC_CHECK_TOOL(NETSNMP, net-snmp-config) | ||
| 17 | - if test -n "$NETSNMP"; then | ||
| 18 | + if test -n "$NETSNMP" -a -e "$NETSNMP"; then | ||
| 19 | AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported]) | ||
| 20 | SNMPLIBS="`$NETSNMP --libs`" | ||
| 21 | SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`" | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/ntop_init.patch b/meta-networking/recipes-support/ntop/ntop/ntop_init.patch deleted file mode 100644 index e7684c1b4c..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/ntop_init.patch +++ /dev/null | |||
| @@ -1,228 +0,0 @@ | |||
| 1 | Modify ntop.init to WRLinux 5.0 style. | ||
| 2 | |||
| 3 | Fix a small problem that when ntop not running, | ||
| 4 | /etc/init.d/ntop stop will return 1 | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded specific] | ||
| 7 | |||
| 8 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
| 9 | --- | ||
| 10 | packages/RedHat/ntop.init | 102 +++++++++----------------------------------- | ||
| 11 | 1 files changed, 21 insertions(+), 81 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/packages/RedHat/ntop.init b/packages/RedHat/ntop.init | ||
| 14 | index 40d49f1..a189c59 100755 | ||
| 15 | --- a/packages/RedHat/ntop.init | ||
| 16 | +++ b/packages/RedHat/ntop.init | ||
| 17 | @@ -10,19 +10,9 @@ | ||
| 18 | # You have set the admin password - read docs/1STRUN.txt | ||
| 19 | # You have created /etc/ntop.conf with appropriate parameters. | ||
| 20 | |||
| 21 | -# To identify an interface to ntop, use the following flags | ||
| 22 | -# in /etc/sysconfig/network-scripts/ifcfg-ethx | ||
| 23 | - | ||
| 24 | -# NTOP="yes" <--- means for ntop to use this interface | ||
| 25 | -# NTOPCONFIG="yes" <--- means for ntop to configure this interface | ||
| 26 | - | ||
| 27 | # Note that if you give a -i parameter in either /etc/ntop.conf or | ||
| 28 | # the command line, the scan is NOT performed. | ||
| 29 | |||
| 30 | -# However, when it comes to the configuration step, with NTOPCONFIG="yes" | ||
| 31 | -# the interface is configured regardless of how the interface list was | ||
| 32 | -# specified. | ||
| 33 | - | ||
| 34 | # | ||
| 35 | # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
| 36 | # | ||
| 37 | @@ -107,11 +97,7 @@ ntopusesyslog="local3" | ||
| 38 | invoked=$0 | ||
| 39 | |||
| 40 | # Source function library. | ||
| 41 | -. /etc/rc.d/init.d/functions | ||
| 42 | - | ||
| 43 | -# Source networking configuration. | ||
| 44 | -. /etc/sysconfig/network | ||
| 45 | - | ||
| 46 | +. /etc/init.d/functions | ||
| 47 | |||
| 48 | # Basic sanity checks... | ||
| 49 | if ! [ -x $prog ]; then | ||
| 50 | @@ -124,16 +110,6 @@ if ! [ -x $prog ]; then | ||
| 51 | exit 1 | ||
| 52 | fi | ||
| 53 | |||
| 54 | -if [ ${NETWORKING} = "no" ]; then | ||
| 55 | - echo "" | ||
| 56 | - echo "ERROR -" | ||
| 57 | - echo " Networking is not up!" | ||
| 58 | - echo "" | ||
| 59 | - echo "Aborting..." | ||
| 60 | - echo "" | ||
| 61 | - exit 1 | ||
| 62 | -fi | ||
| 63 | - | ||
| 64 | if ! [ -f ${conf} ]; then | ||
| 65 | echo "" | ||
| 66 | echo "ERROR -" | ||
| 67 | @@ -180,8 +156,8 @@ fi | ||
| 68 | if [ "${debug}" = "y" ]; then echo "DEBUG: parm file temp is ${parmfile}"; fi | ||
| 69 | |||
| 70 | cmd=`echo \ | ||
| 71 | - @${conf} \ | ||
| 72 | -i tbd \ | ||
| 73 | + @${conf} \ | ||
| 74 | $extra $@` | ||
| 75 | |||
| 76 | echo ${cmd} | awk ' \ | ||
| 77 | @@ -305,42 +281,6 @@ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuration | ||
| 78 | |||
| 79 | # Build list of interfaces, e.g eth0 eth1 eth1:1 | ||
| 80 | # (Yeah, we'll have to convert that to eth0,eth1,eth1:1 later | ||
| 81 | -if [ ".${ntopinterface}" = ".tbd" ]; then | ||
| 82 | - | ||
| 83 | - ntopinterface="" | ||
| 84 | - iflist=`ip link show | \ | ||
| 85 | - awk '/^[0-9]*:\ eth/ { printf("%s ", substr($2, 1, length($2)-1)) }'` | ||
| 86 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Scanning all interfaces $iflist" | ||
| 87 | - if [ "${debug}" = "y" ]; then echo "DEBUG: Interface candidates are ${iflist}"; fi | ||
| 88 | - | ||
| 89 | - for eth in $iflist; do | ||
| 90 | - | ||
| 91 | - if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp]=['\"]?[Yy][Ee][Ss]['\"]?" \ | ||
| 92 | - /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then | ||
| 93 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntop=yes, skipping" | ||
| 94 | - if [ "${debug}" = "y" ]; then echo "DEBUG: $eth not ntop=yes"; fi | ||
| 95 | - continue | ||
| 96 | - fi | ||
| 97 | - | ||
| 98 | - ntopinterface="${ntopinterface} $eth" | ||
| 99 | - | ||
| 100 | - ip=`ip addr show $eth | \ | ||
| 101 | - awk '/inet/ { printf("%s", substr($2, 1, index($2, "/")-1)) }'` | ||
| 102 | - | ||
| 103 | - if [ ".$ip" = "." ]; then | ||
| 104 | - is="is unnumbered interface" | ||
| 105 | - else | ||
| 106 | - is="has IP address $ip" | ||
| 107 | - fi | ||
| 108 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is ntop=yes, ${is}" | ||
| 109 | - if [ "${debug}" = "y" ]; then echo "DEBUG: $eth ntop=yes, ${is}"; fi | ||
| 110 | - | ||
| 111 | - done | ||
| 112 | - | ||
| 113 | -else | ||
| 114 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Skipping interface scan - list in parms" | ||
| 115 | -fi | ||
| 116 | - | ||
| 117 | if [ "x${ntopinterface}" = "x" ]; then | ||
| 118 | ntopinterface="none" | ||
| 119 | fi | ||
| 120 | @@ -462,12 +402,6 @@ config_interfaces () { | ||
| 121 | if="${if},${eth}" | ||
| 122 | fi | ||
| 123 | |||
| 124 | - if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \ | ||
| 125 | - /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then | ||
| 126 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping" | ||
| 127 | - continue | ||
| 128 | - fi | ||
| 129 | - | ||
| 130 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuring $eth" | ||
| 131 | if [ "${debug}" = "y" ]; then echo "DEBUG: Configuring $eth"; fi | ||
| 132 | |||
| 133 | @@ -527,7 +461,7 @@ start () { | ||
| 134 | show_extra | ||
| 135 | config_interfaces | ||
| 136 | |||
| 137 | - cmd=`echo $prog \ | ||
| 138 | + cmd=`echo \ | ||
| 139 | @${conf} \ | ||
| 140 | -i $if \ | ||
| 141 | $extra $@` | ||
| 142 | @@ -541,7 +475,7 @@ start () { | ||
| 143 | if [ ".${ldlibpath}" != "." ]; then | ||
| 144 | export LD_LIBRARY_PATH="${ldlibpath}" | ||
| 145 | fi | ||
| 146 | - daemon ${cmd} | ||
| 147 | + start-stop-daemon --start --quiet --exec $prog -- ${cmd} | ||
| 148 | RETVAL=$? | ||
| 149 | |||
| 150 | [ $RETVAL = 0 ] && touch /var/lock/subsys/${name}${instance} | ||
| 151 | @@ -551,6 +485,7 @@ start () { | ||
| 152 | stop () { | ||
| 153 | # stop daemon | ||
| 154 | |||
| 155 | + NOT_RUNNING=1 | ||
| 156 | RETVAL=1 | ||
| 157 | echo -n $"Stopping ${name}${instance}: " | ||
| 158 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Stopping: ${name}${instance}" | ||
| 159 | @@ -563,13 +498,14 @@ stop () { | ||
| 160 | if [ $rc = 0 ]; then | ||
| 161 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${pid}" | ||
| 162 | if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${pid}"; fi | ||
| 163 | - kill -s SIGTERM ${pid} | ||
| 164 | + kill -TERM ${pid} 2>&1 > /dev/null | ||
| 165 | RETVAL=$? | ||
| 166 | rm -f ${ntopdbfilepath}/ntop.pid | ||
| 167 | else | ||
| 168 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find process ${pid} ... will kill by name" | ||
| 169 | if [ "${debug}" = "y" ]; then echo "Unable to find process ${pid} ... will kill by name"; fi | ||
| 170 | fi | ||
| 171 | + NOT_RUNNING=0 | ||
| 172 | else | ||
| 173 | |||
| 174 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find ${ntopdbfilepath}/ntop.pid file ... will kill by name" | ||
| 175 | @@ -577,15 +513,16 @@ stop () { | ||
| 176 | |||
| 177 | fi | ||
| 178 | |||
| 179 | - echo | ||
| 180 | - | ||
| 181 | if [ $RETVAL != 0 ]; then | ||
| 182 | pids=`ps axf | grep '\/usr\/bin\/ntop' | awk '{ printf(" %s", $1) }; END { print "" }'` | ||
| 183 | - if [ "${pids}" != " " ]; then | ||
| 184 | + if [ "${pids}" != "" ]; then | ||
| 185 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${prog}...${pids}" | ||
| 186 | if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${prog}...${pids}"; fi | ||
| 187 | - kill -INT ${pids} | ||
| 188 | + kill -TERM ${pids} > /dev/null 2>&1 | ||
| 189 | RETVAL=$? | ||
| 190 | + NOT_RUNNING=0 | ||
| 191 | + else | ||
| 192 | + NOT_RUNNING=1 | ||
| 193 | fi | ||
| 194 | fi | ||
| 195 | |||
| 196 | @@ -597,13 +534,9 @@ stop () { | ||
| 197 | if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring interfaces"; fi | ||
| 198 | |||
| 199 | for eth in ${ntopinterface}; do | ||
| 200 | - if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \ | ||
| 201 | - /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then | ||
| 202 | - logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping" | ||
| 203 | - if [ "${debug}" = "y" ]; then echo "DEBUG: $eth is not ntopconfigure=yes"; fi | ||
| 204 | - continue | ||
| 205 | + if [ "$eth" = "none" ]; then | ||
| 206 | + continue | ||
| 207 | fi | ||
| 208 | - | ||
| 209 | logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unconfiguring $eth" | ||
| 210 | if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring $eth"; fi | ||
| 211 | |||
| 212 | @@ -623,6 +556,13 @@ stop () { | ||
| 213 | if [ "${debug}" = "y" ]; then echo "DEBUG: Interfaces are unconfigured"; fi | ||
| 214 | fi | ||
| 215 | |||
| 216 | + if [ $NOT_RUNNING -eq 1 -o $RETVAL -eq 0 ]; then | ||
| 217 | + echo " [ OK ]" | ||
| 218 | + RETVAL=0 | ||
| 219 | + else | ||
| 220 | + echo " [ FAILED ]" | ||
| 221 | + fi | ||
| 222 | + | ||
| 223 | return $RETVAL | ||
| 224 | } | ||
| 225 | |||
| 226 | -- | ||
| 227 | 1.7.5.4 | ||
| 228 | |||
diff --git a/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch b/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch deleted file mode 100644 index 9f57ca4255..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | change osName to version as it prints out "ntop Version". | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
| 6 | --- | ||
| 7 | diff --git a/webInterface.c b/webInterface.c | ||
| 8 | index 5622e69..8cb7a67 100644 | ||
| 9 | --- a/webInterface.c | ||
| 10 | +++ b/webInterface.c | ||
| 11 | @@ -5816,7 +5816,7 @@ static void printNtopConfigInfoData(int textPrintFlag, UserPref *pref) { | ||
| 12 | printInfoSectionTitle(textPrintFlag, "Basic Information"); | ||
| 13 | |||
| 14 | safe_snprintf(__FILE__, __LINE__, formatBuf, sizeof(formatBuf), "%s (%d bit)", | ||
| 15 | - osName, sizeof(long) == 8 ? 64 : 32); | ||
| 16 | + version, sizeof(long) == 8 ? 64 : 32); | ||
| 17 | printFeatureConfigInfo(textPrintFlag, "ntop Version", formatBuf); | ||
| 18 | |||
| 19 | #ifndef WIN32 | ||
diff --git a/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch b/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch deleted file mode 100644 index 2b001c13e8..0000000000 --- a/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | [PATCH] replace 'inline' with 'static inline' for gcc 5.x | ||
| 2 | |||
| 3 | gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which change | ||
| 4 | the semantics for inline functions and the standalone 'inline' | ||
| 5 | causes error with "gcc5 -g -o0" | ||
| 6 | |||
| 7 | Replace inline with static inline to be compatible with both gcc 4 | ||
| 8 | and 5. | ||
| 9 | |||
| 10 | Upstream-status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 13 | --- | ||
| 14 | nDPI/src/lib/protocols/ssl.c | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/nDPI/src/lib/protocols/ssl.c b/nDPI/src/lib/protocols/ssl.c | ||
| 18 | index 245b8c3..72beda9 100644 | ||
| 19 | --- a/nDPI/src/lib/protocols/ssl.c | ||
| 20 | +++ b/nDPI/src/lib/protocols/ssl.c | ||
| 21 | @@ -39,7 +39,7 @@ static void ipoque_int_ssl_add_connection(struct ipoque_detection_module_struct | ||
| 22 | |||
| 23 | #ifdef HAVE_NTOP | ||
| 24 | #ifndef WIN32 | ||
| 25 | -inline int min(int a, int b) { return(a < b ? a : b); } | ||
| 26 | +static inline int min(int a, int b) { return(a < b ? a : b); } | ||
| 27 | #endif | ||
| 28 | |||
| 29 | static void stripCertificateTrailer(char *buffer, int buffer_len) { | ||
| 30 | -- | ||
| 31 | 1.9.1 | ||
| 32 | |||
diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb deleted file mode 100644 index 13a878412a..0000000000 --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb +++ /dev/null | |||
| @@ -1,142 +0,0 @@ | |||
| 1 | SUMMARY = "ntop is network top" | ||
| 2 | DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \ | ||
| 3 | similar to what the popular top Unix command does." | ||
| 4 | |||
| 5 | SECTION = "console/network" | ||
| 6 | |||
| 7 | LICENSE = "GPLv2+ & GPLv3 & OpenSSL" | ||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 9 | file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \ | ||
| 13 | file://ntop_configure_in.patch \ | ||
| 14 | file://ntop_init.patch \ | ||
| 15 | file://ntop_webInterface.patch \ | ||
| 16 | file://ntop_configure_in_net_snmp_config_exist.patch \ | ||
| 17 | file://ntop.service \ | ||
| 18 | file://use-static-inline.patch \ | ||
| 19 | file://0001-nDPI-Include-sys-types.h.patch \ | ||
| 20 | file://0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch \ | ||
| 21 | file://fix-missing-return-from-non-void-function.patch \ | ||
| 22 | file://embed-libs.patch \ | ||
| 23 | " | ||
| 24 | SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69" | ||
| 25 | SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8" | ||
| 26 | |||
| 27 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/ntop/files/ntop/Stable" | ||
| 28 | |||
| 29 | inherit autotools-brokensep useradd python3native pkgconfig systemd | ||
| 30 | |||
| 31 | DEPENDS = "geoip rrdtool python3 zlib libpcap gdbm" | ||
| 32 | |||
| 33 | PACKAGECONFIG ??= "openssl snmp plugins" | ||
| 34 | PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl" | ||
| 35 | PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \ | ||
| 36 | --disable-snmp,net-snmp," | ||
| 37 | PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ," | ||
| 38 | |||
| 39 | EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no PYTHON_CONFIG=python3-config" | ||
| 40 | |||
| 41 | do_configure() { | ||
| 42 | cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in | ||
| 43 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} | ||
| 44 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} | ||
| 45 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI | ||
| 46 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI | ||
| 47 | cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4 | ||
| 48 | cp 3rd_party/* ./ | ||
| 49 | |||
| 50 | # config nDPI | ||
| 51 | cd nDPI | ||
| 52 | ./configure ${CONFIGUREOPTS} --with-pic | ||
| 53 | cd .. | ||
| 54 | |||
| 55 | sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in | ||
| 56 | |||
| 57 | # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include | ||
| 58 | sed -i \ | ||
| 59 | -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \ | ||
| 60 | -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \ | ||
| 61 | -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \ | ||
| 62 | ${S}/configure.in | ||
| 63 | |||
| 64 | # replace the DISTRO RELEASE in configure.in which are host's | ||
| 65 | # with our release, although those doesn't affect functionality | ||
| 66 | sed -i -e \ | ||
| 67 | '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \ | ||
| 68 | ${S}/configure.in | ||
| 69 | |||
| 70 | # osName in original configure.in should be ${TARGET_SYS} | ||
| 71 | # which will show in ntop's "show configuration" | ||
| 72 | sed -i -e \ | ||
| 73 | 's:^osName=.*:osName=${TARGET_SYS}:' \ | ||
| 74 | ${S}/configure.in | ||
| 75 | |||
| 76 | # rename configureextra to configureextra_rename to avoid | ||
| 77 | # configure.in to guess host OS and pull in more configure, non needed | ||
| 78 | # which will cause some cross-compiling failure on specific host | ||
| 79 | # e.g. SUSE(SLED...) | ||
| 80 | test ! -f configureextra || mv -f configureextra configureextra_rename | ||
| 81 | |||
| 82 | # make sure configure finds python includdirs/libs with these envs | ||
| 83 | export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
| 84 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
| 85 | STAGING_LIBDIR=${STAGING_LIBDIR} | ||
| 86 | |||
| 87 | autotools_do_configure | ||
| 88 | } | ||
| 89 | |||
| 90 | do_compile_prepend() { | ||
| 91 | cd nDPI | ||
| 92 | oe_runmake | ||
| 93 | cd .. | ||
| 94 | } | ||
| 95 | |||
| 96 | do_install_append() { | ||
| 97 | # remove the empty dirs | ||
| 98 | rm -rf ${D}${libdir}/plugins | ||
| 99 | |||
| 100 | install -D -m 0755 ${S}/packages/RedHat/ntop.init \ | ||
| 101 | ${D}${sysconfdir}/init.d/ntop | ||
| 102 | install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \ | ||
| 103 | ${D}${sysconfdir}/ntop.conf | ||
| 104 | |||
| 105 | # change ntop dir in ntop.conf | ||
| 106 | # don't use the -P as the ntop.init didn't support it | ||
| 107 | sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \ | ||
| 108 | -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \ | ||
| 109 | ${D}${sysconfdir}/ntop.conf | ||
| 110 | |||
| 111 | # For systemd | ||
| 112 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 113 | install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper | ||
| 114 | install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service | ||
| 115 | sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \ | ||
| 116 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
| 117 | ${D}${systemd_system_unitdir}/ntop.service | ||
| 118 | fi | ||
| 119 | |||
| 120 | # Fix host-user-contaminated issue | ||
| 121 | chown -R root:root ${D} | ||
| 122 | |||
| 123 | chown -R ntop.ntop ${D}${datadir}/ntop | ||
| 124 | chown -R ntop:ntop ${D}${localstatedir}/lib/ntop | ||
| 125 | } | ||
| 126 | |||
| 127 | USERADD_PACKAGES = "${PN}" | ||
| 128 | USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \ | ||
| 129 | -s /usr/sbin/nologin -c 'ntop' ntop" | ||
| 130 | GROUPADD_PARAM_${PN} = "-r ntop" | ||
| 131 | |||
| 132 | SYSTEMD_SERVICE_${PN} = "ntop.service" | ||
| 133 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 134 | |||
| 135 | FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \ | ||
| 136 | ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so" | ||
| 137 | FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \ | ||
| 138 | ${libdir}/libntopreport.so \ | ||
| 139 | ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \ | ||
| 140 | ${libdir}/librrdPlugin.so \ | ||
| 141 | ${libdir}/*.la" | ||
| 142 | |||
