All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/4] ntop: Fix build with musl
@ 2017-08-31  2:03 Khem Raj
  2017-08-31  2:03 ` [meta-oe][PATCH 2/4] corosync: " Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Khem Raj @ 2017-08-31  2:03 UTC (permalink / raw)
  To: openembedded-devel

move away from .inc file, when its included in single recipe
helps with devtool workflow too.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-support/ntop/ntop.inc      | 131 --------------------
 .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
 .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
 meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135 ++++++++++++++++++++-
 4 files changed, 158 insertions(+), 160 deletions(-)
 delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
 create mode 100644 meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
 delete mode 100644 meta-networking/recipes-support/ntop/ntop/support-arm64.patch

diff --git a/meta-networking/recipes-support/ntop/ntop.inc b/meta-networking/recipes-support/ntop/ntop.inc
deleted file mode 100644
index b96433425..000000000
--- a/meta-networking/recipes-support/ntop/ntop.inc
+++ /dev/null
@@ -1,131 +0,0 @@
-SUMMARY = "ntop is network top"
-DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
-similar to what the popular top Unix command does."
-
-SECTION = "console/network"
-
-LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
-                   "
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
-           file://ntop_configure_in.patch \
-           file://ntop_init.patch \
-           file://ntop_webInterface.patch \
-           file://ntop_configure_in_net_snmp_config_exist.patch \
-           file://ntop.service \
-           file://use-static-inline.patch \
-           file://support-arm64.patch \
-          "
-
-inherit autotools-brokensep useradd pythonnative pkgconfig systemd
-
-DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
-
-PACKAGECONFIG ??= "openssl snmp plugins"
-PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
-PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
---disable-snmp,net-snmp,"
-PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
-
-EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
-
-do_configure() {
-    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
-    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
-    cp 3rd_party/* ./
-
-    # config nDPI
-    cd nDPI
-    ./configure ${CONFIGUREOPTS} --with-pic
-    cd ..
-
-    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
-
-    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
-    sed -i \
-        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
-        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
-        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
-        ${S}/configure.in
-
-    # replace the DISTRO RELEASE in configure.in which are host's
-    # with our release, although those doesn't affect functionality
-    sed -i -e \
-        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
-        ${S}/configure.in
-
-    # osName in original configure.in should be ${TARGET_SYS}
-    # which will show in ntop's "show configuration"
-    sed -i -e \
-        's:^osName=.*:osName=${TARGET_SYS}:' \
-        ${S}/configure.in
-
-    # rename configureextra to configureextra_rename to avoid
-    # configure.in to guess host OS and pull in more configure, non needed
-    # which will cause some cross-compiling failure on specific host
-    # e.g. SUSE(SLED...)
-    test ! -f configureextra || mv -f configureextra configureextra_rename
-
-    # make sure configure finds python includdirs/libs with these envs
-    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        STAGING_INCDIR=${STAGING_INCDIR} \
-        STAGING_LIBDIR=${STAGING_LIBDIR}
-
-    autotools_do_configure
-}
-
-do_compile_prepend() {
-    cd nDPI
-    oe_runmake
-    cd ..
-}
-
-do_install_append() {
-    # remove the empty dirs
-    rm -rf ${D}${libdir}/plugins
-
-    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
-        ${D}${sysconfdir}/init.d/ntop
-    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
-        ${D}${sysconfdir}/ntop.conf
-
-    # change ntop dir in ntop.conf
-    # don't use the -P as the ntop.init didn't support it
-    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
-        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
-        ${D}${sysconfdir}/ntop.conf
-
-    # For systemd
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
-        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
-        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
-            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
-            ${D}${systemd_system_unitdir}/ntop.service
-    fi
-
-    # Fix host-user-contaminated issue
-    chown -R root:root ${D}
-
-    chown -R ntop.ntop ${D}${datadir}/ntop
-    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
-}
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
--s /usr/sbin/nologin -c 'ntop' ntop"
-GROUPADD_PARAM_${PN} = "-r ntop"
-
-SYSTEMD_SERVICE_${PN} = "ntop.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
-                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
-FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
-                   ${libdir}/libntopreport.so \
-                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
-                   ${libdir}/librrdPlugin.so \
-                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
-
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
new file mode 100644
index 000000000..3a6a76120
--- /dev/null
+++ b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
@@ -0,0 +1,24 @@
+From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 13:56:24 -0700
+Subject: [PATCH] nDPI: Include sys/types.h
+
+Needed for uint_t types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ nDPI/src/include/ipq_api.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
+===================================================================
+--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
+@@ -24,6 +24,7 @@
+ #ifndef __IPOQUE_API_INCLUDE_FILE__
+ #define __IPOQUE_API_INCLUDE_FILE__
+ 
++#include <sys/types.h>
+ 
+ #if defined(HAVE_NTOP) && defined(WIN32)
+ #include <winsock2.h>
diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
deleted file mode 100644
index 0b1e8afbc..000000000
--- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Add support for arm64
-
-Upstream-Status: Inappropriate [no longer maintained]
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-
-diff --git a/nDPI/config.sub.old b/nDPI/config.sub
-index c2d1257..e4347ac 100755
---- a/nDPI/config.sub.old
-+++ b/nDPI/config.sub
-@@ -249,7 +249,7 @@ case $basic_machine in
- 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- 	| am33_2.0 \
--	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 | aarch64 \
- 	| bfin \
- 	| c4x | clipper \
- 	| d10v | d30v | dlx | dsp16xx \
-@@ -331,7 +331,7 @@ case $basic_machine in
- 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
--	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
- 	| avr-* | avr32-* \
- 	| bfin-* | bs2000-* \
- 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
index 77b5e436f..298fbec61 100644
--- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
+++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
@@ -1,4 +1,137 @@
-include ntop.inc
+SUMMARY = "ntop is network top"
+DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
+similar to what the popular top Unix command does."
 
+SECTION = "console/network"
+
+LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
+                   "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
+           file://ntop_configure_in.patch \
+           file://ntop_init.patch \
+           file://ntop_webInterface.patch \
+           file://ntop_configure_in_net_snmp_config_exist.patch \
+           file://ntop.service \
+           file://use-static-inline.patch \
+           file://0001-nDPI-Include-sys-types.h.patch \
+          "
 SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
 SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
+
+inherit autotools-brokensep useradd pythonnative pkgconfig systemd
+
+DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
+
+PACKAGECONFIG ??= "openssl snmp plugins"
+PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
+PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
+--disable-snmp,net-snmp,"
+PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
+
+EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
+
+do_configure() {
+    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI
+    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
+    cp 3rd_party/* ./
+
+    # config nDPI
+    cd nDPI
+    ./configure ${CONFIGUREOPTS} --with-pic
+    cd ..
+
+    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
+
+    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
+    sed -i \
+        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
+        ${S}/configure.in
+
+    # replace the DISTRO RELEASE in configure.in which are host's
+    # with our release, although those doesn't affect functionality
+    sed -i -e \
+        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
+        ${S}/configure.in
+
+    # osName in original configure.in should be ${TARGET_SYS}
+    # which will show in ntop's "show configuration"
+    sed -i -e \
+        's:^osName=.*:osName=${TARGET_SYS}:' \
+        ${S}/configure.in
+
+    # rename configureextra to configureextra_rename to avoid
+    # configure.in to guess host OS and pull in more configure, non needed
+    # which will cause some cross-compiling failure on specific host
+    # e.g. SUSE(SLED...)
+    test ! -f configureextra || mv -f configureextra configureextra_rename
+
+    # make sure configure finds python includdirs/libs with these envs
+    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+        STAGING_INCDIR=${STAGING_INCDIR} \
+        STAGING_LIBDIR=${STAGING_LIBDIR}
+
+    autotools_do_configure
+}
+
+do_compile_prepend() {
+    cd nDPI
+    oe_runmake
+    cd ..
+}
+
+do_install_append() {
+    # remove the empty dirs
+    rm -rf ${D}${libdir}/plugins
+
+    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
+        ${D}${sysconfdir}/init.d/ntop
+    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
+        ${D}${sysconfdir}/ntop.conf
+
+    # change ntop dir in ntop.conf
+    # don't use the -P as the ntop.init didn't support it
+    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
+        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
+        ${D}${sysconfdir}/ntop.conf
+
+    # For systemd
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
+        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
+        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+            ${D}${systemd_system_unitdir}/ntop.service
+    fi
+
+    # Fix host-user-contaminated issue
+    chown -R root:root ${D}
+
+    chown -R ntop.ntop ${D}${datadir}/ntop
+    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
+-s /usr/sbin/nologin -c 'ntop' ntop"
+GROUPADD_PARAM_${PN} = "-r ntop"
+
+SYSTEMD_SERVICE_${PN} = "ntop.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
+                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
+FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
+                   ${libdir}/libntopreport.so \
+                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
+                   ${libdir}/librrdPlugin.so \
+                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
+
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [meta-oe][PATCH 2/4] corosync: Fix build with musl
  2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
@ 2017-08-31  2:03 ` Khem Raj
  2017-08-31  2:04 ` [meta-networking][PATCH 3/4] netkit-rwho: " Khem Raj
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Khem Raj @ 2017-08-31  2:03 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...001-Include-fcntl.h-for-F_-and-O_-defines.patch | 28 ++++++++++++++++++++++
 .../recipes-extended/corosync/corosync_2.4.2.bb    |  4 +++-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch

diff --git a/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch b/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
new file mode 100644
index 000000000..fe4b0793f
--- /dev/null
+++ b/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
@@ -0,0 +1,28 @@
+From 85ea47fedbc96ed9180e08b0d371d9966e3a88da Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 17:28:55 -0700
+Subject: [PATCH] Include fcntl.h for F_* and O_* defines
+
+Fixes errors like
+utils.c:95:22: error: use of undeclared identifier 'O_WRONLY'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ qdevices/utils.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/qdevices/utils.c b/qdevices/utils.c
+index 41850b8c..87090853 100644
+--- a/qdevices/utils.c
++++ b/qdevices/utils.c
+@@ -39,6 +39,7 @@
+ 
+ #include <err.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <inttypes.h>
+ #include <libgen.h>
+ #include <stdio.h>
+-- 
+2.14.1
+
diff --git a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb
index 7d5a87e4c..33e74e2ff 100644
--- a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb
+++ b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb
@@ -7,7 +7,9 @@ SECTION = "base"
 
 inherit autotools pkgconfig systemd useradd
 
-SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz"
+SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz \
+           file://0001-Include-fcntl.h-for-F_-and-O_-defines.patch \
+          "
 SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f"
 SRC_URI[sha256sum] = "f26e3011309fe4bcce94b1dc20ea8c462f19483a73f3ca62f13b925d011a4ba9"
 
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [meta-networking][PATCH 3/4] netkit-rwho: Fix build with musl
  2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
  2017-08-31  2:03 ` [meta-oe][PATCH 2/4] corosync: " Khem Raj
@ 2017-08-31  2:04 ` Khem Raj
  2017-08-31 21:49   ` akuster808
  2017-08-31  2:04 ` [meta-networking][PATCH 4/4] netkit-tftp: " Khem Raj
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2017-08-31  2:04 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...001-Add-missing-include-path-to-I-options.patch | 44 ++++++++++++++
 .../0002-Fix-build-issues-found-with-musl.patch    | 69 ++++++++++++++++++++++
 .../recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb |  4 +-
 3 files changed, 116 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
 create mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch

diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
new file mode 100644
index 000000000..9899292b0
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
@@ -0,0 +1,44 @@
+From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:11:33 -0700
+Subject: [PATCH 1/2] Add missing include path to -I options
+
+Fixes errors like
+| rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found
+| #include <protocols/rwhod.h>
+|          ^~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ rwho/Makefile  | 1 +
+ rwhod/Makefile | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/rwho/Makefile b/rwho/Makefile
+index 6f86388..67b28d4 100644
+--- a/rwho/Makefile
++++ b/rwho/Makefile
+@@ -6,6 +6,7 @@ include ../MRULES
+ rwho: rwho.o
+ 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+ 
++CFLAGS += -I../include
+ rwho.o: ../version.h
+ 
+ install: rwho
+diff --git a/rwhod/Makefile b/rwhod/Makefile
+index 772b641..9034218 100644
+--- a/rwhod/Makefile
++++ b/rwhod/Makefile
+@@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1)
+ CFLAGS += -D_GNU_SOURCE
+ endif
+ 
++CFLAGS += -I../include
++
+ OBJS = rwhod.o
+ 
+ rwhod: $(OBJS)
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
new file mode 100644
index 000000000..e149f3468
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
@@ -0,0 +1,69 @@
+From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:13:17 -0700
+Subject: [PATCH 2/2] Fix build issues found with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ruptime/ruptime.c | 1 +
+ rwho/rwho.c       | 1 +
+ rwhod/rwhod.c     | 5 +++--
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/ruptime/ruptime.c b/ruptime/ruptime.c
+index 1d4f7b6..f1f043c 100644
+--- a/ruptime/ruptime.c
++++ b/ruptime/ruptime.c
+@@ -53,6 +53,7 @@ char ruptime_rcsid[] =
+ #include <string.h>
+ #include <errno.h>
+ #include <time.h>
++#include <fcntl.h>
+ 
+ struct hs {
+ 	char	hs_hostname[MAXHOSTNAMELEN];
+diff --git a/rwho/rwho.c b/rwho/rwho.c
+index 63919ac..71aec9e 100644
+--- a/rwho/rwho.c
++++ b/rwho/rwho.c
+@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/08/01 20:44:18 dholland Exp $";
+ #include <assert.h>
+ #include <stdio.h>
+ #include <time.h>
++#include <fcntl.h>
+ #include <protocols/rwhod.h>
+ 
+ #include "../version.h"
+diff --git a/rwhod/rwhod.c b/rwhod/rwhod.c
+index 54498d0..40cabcf 100644
+--- a/rwhod/rwhod.c
++++ b/rwhod/rwhod.c
+@@ -76,6 +76,7 @@ char rcsid[] =
+ #include <grp.h>
+ #include <time.h>
+ #include <stdint.h>
++#include <fcntl.h>
+ 
+ #include "../version.h"
+ 
+@@ -102,7 +103,7 @@ struct	nlist nl[] = {
+ static void	broadcaster(void);
+ static int	configure(int s);
+ static int	verify(const char *name);
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) &&  (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ static int	getloadavg(double ptr[3], int n);
+ #endif
+ 
+@@ -549,7 +550,7 @@ sendpacket(struct whod *wd)
+ 	}
+ }
+ 
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ /*
+  * Taken from:
+  *
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
index 04baa4286..5685f03d6 100644
--- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
@@ -8,7 +8,9 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;nam
            ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \
            file://rwhod \
            file://rwhod.default \
-"
+           file://0001-Add-missing-include-path-to-I-options.patch \
+           file://0002-Fix-build-issues-found-with-musl.patch \
+           "
 SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75"
 SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7"
 SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [meta-networking][PATCH 4/4] netkit-tftp: Fix build with musl
  2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
  2017-08-31  2:03 ` [meta-oe][PATCH 2/4] corosync: " Khem Raj
  2017-08-31  2:04 ` [meta-networking][PATCH 3/4] netkit-rwho: " Khem Raj
@ 2017-08-31  2:04 ` Khem Raj
  2017-08-31 21:50   ` akuster808
  2017-08-31 21:51 ` [meta-networking][PATCH 1/4] ntop: " akuster808
  2017-09-01 13:05 ` Martin Jansa
  4 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2017-08-31  2:04 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-tftp-Include-missing-fcntl.h.patch        | 25 ++++++++++++++++++++++
 .../recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb |  7 +++---
 2 files changed, 29 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch

diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
new file mode 100644
index 000000000..c5dcdb423
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
@@ -0,0 +1,25 @@
+From fa57e161fc953264a75d50a787cb83983e60acc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:30:02 -0700
+Subject: [PATCH] tftp: Include missing fcntl.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tftp/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tftp/main.c b/tftp/main.c
+index 8c54843..5c9b698 100644
+--- a/tftp/main.c
++++ b/tftp/main.c
+@@ -63,6 +63,7 @@ char main_rcsid[] =
+ #include <ctype.h>
+ #include <netdb.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ 
+ #include "tftpsubs.h"  /* for mysignal() */
+ 
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
index 67a541d25..92c13e850 100644
--- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
@@ -6,9 +6,10 @@ DEPENDS = "tcp-wrappers"
 LIC_FILES_CHKSUM = "file://tftp/tftp.c;beginline=2;endline=3;md5=84d2cfe1e60863a7d82648734ba4d30c"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
-    ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
-    file://tftp.conf \
-"
+           ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
+           file://tftp.conf \
+           file://0001-tftp-Include-missing-fcntl.h.patch \
+           "
 
 SRC_URI[archive.md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8"
 SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 3/4] netkit-rwho: Fix build with musl
  2017-08-31  2:04 ` [meta-networking][PATCH 3/4] netkit-rwho: " Khem Raj
@ 2017-08-31 21:49   ` akuster808
  0 siblings, 0 replies; 13+ messages in thread
From: akuster808 @ 2017-08-31 21:49 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel



On 08/30/2017 07:04 PM, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   ...001-Add-missing-include-path-to-I-options.patch | 44 ++++++++++++++
>   .../0002-Fix-build-issues-found-with-musl.patch    | 69 ++++++++++++++++++++++
>   .../recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb |  4 +-
>   3 files changed, 116 insertions(+), 1 deletion(-)
>   create mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
>   create mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
>
> diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
> new file mode 100644
> index 000000000..9899292b0
> --- /dev/null
> +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
> @@ -0,0 +1,44 @@
> +From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 30 Aug 2017 18:11:33 -0700
> +Subject: [PATCH 1/2] Add missing include path to -I options
> +
> +Fixes errors like
> +| rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found
> +| #include <protocols/rwhod.h>
> +|          ^~~~~~~~~~~~~~~~~~~
> +

Am I not seeing "Upstream-Status"  in either patches?

- armin

> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + rwho/Makefile  | 1 +
> + rwhod/Makefile | 2 ++
> + 2 files changed, 3 insertions(+)
> +
> +diff --git a/rwho/Makefile b/rwho/Makefile
> +index 6f86388..67b28d4 100644
> +--- a/rwho/Makefile
> ++++ b/rwho/Makefile
> +@@ -6,6 +6,7 @@ include ../MRULES
> + rwho: rwho.o
> + 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
> +
> ++CFLAGS += -I../include
> + rwho.o: ../version.h
> +
> + install: rwho
> +diff --git a/rwhod/Makefile b/rwhod/Makefile
> +index 772b641..9034218 100644
> +--- a/rwhod/Makefile
> ++++ b/rwhod/Makefile
> +@@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1)
> + CFLAGS += -D_GNU_SOURCE
> + endif
> +
> ++CFLAGS += -I../include
> ++
> + OBJS = rwhod.o
> +
> + rwhod: $(OBJS)
> +--
> +2.14.1
> +
> diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
> new file mode 100644
> index 000000000..e149f3468
> --- /dev/null
> +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
> @@ -0,0 +1,69 @@
> +From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 30 Aug 2017 18:13:17 -0700
> +Subject: [PATCH 2/2] Fix build issues found with musl
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + ruptime/ruptime.c | 1 +
> + rwho/rwho.c       | 1 +
> + rwhod/rwhod.c     | 5 +++--
> + 3 files changed, 5 insertions(+), 2 deletions(-)
> +
> +diff --git a/ruptime/ruptime.c b/ruptime/ruptime.c
> +index 1d4f7b6..f1f043c 100644
> +--- a/ruptime/ruptime.c
> ++++ b/ruptime/ruptime.c
> +@@ -53,6 +53,7 @@ char ruptime_rcsid[] =
> + #include <string.h>
> + #include <errno.h>
> + #include <time.h>
> ++#include <fcntl.h>
> +
> + struct hs {
> + 	char	hs_hostname[MAXHOSTNAMELEN];
> +diff --git a/rwho/rwho.c b/rwho/rwho.c
> +index 63919ac..71aec9e 100644
> +--- a/rwho/rwho.c
> ++++ b/rwho/rwho.c
> +@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/08/01 20:44:18 dholland Exp $";
> + #include <assert.h>
> + #include <stdio.h>
> + #include <time.h>
> ++#include <fcntl.h>
> + #include <protocols/rwhod.h>
> +
> + #include "../version.h"
> +diff --git a/rwhod/rwhod.c b/rwhod/rwhod.c
> +index 54498d0..40cabcf 100644
> +--- a/rwhod/rwhod.c
> ++++ b/rwhod/rwhod.c
> +@@ -76,6 +76,7 @@ char rcsid[] =
> + #include <grp.h>
> + #include <time.h>
> + #include <stdint.h>
> ++#include <fcntl.h>
> +
> + #include "../version.h"
> +
> +@@ -102,7 +103,7 @@ struct	nlist nl[] = {
> + static void	broadcaster(void);
> + static int	configure(int s);
> + static int	verify(const char *name);
> +-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
> ++#if defined(__GLIBC__) &&  (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
> + static int	getloadavg(double ptr[3], int n);
> + #endif
> +
> +@@ -549,7 +550,7 @@ sendpacket(struct whod *wd)
> + 	}
> + }
> +
> +-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
> ++#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
> + /*
> +  * Taken from:
> +  *
> +--
> +2.14.1
> +
> diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
> index 04baa4286..5685f03d6 100644
> --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
> +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
> @@ -8,7 +8,9 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;nam
>              ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \
>              file://rwhod \
>              file://rwhod.default \
> -"
> +           file://0001-Add-missing-include-path-to-I-options.patch \
> +           file://0002-Fix-build-issues-found-with-musl.patch \
> +           "
>   SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75"
>   SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7"
>   SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9"



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 4/4] netkit-tftp: Fix build with musl
  2017-08-31  2:04 ` [meta-networking][PATCH 4/4] netkit-tftp: " Khem Raj
@ 2017-08-31 21:50   ` akuster808
  0 siblings, 0 replies; 13+ messages in thread
From: akuster808 @ 2017-08-31 21:50 UTC (permalink / raw)
  To: openembedded-devel



On 08/30/2017 07:04 PM, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   .../0001-tftp-Include-missing-fcntl.h.patch        | 25 ++++++++++++++++++++++
>   .../recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb |  7 +++---
>   2 files changed, 29 insertions(+), 3 deletions(-)
>   create mode 100644 meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
>
> diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
> new file mode 100644
> index 000000000..c5dcdb423
> --- /dev/null
> +++ b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
> @@ -0,0 +1,25 @@
> +From fa57e161fc953264a75d50a787cb83983e60acc7 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 30 Aug 2017 18:30:02 -0700
> +Subject: [PATCH] tftp: Include missing fcntl.h
Did I miss the "Upstream-Status" ?
- armin
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + tftp/main.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/tftp/main.c b/tftp/main.c
> +index 8c54843..5c9b698 100644
> +--- a/tftp/main.c
> ++++ b/tftp/main.c
> +@@ -63,6 +63,7 @@ char main_rcsid[] =
> + #include <ctype.h>
> + #include <netdb.h>
> + #include <unistd.h>
> ++#include <fcntl.h>
> +
> + #include "tftpsubs.h"  /* for mysignal() */
> +
> +--
> +2.14.1
> +
> diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
> index 67a541d25..92c13e850 100644
> --- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
> +++ b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
> @@ -6,9 +6,10 @@ DEPENDS = "tcp-wrappers"
>   LIC_FILES_CHKSUM = "file://tftp/tftp.c;beginline=2;endline=3;md5=84d2cfe1e60863a7d82648734ba4d30c"
>   
>   SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
> -    ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
> -    file://tftp.conf \
> -"
> +           ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
> +           file://tftp.conf \
> +           file://0001-tftp-Include-missing-fcntl.h.patch \
> +           "
>   
>   SRC_URI[archive.md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8"
>   SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d"



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
                   ` (2 preceding siblings ...)
  2017-08-31  2:04 ` [meta-networking][PATCH 4/4] netkit-tftp: " Khem Raj
@ 2017-08-31 21:51 ` akuster808
  2017-08-31 22:59   ` Khem Raj
  2017-09-01 13:05 ` Martin Jansa
  4 siblings, 1 reply; 13+ messages in thread
From: akuster808 @ 2017-08-31 21:51 UTC (permalink / raw)
  To: openembedded-devel



On 08/30/2017 07:03 PM, Khem Raj wrote:
> move away from .inc file, when its included in single recipe
> helps with devtool workflow too.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta-networking/recipes-support/ntop/ntop.inc      | 131 --------------------
>   .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>   .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>   meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135 ++++++++++++++++++++-
>   4 files changed, 158 insertions(+), 160 deletions(-)
>   delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>   create mode 100644 meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>   delete mode 100644 meta-networking/recipes-support/ntop/ntop/support-arm64.patch

Son,

I think Upstream-Status is missing in all patches.
- armin
> diff --git a/meta-networking/recipes-support/ntop/ntop.inc b/meta-networking/recipes-support/ntop/ntop.inc
> deleted file mode 100644
> index b96433425..000000000
> --- a/meta-networking/recipes-support/ntop/ntop.inc
> +++ /dev/null
> @@ -1,131 +0,0 @@
> -SUMMARY = "ntop is network top"
> -DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
> -similar to what the popular top Unix command does."
> -
> -SECTION = "console/network"
> -
> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> -                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
> -                   "
> -
> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> -           file://ntop_configure_in.patch \
> -           file://ntop_init.patch \
> -           file://ntop_webInterface.patch \
> -           file://ntop_configure_in_net_snmp_config_exist.patch \
> -           file://ntop.service \
> -           file://use-static-inline.patch \
> -           file://support-arm64.patch \
> -          "
> -
> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> -
> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> -
> -PACKAGECONFIG ??= "openssl snmp plugins"
> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> -PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
> ---disable-snmp,net-snmp,"
> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> -
> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> -
> -do_configure() {
> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> -    cp 3rd_party/* ./
> -
> -    # config nDPI
> -    cd nDPI
> -    ./configure ${CONFIGUREOPTS} --with-pic
> -    cd ..
> -
> -    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
> -
> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> -    sed -i \
> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
> -        ${S}/configure.in
> -
> -    # replace the DISTRO RELEASE in configure.in which are host's
> -    # with our release, although those doesn't affect functionality
> -    sed -i -e \
> -        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
> -        ${S}/configure.in
> -
> -    # osName in original configure.in should be ${TARGET_SYS}
> -    # which will show in ntop's "show configuration"
> -    sed -i -e \
> -        's:^osName=.*:osName=${TARGET_SYS}:' \
> -        ${S}/configure.in
> -
> -    # rename configureextra to configureextra_rename to avoid
> -    # configure.in to guess host OS and pull in more configure, non needed
> -    # which will cause some cross-compiling failure on specific host
> -    # e.g. SUSE(SLED...)
> -    test ! -f configureextra || mv -f configureextra configureextra_rename
> -
> -    # make sure configure finds python includdirs/libs with these envs
> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> -        STAGING_INCDIR=${STAGING_INCDIR} \
> -        STAGING_LIBDIR=${STAGING_LIBDIR}
> -
> -    autotools_do_configure
> -}
> -
> -do_compile_prepend() {
> -    cd nDPI
> -    oe_runmake
> -    cd ..
> -}
> -
> -do_install_append() {
> -    # remove the empty dirs
> -    rm -rf ${D}${libdir}/plugins
> -
> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> -        ${D}${sysconfdir}/init.d/ntop
> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> -        ${D}${sysconfdir}/ntop.conf
> -
> -    # change ntop dir in ntop.conf
> -    # don't use the -P as the ntop.init didn't support it
> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> -        ${D}${sysconfdir}/ntop.conf
> -
> -    # For systemd
> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
> -        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> -            ${D}${systemd_system_unitdir}/ntop.service
> -    fi
> -
> -    # Fix host-user-contaminated issue
> -    chown -R root:root ${D}
> -
> -    chown -R ntop.ntop ${D}${datadir}/ntop
> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> -}
> -
> -USERADD_PACKAGES = "${PN}"
> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> --s /usr/sbin/nologin -c 'ntop' ntop"
> -GROUPADD_PARAM_${PN} = "-r ntop"
> -
> -SYSTEMD_SERVICE_${PN} = "ntop.service"
> -SYSTEMD_AUTO_ENABLE = "disable"
> -
> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> -                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> -                   ${libdir}/libntopreport.so \
> -                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
> -                   ${libdir}/librrdPlugin.so \
> -                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
> -
> 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
> new file mode 100644
> index 000000000..3a6a76120
> --- /dev/null
> +++ b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
> @@ -0,0 +1,24 @@
> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 30 Aug 2017 13:56:24 -0700
> +Subject: [PATCH] nDPI: Include sys/types.h
> +
> +Needed for uint_t types
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + nDPI/src/include/ipq_api.h | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
> +===================================================================
> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
> +@@ -24,6 +24,7 @@
> + #ifndef __IPOQUE_API_INCLUDE_FILE__
> + #define __IPOQUE_API_INCLUDE_FILE__
> +
> ++#include <sys/types.h>
> +
> + #if defined(HAVE_NTOP) && defined(WIN32)
> + #include <winsock2.h>
> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> deleted file mode 100644
> index 0b1e8afbc..000000000
> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -Add support for arm64
> -
> -Upstream-Status: Inappropriate [no longer maintained]
> -
> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
> -
> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
> -index c2d1257..e4347ac 100755
> ---- a/nDPI/config.sub.old
> -+++ b/nDPI/config.sub
> -@@ -249,7 +249,7 @@ case $basic_machine in
> - 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
> - 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
> - 	| am33_2.0 \
> --	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
> -+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 | aarch64 \
> - 	| bfin \
> - 	| c4x | clipper \
> - 	| d10v | d30v | dlx | dsp16xx \
> -@@ -331,7 +331,7 @@ case $basic_machine in
> - 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
> - 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
> - 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
> --	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
> -+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
> - 	| avr-* | avr32-* \
> - 	| bfin-* | bs2000-* \
> - 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> index 77b5e436f..298fbec61 100644
> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> @@ -1,4 +1,137 @@
> -include ntop.inc
> +SUMMARY = "ntop is network top"
> +DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
> +similar to what the popular top Unix command does."
>   
> +SECTION = "console/network"
> +
> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> +                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
> +                   "
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> +           file://ntop_configure_in.patch \
> +           file://ntop_init.patch \
> +           file://ntop_webInterface.patch \
> +           file://ntop_configure_in_net_snmp_config_exist.patch \
> +           file://ntop.service \
> +           file://use-static-inline.patch \
> +           file://0001-nDPI-Include-sys-types.h.patch \
> +          "
>   SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>   SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
> +
> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> +
> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> +
> +PACKAGECONFIG ??= "openssl snmp plugins"
> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> +PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
> +--disable-snmp,net-snmp,"
> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> +
> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> +
> +do_configure() {
> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI
> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> +    cp 3rd_party/* ./
> +
> +    # config nDPI
> +    cd nDPI
> +    ./configure ${CONFIGUREOPTS} --with-pic
> +    cd ..
> +
> +    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
> +
> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> +    sed -i \
> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
> +        ${S}/configure.in
> +
> +    # replace the DISTRO RELEASE in configure.in which are host's
> +    # with our release, although those doesn't affect functionality
> +    sed -i -e \
> +        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
> +        ${S}/configure.in
> +
> +    # osName in original configure.in should be ${TARGET_SYS}
> +    # which will show in ntop's "show configuration"
> +    sed -i -e \
> +        's:^osName=.*:osName=${TARGET_SYS}:' \
> +        ${S}/configure.in
> +
> +    # rename configureextra to configureextra_rename to avoid
> +    # configure.in to guess host OS and pull in more configure, non needed
> +    # which will cause some cross-compiling failure on specific host
> +    # e.g. SUSE(SLED...)
> +    test ! -f configureextra || mv -f configureextra configureextra_rename
> +
> +    # make sure configure finds python includdirs/libs with these envs
> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> +        STAGING_INCDIR=${STAGING_INCDIR} \
> +        STAGING_LIBDIR=${STAGING_LIBDIR}
> +
> +    autotools_do_configure
> +}
> +
> +do_compile_prepend() {
> +    cd nDPI
> +    oe_runmake
> +    cd ..
> +}
> +
> +do_install_append() {
> +    # remove the empty dirs
> +    rm -rf ${D}${libdir}/plugins
> +
> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> +        ${D}${sysconfdir}/init.d/ntop
> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> +        ${D}${sysconfdir}/ntop.conf
> +
> +    # change ntop dir in ntop.conf
> +    # don't use the -P as the ntop.init didn't support it
> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> +        ${D}${sysconfdir}/ntop.conf
> +
> +    # For systemd
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
> +        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> +            ${D}${systemd_system_unitdir}/ntop.service
> +    fi
> +
> +    # Fix host-user-contaminated issue
> +    chown -R root:root ${D}
> +
> +    chown -R ntop.ntop ${D}${datadir}/ntop
> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> +}
> +
> +USERADD_PACKAGES = "${PN}"
> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> +-s /usr/sbin/nologin -c 'ntop' ntop"
> +GROUPADD_PARAM_${PN} = "-r ntop"
> +
> +SYSTEMD_SERVICE_${PN} = "ntop.service"
> +SYSTEMD_AUTO_ENABLE = "disable"
> +
> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> +                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> +                   ${libdir}/libntopreport.so \
> +                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
> +                   ${libdir}/librrdPlugin.so \
> +                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
> +



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-08-31 21:51 ` [meta-networking][PATCH 1/4] ntop: " akuster808
@ 2017-08-31 22:59   ` Khem Raj
  0 siblings, 0 replies; 13+ messages in thread
From: Khem Raj @ 2017-08-31 22:59 UTC (permalink / raw)
  To: akuster808; +Cc: openembeded-devel

On Thu, Aug 31, 2017 at 2:51 PM, akuster808 <akuster808@gmail.com> wrote:
>
>
> On 08/30/2017 07:03 PM, Khem Raj wrote:
>>
>> move away from .inc file, when its included in single recipe
>> helps with devtool workflow too.
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta-networking/recipes-support/ntop/ntop.inc      | 131
>> --------------------
>>   .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>>   .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>>   meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
>> ++++++++++++++++++++-
>>   4 files changed, 158 insertions(+), 160 deletions(-)
>>   delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>>   create mode 100644
>> meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>>   delete mode 100644
>> meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>
>
> Son,
>
> I think Upstream-Status is missing in all patches.

heh. OK

> - armin
>
>> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
>> b/meta-networking/recipes-support/ntop/ntop.inc
>> deleted file mode 100644
>> index b96433425..000000000
>> --- a/meta-networking/recipes-support/ntop/ntop.inc
>> +++ /dev/null
>> @@ -1,131 +0,0 @@
>> -SUMMARY = "ntop is network top"
>> -DESCRIPTION = "ntop is a network traffic probe that shows the network
>> usage, \
>> -similar to what the popular top Unix command does."
>> -
>> -SECTION = "console/network"
>> -
>> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> -
>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> -                   "
>> -
>> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> -           file://ntop_configure_in.patch \
>> -           file://ntop_init.patch \
>> -           file://ntop_webInterface.patch \
>> -           file://ntop_configure_in_net_snmp_config_exist.patch \
>> -           file://ntop.service \
>> -           file://use-static-inline.patch \
>> -           file://support-arm64.patch \
>> -          "
>> -
>> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> -
>> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> -
>> -PACKAGECONFIG ??= "openssl snmp plugins"
>> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> -PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> ---disable-snmp,net-snmp,"
>> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> -
>> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> -
>> -do_configure() {
>> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> -    cp 3rd_party/* ./
>> -
>> -    # config nDPI
>> -    cd nDPI
>> -    ./configure ${CONFIGUREOPTS} --with-pic
>> -    cd ..
>> -
>> -    sed -i -e
>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> ${S}/configure.in
>> -
>> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> -    sed -i \
>> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> \
>> -        ${S}/configure.in
>> -
>> -    # replace the DISTRO RELEASE in configure.in which are host's
>> -    # with our release, although those doesn't affect functionality
>> -    sed -i -e \
>> -
>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> \
>> -        ${S}/configure.in
>> -
>> -    # osName in original configure.in should be ${TARGET_SYS}
>> -    # which will show in ntop's "show configuration"
>> -    sed -i -e \
>> -        's:^osName=.*:osName=${TARGET_SYS}:' \
>> -        ${S}/configure.in
>> -
>> -    # rename configureextra to configureextra_rename to avoid
>> -    # configure.in to guess host OS and pull in more configure, non
>> needed
>> -    # which will cause some cross-compiling failure on specific host
>> -    # e.g. SUSE(SLED...)
>> -    test ! -f configureextra || mv -f configureextra
>> configureextra_rename
>> -
>> -    # make sure configure finds python includdirs/libs with these envs
>> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> -        STAGING_INCDIR=${STAGING_INCDIR} \
>> -        STAGING_LIBDIR=${STAGING_LIBDIR}
>> -
>> -    autotools_do_configure
>> -}
>> -
>> -do_compile_prepend() {
>> -    cd nDPI
>> -    oe_runmake
>> -    cd ..
>> -}
>> -
>> -do_install_append() {
>> -    # remove the empty dirs
>> -    rm -rf ${D}${libdir}/plugins
>> -
>> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> -        ${D}${sysconfdir}/init.d/ntop
>> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> -        ${D}${sysconfdir}/ntop.conf
>> -
>> -    # change ntop dir in ntop.conf
>> -    # don't use the -P as the ntop.init didn't support it
>> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> /var/lib/ntop:" \
>> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> -        ${D}${sysconfdir}/ntop.conf
>> -
>> -    # For systemd
>> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> 'false', d)}; then
>> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> ${D}${libexecdir}/ntop-helper
>> -        install -D -m 0644 ${WORKDIR}/ntop.service
>> ${D}${systemd_system_unitdir}/ntop.service
>> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> -            ${D}${systemd_system_unitdir}/ntop.service
>> -    fi
>> -
>> -    # Fix host-user-contaminated issue
>> -    chown -R root:root ${D}
>> -
>> -    chown -R ntop.ntop ${D}${datadir}/ntop
>> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> -}
>> -
>> -USERADD_PACKAGES = "${PN}"
>> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> --s /usr/sbin/nologin -c 'ntop' ntop"
>> -GROUPADD_PARAM_${PN} = "-r ntop"
>> -
>> -SYSTEMD_SERVICE_${PN} = "ntop.service"
>> -SYSTEMD_AUTO_ENABLE = "disable"
>> -
>> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> -                      ${libdir}/libntopreport-*.so
>> ${libdir}/lib*-${PV}.so"
>> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> -                   ${libdir}/libntopreport.so \
>> -                   ${libdir}/libnetflowPlugin.so
>> ${libdir}/libsflowPlugin.so \
>> -                   ${libdir}/librrdPlugin.so \
>> -                   ${libdir}/*.a ${libdir}/libntopreport.a
>> ${libdir}/*.la"
>> -
>> 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
>> new file mode 100644
>> index 000000000..3a6a76120
>> --- /dev/null
>> +++
>> b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>> @@ -0,0 +1,24 @@
>> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Wed, 30 Aug 2017 13:56:24 -0700
>> +Subject: [PATCH] nDPI: Include sys/types.h
>> +
>> +Needed for uint_t types
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> + nDPI/src/include/ipq_api.h | 1 +
>> + 1 file changed, 1 insertion(+)
>> +
>> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
>> +===================================================================
>> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
>> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
>> +@@ -24,6 +24,7 @@
>> + #ifndef __IPOQUE_API_INCLUDE_FILE__
>> + #define __IPOQUE_API_INCLUDE_FILE__
>> +
>> ++#include <sys/types.h>
>> +
>> + #if defined(HAVE_NTOP) && defined(WIN32)
>> + #include <winsock2.h>
>> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> deleted file mode 100644
>> index 0b1e8afbc..000000000
>> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> +++ /dev/null
>> @@ -1,28 +0,0 @@
>> -Add support for arm64
>> -
>> -Upstream-Status: Inappropriate [no longer maintained]
>> -
>> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
>> -
>> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
>> -index c2d1257..e4347ac 100755
>> ---- a/nDPI/config.sub.old
>> -+++ b/nDPI/config.sub
>> -@@ -249,7 +249,7 @@ case $basic_machine in
>> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67]
>> \
>> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
>> alpha64pca5[67] \
>> -       | am33_2.0 \
>> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> avr | avr32 \
>> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> avr | avr32 | aarch64 \
>> -       | bfin \
>> -       | c4x | clipper \
>> -       | d10v | d30v | dlx | dsp16xx \
>> -@@ -331,7 +331,7 @@ case $basic_machine in
>> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
>> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-*
>> \
>> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
>> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
>> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
>> -       | avr-* | avr32-* \
>> -       | bfin-* | bs2000-* \
>> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
>> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> index 77b5e436f..298fbec61 100644
>> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> @@ -1,4 +1,137 @@
>> -include ntop.inc
>> +SUMMARY = "ntop is network top"
>> +DESCRIPTION = "ntop is a network traffic probe that shows the network
>> usage, \
>> +similar to what the popular top Unix command does."
>>   +SECTION = "console/network"
>> +
>> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> +
>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> +                   "
>> +
>> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> +           file://ntop_configure_in.patch \
>> +           file://ntop_init.patch \
>> +           file://ntop_webInterface.patch \
>> +           file://ntop_configure_in_net_snmp_config_exist.patch \
>> +           file://ntop.service \
>> +           file://use-static-inline.patch \
>> +           file://0001-nDPI-Include-sys-types.h.patch \
>> +          "
>>   SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>>   SRC_URI[sha256sum] =
>> "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
>> +
>> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> +
>> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> +
>> +PACKAGECONFIG ??= "openssl snmp plugins"
>> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> +PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> +--disable-snmp,net-snmp,"
>> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> +
>> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> +
>> +do_configure() {
>> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> ${S}
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> ${S}/nDPI
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
>> ${S}/nDPI
>> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> +    cp 3rd_party/* ./
>> +
>> +    # config nDPI
>> +    cd nDPI
>> +    ./configure ${CONFIGUREOPTS} --with-pic
>> +    cd ..
>> +
>> +    sed -i -e
>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> ${S}/configure.in
>> +
>> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> +    sed -i \
>> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> \
>> +        ${S}/configure.in
>> +
>> +    # replace the DISTRO RELEASE in configure.in which are host's
>> +    # with our release, although those doesn't affect functionality
>> +    sed -i -e \
>> +
>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> \
>> +        ${S}/configure.in
>> +
>> +    # osName in original configure.in should be ${TARGET_SYS}
>> +    # which will show in ntop's "show configuration"
>> +    sed -i -e \
>> +        's:^osName=.*:osName=${TARGET_SYS}:' \
>> +        ${S}/configure.in
>> +
>> +    # rename configureextra to configureextra_rename to avoid
>> +    # configure.in to guess host OS and pull in more configure, non
>> needed
>> +    # which will cause some cross-compiling failure on specific host
>> +    # e.g. SUSE(SLED...)
>> +    test ! -f configureextra || mv -f configureextra
>> configureextra_rename
>> +
>> +    # make sure configure finds python includdirs/libs with these envs
>> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> +        STAGING_INCDIR=${STAGING_INCDIR} \
>> +        STAGING_LIBDIR=${STAGING_LIBDIR}
>> +
>> +    autotools_do_configure
>> +}
>> +
>> +do_compile_prepend() {
>> +    cd nDPI
>> +    oe_runmake
>> +    cd ..
>> +}
>> +
>> +do_install_append() {
>> +    # remove the empty dirs
>> +    rm -rf ${D}${libdir}/plugins
>> +
>> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> +        ${D}${sysconfdir}/init.d/ntop
>> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> +        ${D}${sysconfdir}/ntop.conf
>> +
>> +    # change ntop dir in ntop.conf
>> +    # don't use the -P as the ntop.init didn't support it
>> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> /var/lib/ntop:" \
>> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> +        ${D}${sysconfdir}/ntop.conf
>> +
>> +    # For systemd
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> 'false', d)}; then
>> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> ${D}${libexecdir}/ntop-helper
>> +        install -D -m 0644 ${WORKDIR}/ntop.service
>> ${D}${systemd_system_unitdir}/ntop.service
>> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> +            ${D}${systemd_system_unitdir}/ntop.service
>> +    fi
>> +
>> +    # Fix host-user-contaminated issue
>> +    chown -R root:root ${D}
>> +
>> +    chown -R ntop.ntop ${D}${datadir}/ntop
>> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> +}
>> +
>> +USERADD_PACKAGES = "${PN}"
>> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> +-s /usr/sbin/nologin -c 'ntop' ntop"
>> +GROUPADD_PARAM_${PN} = "-r ntop"
>> +
>> +SYSTEMD_SERVICE_${PN} = "ntop.service"
>> +SYSTEMD_AUTO_ENABLE = "disable"
>> +
>> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> +                      ${libdir}/libntopreport-*.so
>> ${libdir}/lib*-${PV}.so"
>> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> +                   ${libdir}/libntopreport.so \
>> +                   ${libdir}/libnetflowPlugin.so
>> ${libdir}/libsflowPlugin.so \
>> +                   ${libdir}/librrdPlugin.so \
>> +                   ${libdir}/*.a ${libdir}/libntopreport.a
>> ${libdir}/*.la"
>> +
>
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
                   ` (3 preceding siblings ...)
  2017-08-31 21:51 ` [meta-networking][PATCH 1/4] ntop: " akuster808
@ 2017-09-01 13:05 ` Martin Jansa
  2017-09-01 15:42   ` Khem Raj
  4 siblings, 1 reply; 13+ messages in thread
From: Martin Jansa @ 2017-09-01 13:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

added .patch file fails to apply in master-next:
http://errors.yoctoproject.org/Errors/Details/154751/

On Thu, Aug 31, 2017 at 4:03 AM, Khem Raj <raj.khem@gmail.com> wrote:

> move away from .inc file, when its included in single recipe
> helps with devtool workflow too.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-networking/recipes-support/ntop/ntop.inc      | 131
> --------------------
>  .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>  .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>  meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
> ++++++++++++++++++++-
>  4 files changed, 158 insertions(+), 160 deletions(-)
>  delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>  create mode 100644 meta-networking/recipes-support/ntop/ntop/0001-nDPI-
> Include-sys-types.h.patch
>  delete mode 100644 meta-networking/recipes-support/ntop/ntop/support-
> arm64.patch
>
> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
> b/meta-networking/recipes-support/ntop/ntop.inc
> deleted file mode 100644
> index b96433425..000000000
> --- a/meta-networking/recipes-support/ntop/ntop.inc
> +++ /dev/null
> @@ -1,131 +0,0 @@
> -SUMMARY = "ntop is network top"
> -DESCRIPTION = "ntop is a network traffic probe that shows the network
> usage, \
> -similar to what the popular top Unix command does."
> -
> -SECTION = "console/network"
> -
> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> -                    file://LICENSE-OpenSSL.txt;md5=
> a409f902e447ddd889cffa0c70e7c7c2 \
> -                   "
> -
> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> -           file://ntop_configure_in.patch \
> -           file://ntop_init.patch \
> -           file://ntop_webInterface.patch \
> -           file://ntop_configure_in_net_snmp_config_exist.patch \
> -           file://ntop.service \
> -           file://use-static-inline.patch \
> -           file://support-arm64.patch \
> -          "
> -
> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> -
> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> -
> -PACKAGECONFIG ??= "openssl snmp plugins"
> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> -PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config,
> \
> ---disable-snmp,net-snmp,"
> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> -
> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> -
> -do_configure() {
> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> -    cp 3rd_party/* ./
> -
> -    # config nDPI
> -    cd nDPI
> -    ./configure ${CONFIGUREOPTS} --with-pic
> -    cd ..
> -
> -    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
> ${S}/configure.in
> -
> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> -    sed -i \
> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
> -I/opt/local/include":\1":' \
> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
> -I/opt/local/include":\1":' \
> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
> \
> -        ${S}/configure.in
> -
> -    # replace the DISTRO RELEASE in configure.in which are host's
> -    # with our release, although those doesn't affect functionality
> -    sed -i -e \
> -        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;
> N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
> -        ${S}/configure.in
> -
> -    # osName in original configure.in should be ${TARGET_SYS}
> -    # which will show in ntop's "show configuration"
> -    sed -i -e \
> -        's:^osName=.*:osName=${TARGET_SYS}:' \
> -        ${S}/configure.in
> -
> -    # rename configureextra to configureextra_rename to avoid
> -    # configure.in to guess host OS and pull in more configure, non
> needed
> -    # which will cause some cross-compiling failure on specific host
> -    # e.g. SUSE(SLED...)
> -    test ! -f configureextra || mv -f configureextra configureextra_rename
> -
> -    # make sure configure finds python includdirs/libs with these envs
> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> -        STAGING_INCDIR=${STAGING_INCDIR} \
> -        STAGING_LIBDIR=${STAGING_LIBDIR}
> -
> -    autotools_do_configure
> -}
> -
> -do_compile_prepend() {
> -    cd nDPI
> -    oe_runmake
> -    cd ..
> -}
> -
> -do_install_append() {
> -    # remove the empty dirs
> -    rm -rf ${D}${libdir}/plugins
> -
> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> -        ${D}${sysconfdir}/init.d/ntop
> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> -        ${D}${sysconfdir}/ntop.conf
> -
> -    # change ntop dir in ntop.conf
> -    # don't use the -P as the ntop.init didn't support it
> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
> /var/lib/ntop:" \
> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> -        ${D}${sysconfdir}/ntop.conf
> -
> -    # For systemd
> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> 'false', d)}; then
> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
> ${D}${libexecdir}/ntop-helper
> -        install -D -m 0644 ${WORKDIR}/ntop.service
> ${D}${systemd_system_unitdir}/ntop.service
> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> -            ${D}${systemd_system_unitdir}/ntop.service
> -    fi
> -
> -    # Fix host-user-contaminated issue
> -    chown -R root:root ${D}
> -
> -    chown -R ntop.ntop ${D}${datadir}/ntop
> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> -}
> -
> -USERADD_PACKAGES = "${PN}"
> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> --s /usr/sbin/nologin -c 'ntop' ntop"
> -GROUPADD_PARAM_${PN} = "-r ntop"
> -
> -SYSTEMD_SERVICE_${PN} = "ntop.service"
> -SYSTEMD_AUTO_ENABLE = "disable"
> -
> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> -                      ${libdir}/libntopreport-*.so
> ${libdir}/lib*-${PV}.so"
> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> -                   ${libdir}/libntopreport.so \
> -                   ${libdir}/libnetflowPlugin.so
> ${libdir}/libsflowPlugin.so \
> -                   ${libdir}/librrdPlugin.so \
> -                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
> -
> 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
> new file mode 100644
> index 000000000..3a6a76120
> --- /dev/null
> +++ b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-
> Include-sys-types.h.patch
> @@ -0,0 +1,24 @@
> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 30 Aug 2017 13:56:24 -0700
> +Subject: [PATCH] nDPI: Include sys/types.h
> +
> +Needed for uint_t types
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + nDPI/src/include/ipq_api.h | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
> +===================================================================
> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
> +@@ -24,6 +24,7 @@
> + #ifndef __IPOQUE_API_INCLUDE_FILE__
> + #define __IPOQUE_API_INCLUDE_FILE__
> +
> ++#include <sys/types.h>
> +
> + #if defined(HAVE_NTOP) && defined(WIN32)
> + #include <winsock2.h>
> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> deleted file mode 100644
> index 0b1e8afbc..000000000
> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -Add support for arm64
> -
> -Upstream-Status: Inappropriate [no longer maintained]
> -
> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
> -
> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
> -index c2d1257..e4347ac 100755
> ---- a/nDPI/config.sub.old
> -+++ b/nDPI/config.sub
> -@@ -249,7 +249,7 @@ case $basic_machine in
> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
> alpha64pca5[67] \
> -       | am33_2.0 \
> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
> avr | avr32 \
> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
> avr | avr32 | aarch64 \
> -       | bfin \
> -       | c4x | clipper \
> -       | d10v | d30v | dlx | dsp16xx \
> -@@ -331,7 +331,7 @@ case $basic_machine in
> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
> -       | avr-* | avr32-* \
> -       | bfin-* | bs2000-* \
> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> index 77b5e436f..298fbec61 100644
> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> @@ -1,4 +1,137 @@
> -include ntop.inc
> +SUMMARY = "ntop is network top"
> +DESCRIPTION = "ntop is a network traffic probe that shows the network
> usage, \
> +similar to what the popular top Unix command does."
>
> +SECTION = "console/network"
> +
> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> +                    file://LICENSE-OpenSSL.txt;md5=
> a409f902e447ddd889cffa0c70e7c7c2 \
> +                   "
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> +           file://ntop_configure_in.patch \
> +           file://ntop_init.patch \
> +           file://ntop_webInterface.patch \
> +           file://ntop_configure_in_net_snmp_config_exist.patch \
> +           file://ntop.service \
> +           file://use-static-inline.patch \
> +           file://0001-nDPI-Include-sys-types.h.patch \
> +          "
>  SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>  SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a1
> 4d84a4bef84ec37b2276bc363f45c52ef8"
> +
> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> +
> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> +
> +PACKAGECONFIG ??= "openssl snmp plugins"
> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> +PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config,
> \
> +--disable-snmp,net-snmp,"
> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> +
> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> +
> +do_configure() {
> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
> ${S}
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
> ${S}/nDPI
> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
> ${S}/nDPI
> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> +    cp 3rd_party/* ./
> +
> +    # config nDPI
> +    cd nDPI
> +    ./configure ${CONFIGUREOPTS} --with-pic
> +    cd ..
> +
> +    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
> ${S}/configure.in
> +
> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> +    sed -i \
> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
> -I/opt/local/include":\1":' \
> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
> -I/opt/local/include":\1":' \
> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
> \
> +        ${S}/configure.in
> +
> +    # replace the DISTRO RELEASE in configure.in which are host's
> +    # with our release, although those doesn't affect functionality
> +    sed -i -e \
> +        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;
> N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
> +        ${S}/configure.in
> +
> +    # osName in original configure.in should be ${TARGET_SYS}
> +    # which will show in ntop's "show configuration"
> +    sed -i -e \
> +        's:^osName=.*:osName=${TARGET_SYS}:' \
> +        ${S}/configure.in
> +
> +    # rename configureextra to configureextra_rename to avoid
> +    # configure.in to guess host OS and pull in more configure, non
> needed
> +    # which will cause some cross-compiling failure on specific host
> +    # e.g. SUSE(SLED...)
> +    test ! -f configureextra || mv -f configureextra configureextra_rename
> +
> +    # make sure configure finds python includdirs/libs with these envs
> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> +        STAGING_INCDIR=${STAGING_INCDIR} \
> +        STAGING_LIBDIR=${STAGING_LIBDIR}
> +
> +    autotools_do_configure
> +}
> +
> +do_compile_prepend() {
> +    cd nDPI
> +    oe_runmake
> +    cd ..
> +}
> +
> +do_install_append() {
> +    # remove the empty dirs
> +    rm -rf ${D}${libdir}/plugins
> +
> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> +        ${D}${sysconfdir}/init.d/ntop
> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> +        ${D}${sysconfdir}/ntop.conf
> +
> +    # change ntop dir in ntop.conf
> +    # don't use the -P as the ntop.init didn't support it
> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
> /var/lib/ntop:" \
> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> +        ${D}${sysconfdir}/ntop.conf
> +
> +    # For systemd
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> 'false', d)}; then
> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
> ${D}${libexecdir}/ntop-helper
> +        install -D -m 0644 ${WORKDIR}/ntop.service
> ${D}${systemd_system_unitdir}/ntop.service
> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> +            ${D}${systemd_system_unitdir}/ntop.service
> +    fi
> +
> +    # Fix host-user-contaminated issue
> +    chown -R root:root ${D}
> +
> +    chown -R ntop.ntop ${D}${datadir}/ntop
> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> +}
> +
> +USERADD_PACKAGES = "${PN}"
> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> +-s /usr/sbin/nologin -c 'ntop' ntop"
> +GROUPADD_PARAM_${PN} = "-r ntop"
> +
> +SYSTEMD_SERVICE_${PN} = "ntop.service"
> +SYSTEMD_AUTO_ENABLE = "disable"
> +
> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> +                      ${libdir}/libntopreport-*.so
> ${libdir}/lib*-${PV}.so"
> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> +                   ${libdir}/libntopreport.so \
> +                   ${libdir}/libnetflowPlugin.so
> ${libdir}/libsflowPlugin.so \
> +                   ${libdir}/librrdPlugin.so \
> +                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
> +
> --
> 2.14.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-09-01 13:05 ` Martin Jansa
@ 2017-09-01 15:42   ` Khem Raj
  2017-09-01 15:44     ` Khem Raj
  0 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2017-09-01 15:42 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Fri, Sep 1, 2017 at 6:05 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> added .patch file fails to apply in master-next:
> http://errors.yoctoproject.org/Errors/Details/154751/
>

I do see the ^M  line endings in the source. However, this patch works fine
with archlinux host here. Can you try to cherry-pick it directly from

https://github.com/kraj/meta-openembedded/commit/42cd752bd366ccd40c8f302ac9dd0455511eab4e

I wonder if its something to do with mailing lists + patchwork.

> On Thu, Aug 31, 2017 at 4:03 AM, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> move away from .inc file, when its included in single recipe
>> helps with devtool workflow too.
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta-networking/recipes-support/ntop/ntop.inc      | 131
>> --------------------
>>  .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>>  .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>>  meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
>> ++++++++++++++++++++-
>>  4 files changed, 158 insertions(+), 160 deletions(-)
>>  delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>>  create mode 100644
>> meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>>  delete mode 100644
>> meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>>
>> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
>> b/meta-networking/recipes-support/ntop/ntop.inc
>> deleted file mode 100644
>> index b96433425..000000000
>> --- a/meta-networking/recipes-support/ntop/ntop.inc
>> +++ /dev/null
>> @@ -1,131 +0,0 @@
>> -SUMMARY = "ntop is network top"
>> -DESCRIPTION = "ntop is a network traffic probe that shows the network
>> usage, \
>> -similar to what the popular top Unix command does."
>> -
>> -SECTION = "console/network"
>> -
>> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> -
>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> -                   "
>> -
>> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> -           file://ntop_configure_in.patch \
>> -           file://ntop_init.patch \
>> -           file://ntop_webInterface.patch \
>> -           file://ntop_configure_in_net_snmp_config_exist.patch \
>> -           file://ntop.service \
>> -           file://use-static-inline.patch \
>> -           file://support-arm64.patch \
>> -          "
>> -
>> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> -
>> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> -
>> -PACKAGECONFIG ??= "openssl snmp plugins"
>> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> -PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> ---disable-snmp,net-snmp,"
>> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> -
>> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> -
>> -do_configure() {
>> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> -    cp 3rd_party/* ./
>> -
>> -    # config nDPI
>> -    cd nDPI
>> -    ./configure ${CONFIGUREOPTS} --with-pic
>> -    cd ..
>> -
>> -    sed -i -e
>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> ${S}/configure.in
>> -
>> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> -    sed -i \
>> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> \
>> -        ${S}/configure.in
>> -
>> -    # replace the DISTRO RELEASE in configure.in which are host's
>> -    # with our release, although those doesn't affect functionality
>> -    sed -i -e \
>> -
>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> \
>> -        ${S}/configure.in
>> -
>> -    # osName in original configure.in should be ${TARGET_SYS}
>> -    # which will show in ntop's "show configuration"
>> -    sed -i -e \
>> -        's:^osName=.*:osName=${TARGET_SYS}:' \
>> -        ${S}/configure.in
>> -
>> -    # rename configureextra to configureextra_rename to avoid
>> -    # configure.in to guess host OS and pull in more configure, non
>> needed
>> -    # which will cause some cross-compiling failure on specific host
>> -    # e.g. SUSE(SLED...)
>> -    test ! -f configureextra || mv -f configureextra
>> configureextra_rename
>> -
>> -    # make sure configure finds python includdirs/libs with these envs
>> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> -        STAGING_INCDIR=${STAGING_INCDIR} \
>> -        STAGING_LIBDIR=${STAGING_LIBDIR}
>> -
>> -    autotools_do_configure
>> -}
>> -
>> -do_compile_prepend() {
>> -    cd nDPI
>> -    oe_runmake
>> -    cd ..
>> -}
>> -
>> -do_install_append() {
>> -    # remove the empty dirs
>> -    rm -rf ${D}${libdir}/plugins
>> -
>> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> -        ${D}${sysconfdir}/init.d/ntop
>> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> -        ${D}${sysconfdir}/ntop.conf
>> -
>> -    # change ntop dir in ntop.conf
>> -    # don't use the -P as the ntop.init didn't support it
>> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> /var/lib/ntop:" \
>> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> -        ${D}${sysconfdir}/ntop.conf
>> -
>> -    # For systemd
>> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> 'false', d)}; then
>> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> ${D}${libexecdir}/ntop-helper
>> -        install -D -m 0644 ${WORKDIR}/ntop.service
>> ${D}${systemd_system_unitdir}/ntop.service
>> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> -            ${D}${systemd_system_unitdir}/ntop.service
>> -    fi
>> -
>> -    # Fix host-user-contaminated issue
>> -    chown -R root:root ${D}
>> -
>> -    chown -R ntop.ntop ${D}${datadir}/ntop
>> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> -}
>> -
>> -USERADD_PACKAGES = "${PN}"
>> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> --s /usr/sbin/nologin -c 'ntop' ntop"
>> -GROUPADD_PARAM_${PN} = "-r ntop"
>> -
>> -SYSTEMD_SERVICE_${PN} = "ntop.service"
>> -SYSTEMD_AUTO_ENABLE = "disable"
>> -
>> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> -                      ${libdir}/libntopreport-*.so
>> ${libdir}/lib*-${PV}.so"
>> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> -                   ${libdir}/libntopreport.so \
>> -                   ${libdir}/libnetflowPlugin.so
>> ${libdir}/libsflowPlugin.so \
>> -                   ${libdir}/librrdPlugin.so \
>> -                   ${libdir}/*.a ${libdir}/libntopreport.a
>> ${libdir}/*.la"
>> -
>> 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
>> new file mode 100644
>> index 000000000..3a6a76120
>> --- /dev/null
>> +++
>> b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>> @@ -0,0 +1,24 @@
>> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Wed, 30 Aug 2017 13:56:24 -0700
>> +Subject: [PATCH] nDPI: Include sys/types.h
>> +
>> +Needed for uint_t types
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> + nDPI/src/include/ipq_api.h | 1 +
>> + 1 file changed, 1 insertion(+)
>> +
>> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
>> +===================================================================
>> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
>> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
>> +@@ -24,6 +24,7 @@
>> + #ifndef __IPOQUE_API_INCLUDE_FILE__
>> + #define __IPOQUE_API_INCLUDE_FILE__
>> +
>> ++#include <sys/types.h>
>> +
>> + #if defined(HAVE_NTOP) && defined(WIN32)
>> + #include <winsock2.h>
>> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> deleted file mode 100644
>> index 0b1e8afbc..000000000
>> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> +++ /dev/null
>> @@ -1,28 +0,0 @@
>> -Add support for arm64
>> -
>> -Upstream-Status: Inappropriate [no longer maintained]
>> -
>> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
>> -
>> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
>> -index c2d1257..e4347ac 100755
>> ---- a/nDPI/config.sub.old
>> -+++ b/nDPI/config.sub
>> -@@ -249,7 +249,7 @@ case $basic_machine in
>> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67]
>> \
>> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
>> alpha64pca5[67] \
>> -       | am33_2.0 \
>> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> avr | avr32 \
>> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> avr | avr32 | aarch64 \
>> -       | bfin \
>> -       | c4x | clipper \
>> -       | d10v | d30v | dlx | dsp16xx \
>> -@@ -331,7 +331,7 @@ case $basic_machine in
>> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
>> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-*
>> \
>> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
>> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
>> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
>> -       | avr-* | avr32-* \
>> -       | bfin-* | bs2000-* \
>> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
>> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> index 77b5e436f..298fbec61 100644
>> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> @@ -1,4 +1,137 @@
>> -include ntop.inc
>> +SUMMARY = "ntop is network top"
>> +DESCRIPTION = "ntop is a network traffic probe that shows the network
>> usage, \
>> +similar to what the popular top Unix command does."
>>
>> +SECTION = "console/network"
>> +
>> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> +
>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> +                   "
>> +
>> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> +           file://ntop_configure_in.patch \
>> +           file://ntop_init.patch \
>> +           file://ntop_webInterface.patch \
>> +           file://ntop_configure_in_net_snmp_config_exist.patch \
>> +           file://ntop.service \
>> +           file://use-static-inline.patch \
>> +           file://0001-nDPI-Include-sys-types.h.patch \
>> +          "
>>  SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>>  SRC_URI[sha256sum] =
>> "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
>> +
>> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> +
>> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> +
>> +PACKAGECONFIG ??= "openssl snmp plugins"
>> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> +PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> +--disable-snmp,net-snmp,"
>> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> +
>> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> +
>> +do_configure() {
>> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> ${S}
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> ${S}/nDPI
>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
>> ${S}/nDPI
>> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> +    cp 3rd_party/* ./
>> +
>> +    # config nDPI
>> +    cd nDPI
>> +    ./configure ${CONFIGUREOPTS} --with-pic
>> +    cd ..
>> +
>> +    sed -i -e
>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> ${S}/configure.in
>> +
>> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> +    sed -i \
>> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> -I/opt/local/include":\1":' \
>> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> \
>> +        ${S}/configure.in
>> +
>> +    # replace the DISTRO RELEASE in configure.in which are host's
>> +    # with our release, although those doesn't affect functionality
>> +    sed -i -e \
>> +
>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> \
>> +        ${S}/configure.in
>> +
>> +    # osName in original configure.in should be ${TARGET_SYS}
>> +    # which will show in ntop's "show configuration"
>> +    sed -i -e \
>> +        's:^osName=.*:osName=${TARGET_SYS}:' \
>> +        ${S}/configure.in
>> +
>> +    # rename configureextra to configureextra_rename to avoid
>> +    # configure.in to guess host OS and pull in more configure, non
>> needed
>> +    # which will cause some cross-compiling failure on specific host
>> +    # e.g. SUSE(SLED...)
>> +    test ! -f configureextra || mv -f configureextra
>> configureextra_rename
>> +
>> +    # make sure configure finds python includdirs/libs with these envs
>> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> +        STAGING_INCDIR=${STAGING_INCDIR} \
>> +        STAGING_LIBDIR=${STAGING_LIBDIR}
>> +
>> +    autotools_do_configure
>> +}
>> +
>> +do_compile_prepend() {
>> +    cd nDPI
>> +    oe_runmake
>> +    cd ..
>> +}
>> +
>> +do_install_append() {
>> +    # remove the empty dirs
>> +    rm -rf ${D}${libdir}/plugins
>> +
>> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> +        ${D}${sysconfdir}/init.d/ntop
>> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> +        ${D}${sysconfdir}/ntop.conf
>> +
>> +    # change ntop dir in ntop.conf
>> +    # don't use the -P as the ntop.init didn't support it
>> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> /var/lib/ntop:" \
>> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> +        ${D}${sysconfdir}/ntop.conf
>> +
>> +    # For systemd
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> 'false', d)}; then
>> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> ${D}${libexecdir}/ntop-helper
>> +        install -D -m 0644 ${WORKDIR}/ntop.service
>> ${D}${systemd_system_unitdir}/ntop.service
>> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> +            ${D}${systemd_system_unitdir}/ntop.service
>> +    fi
>> +
>> +    # Fix host-user-contaminated issue
>> +    chown -R root:root ${D}
>> +
>> +    chown -R ntop.ntop ${D}${datadir}/ntop
>> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> +}
>> +
>> +USERADD_PACKAGES = "${PN}"
>> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> +-s /usr/sbin/nologin -c 'ntop' ntop"
>> +GROUPADD_PARAM_${PN} = "-r ntop"
>> +
>> +SYSTEMD_SERVICE_${PN} = "ntop.service"
>> +SYSTEMD_AUTO_ENABLE = "disable"
>> +
>> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> +                      ${libdir}/libntopreport-*.so
>> ${libdir}/lib*-${PV}.so"
>> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> +                   ${libdir}/libntopreport.so \
>> +                   ${libdir}/libnetflowPlugin.so
>> ${libdir}/libsflowPlugin.so \
>> +                   ${libdir}/librrdPlugin.so \
>> +                   ${libdir}/*.a ${libdir}/libntopreport.a
>> ${libdir}/*.la"
>> +
>> --
>> 2.14.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-09-01 15:42   ` Khem Raj
@ 2017-09-01 15:44     ` Khem Raj
  2017-09-02  6:48       ` Martin Jansa
  0 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2017-09-01 15:44 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Fri, Sep 1, 2017 at 8:42 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Sep 1, 2017 at 6:05 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> added .patch file fails to apply in master-next:
>> http://errors.yoctoproject.org/Errors/Details/154751/
>>
>
> I do see the ^M  line endings in the source. However, this patch works fine
> with archlinux host here. Can you try to cherry-pick it directly from
>
> https://github.com/kraj/meta-openembedded/commit/42cd752bd366ccd40c8f302ac9dd0455511eab4e
>
> I wonder if its something to do with mailing lists + patchwork.
>

oh and did you apply v2 ?
https://patchwork.openembedded.org/patch/143411/

>> On Thu, Aug 31, 2017 at 4:03 AM, Khem Raj <raj.khem@gmail.com> wrote:
>>>
>>> move away from .inc file, when its included in single recipe
>>> helps with devtool workflow too.
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> ---
>>>  meta-networking/recipes-support/ntop/ntop.inc      | 131
>>> --------------------
>>>  .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>>>  .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>>>  meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
>>> ++++++++++++++++++++-
>>>  4 files changed, 158 insertions(+), 160 deletions(-)
>>>  delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>>>  create mode 100644
>>> meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>>>  delete mode 100644
>>> meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>>>
>>> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
>>> b/meta-networking/recipes-support/ntop/ntop.inc
>>> deleted file mode 100644
>>> index b96433425..000000000
>>> --- a/meta-networking/recipes-support/ntop/ntop.inc
>>> +++ /dev/null
>>> @@ -1,131 +0,0 @@
>>> -SUMMARY = "ntop is network top"
>>> -DESCRIPTION = "ntop is a network traffic probe that shows the network
>>> usage, \
>>> -similar to what the popular top Unix command does."
>>> -
>>> -SECTION = "console/network"
>>> -
>>> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>>> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>>> -
>>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>>> -                   "
>>> -
>>> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>>> -           file://ntop_configure_in.patch \
>>> -           file://ntop_init.patch \
>>> -           file://ntop_webInterface.patch \
>>> -           file://ntop_configure_in_net_snmp_config_exist.patch \
>>> -           file://ntop.service \
>>> -           file://use-static-inline.patch \
>>> -           file://support-arm64.patch \
>>> -          "
>>> -
>>> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>>> -
>>> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>>> -
>>> -PACKAGECONFIG ??= "openssl snmp plugins"
>>> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>>> -PACKAGECONFIG[snmp] = "--enable-snmp=yes
>>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>>> ---disable-snmp,net-snmp,"
>>> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>>> -
>>> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>>> -
>>> -do_configure() {
>>> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>>> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>>> -    cp 3rd_party/* ./
>>> -
>>> -    # config nDPI
>>> -    cd nDPI
>>> -    ./configure ${CONFIGUREOPTS} --with-pic
>>> -    cd ..
>>> -
>>> -    sed -i -e
>>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>>> ${S}/configure.in
>>> -
>>> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>>> -    sed -i \
>>> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>>> -I/opt/local/include":\1":' \
>>> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>>> -I/opt/local/include":\1":' \
>>> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>>> \
>>> -        ${S}/configure.in
>>> -
>>> -    # replace the DISTRO RELEASE in configure.in which are host's
>>> -    # with our release, although those doesn't affect functionality
>>> -    sed -i -e \
>>> -
>>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>>> \
>>> -        ${S}/configure.in
>>> -
>>> -    # osName in original configure.in should be ${TARGET_SYS}
>>> -    # which will show in ntop's "show configuration"
>>> -    sed -i -e \
>>> -        's:^osName=.*:osName=${TARGET_SYS}:' \
>>> -        ${S}/configure.in
>>> -
>>> -    # rename configureextra to configureextra_rename to avoid
>>> -    # configure.in to guess host OS and pull in more configure, non
>>> needed
>>> -    # which will cause some cross-compiling failure on specific host
>>> -    # e.g. SUSE(SLED...)
>>> -    test ! -f configureextra || mv -f configureextra
>>> configureextra_rename
>>> -
>>> -    # make sure configure finds python includdirs/libs with these envs
>>> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>>> -        STAGING_INCDIR=${STAGING_INCDIR} \
>>> -        STAGING_LIBDIR=${STAGING_LIBDIR}
>>> -
>>> -    autotools_do_configure
>>> -}
>>> -
>>> -do_compile_prepend() {
>>> -    cd nDPI
>>> -    oe_runmake
>>> -    cd ..
>>> -}
>>> -
>>> -do_install_append() {
>>> -    # remove the empty dirs
>>> -    rm -rf ${D}${libdir}/plugins
>>> -
>>> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>>> -        ${D}${sysconfdir}/init.d/ntop
>>> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>>> -        ${D}${sysconfdir}/ntop.conf
>>> -
>>> -    # change ntop dir in ntop.conf
>>> -    # don't use the -P as the ntop.init didn't support it
>>> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>>> /var/lib/ntop:" \
>>> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>>> -        ${D}${sysconfdir}/ntop.conf
>>> -
>>> -    # For systemd
>>> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>>> 'false', d)}; then
>>> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>>> ${D}${libexecdir}/ntop-helper
>>> -        install -D -m 0644 ${WORKDIR}/ntop.service
>>> ${D}${systemd_system_unitdir}/ntop.service
>>> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>>> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>>> -            ${D}${systemd_system_unitdir}/ntop.service
>>> -    fi
>>> -
>>> -    # Fix host-user-contaminated issue
>>> -    chown -R root:root ${D}
>>> -
>>> -    chown -R ntop.ntop ${D}${datadir}/ntop
>>> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>>> -}
>>> -
>>> -USERADD_PACKAGES = "${PN}"
>>> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>>> --s /usr/sbin/nologin -c 'ntop' ntop"
>>> -GROUPADD_PARAM_${PN} = "-r ntop"
>>> -
>>> -SYSTEMD_SERVICE_${PN} = "ntop.service"
>>> -SYSTEMD_AUTO_ENABLE = "disable"
>>> -
>>> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>>> -                      ${libdir}/libntopreport-*.so
>>> ${libdir}/lib*-${PV}.so"
>>> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>>> -                   ${libdir}/libntopreport.so \
>>> -                   ${libdir}/libnetflowPlugin.so
>>> ${libdir}/libsflowPlugin.so \
>>> -                   ${libdir}/librrdPlugin.so \
>>> -                   ${libdir}/*.a ${libdir}/libntopreport.a
>>> ${libdir}/*.la"
>>> -
>>> 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
>>> new file mode 100644
>>> index 000000000..3a6a76120
>>> --- /dev/null
>>> +++
>>> b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>>> @@ -0,0 +1,24 @@
>>> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
>>> +From: Khem Raj <raj.khem@gmail.com>
>>> +Date: Wed, 30 Aug 2017 13:56:24 -0700
>>> +Subject: [PATCH] nDPI: Include sys/types.h
>>> +
>>> +Needed for uint_t types
>>> +
>>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> +---
>>> + nDPI/src/include/ipq_api.h | 1 +
>>> + 1 file changed, 1 insertion(+)
>>> +
>>> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
>>> +===================================================================
>>> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
>>> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
>>> +@@ -24,6 +24,7 @@
>>> + #ifndef __IPOQUE_API_INCLUDE_FILE__
>>> + #define __IPOQUE_API_INCLUDE_FILE__
>>> +
>>> ++#include <sys/types.h>
>>> +
>>> + #if defined(HAVE_NTOP) && defined(WIN32)
>>> + #include <winsock2.h>
>>> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>>> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>>> deleted file mode 100644
>>> index 0b1e8afbc..000000000
>>> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>>> +++ /dev/null
>>> @@ -1,28 +0,0 @@
>>> -Add support for arm64
>>> -
>>> -Upstream-Status: Inappropriate [no longer maintained]
>>> -
>>> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
>>> -
>>> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
>>> -index c2d1257..e4347ac 100755
>>> ---- a/nDPI/config.sub.old
>>> -+++ b/nDPI/config.sub
>>> -@@ -249,7 +249,7 @@ case $basic_machine in
>>> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67]
>>> \
>>> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
>>> alpha64pca5[67] \
>>> -       | am33_2.0 \
>>> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>>> avr | avr32 \
>>> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>>> avr | avr32 | aarch64 \
>>> -       | bfin \
>>> -       | c4x | clipper \
>>> -       | d10v | d30v | dlx | dsp16xx \
>>> -@@ -331,7 +331,7 @@ case $basic_machine in
>>> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
>>> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-*
>>> \
>>> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
>>> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
>>> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
>>> -       | avr-* | avr32-* \
>>> -       | bfin-* | bs2000-* \
>>> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
>>> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>>> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>>> index 77b5e436f..298fbec61 100644
>>> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>>> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>>> @@ -1,4 +1,137 @@
>>> -include ntop.inc
>>> +SUMMARY = "ntop is network top"
>>> +DESCRIPTION = "ntop is a network traffic probe that shows the network
>>> usage, \
>>> +similar to what the popular top Unix command does."
>>>
>>> +SECTION = "console/network"
>>> +
>>> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>>> +
>>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>>> +                   "
>>> +
>>> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>>> +           file://ntop_configure_in.patch \
>>> +           file://ntop_init.patch \
>>> +           file://ntop_webInterface.patch \
>>> +           file://ntop_configure_in_net_snmp_config_exist.patch \
>>> +           file://ntop.service \
>>> +           file://use-static-inline.patch \
>>> +           file://0001-nDPI-Include-sys-types.h.patch \
>>> +          "
>>>  SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>>>  SRC_URI[sha256sum] =
>>> "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
>>> +
>>> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>>> +
>>> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>>> +
>>> +PACKAGECONFIG ??= "openssl snmp plugins"
>>> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>>> +PACKAGECONFIG[snmp] = "--enable-snmp=yes
>>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>>> +--disable-snmp,net-snmp,"
>>> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>>> +
>>> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>>> +
>>> +do_configure() {
>>> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>>> ${S}
>>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
>>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>>> ${S}/nDPI
>>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
>>> ${S}/nDPI
>>> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>>> +    cp 3rd_party/* ./
>>> +
>>> +    # config nDPI
>>> +    cd nDPI
>>> +    ./configure ${CONFIGUREOPTS} --with-pic
>>> +    cd ..
>>> +
>>> +    sed -i -e
>>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>>> ${S}/configure.in
>>> +
>>> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>>> +    sed -i \
>>> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>>> -I/opt/local/include":\1":' \
>>> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>>> -I/opt/local/include":\1":' \
>>> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>>> \
>>> +        ${S}/configure.in
>>> +
>>> +    # replace the DISTRO RELEASE in configure.in which are host's
>>> +    # with our release, although those doesn't affect functionality
>>> +    sed -i -e \
>>> +
>>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>>> \
>>> +        ${S}/configure.in
>>> +
>>> +    # osName in original configure.in should be ${TARGET_SYS}
>>> +    # which will show in ntop's "show configuration"
>>> +    sed -i -e \
>>> +        's:^osName=.*:osName=${TARGET_SYS}:' \
>>> +        ${S}/configure.in
>>> +
>>> +    # rename configureextra to configureextra_rename to avoid
>>> +    # configure.in to guess host OS and pull in more configure, non
>>> needed
>>> +    # which will cause some cross-compiling failure on specific host
>>> +    # e.g. SUSE(SLED...)
>>> +    test ! -f configureextra || mv -f configureextra
>>> configureextra_rename
>>> +
>>> +    # make sure configure finds python includdirs/libs with these envs
>>> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>>> +        STAGING_INCDIR=${STAGING_INCDIR} \
>>> +        STAGING_LIBDIR=${STAGING_LIBDIR}
>>> +
>>> +    autotools_do_configure
>>> +}
>>> +
>>> +do_compile_prepend() {
>>> +    cd nDPI
>>> +    oe_runmake
>>> +    cd ..
>>> +}
>>> +
>>> +do_install_append() {
>>> +    # remove the empty dirs
>>> +    rm -rf ${D}${libdir}/plugins
>>> +
>>> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>>> +        ${D}${sysconfdir}/init.d/ntop
>>> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>>> +        ${D}${sysconfdir}/ntop.conf
>>> +
>>> +    # change ntop dir in ntop.conf
>>> +    # don't use the -P as the ntop.init didn't support it
>>> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>>> /var/lib/ntop:" \
>>> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>>> +        ${D}${sysconfdir}/ntop.conf
>>> +
>>> +    # For systemd
>>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>>> 'false', d)}; then
>>> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>>> ${D}${libexecdir}/ntop-helper
>>> +        install -D -m 0644 ${WORKDIR}/ntop.service
>>> ${D}${systemd_system_unitdir}/ntop.service
>>> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>>> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>>> +            ${D}${systemd_system_unitdir}/ntop.service
>>> +    fi
>>> +
>>> +    # Fix host-user-contaminated issue
>>> +    chown -R root:root ${D}
>>> +
>>> +    chown -R ntop.ntop ${D}${datadir}/ntop
>>> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>>> +}
>>> +
>>> +USERADD_PACKAGES = "${PN}"
>>> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>>> +-s /usr/sbin/nologin -c 'ntop' ntop"
>>> +GROUPADD_PARAM_${PN} = "-r ntop"
>>> +
>>> +SYSTEMD_SERVICE_${PN} = "ntop.service"
>>> +SYSTEMD_AUTO_ENABLE = "disable"
>>> +
>>> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>>> +                      ${libdir}/libntopreport-*.so
>>> ${libdir}/lib*-${PV}.so"
>>> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>>> +                   ${libdir}/libntopreport.so \
>>> +                   ${libdir}/libnetflowPlugin.so
>>> ${libdir}/libsflowPlugin.so \
>>> +                   ${libdir}/librrdPlugin.so \
>>> +                   ${libdir}/*.a ${libdir}/libntopreport.a
>>> ${libdir}/*.la"
>>> +
>>> --
>>> 2.14.1
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>>
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-09-01 15:44     ` Khem Raj
@ 2017-09-02  6:48       ` Martin Jansa
  2017-09-02 15:45         ` Khem Raj
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jansa @ 2017-09-02  6:48 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 18809 bytes --]

On Fri, Sep 01, 2017 at 08:44:00AM -0700, Khem Raj wrote:
> On Fri, Sep 1, 2017 at 8:42 AM, Khem Raj <raj.khem@gmail.com> wrote:
> > On Fri, Sep 1, 2017 at 6:05 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> >> added .patch file fails to apply in master-next:
> >> http://errors.yoctoproject.org/Errors/Details/154751/
> >>
> >
> > I do see the ^M  line endings in the source. However, this patch works fine
> > with archlinux host here. Can you try to cherry-pick it directly from
> >
> > https://github.com/kraj/meta-openembedded/commit/42cd752bd366ccd40c8f302ac9dd0455511eab4e
> >
> > I wonder if its something to do with mailing lists + patchwork.
> >
> 
> oh and did you apply v2 ?
> https://patchwork.openembedded.org/patch/143411/

the ntop patch was indeed CR+LF issue, which patchwork doesn't respect, I've updated it from your branch, next
time you can use dos2unix.bbclass to make it a bit easier.

the iscsi patch in master-next was already v2.

> 
> >> On Thu, Aug 31, 2017 at 4:03 AM, Khem Raj <raj.khem@gmail.com> wrote:
> >>>
> >>> move away from .inc file, when its included in single recipe
> >>> helps with devtool workflow too.
> >>>
> >>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >>> ---
> >>>  meta-networking/recipes-support/ntop/ntop.inc      | 131
> >>> --------------------
> >>>  .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
> >>>  .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
> >>>  meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
> >>> ++++++++++++++++++++-
> >>>  4 files changed, 158 insertions(+), 160 deletions(-)
> >>>  delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
> >>>  create mode 100644
> >>> meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
> >>>  delete mode 100644
> >>> meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> >>>
> >>> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
> >>> b/meta-networking/recipes-support/ntop/ntop.inc
> >>> deleted file mode 100644
> >>> index b96433425..000000000
> >>> --- a/meta-networking/recipes-support/ntop/ntop.inc
> >>> +++ /dev/null
> >>> @@ -1,131 +0,0 @@
> >>> -SUMMARY = "ntop is network top"
> >>> -DESCRIPTION = "ntop is a network traffic probe that shows the network
> >>> usage, \
> >>> -similar to what the popular top Unix command does."
> >>> -
> >>> -SECTION = "console/network"
> >>> -
> >>> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> >>> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> >>> -
> >>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
> >>> -                   "
> >>> -
> >>> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> >>> -           file://ntop_configure_in.patch \
> >>> -           file://ntop_init.patch \
> >>> -           file://ntop_webInterface.patch \
> >>> -           file://ntop_configure_in_net_snmp_config_exist.patch \
> >>> -           file://ntop.service \
> >>> -           file://use-static-inline.patch \
> >>> -           file://support-arm64.patch \
> >>> -          "
> >>> -
> >>> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> >>> -
> >>> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> >>> -
> >>> -PACKAGECONFIG ??= "openssl snmp plugins"
> >>> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> >>> -PACKAGECONFIG[snmp] = "--enable-snmp=yes
> >>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
> >>> ---disable-snmp,net-snmp,"
> >>> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> >>> -
> >>> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> >>> -
> >>> -do_configure() {
> >>> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> >>> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> >>> -    cp 3rd_party/* ./
> >>> -
> >>> -    # config nDPI
> >>> -    cd nDPI
> >>> -    ./configure ${CONFIGUREOPTS} --with-pic
> >>> -    cd ..
> >>> -
> >>> -    sed -i -e
> >>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
> >>> ${S}/configure.in
> >>> -
> >>> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> >>> -    sed -i \
> >>> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
> >>> -I/opt/local/include":\1":' \
> >>> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
> >>> -I/opt/local/include":\1":' \
> >>> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
> >>> \
> >>> -        ${S}/configure.in
> >>> -
> >>> -    # replace the DISTRO RELEASE in configure.in which are host's
> >>> -    # with our release, although those doesn't affect functionality
> >>> -    sed -i -e \
> >>> -
> >>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
> >>> \
> >>> -        ${S}/configure.in
> >>> -
> >>> -    # osName in original configure.in should be ${TARGET_SYS}
> >>> -    # which will show in ntop's "show configuration"
> >>> -    sed -i -e \
> >>> -        's:^osName=.*:osName=${TARGET_SYS}:' \
> >>> -        ${S}/configure.in
> >>> -
> >>> -    # rename configureextra to configureextra_rename to avoid
> >>> -    # configure.in to guess host OS and pull in more configure, non
> >>> needed
> >>> -    # which will cause some cross-compiling failure on specific host
> >>> -    # e.g. SUSE(SLED...)
> >>> -    test ! -f configureextra || mv -f configureextra
> >>> configureextra_rename
> >>> -
> >>> -    # make sure configure finds python includdirs/libs with these envs
> >>> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> >>> -        STAGING_INCDIR=${STAGING_INCDIR} \
> >>> -        STAGING_LIBDIR=${STAGING_LIBDIR}
> >>> -
> >>> -    autotools_do_configure
> >>> -}
> >>> -
> >>> -do_compile_prepend() {
> >>> -    cd nDPI
> >>> -    oe_runmake
> >>> -    cd ..
> >>> -}
> >>> -
> >>> -do_install_append() {
> >>> -    # remove the empty dirs
> >>> -    rm -rf ${D}${libdir}/plugins
> >>> -
> >>> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> >>> -        ${D}${sysconfdir}/init.d/ntop
> >>> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> >>> -        ${D}${sysconfdir}/ntop.conf
> >>> -
> >>> -    # change ntop dir in ntop.conf
> >>> -    # don't use the -P as the ntop.init didn't support it
> >>> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
> >>> /var/lib/ntop:" \
> >>> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> >>> -        ${D}${sysconfdir}/ntop.conf
> >>> -
> >>> -    # For systemd
> >>> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> >>> 'false', d)}; then
> >>> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
> >>> ${D}${libexecdir}/ntop-helper
> >>> -        install -D -m 0644 ${WORKDIR}/ntop.service
> >>> ${D}${systemd_system_unitdir}/ntop.service
> >>> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> >>> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> >>> -            ${D}${systemd_system_unitdir}/ntop.service
> >>> -    fi
> >>> -
> >>> -    # Fix host-user-contaminated issue
> >>> -    chown -R root:root ${D}
> >>> -
> >>> -    chown -R ntop.ntop ${D}${datadir}/ntop
> >>> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> >>> -}
> >>> -
> >>> -USERADD_PACKAGES = "${PN}"
> >>> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> >>> --s /usr/sbin/nologin -c 'ntop' ntop"
> >>> -GROUPADD_PARAM_${PN} = "-r ntop"
> >>> -
> >>> -SYSTEMD_SERVICE_${PN} = "ntop.service"
> >>> -SYSTEMD_AUTO_ENABLE = "disable"
> >>> -
> >>> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> >>> -                      ${libdir}/libntopreport-*.so
> >>> ${libdir}/lib*-${PV}.so"
> >>> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> >>> -                   ${libdir}/libntopreport.so \
> >>> -                   ${libdir}/libnetflowPlugin.so
> >>> ${libdir}/libsflowPlugin.so \
> >>> -                   ${libdir}/librrdPlugin.so \
> >>> -                   ${libdir}/*.a ${libdir}/libntopreport.a
> >>> ${libdir}/*.la"
> >>> -
> >>> 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
> >>> new file mode 100644
> >>> index 000000000..3a6a76120
> >>> --- /dev/null
> >>> +++
> >>> b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
> >>> @@ -0,0 +1,24 @@
> >>> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
> >>> +From: Khem Raj <raj.khem@gmail.com>
> >>> +Date: Wed, 30 Aug 2017 13:56:24 -0700
> >>> +Subject: [PATCH] nDPI: Include sys/types.h
> >>> +
> >>> +Needed for uint_t types
> >>> +
> >>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >>> +---
> >>> + nDPI/src/include/ipq_api.h | 1 +
> >>> + 1 file changed, 1 insertion(+)
> >>> +
> >>> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
> >>> +===================================================================
> >>> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
> >>> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
> >>> +@@ -24,6 +24,7 @@
> >>> + #ifndef __IPOQUE_API_INCLUDE_FILE__
> >>> + #define __IPOQUE_API_INCLUDE_FILE__
> >>> +
> >>> ++#include <sys/types.h>
> >>> +
> >>> + #if defined(HAVE_NTOP) && defined(WIN32)
> >>> + #include <winsock2.h>
> >>> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> >>> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> >>> deleted file mode 100644
> >>> index 0b1e8afbc..000000000
> >>> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
> >>> +++ /dev/null
> >>> @@ -1,28 +0,0 @@
> >>> -Add support for arm64
> >>> -
> >>> -Upstream-Status: Inappropriate [no longer maintained]
> >>> -
> >>> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
> >>> -
> >>> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
> >>> -index c2d1257..e4347ac 100755
> >>> ---- a/nDPI/config.sub.old
> >>> -+++ b/nDPI/config.sub
> >>> -@@ -249,7 +249,7 @@ case $basic_machine in
> >>> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67]
> >>> \
> >>> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
> >>> alpha64pca5[67] \
> >>> -       | am33_2.0 \
> >>> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
> >>> avr | avr32 \
> >>> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
> >>> avr | avr32 | aarch64 \
> >>> -       | bfin \
> >>> -       | c4x | clipper \
> >>> -       | d10v | d30v | dlx | dsp16xx \
> >>> -@@ -331,7 +331,7 @@ case $basic_machine in
> >>> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
> >>> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-*
> >>> \
> >>> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
> >>> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
> >>> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
> >>> -       | avr-* | avr32-* \
> >>> -       | bfin-* | bs2000-* \
> >>> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
> >>> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> >>> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> >>> index 77b5e436f..298fbec61 100644
> >>> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> >>> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
> >>> @@ -1,4 +1,137 @@
> >>> -include ntop.inc
> >>> +SUMMARY = "ntop is network top"
> >>> +DESCRIPTION = "ntop is a network traffic probe that shows the network
> >>> usage, \
> >>> +similar to what the popular top Unix command does."
> >>>
> >>> +SECTION = "console/network"
> >>> +
> >>> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
> >>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> >>> +
> >>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
> >>> +                   "
> >>> +
> >>> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
> >>> +           file://ntop_configure_in.patch \
> >>> +           file://ntop_init.patch \
> >>> +           file://ntop_webInterface.patch \
> >>> +           file://ntop_configure_in_net_snmp_config_exist.patch \
> >>> +           file://ntop.service \
> >>> +           file://use-static-inline.patch \
> >>> +           file://0001-nDPI-Include-sys-types.h.patch \
> >>> +          "
> >>>  SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
> >>>  SRC_URI[sha256sum] =
> >>> "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
> >>> +
> >>> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
> >>> +
> >>> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
> >>> +
> >>> +PACKAGECONFIG ??= "openssl snmp plugins"
> >>> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
> >>> +PACKAGECONFIG[snmp] = "--enable-snmp=yes
> >>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
> >>> +--disable-snmp,net-snmp,"
> >>> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
> >>> +
> >>> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
> >>> +
> >>> +do_configure() {
> >>> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
> >>> ${S}
> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
> >>> ${S}/nDPI
> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
> >>> ${S}/nDPI
> >>> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
> >>> +    cp 3rd_party/* ./
> >>> +
> >>> +    # config nDPI
> >>> +    cd nDPI
> >>> +    ./configure ${CONFIGUREOPTS} --with-pic
> >>> +    cd ..
> >>> +
> >>> +    sed -i -e
> >>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
> >>> ${S}/configure.in
> >>> +
> >>> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
> >>> +    sed -i \
> >>> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
> >>> -I/opt/local/include":\1":' \
> >>> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
> >>> -I/opt/local/include":\1":' \
> >>> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
> >>> \
> >>> +        ${S}/configure.in
> >>> +
> >>> +    # replace the DISTRO RELEASE in configure.in which are host's
> >>> +    # with our release, although those doesn't affect functionality
> >>> +    sed -i -e \
> >>> +
> >>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
> >>> \
> >>> +        ${S}/configure.in
> >>> +
> >>> +    # osName in original configure.in should be ${TARGET_SYS}
> >>> +    # which will show in ntop's "show configuration"
> >>> +    sed -i -e \
> >>> +        's:^osName=.*:osName=${TARGET_SYS}:' \
> >>> +        ${S}/configure.in
> >>> +
> >>> +    # rename configureextra to configureextra_rename to avoid
> >>> +    # configure.in to guess host OS and pull in more configure, non
> >>> needed
> >>> +    # which will cause some cross-compiling failure on specific host
> >>> +    # e.g. SUSE(SLED...)
> >>> +    test ! -f configureextra || mv -f configureextra
> >>> configureextra_rename
> >>> +
> >>> +    # make sure configure finds python includdirs/libs with these envs
> >>> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> >>> +        STAGING_INCDIR=${STAGING_INCDIR} \
> >>> +        STAGING_LIBDIR=${STAGING_LIBDIR}
> >>> +
> >>> +    autotools_do_configure
> >>> +}
> >>> +
> >>> +do_compile_prepend() {
> >>> +    cd nDPI
> >>> +    oe_runmake
> >>> +    cd ..
> >>> +}
> >>> +
> >>> +do_install_append() {
> >>> +    # remove the empty dirs
> >>> +    rm -rf ${D}${libdir}/plugins
> >>> +
> >>> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
> >>> +        ${D}${sysconfdir}/init.d/ntop
> >>> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
> >>> +        ${D}${sysconfdir}/ntop.conf
> >>> +
> >>> +    # change ntop dir in ntop.conf
> >>> +    # don't use the -P as the ntop.init didn't support it
> >>> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
> >>> /var/lib/ntop:" \
> >>> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
> >>> +        ${D}${sysconfdir}/ntop.conf
> >>> +
> >>> +    # For systemd
> >>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> >>> 'false', d)}; then
> >>> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
> >>> ${D}${libexecdir}/ntop-helper
> >>> +        install -D -m 0644 ${WORKDIR}/ntop.service
> >>> ${D}${systemd_system_unitdir}/ntop.service
> >>> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
> >>> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> >>> +            ${D}${systemd_system_unitdir}/ntop.service
> >>> +    fi
> >>> +
> >>> +    # Fix host-user-contaminated issue
> >>> +    chown -R root:root ${D}
> >>> +
> >>> +    chown -R ntop.ntop ${D}${datadir}/ntop
> >>> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
> >>> +}
> >>> +
> >>> +USERADD_PACKAGES = "${PN}"
> >>> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
> >>> +-s /usr/sbin/nologin -c 'ntop' ntop"
> >>> +GROUPADD_PARAM_${PN} = "-r ntop"
> >>> +
> >>> +SYSTEMD_SERVICE_${PN} = "ntop.service"
> >>> +SYSTEMD_AUTO_ENABLE = "disable"
> >>> +
> >>> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
> >>> +                      ${libdir}/libntopreport-*.so
> >>> ${libdir}/lib*-${PV}.so"
> >>> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
> >>> +                   ${libdir}/libntopreport.so \
> >>> +                   ${libdir}/libnetflowPlugin.so
> >>> ${libdir}/libsflowPlugin.so \
> >>> +                   ${libdir}/librrdPlugin.so \
> >>> +                   ${libdir}/*.a ${libdir}/libntopreport.a
> >>> ${libdir}/*.la"
> >>> +
> >>> --
> >>> 2.14.1
> >>>
> >>> --
> >>> _______________________________________________
> >>> Openembedded-devel mailing list
> >>> Openembedded-devel@lists.openembedded.org
> >>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >>
> >>

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [meta-networking][PATCH 1/4] ntop: Fix build with musl
  2017-09-02  6:48       ` Martin Jansa
@ 2017-09-02 15:45         ` Khem Raj
  0 siblings, 0 replies; 13+ messages in thread
From: Khem Raj @ 2017-09-02 15:45 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Fri, Sep 1, 2017 at 11:48 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Fri, Sep 01, 2017 at 08:44:00AM -0700, Khem Raj wrote:
>> On Fri, Sep 1, 2017 at 8:42 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> > On Fri, Sep 1, 2017 at 6:05 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> >> added .patch file fails to apply in master-next:
>> >> http://errors.yoctoproject.org/Errors/Details/154751/
>> >>
>> >
>> > I do see the ^M  line endings in the source. However, this patch works fine
>> > with archlinux host here. Can you try to cherry-pick it directly from
>> >
>> > https://github.com/kraj/meta-openembedded/commit/42cd752bd366ccd40c8f302ac9dd0455511eab4e
>> >
>> > I wonder if its something to do with mailing lists + patchwork.
>> >
>>
>> oh and did you apply v2 ?
>> https://patchwork.openembedded.org/patch/143411/
>
> the ntop patch was indeed CR+LF issue, which patchwork doesn't respect, I've updated it from your branch, next
> time you can use dos2unix.bbclass to make it a bit easier.

thats right. on a tangential note this class is useful in general and
should be in oe-core IMO

>
> the iscsi patch in master-next was already v2.
>
>>
>> >> On Thu, Aug 31, 2017 at 4:03 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> >>>
>> >>> move away from .inc file, when its included in single recipe
>> >>> helps with devtool workflow too.
>> >>>
>> >>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >>> ---
>> >>>  meta-networking/recipes-support/ntop/ntop.inc      | 131
>> >>> --------------------
>> >>>  .../ntop/ntop/0001-nDPI-Include-sys-types.h.patch  |  24 ++++
>> >>>  .../recipes-support/ntop/ntop/support-arm64.patch  |  28 -----
>> >>>  meta-networking/recipes-support/ntop/ntop_5.0.1.bb | 135
>> >>> ++++++++++++++++++++-
>> >>>  4 files changed, 158 insertions(+), 160 deletions(-)
>> >>>  delete mode 100644 meta-networking/recipes-support/ntop/ntop.inc
>> >>>  create mode 100644
>> >>> meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>> >>>  delete mode 100644
>> >>> meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> >>>
>> >>> diff --git a/meta-networking/recipes-support/ntop/ntop.inc
>> >>> b/meta-networking/recipes-support/ntop/ntop.inc
>> >>> deleted file mode 100644
>> >>> index b96433425..000000000
>> >>> --- a/meta-networking/recipes-support/ntop/ntop.inc
>> >>> +++ /dev/null
>> >>> @@ -1,131 +0,0 @@
>> >>> -SUMMARY = "ntop is network top"
>> >>> -DESCRIPTION = "ntop is a network traffic probe that shows the network
>> >>> usage, \
>> >>> -similar to what the popular top Unix command does."
>> >>> -
>> >>> -SECTION = "console/network"
>> >>> -
>> >>> -LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> >>> -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> >>> -
>> >>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> >>> -                   "
>> >>> -
>> >>> -SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> >>> -           file://ntop_configure_in.patch \
>> >>> -           file://ntop_init.patch \
>> >>> -           file://ntop_webInterface.patch \
>> >>> -           file://ntop_configure_in_net_snmp_config_exist.patch \
>> >>> -           file://ntop.service \
>> >>> -           file://use-static-inline.patch \
>> >>> -           file://support-arm64.patch \
>> >>> -          "
>> >>> -
>> >>> -inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> >>> -
>> >>> -DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> >>> -
>> >>> -PACKAGECONFIG ??= "openssl snmp plugins"
>> >>> -PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> >>> -PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> >>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> >>> ---disable-snmp,net-snmp,"
>> >>> -PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> >>> -
>> >>> -EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> >>> -
>> >>> -do_configure() {
>> >>> -    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> >>> -    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> >>> -    cp 3rd_party/* ./
>> >>> -
>> >>> -    # config nDPI
>> >>> -    cd nDPI
>> >>> -    ./configure ${CONFIGUREOPTS} --with-pic
>> >>> -    cd ..
>> >>> -
>> >>> -    sed -i -e
>> >>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> >>> ${S}/configure.in
>> >>> -
>> >>> -    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> >>> -    sed -i \
>> >>> -        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> >>> -I/opt/local/include":\1":' \
>> >>> -        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> >>> -I/opt/local/include":\1":' \
>> >>> -        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> >>> \
>> >>> -        ${S}/configure.in
>> >>> -
>> >>> -    # replace the DISTRO RELEASE in configure.in which are host's
>> >>> -    # with our release, although those doesn't affect functionality
>> >>> -    sed -i -e \
>> >>> -
>> >>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> >>> \
>> >>> -        ${S}/configure.in
>> >>> -
>> >>> -    # osName in original configure.in should be ${TARGET_SYS}
>> >>> -    # which will show in ntop's "show configuration"
>> >>> -    sed -i -e \
>> >>> -        's:^osName=.*:osName=${TARGET_SYS}:' \
>> >>> -        ${S}/configure.in
>> >>> -
>> >>> -    # rename configureextra to configureextra_rename to avoid
>> >>> -    # configure.in to guess host OS and pull in more configure, non
>> >>> needed
>> >>> -    # which will cause some cross-compiling failure on specific host
>> >>> -    # e.g. SUSE(SLED...)
>> >>> -    test ! -f configureextra || mv -f configureextra
>> >>> configureextra_rename
>> >>> -
>> >>> -    # make sure configure finds python includdirs/libs with these envs
>> >>> -    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> >>> -        STAGING_INCDIR=${STAGING_INCDIR} \
>> >>> -        STAGING_LIBDIR=${STAGING_LIBDIR}
>> >>> -
>> >>> -    autotools_do_configure
>> >>> -}
>> >>> -
>> >>> -do_compile_prepend() {
>> >>> -    cd nDPI
>> >>> -    oe_runmake
>> >>> -    cd ..
>> >>> -}
>> >>> -
>> >>> -do_install_append() {
>> >>> -    # remove the empty dirs
>> >>> -    rm -rf ${D}${libdir}/plugins
>> >>> -
>> >>> -    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> >>> -        ${D}${sysconfdir}/init.d/ntop
>> >>> -    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> >>> -        ${D}${sysconfdir}/ntop.conf
>> >>> -
>> >>> -    # change ntop dir in ntop.conf
>> >>> -    # don't use the -P as the ntop.init didn't support it
>> >>> -    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> >>> /var/lib/ntop:" \
>> >>> -        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> >>> -        ${D}${sysconfdir}/ntop.conf
>> >>> -
>> >>> -    # For systemd
>> >>> -    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> >>> 'false', d)}; then
>> >>> -        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> >>> ${D}${libexecdir}/ntop-helper
>> >>> -        install -D -m 0644 ${WORKDIR}/ntop.service
>> >>> ${D}${systemd_system_unitdir}/ntop.service
>> >>> -        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> >>> -            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> >>> -            ${D}${systemd_system_unitdir}/ntop.service
>> >>> -    fi
>> >>> -
>> >>> -    # Fix host-user-contaminated issue
>> >>> -    chown -R root:root ${D}
>> >>> -
>> >>> -    chown -R ntop.ntop ${D}${datadir}/ntop
>> >>> -    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> >>> -}
>> >>> -
>> >>> -USERADD_PACKAGES = "${PN}"
>> >>> -USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> >>> --s /usr/sbin/nologin -c 'ntop' ntop"
>> >>> -GROUPADD_PARAM_${PN} = "-r ntop"
>> >>> -
>> >>> -SYSTEMD_SERVICE_${PN} = "ntop.service"
>> >>> -SYSTEMD_AUTO_ENABLE = "disable"
>> >>> -
>> >>> -FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> >>> -                      ${libdir}/libntopreport-*.so
>> >>> ${libdir}/lib*-${PV}.so"
>> >>> -FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> >>> -                   ${libdir}/libntopreport.so \
>> >>> -                   ${libdir}/libnetflowPlugin.so
>> >>> ${libdir}/libsflowPlugin.so \
>> >>> -                   ${libdir}/librrdPlugin.so \
>> >>> -                   ${libdir}/*.a ${libdir}/libntopreport.a
>> >>> ${libdir}/*.la"
>> >>> -
>> >>> 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
>> >>> new file mode 100644
>> >>> index 000000000..3a6a76120
>> >>> --- /dev/null
>> >>> +++
>> >>> b/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
>> >>> @@ -0,0 +1,24 @@
>> >>> +From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
>> >>> +From: Khem Raj <raj.khem@gmail.com>
>> >>> +Date: Wed, 30 Aug 2017 13:56:24 -0700
>> >>> +Subject: [PATCH] nDPI: Include sys/types.h
>> >>> +
>> >>> +Needed for uint_t types
>> >>> +
>> >>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >>> +---
>> >>> + nDPI/src/include/ipq_api.h | 1 +
>> >>> + 1 file changed, 1 insertion(+)
>> >>> +
>> >>> +Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
>> >>> +===================================================================
>> >>> +--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
>> >>> ++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
>> >>> +@@ -24,6 +24,7 @@
>> >>> + #ifndef __IPOQUE_API_INCLUDE_FILE__
>> >>> + #define __IPOQUE_API_INCLUDE_FILE__
>> >>> +
>> >>> ++#include <sys/types.h>
>> >>> +
>> >>> + #if defined(HAVE_NTOP) && defined(WIN32)
>> >>> + #include <winsock2.h>
>> >>> diff --git a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> >>> b/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> >>> deleted file mode 100644
>> >>> index 0b1e8afbc..000000000
>> >>> --- a/meta-networking/recipes-support/ntop/ntop/support-arm64.patch
>> >>> +++ /dev/null
>> >>> @@ -1,28 +0,0 @@
>> >>> -Add support for arm64
>> >>> -
>> >>> -Upstream-Status: Inappropriate [no longer maintained]
>> >>> -
>> >>> -Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
>> >>> -
>> >>> -diff --git a/nDPI/config.sub.old b/nDPI/config.sub
>> >>> -index c2d1257..e4347ac 100755
>> >>> ---- a/nDPI/config.sub.old
>> >>> -+++ b/nDPI/config.sub
>> >>> -@@ -249,7 +249,7 @@ case $basic_machine in
>> >>> -       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67]
>> >>> \
>> >>> -       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
>> >>> alpha64pca5[67] \
>> >>> -       | am33_2.0 \
>> >>> --      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> >>> avr | avr32 \
>> >>> -+      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] |
>> >>> avr | avr32 | aarch64 \
>> >>> -       | bfin \
>> >>> -       | c4x | clipper \
>> >>> -       | d10v | d30v | dlx | dsp16xx \
>> >>> -@@ -331,7 +331,7 @@ case $basic_machine in
>> >>> -       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
>> >>> -       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-*
>> >>> \
>> >>> -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
>> >>> --      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
>> >>> -+      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
>> >>> -       | avr-* | avr32-* \
>> >>> -       | bfin-* | bs2000-* \
>> >>> -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
>> >>> diff --git a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> >>> b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> >>> index 77b5e436f..298fbec61 100644
>> >>> --- a/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> >>> +++ b/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
>> >>> @@ -1,4 +1,137 @@
>> >>> -include ntop.inc
>> >>> +SUMMARY = "ntop is network top"
>> >>> +DESCRIPTION = "ntop is a network traffic probe that shows the network
>> >>> usage, \
>> >>> +similar to what the popular top Unix command does."
>> >>>
>> >>> +SECTION = "console/network"
>> >>> +
>> >>> +LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
>> >>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>> >>> +
>> >>> file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
>> >>> +                   "
>> >>> +
>> >>> +SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
>> >>> +           file://ntop_configure_in.patch \
>> >>> +           file://ntop_init.patch \
>> >>> +           file://ntop_webInterface.patch \
>> >>> +           file://ntop_configure_in_net_snmp_config_exist.patch \
>> >>> +           file://ntop.service \
>> >>> +           file://use-static-inline.patch \
>> >>> +           file://0001-nDPI-Include-sys-types.h.patch \
>> >>> +          "
>> >>>  SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
>> >>>  SRC_URI[sha256sum] =
>> >>> "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
>> >>> +
>> >>> +inherit autotools-brokensep useradd pythonnative pkgconfig systemd
>> >>> +
>> >>> +DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
>> >>> +
>> >>> +PACKAGECONFIG ??= "openssl snmp plugins"
>> >>> +PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
>> >>> +PACKAGECONFIG[snmp] = "--enable-snmp=yes
>> >>> NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
>> >>> +--disable-snmp,net-snmp,"
>> >>> +PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
>> >>> +
>> >>> +EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
>> >>> +
>> >>> +do_configure() {
>> >>> +    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
>> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> >>> ${S}
>> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
>> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess
>> >>> ${S}/nDPI
>> >>> +    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub
>> >>> ${S}/nDPI
>> >>> +    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
>> >>> +    cp 3rd_party/* ./
>> >>> +
>> >>> +    # config nDPI
>> >>> +    cd nDPI
>> >>> +    ./configure ${CONFIGUREOPTS} --with-pic
>> >>> +    cd ..
>> >>> +
>> >>> +    sed -i -e
>> >>> 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:'
>> >>> ${S}/configure.in
>> >>> +
>> >>> +    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
>> >>> +    sed -i \
>> >>> +        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include
>> >>> -I/opt/local/include":\1":' \
>> >>> +        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include
>> >>> -I/opt/local/include":\1":' \
>> >>> +        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":'
>> >>> \
>> >>> +        ${S}/configure.in
>> >>> +
>> >>> +    # replace the DISTRO RELEASE in configure.in which are host's
>> >>> +    # with our release, although those doesn't affect functionality
>> >>> +    sed -i -e \
>> >>> +
>> >>> '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}'
>> >>> \
>> >>> +        ${S}/configure.in
>> >>> +
>> >>> +    # osName in original configure.in should be ${TARGET_SYS}
>> >>> +    # which will show in ntop's "show configuration"
>> >>> +    sed -i -e \
>> >>> +        's:^osName=.*:osName=${TARGET_SYS}:' \
>> >>> +        ${S}/configure.in
>> >>> +
>> >>> +    # rename configureextra to configureextra_rename to avoid
>> >>> +    # configure.in to guess host OS and pull in more configure, non
>> >>> needed
>> >>> +    # which will cause some cross-compiling failure on specific host
>> >>> +    # e.g. SUSE(SLED...)
>> >>> +    test ! -f configureextra || mv -f configureextra
>> >>> configureextra_rename
>> >>> +
>> >>> +    # make sure configure finds python includdirs/libs with these envs
>> >>> +    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>> >>> +        STAGING_INCDIR=${STAGING_INCDIR} \
>> >>> +        STAGING_LIBDIR=${STAGING_LIBDIR}
>> >>> +
>> >>> +    autotools_do_configure
>> >>> +}
>> >>> +
>> >>> +do_compile_prepend() {
>> >>> +    cd nDPI
>> >>> +    oe_runmake
>> >>> +    cd ..
>> >>> +}
>> >>> +
>> >>> +do_install_append() {
>> >>> +    # remove the empty dirs
>> >>> +    rm -rf ${D}${libdir}/plugins
>> >>> +
>> >>> +    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
>> >>> +        ${D}${sysconfdir}/init.d/ntop
>> >>> +    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
>> >>> +        ${D}${sysconfdir}/ntop.conf
>> >>> +
>> >>> +    # change ntop dir in ntop.conf
>> >>> +    # don't use the -P as the ntop.init didn't support it
>> >>> +    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path
>> >>> /var/lib/ntop:" \
>> >>> +        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
>> >>> +        ${D}${sysconfdir}/ntop.conf
>> >>> +
>> >>> +    # For systemd
>> >>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> >>> 'false', d)}; then
>> >>> +        install -D -m 0755 ${S}/packages/RedHat/ntop.init
>> >>> ${D}${libexecdir}/ntop-helper
>> >>> +        install -D -m 0644 ${WORKDIR}/ntop.service
>> >>> ${D}${systemd_system_unitdir}/ntop.service
>> >>> +        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
>> >>> +            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
>> >>> +            ${D}${systemd_system_unitdir}/ntop.service
>> >>> +    fi
>> >>> +
>> >>> +    # Fix host-user-contaminated issue
>> >>> +    chown -R root:root ${D}
>> >>> +
>> >>> +    chown -R ntop.ntop ${D}${datadir}/ntop
>> >>> +    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
>> >>> +}
>> >>> +
>> >>> +USERADD_PACKAGES = "${PN}"
>> >>> +USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
>> >>> +-s /usr/sbin/nologin -c 'ntop' ntop"
>> >>> +GROUPADD_PARAM_${PN} = "-r ntop"
>> >>> +
>> >>> +SYSTEMD_SERVICE_${PN} = "ntop.service"
>> >>> +SYSTEMD_AUTO_ENABLE = "disable"
>> >>> +
>> >>> +FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
>> >>> +                      ${libdir}/libntopreport-*.so
>> >>> ${libdir}/lib*-${PV}.so"
>> >>> +FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
>> >>> +                   ${libdir}/libntopreport.so \
>> >>> +                   ${libdir}/libnetflowPlugin.so
>> >>> ${libdir}/libsflowPlugin.so \
>> >>> +                   ${libdir}/librrdPlugin.so \
>> >>> +                   ${libdir}/*.a ${libdir}/libntopreport.a
>> >>> ${libdir}/*.la"
>> >>> +
>> >>> --
>> >>> 2.14.1
>> >>>
>> >>> --
>> >>> _______________________________________________
>> >>> Openembedded-devel mailing list
>> >>> Openembedded-devel@lists.openembedded.org
>> >>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>> >>
>> >>
>
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-09-02 15:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31  2:03 [meta-networking][PATCH 1/4] ntop: Fix build with musl Khem Raj
2017-08-31  2:03 ` [meta-oe][PATCH 2/4] corosync: " Khem Raj
2017-08-31  2:04 ` [meta-networking][PATCH 3/4] netkit-rwho: " Khem Raj
2017-08-31 21:49   ` akuster808
2017-08-31  2:04 ` [meta-networking][PATCH 4/4] netkit-tftp: " Khem Raj
2017-08-31 21:50   ` akuster808
2017-08-31 21:51 ` [meta-networking][PATCH 1/4] ntop: " akuster808
2017-08-31 22:59   ` Khem Raj
2017-09-01 13:05 ` Martin Jansa
2017-09-01 15:42   ` Khem Raj
2017-09-01 15:44     ` Khem Raj
2017-09-02  6:48       ` Martin Jansa
2017-09-02 15:45         ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.