aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorsergei <sergei@FreeBSD.org>2004-10-12 15:37:21 +0800
committersergei <sergei@FreeBSD.org>2004-10-12 15:37:21 +0800
commitadee0bf6f916ad0588fc2d0f43117101fb34f141 (patch)
treeb5a3ad97605a1618d51009c5a4c4faf551dfe7ca /security
parent2fd64da8ef34c6536430e03ec71e21847111cf3b (diff)
downloadfreebsd-ports-gnome-adee0bf6f916ad0588fc2d0f43117101fb34f141.tar.gz
freebsd-ports-gnome-adee0bf6f916ad0588fc2d0f43117101fb34f141.tar.zst
freebsd-ports-gnome-adee0bf6f916ad0588fc2d0f43117101fb34f141.zip
- Upgrade to 2.2.0 [1]
- Prevent local.rules from being clobbered [2] - Revive OPTIONS - the time has come... ;) PR: ports/70332 [1], ports/70814 [2] Submitted by: Linh Pham <question+freebsdpr@closedsrc.org> [1], Jez Hancock <jez.hancock@munk.nu> [2]
Diffstat (limited to 'security')
-rw-r--r--security/snort/Makefile56
-rw-r--r--security/snort/distinfo8
-rw-r--r--security/snort/files/patch-snort.conf20
-rw-r--r--security/snort/pkg-plist5
4 files changed, 45 insertions, 44 deletions
diff --git a/security/snort/Makefile b/security/snort/Makefile
index fbd462e7b944..7e053b006f2b 100644
--- a/security/snort/Makefile
+++ b/security/snort/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= snort
-PORTVERSION= 2.1.3
+PORTVERSION= 2.2.0
CATEGORIES= security
MASTER_SITES= http://www.snort.org/dl/
@@ -15,18 +15,26 @@ COMMENT= Lightweight network intrusion detection system
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
-#OPTIONS= FLEXRESP "Flexible response to events" off \
-# MYSQL "Enable MySQL support" off \
-# ODBC "Enable ODBC support" off \
-# POSTGRESQL "Enable PostgreSQL support" off
+OPTIONS= FLEXRESP "Flexible response to events" off \
+ MYSQL "Enable MySQL support" off \
+ ODBC "Enable ODBC support" off \
+ POSTGRESQL "Enable PostgreSQL support" off
USE_GPG= yes
SIG_SUFFIX= .asc
USE_REINPLACE= yes
+USE_RC_SUBR= yes
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+MAN8= snort.8
+DOCS= ChangeLog doc/AUTHORS doc/BUGS doc/CREDITS doc/FAQ doc/NEWS \
+ doc/README* doc/TODO doc/USAGE doc/snort_manual.pdf
+
+.include <bsd.port.pre.mk>
+
.if defined(WITH_FLEXRESP)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
CONFIGURE_ARGS+= --enable-flexresp \
@@ -60,37 +68,25 @@ LDFLAGS+= -lssl -lcrypto
CONFIGURE_ARGS+= --with-postgresql=no
.endif
-MAN8= snort.8
-DOCS= ChangeLog doc/AUTHORS doc/BUGS doc/CREDITS doc/FAQ doc/NEWS \
- doc/README* doc/TODO doc/USAGE doc/snort_manual.pdf
-
-USE_RC_SUBR= yes
-RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
-
post-patch:
${REINPLACE_CMD} "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/snort.c
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/snort.sh > ${WRKDIR}/snort.sh
-pre-configure:
- @${ECHO} ""
- @${ECHO} "Set WITH_FLEXRESP, WITH_MYSQL, WITH_ODBC or WITH_POSTGRESQL"
- @${ECHO} "to get additional support."
- @${ECHO} ""
-
post-install:
- @${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/rules/*.rules ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/etc/classification.config \
- ${DATADIR}/classification.config-sample
- [ -f ${DATADIR}/classification.config ] || \
- ${CP} ${DATADIR}/classification.config-sample \
- ${DATADIR}/classification.config
- ${INSTALL_DATA} ${WRKSRC}/etc/reference.config \
- ${DATADIR}/reference.config-sample
- [ -f ${DATADIR}/reference.config ] || \
- ${CP} ${DATADIR}/reference.config-sample ${DATADIR}/reference.config
${INSTALL_SCRIPT} -m 751 ${WRKDIR}/snort.sh ${PREFIX}/etc/rc.d/snort.sh
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/rules/[^l]*.rules ${DATADIR}
+.for f in local.rules
+ ${INSTALL_DATA} ${WRKSRC}/rules/${f} ${DATADIR}/${f}-sample
+ [ -f ${DATADIR}/${f} ] || \
+ ${INSTALL_DATA} ${WRKSRC}/rules/${f} ${DATADIR}/${f}
+.endfor
+.for f in classification.config reference.config
+ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${DATADIR}/${f}-sample
+ [ -f ${DATADIR}/${f} ] || \
+ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${DATADIR}/${f}
+.endfor
.for f in snort.conf unicode.map threshold.conf
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample
[ -f ${PREFIX}/etc/${f} ] || \
@@ -102,4 +98,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/security/snort/distinfo b/security/snort/distinfo
index a975e5113299..fa33aa26605c 100644
--- a/security/snort/distinfo
+++ b/security/snort/distinfo
@@ -1,4 +1,4 @@
-MD5 (snort-2.1.3.tar.gz) = 76a538d27c23d51dbed43b04c06114e1
-SIZE (snort-2.1.3.tar.gz) = 2379344
-MD5 (snort-2.1.3.tar.gz.asc) = 9c0a4261e9016a820f969ee44fef4b95
-SIZE (snort-2.1.3.tar.gz.asc) = 189
+MD5 (snort-2.2.0.tar.gz) = 6194278217e4e3f733b046256a31f0e6
+SIZE (snort-2.2.0.tar.gz) = 2498466
+MD5 (snort-2.2.0.tar.gz.asc) = 67a545445a19f8fad289875b24fabe2e
+SIZE (snort-2.2.0.tar.gz.asc) = 189
diff --git a/security/snort/files/patch-snort.conf b/security/snort/files/patch-snort.conf
index 8ba82ff36a91..06cb69bb7895 100644
--- a/security/snort/files/patch-snort.conf
+++ b/security/snort/files/patch-snort.conf
@@ -1,16 +1,16 @@
---- 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]
-
+--- etc/snort.conf.orig Thu Aug 5 11:55:37 2004
++++ etc/snort.conf Wed Aug 11 15:52:47 2004
+@@ -106,7 +106,7 @@
# Path to your rules files (this can be a relative path)
+ # Note for Windows users: You are advised to make this an absolute path,
+ # such as: c:\snort\rules
-var RULE_PATH ../rules
+var RULE_PATH ../share/snort
- ###################################################
- # Step #2: Configure preprocessors
-@@ -533,13 +533,13 @@
- # Include classification & priority settings
+ # Configure the snort decoder
+ # ============================
+@@ -507,7 +507,7 @@
+ # such as: c:\snort\etc\classification.config
#
-include classification.config
@@ -18,6 +18,8 @@
#
# Include reference systems
+@@ -515,7 +515,7 @@
+ # such as: c:\snort\etc\reference.config
#
-include reference.config
diff --git a/security/snort/pkg-plist b/security/snort/pkg-plist
index e18dd25e5902..94491e55ea2d 100644
--- a/security/snort/pkg-plist
+++ b/security/snort/pkg-plist
@@ -22,6 +22,7 @@ etc/rc.d/snort.sh
%%PORTDOCS%%%%DOCSDIR%%/README.UNSOCK
%%PORTDOCS%%%%DOCSDIR%%/README.WIN32
%%PORTDOCS%%%%DOCSDIR%%/README.alert_order
+%%PORTDOCS%%%%DOCSDIR%%/README.asn1
%%PORTDOCS%%%%DOCSDIR%%/README.csv
%%PORTDOCS%%%%DOCSDIR%%/README.database
%%PORTDOCS%%%%DOCSDIR%%/README.event_queue
@@ -54,7 +55,9 @@ etc/rc.d/snort.sh
%%DATADIR%%/icmp.rules
%%DATADIR%%/imap.rules
%%DATADIR%%/info.rules
-%%DATADIR%%/local.rules
+@unexec if [ -f %B/local.rules ] && cmp -s %B/local.rules %B/local.rules-sample; then rm -f %B/local.rules; fi
+%%DATADIR%%/local.rules-sample
+@exec [ -f %B/local.rules ] || cp %B/%f %B/local.rules
%%DATADIR%%/misc.rules
%%DATADIR%%/multimedia.rules
%%DATADIR%%/mysql.rules