]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/suricata
suricata: Set correct ownership for default rules file.
[people/pmueller/ipfire-2.x.git] / lfs / suricata
index c7f189bf432f52def109365beba8cfcbb5e442b7..a870e3668c63216096e02dc9a6221c146d9ce10a 100644 (file)
 
 include Config
 
-VER        = 5.0.7
+VER        = 5.0.8
 
 THISAPP    = suricata-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
-SUP_ARCH   = x86_64 i586 aarch64 armv6l
 
 ###############################################################################
 # Top-level Rules
@@ -41,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = f6ff77e4dcf8035853209ceeba9b530c
+$(DL_FILE)_MD5 = d48387c2e0b5e502852b077369d947c5
 
 install : $(TARGET)
 
@@ -71,6 +70,8 @@ $(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) && 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 \
@@ -96,18 +97,22 @@ $(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
+
+       # Set correct ownership for the default rules file.
+       chown nobody:nobody /var/ipfire/suricata/suricata-default-rules.yaml
 
        # 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