From 67752a9510d9db653ca8aee9355e8fa63d0f9316 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 23 Jul 2018 20:21:38 +0200 Subject: [PATCH] suricata: New package Signed-off-by: Stefan Schantl --- config/rootfiles/common/suricata | 48 +++++++++++++++++ lfs/suricata | 89 ++++++++++++++++++++++++++++++++ make.sh | 1 + 3 files changed, 138 insertions(+) create mode 100644 config/rootfiles/common/suricata create mode 100644 lfs/suricata diff --git a/config/rootfiles/common/suricata b/config/rootfiles/common/suricata new file mode 100644 index 0000000000..37ad01318e --- /dev/null +++ b/config/rootfiles/common/suricata @@ -0,0 +1,48 @@ +etc/suricata +etc/suricata/classification.config +etc/suricata/reference.config +etc/suricata/rules +etc/suricata/suricata-example.yaml +etc/suricata/threshold.config +usr/bin/suricata +#usr/bin/suricatasc +#usr/lib/python2.7/site-packages/suricatasc +#usr/lib/python2.7/site-packages/suricatasc-0.9-py2.7.egg-info +#usr/lib/python2.7/site-packages/suricatasc/__init__.py +#usr/lib/python2.7/site-packages/suricatasc/__init__.pyc +#usr/lib/python2.7/site-packages/suricatasc/suricatasc.py +#usr/lib/python2.7/site-packages/suricatasc/suricatasc.pyc +#usr/share/doc/suricata +#usr/share/doc/suricata/AUTHORS +#usr/share/doc/suricata/Basic_Setup.txt +#usr/share/doc/suricata/CentOS5.txt +#usr/share/doc/suricata/CentOS_56_Installation.txt +#usr/share/doc/suricata/Debian_Installation.txt +#usr/share/doc/suricata/Fedora_Core.txt +#usr/share/doc/suricata/FreeBSD_8.txt +#usr/share/doc/suricata/GITGUIDE +#usr/share/doc/suricata/HTP_library_installation.txt +#usr/share/doc/suricata/INSTALL +#usr/share/doc/suricata/INSTALL.PF_RING +#usr/share/doc/suricata/INSTALL.WINDOWS +#usr/share/doc/suricata/Installation_from_GIT_with_PCRE-JIT.txt +#usr/share/doc/suricata/Installation_from_GIT_with_PF_RING_on_Ubuntu_server_1104.txt +#usr/share/doc/suricata/Installation_with_CUDA_and_PFRING_on_Scientific_Linux_6.txt +#usr/share/doc/suricata/Installation_with_CUDA_and_PF_RING_on_Ubuntu_server_1104.txt +#usr/share/doc/suricata/Installation_with_CUDA_on_Scientific_Linux_6.txt +#usr/share/doc/suricata/Installation_with_CUDA_on_Ubuntu_server_1104.txt +#usr/share/doc/suricata/Installation_with_PF_RING.txt +#usr/share/doc/suricata/Mac_OS_X_106x.txt +#usr/share/doc/suricata/NEWS +#usr/share/doc/suricata/OpenBSD_Installation_from_GIT.txt +#usr/share/doc/suricata/README +#usr/share/doc/suricata/Setting_up_IPSinline_for_Linux.txt +#usr/share/doc/suricata/TODO +#usr/share/doc/suricata/Third_Party_Installation_Guides.txt +#usr/share/doc/suricata/Ubuntu_Installation.txt +#usr/share/doc/suricata/Ubuntu_Installation_from_GIT.txt +#usr/share/doc/suricata/Windows.txt +#usr/share/man/man1/suricata.1 +var/log/suricata +var/log/suricata/certs +var/log/suricata/files diff --git a/lfs/suricata b/lfs/suricata new file mode 100644 index 0000000000..0873f54b43 --- /dev/null +++ b/lfs/suricata @@ -0,0 +1,89 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2015 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 4.0.5 + +THISAPP = suricata-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = ea0cb823d6a86568152f75ade6de442f + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-gccprotect \ + --disable-gccmarch-native \ + --enable-non-bundled-htp \ + --enable-nfqueue \ + --disable-static + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + cd $(DIR_APP) && make install-conf + mv /etc/suricata/suricata.yaml /etc/suricata/suricata-example.yaml + -mkdir -p /etc/suricata/rules + -mkdir -p /var/log/suricata + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 4acc66b4a8..531ba801ca 100755 --- a/make.sh +++ b/make.sh @@ -1292,6 +1292,7 @@ buildipfire() { lfsmake2 snort lfsmake2 yaml lfsmake2 libhtp + lfsmake2 suricata lfsmake2 oinkmaster lfsmake2 squid lfsmake2 squidguard -- 2.39.2