[151665] trunk/dports/net/snort/Portfile

mf2k at macports.org mf2k at macports.org
Fri Aug 19 07:37:38 PDT 2016


Revision: 151665
          https://trac.macports.org/changeset/151665
Author:   mf2k at macports.org
Date:     2016-08-19 07:37:38 -0700 (Fri, 19 Aug 2016)
Log Message:
-----------
snort: Add missing rules files from default snort.conf. (#46320)

Modified Paths:
--------------
    trunk/dports/net/snort/Portfile

Modified: trunk/dports/net/snort/Portfile
===================================================================
--- trunk/dports/net/snort/Portfile	2016-08-19 14:29:55 UTC (rev 151664)
+++ trunk/dports/net/snort/Portfile	2016-08-19 14:37:38 UTC (rev 151665)
@@ -56,6 +56,7 @@
     reinplace "s|dynamicengine /usr/local/lib/snort_dynamicengine/libsf_engine.so|dynamicengine ${prefix}/lib/snort_dynamicengine/libsf_engine.dylib|g" ${destroot}${prefix}/share/examples/${name}/snort.conf.dist
     reinplace "s|dynamicdetection directory /usr/local/lib/snort_dynamicrule/|dynamicdetection directory ${prefix}/lib/snort_dynamicrule/|g" ${destroot}${prefix}/share/examples/${name}/snort.conf.dist
     reinplace "s|dynamicdetection file /usr/local/lib/snort_dynamicrule/libdynamicexamplerule.so|dynamicdetection file ${prefix}/lib/snort_dynamicrule/libdynamicexamplerule.dylib|g" ${destroot}${prefix}/share/examples/${name}/snort.conf.dist
+    reinplace "s|_LIST_PATH ../rules|_LIST_PATH ${prefix}/etc/snort|g" ${destroot}${prefix}/share/examples/${name}/snort.conf.dist
 
     xinstall -d ${destroot}${prefix}/share/${name}
     xinstall -m 755 ${filespath}/snort.sh \
@@ -80,6 +81,9 @@
 post-activate {
     if ![file exists ${prefix}/etc/snort/snort.conf ] {
         copy ${prefix}/share/examples/${name}/snort.conf.dist ${prefix}/etc/snort/snort.conf
+        system "touch ${prefix}/etc/snort/rules/local.rules"
+        system "touch ${prefix}/etc/snort/white_list.rules"
+        system "touch ${prefix}/etc/snort/black_list.rules"
     }
 }
 
@@ -92,7 +96,8 @@
 
 NOTE: Make sure you do not change the location of the snort.conf file or the startup scripts will not be able to find it.
 
-Please download rules from https://www.snort.org/snort-rules/#rules either manually or with oinkmaster.
+*Please download rules from https://www.snort.org/downloads/#rule-downloads either manually or with oinkmaster.*
+Oinkmaster is the recommended way with regular updates.
 
 Change at least your HOME_NET in snort.conf and Validate your config with
     $ snort -T -c ${prefix}/etc/snort/snort.conf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160819/0980d300/attachment.html>


More information about the macports-changes mailing list