aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-10-06 09:48:09 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-10-06 09:48:09 +0000
commit2602376b15872b736f2c7f71b1603e6bc5936a06 (patch)
tree207bc098aa89091f412ec9a0875bbd2cda19d2e0 /security
parenta7352efa097263af4ae579266af861fd2b458841 (diff)
downloadports-2602376b15872b736f2c7f71b1603e6bc5936a06.tar.gz
ports-2602376b15872b736f2c7f71b1603e6bc5936a06.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/snort/Makefile41
-rw-r--r--security/snort/distinfo2
-rw-r--r--security/snort/files/patch-snort.c22
-rw-r--r--security/snort/files/patch-snort.conf27
-rw-r--r--security/snort/pkg-message17
-rw-r--r--security/snort/pkg-plist42
6 files changed, 110 insertions, 41 deletions
diff --git a/security/snort/Makefile b/security/snort/Makefile
index 2cf7ff7e7fb9..ee09b4d8ec2e 100644
--- a/security/snort/Makefile
+++ b/security/snort/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= snort
-PORTVERSION= 1.8.7
+PORTVERSION= 1.9.0
CATEGORIES= security
MASTER_SITES= http://www.snort.org/dl/
@@ -43,6 +43,10 @@ LDFLAGS+= -lssl -lcrypto
.endif
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
+USE_REINPLACE= yes
+
+post-patch:
+ ${REINPLACE_CMD} "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/snort.c
pre-configure:
@${ECHO} ""
@@ -50,14 +54,35 @@ pre-configure:
@${ECHO} "to get additional support."
@${ECHO} ""
+DOCS= AUTHORS NEWS README.csv BUGS README README.database \
+ CREDITS README.SNMP README.xml README.FLEXRESP RULES.todo FAQ \
+ SnortUsersManual.pdf README.PLUGINS USAGE
+
post-install:
${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/CREDITS ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/RULES.SAMPLE ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/USAGE ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/*.rules ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/classification.config ${PREFIX}/etc/classification.config-sample
- ${INSTALL_DATA} ${WRKSRC}/snort.conf ${PREFIX}/etc/snort.conf-sample
- @${SED} -e 's#/usr/local#${PREFIX}#g' ${PKGMESSAGE}
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for i in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
+.endfor
+.endif
+ @${INSTALL_DATA} ${WRKSRC}/rules/*.rules ${DATADIR}; \
+ ${INSTALL_DATA} ${WRKSRC}/etc/classification.config ${DATADIR}/classification.config-sample; \
+ if [ ! -f ${DATADIR}/classification.config ]; then \
+ ${CP} ${DATADIR}/classification.config-sample \
+ ${DATADIR}/classification.config; \
+ fi; \
+ ${INSTALL_DATA} ${WRKSRC}/etc/reference.config \
+ ${DATADIR}/reference.config-sample; \
+ if [ ! -f ${DATADIR}/reference.config ]; then \
+ ${CP} ${DATADIR}/reference.config-sample \
+ ${DATADIR}/reference.config; \
+ fi; \
+ ${INSTALL_DATA} ${WRKSRC}/etc/snort.conf \
+ ${PREFIX}/etc/snort.conf-sample; \
+ if [ ! -f ${PREFIX}/etc/snort.conf ]; then \
+ ${CP} ${PREFIX}/etc/snort.conf-sample \
+ ${PREFIX}/etc/snort.conf; \
+ fi
.include <bsd.port.mk>
diff --git a/security/snort/distinfo b/security/snort/distinfo
index c5913bbc5773..fbed31a4e2ed 100644
--- a/security/snort/distinfo
+++ b/security/snort/distinfo
@@ -1 +1 @@
-MD5 (snort-1.8.7.tar.gz) = 29c81d0bc243edb21ba4ab33ee80457e
+MD5 (snort-1.9.0.tar.gz) = bcd3cbd0e6982345871d02fe60444c5c
diff --git a/security/snort/files/patch-snort.c b/security/snort/files/patch-snort.c
index b299c7e60748..0cf8de8354d4 100644
--- a/security/snort/files/patch-snort.c
+++ b/security/snort/files/patch-snort.c
@@ -1,11 +1,11 @@
---- snort.c.orig Fri Jun 28 10:22:59 2002
-+++ snort.c Sat Jul 13 11:13:16 2002
-@@ -1694,7 +1694,7 @@
- difftime.tv_sec = endtime.tv_sec - starttime.tv_sec;
- difftime.tv_usec = endtime.tv_usec - starttime.tv_usec;
-
-- printf("Run time for packet processing was %u.%u seconds\n",
-+ printf("Run time for packet processing was %lu.%lu seconds\n",
- difftime.tv_sec, difftime.tv_usec);
-
- CleanExit(SIGQUIT);
+--- src/snort.c.orig Sun Oct 6 02:14:32 2002
++++ src/snort.c Sun Oct 6 02:14:18 2002
+@@ -2193,7 +2193,7 @@
+ struct stat st;
+ int found;
+ int i;
+- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL};
++ char *conf_files[]={"%%PREFIX%%/etc/snort.conf", "./snort.conf", NULL};
+ char *fname = NULL;
+ char *home_dir;
+ char *tmp;
diff --git a/security/snort/files/patch-snort.conf b/security/snort/files/patch-snort.conf
new file mode 100644
index 000000000000..8ba82ff36a91
--- /dev/null
+++ b/security/snort/files/patch-snort.conf
@@ -0,0 +1,27 @@
+--- etc/snort.conf.orig Tue Aug 13 20:17:58 2002
++++ etc/snort.conf Sun Oct 6 02:21:52 2002
+@@ -99,7 +99,7 @@
+ var AIM_SERVERS [64.12.24.0/24,64.12.25.0/24,64.12.26.14/24,64.12.28.0/24,64.12.29.0/24,64.12.161.0/24,64.12.163.0/24,205.188.5.0/24,205.188.9.0/24]
+
+ # Path to your rules files (this can be a relative path)
+-var RULE_PATH ../rules
++var RULE_PATH ../share/snort
+
+ ###################################################
+ # Step #2: Configure preprocessors
+@@ -533,13 +533,13 @@
+ # Include classification & priority settings
+ #
+
+-include classification.config
++include ../share/snort/classification.config
+
+ #
+ # Include reference systems
+ #
+
+-include reference.config
++include ../share/snort/reference.config
+
+ ####################################################################
+ # Step #4: Customize your rule set
diff --git a/security/snort/pkg-message b/security/snort/pkg-message
deleted file mode 100644
index 9ffcbbc17211..000000000000
--- a/security/snort/pkg-message
+++ /dev/null
@@ -1,17 +0,0 @@
-
-***********************************************************
-Copy
-
- /usr/local/etc/snort.conf-sample
-to
- /usr/local/etc/snort.conf
-
-and
-
- /usr/local/etc/classification.config-sample
-to
- /usr/local/etc/classification.config
-
-and edit them to fit your needs.
-***********************************************************
-
diff --git a/security/snort/pkg-plist b/security/snort/pkg-plist
index 11ebe3e367fb..c7e3ff87387b 100644
--- a/security/snort/pkg-plist
+++ b/security/snort/pkg-plist
@@ -1,40 +1,74 @@
bin/snort
-etc/classification.config-sample
+@unexec if [ -f %D/etc/snort.conf ] && cmp -s %D/etc/snort.conf %D/etc/snort.conf-sample; then rm -f %D/etc/snort.conf; fi
etc/snort.conf-sample
-share/snort/CREDITS
-share/snort/RULES.SAMPLE
-share/snort/USAGE
+@exec [ -f %B/snort.conf ] || cp %B/%f %B/snort.conf
+%%PORTDOCS%%share/doc/snort/AUTHORS
+%%PORTDOCS%%share/doc/snort/NEWS
+%%PORTDOCS%%share/doc/snort/README.csv
+%%PORTDOCS%%share/doc/snort/BUGS
+%%PORTDOCS%%share/doc/snort/README
+%%PORTDOCS%%share/doc/snort/README.database
+%%PORTDOCS%%share/doc/snort/CREDITS
+%%PORTDOCS%%share/doc/snort/README.SNMP
+%%PORTDOCS%%share/doc/snort/README.xml
+%%PORTDOCS%%share/doc/snort/README.FLEXRESP
+%%PORTDOCS%%share/doc/snort/RULES.todo
+%%PORTDOCS%%share/doc/snort/FAQ
+%%PORTDOCS%%share/doc/snort/SnortUsersManual.pdf
+%%PORTDOCS%%share/doc/snort/README.PLUGINS
+%%PORTDOCS%%share/doc/snort/USAGE
share/snort/attack-responses.rules
share/snort/backdoor.rules
share/snort/bad-traffic.rules
+share/snort/chat.rules
+@unexec if [ -f %B/classification.config ] && cmp -s %B/classification.config %B/classification.config-sample; then rm -f %B/classification.config; fi
+share/snort/classification.config-sample
+@exec [ -f %B/classification.config ] || cp %B/%f %B/classification.config
share/snort/ddos.rules
+share/snort/deleted.rules
share/snort/dns.rules
share/snort/dos.rules
+share/snort/experimental.rules
share/snort/exploit.rules
share/snort/finger.rules
share/snort/ftp.rules
share/snort/icmp-info.rules
share/snort/icmp.rules
+share/snort/imap.rules
share/snort/info.rules
share/snort/local.rules
share/snort/misc.rules
+share/snort/multimedia.rules
+share/snort/mysql.rules
share/snort/netbios.rules
+share/snort/nntp.rules
+share/snort/oracle.rules
+share/snort/other-ids.rules
+share/snort/p2p.rules
share/snort/policy.rules
+share/snort/pop3.rules
share/snort/porn.rules
+@unexec if [ -f %B/reference.config ] && cmp -s %B/reference.config %B/reference.config-sample; then rm -f %B/reference.config; fi
+share/snort/reference.config-sample
+@exec [ -f %B/reference.config ] || cp %B/%f %B/reference.config
share/snort/rpc.rules
share/snort/rservices.rules
share/snort/scan.rules
share/snort/shellcode.rules
share/snort/smtp.rules
+share/snort/snmp.rules
share/snort/sql.rules
share/snort/telnet.rules
share/snort/tftp.rules
share/snort/virus.rules
share/snort/web-attacks.rules
share/snort/web-cgi.rules
+share/snort/web-client.rules
share/snort/web-coldfusion.rules
share/snort/web-frontpage.rules
share/snort/web-iis.rules
share/snort/web-misc.rules
+share/snort/web-php.rules
share/snort/x11.rules
+%%PORTDOCS%%@dirrm share/doc/snort
@dirrm share/snort