diff options
author | Kai Kang <kai.kang@windriver.com> | 2017-05-24 17:38:53 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-06-28 10:26:16 -0400 |
commit | 3491e039312e69907ab841948108f1f33a4eb956 (patch) | |
tree | 440843810e03152797b2e5dedf8fbf0567f538e1 | |
parent | 27f425bf2c57bdc9e0cd090eeb9d23a7e787ceb1 (diff) | |
download | meta-openembedded-3491e039312e69907ab841948108f1f33a4eb956.tar.gz |
snort: enable static daq
When start snort, it shows error and quit:
| --== Initializing Snort ==--
| Initializing Output Plugins!
| ERROR: Can't find pcap DAQ!
| Fatal Error, Quitting..
Fix by enable static daq for snort and enable static build for daq. snort calls
command daq-modules-config which is from daq-native to get required daq static
libraries and library path. Add package daq-native and add patch for snort to
filter library path out to avoid host contamination issue.
Add daq-native's dependency libnet-native too. And daq-native also depends on
libpcap-native from layer oe-core.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
4 files changed, 29 insertions, 2 deletions
diff --git a/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb index 47cb163e6f..ec35175a08 100644 --- a/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb +++ b/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb | |||
@@ -29,3 +29,7 @@ SRC_URI[md5sum] = "2cd6da422a72c129c685fc4bb848c24c" | |||
29 | SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb" | 29 | SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb" |
30 | 30 | ||
31 | inherit autotools | 31 | inherit autotools |
32 | |||
33 | DISABLE_STATIC = "" | ||
34 | |||
35 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb index f48b6553b0..e579de5074 100644 --- a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb +++ b/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb | |||
@@ -13,3 +13,4 @@ inherit autotools | |||
13 | 13 | ||
14 | acpaths = "-I ./config/" | 14 | acpaths = "-I ./config/" |
15 | 15 | ||
16 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch new file mode 100644 index 0000000000..2becc06244 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | When enable static daq for snort, it calls to daq-modules-config to get link | ||
4 | library and library path. Library path is useless for oe and cause host | ||
5 | contamination issue. So filter it. | ||
6 | |||
7 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
8 | --- | ||
9 | diff --git a/configure.in b/configure.in | ||
10 | index fded45b..a247bb9 100644 | ||
11 | --- a/configure.in | ||
12 | +++ b/configure.in | ||
13 | @@ -658,7 +658,7 @@ fi | ||
14 | |||
15 | if test "x$enable_static_daq" = "xyes"; then | ||
16 | LDAQ="" | ||
17 | - LIBS="${LIBS} `daq-modules-config --static --libs`" | ||
18 | + LIBS="${LIBS} `daq-modules-config --static --libs | sed 's#-L[^ ]*##g'`" | ||
19 | AC_CHECK_LIB([daq_static], [daq_load_modules], | ||
20 | [LIBS="-ldaq_static ${LIBS}"], [LDAQ="no"], [ ]) | ||
21 | |||
diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb index 57a04f2e73..e189b0f56d 100644 --- a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb +++ b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb | |||
@@ -4,7 +4,7 @@ SECTION = "net" | |||
4 | LICENSE = "GPL-2.0" | 4 | LICENSE = "GPL-2.0" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" |
6 | 6 | ||
7 | DEPENDS = "xz libpcap libpcre daq libdnet util-linux" | 7 | DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native" |
8 | DEPENDS_append_libc-musl = " libtirpc" | 8 | DEPENDS_append_libc-musl = " libtirpc" |
9 | 9 | ||
10 | SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \ | 10 | SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \ |
@@ -15,6 +15,7 @@ SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \ | |||
15 | file://disable-daq-verdict-retry.patch \ | 15 | file://disable-daq-verdict-retry.patch \ |
16 | file://0001-libpcap-search-sysroot-for-headers.patch \ | 16 | file://0001-libpcap-search-sysroot-for-headers.patch \ |
17 | file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \ | 17 | file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \ |
18 | file://fix-host-contamination-when-enable-static-daq.patch \ | ||
18 | " | 19 | " |
19 | 20 | ||
20 | SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202" | 21 | SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202" |
@@ -31,7 +32,7 @@ EXTRA_OECONF = " \ | |||
31 | --enable-reload \ | 32 | --enable-reload \ |
32 | --enable-reload-error-restart \ | 33 | --enable-reload-error-restart \ |
33 | --enable-targetbased \ | 34 | --enable-targetbased \ |
34 | --disable-static-daq \ | 35 | --enable-static-daq \ |
35 | --with-dnet-includes=${STAGING_INCDIR} \ | 36 | --with-dnet-includes=${STAGING_INCDIR} \ |
36 | --with-dnet-libraries=${STAGING_LIBDIR} \ | 37 | --with-dnet-libraries=${STAGING_LIBDIR} \ |
37 | --with-libpcre-includes=${STAGING_INCDIR} \ | 38 | --with-libpcre-includes=${STAGING_INCDIR} \ |