]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/suricata
suricata: Fix ownership of the classification.config file.
[people/pmueller/ipfire-2.x.git] / lfs / suricata
index 31092060631cbb99764621cdc53d0fb152a99aa0..9394d9f47574e7354f257e0da0ff79f963f4e98c 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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        #
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 4.1.4
+VER        = 5.0.8
 
 THISAPP    = suricata-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = cb8bf6b8330c44ae78dfb5b083a6fe82
+$(DL_FILE)_MD5 = d48387c2e0b5e502852b077369d947c5
 
 install : $(TARGET)
 
@@ -70,7 +70,9 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && ./configure \
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/suricata-5.0-stream-tcp-Handle-retransmitted-SYN-with-TSval.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/suricata-disable-sid-2210059.patch
+       cd $(DIR_APP) && LDFLAGS="$(LDFLAGS)" ./configure \
                --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var \
@@ -80,7 +82,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                --enable-nfqueue \
                --disable-static \
                --disable-python \
-               --disable-suricata-update
+               --with-libjansson-libraries=/usr/lib \
+               --with-libjansson-includes=/usr/include \
+               --disable-suricata-update \
+               --enable-rust
+
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        cd $(DIR_APP) && make install-conf
@@ -91,18 +97,19 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Install IPFire related config file.
        install -m 0644 $(DIR_SRC)/config/suricata/suricata.yaml /etc/suricata
 
-       # Remove shipped rules.
-       rm -rvf /usr/share/suricata
+       # Install yaml file for loading default rules.
+       install -m 0664 $(DIR_SRC)/config/suricata/suricata-default-rules.yaml /var/ipfire/suricata
 
        # Create emtpy rules directory.
        -mkdir -p /var/lib/suricata
 
        # Move config files for references, threshold and classification
        # to the rules directory.
-       mv /etc/suricata/*.config /var/lib/suricata
+       rm -rfv /etc/suricata/*.config
 
-       # Set correct permissions for the files.
-       chmod 644 /var/lib/suricata/*.config
+       # Set correct ownership for the classifiction config file.
+       # (File has to be writeable for the nobody user)
+       chown nobody:nobody /usr/share/suricata/classification.config
 
        # Set correct ownership for /var/lib/suricata and the
        # contained files