diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort')
4 files changed, 91 insertions, 28 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch new file mode 100644 index 00000000..87fd05bf --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch @@ -0,0 +1,60 @@ +From 65463a7c5cb2514b1523a81911810effffb75a79 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Fri, 28 Jun 2019 15:05:31 +0800 +Subject: [PATCH] configure.in: disable tirpc checking for fedora + +The Fedora 28+ does not have inbuilt SunRPC support in glibc and is +separately availble in tirpc package. So it enables tirpc checking for +fedora in configure. + +Drop this piece of code since we had specify '-ltirpc' in LDFLAGS +explicitly. Otherwise it will cause a compile-host-path QA issue if the +host is Fedora 28+: +cc1: warning: include location "/usr/include/tirpc" is unsafe for +cross-compilation [-Wpoison-system-directories] + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + configure.in | 24 ------------------------ + 1 file changed, 24 deletions(-) + +diff --git a/configure.in b/configure.in +index 8662cdd..0ff7e27 100644 +--- a/configure.in ++++ b/configure.in +@@ -895,30 +895,6 @@ if test "x$enable_dlclose" = "xno"; then + AC_DEFINE([DISABLE_DLCLOSE_FOR_VALGRIND_TESTING],[1],[Don't close opened shared objects for valgrind leak testing of dynamic libraries]) + fi + +-################################################## +-# Fedora 28+ does not have inbuilt SunRPC support# +-# in glibc and is separately availble in tirpc # +-# package. Make sure we've got the library and # +-# link it # +-################################################## +- +-if test -f /etc/fedora-release ; then +- DISTRO_VERSION=$(awk '{ print $3 }' /etc/fedora-release) +- if test $DISTRO_VERSION -ge 28 ; then +- TIRPC="" +- AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no") +- echo "$TIRPC" +- if test "x$TIRPC" = "xno"; then +- echo +- echo " ERROR! tirpc not found, get it by running " +- echo " yum install libtirpc-devel " +- exit +- fi +- LIBS="${LIBS} -ltirpc" +- extra_incl="-I/usr/include/tirpc" +- fi +-fi +- + Z_LIB="" + AC_CHECK_HEADERS(zlib.h,, Z_LIB="no") + if test "x$Z_LIB" = "xno"; then +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch index 037962fb..30ec1743 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch @@ -226,7 +226,7 @@ index 4b3a5db..a6c5498 100644 -]])], -[have_daq_packet_trace="yes"], -[have_daq_packet_trace="no"]) -+have_daq_packet_trace="yes" ++have_daq_packet_trace="no" AC_MSG_RESULT($have_daq_packet_trace) if test "x$have_daq_packet_trace" = "xyes"; then AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1], @@ -245,7 +245,7 @@ index 4b3a5db..a6c5498 100644 -]])], -[have_daq_verdict_reason="yes"], -[have_daq_verdict_reason="no"]) -+have_daq_verdict_reason="yes" ++have_daq_verdict_reason="no" AC_MSG_RESULT($have_daq_verdict_reason) if test "x$have_daq_verdict_reason" = "xyes"; then AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1], diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init index d8a00c43..0d90c9af 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init @@ -1,6 +1,6 @@ #!/bin/sh # -# Snort Startup Script modified for OpenEmbedded +# Snort Startup Script modified for OpenEmbedded # # Script variables @@ -30,16 +30,16 @@ fi start() { - [ -n "$LAN_INTERFACE" ] || return 0 # Check if log diratory is present. Otherwise, create it. if [ ! -d $LOGDIR/$DATE ]; then - mkdir -d $LOGDIR/$DATE + mkdir -p $LOGDIR/$DATE /bin/chown -R $USER:$USER $LOGDIR/$DATE - /bin/chmod -R 700 $LOGDIR/$DATE + /bin/chmod -R 700 $LOGDIR/$DATE fi /bin/echo "Starting $PROG: " + # Snort parameters # -D Run Snort in background (daemon) mode # -i <if> Listen on interface <if> @@ -64,7 +64,7 @@ stop() RETURN_VAL=$? /bin/echo "$PROG shutdown complete." [ -e $DEL_PID ] && rm -f $DEL_PID - [ -e $DEL_PID.lck ] && rm -f $DEL_PID.lck + [ -e $DEL_PID.lck ] && rm -f $DEL_PID.lck else /bin/echo "ERROR: PID in $PID file not found." RETURN_VAL=1 @@ -72,12 +72,13 @@ stop() return $RETURN_VAL } -status() { - if [ -s $PID ]; then - echo "$PROG is running as pid `cat $PID`:" - else - echo "$PROG is not running." - fi +status() +{ + if [ -s $PID ]; then + echo "$PROG is running as pid `cat $PID`:" + else + echo "$PROG is not running." + fi } restart() @@ -89,21 +90,21 @@ restart() } case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - restart|reload) - restart - ;; - *) - /bin/echo "Usage: $0 {start|stop|status|restart|reload}" - RETURN_VAL=1 + start) + start + ;; + stop) + stop + ;; + status) + status + ;; + restart|reload) + restart + ;; + *) + /bin/echo "Usage: $0 {start|stop|status|restart|reload}" + RETURN_VAL=1 esac exit $RETURN_VAL diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort new file mode 100644 index 00000000..acf5f61a --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort @@ -0,0 +1,2 @@ +# <type> <owner> <group> <mode> <path> <linksource> +d root root 0755 /var/log/snort none |