mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-02 17:12:39 +00:00
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>
This commit is contained in:
parent
27f425bf2c
commit
3491e03931
@ -29,3 +29,7 @@ SRC_URI[md5sum] = "2cd6da422a72c129c685fc4bb848c24c"
|
|||||||
SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb"
|
SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb"
|
||||||
|
|
||||||
inherit autotools
|
inherit autotools
|
||||||
|
|
||||||
|
DISABLE_STATIC = ""
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native"
|
||||||
|
|||||||
@ -13,3 +13,4 @@ inherit autotools
|
|||||||
|
|
||||||
acpaths = "-I ./config/"
|
acpaths = "-I ./config/"
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native"
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
Upstream-Status: Inappropriate [embedded specific]
|
||||||
|
|
||||||
|
When enable static daq for snort, it calls to daq-modules-config to get link
|
||||||
|
library and library path. Library path is useless for oe and cause host
|
||||||
|
contamination issue. So filter it.
|
||||||
|
|
||||||
|
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||||
|
---
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index fded45b..a247bb9 100644
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -658,7 +658,7 @@ fi
|
||||||
|
|
||||||
|
if test "x$enable_static_daq" = "xyes"; then
|
||||||
|
LDAQ=""
|
||||||
|
- LIBS="${LIBS} `daq-modules-config --static --libs`"
|
||||||
|
+ LIBS="${LIBS} `daq-modules-config --static --libs | sed 's#-L[^ ]*##g'`"
|
||||||
|
AC_CHECK_LIB([daq_static], [daq_load_modules],
|
||||||
|
[LIBS="-ldaq_static ${LIBS}"], [LDAQ="no"], [ ])
|
||||||
|
|
||||||
@ -4,7 +4,7 @@ SECTION = "net"
|
|||||||
LICENSE = "GPL-2.0"
|
LICENSE = "GPL-2.0"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5"
|
||||||
|
|
||||||
DEPENDS = "xz libpcap libpcre daq libdnet util-linux"
|
DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native"
|
||||||
DEPENDS_append_libc-musl = " libtirpc"
|
DEPENDS_append_libc-musl = " libtirpc"
|
||||||
|
|
||||||
SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \
|
SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \
|
||||||
@ -15,6 +15,7 @@ SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \
|
|||||||
file://disable-daq-verdict-retry.patch \
|
file://disable-daq-verdict-retry.patch \
|
||||||
file://0001-libpcap-search-sysroot-for-headers.patch \
|
file://0001-libpcap-search-sysroot-for-headers.patch \
|
||||||
file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \
|
file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \
|
||||||
|
file://fix-host-contamination-when-enable-static-daq.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202"
|
SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202"
|
||||||
@ -31,7 +32,7 @@ EXTRA_OECONF = " \
|
|||||||
--enable-reload \
|
--enable-reload \
|
||||||
--enable-reload-error-restart \
|
--enable-reload-error-restart \
|
||||||
--enable-targetbased \
|
--enable-targetbased \
|
||||||
--disable-static-daq \
|
--enable-static-daq \
|
||||||
--with-dnet-includes=${STAGING_INCDIR} \
|
--with-dnet-includes=${STAGING_INCDIR} \
|
||||||
--with-dnet-libraries=${STAGING_LIBDIR} \
|
--with-dnet-libraries=${STAGING_LIBDIR} \
|
||||||
--with-libpcre-includes=${STAGING_INCDIR} \
|
--with-libpcre-includes=${STAGING_INCDIR} \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user