View | Details | Raw Unified | Return to bug 172456 | Differences between
and this patch

Collapse All | Expand All

(-)barnyard2/Makefile (-23 / +54 lines)
Lines 6-72 Link Here
6
#
6
#
7
7
8
PORTNAME=	barnyard2
8
PORTNAME=	barnyard2
9
PORTVERSION=	1.9
9
PORTVERSION=	1.10
10
PORTREVISION=	2
11
CATEGORIES=	security
10
CATEGORIES=	security
12
MASTER_SITES=	http://www.securixlive.com/download/barnyard2/
13
11
14
MAINTAINER=	pauls@utdallas.edu
12
MAINTAINER=	pauls@utdallas.edu
15
COMMENT=	An output system for Snort or Suricata that parses unified2 files
13
COMMENT=	An output system for security monitoring systems that parses unified2 files
16
14
17
OPTIONS=	MYSQL "Enable MySQL support" on \
15
LICENSE?=	GPLv2
18
		POSTGRESQL "Enable PostgreSQL support" off \
16
LICENSE_FILE?=	${WRKSRC}/LICENSE
19
		SNORT "Depend on security/snort" off \
17
20
		SURICATA "Depend on security/suricata" off
18
GH_ACCOUNT=	firnsy
21
.if !defined(SLAVE)
19
GH_PROJECT=	barnyard2
22
OPTIONS+=	TCL "Enable TCL support" off
20
GH_TAGNAME=	v2-1.10
21
GH_COMMIT=	2f5d496
22
USE_GITHUB=	yes
23
MAKE_JOBS_UNSAFE=	yes
24
25
OPTIONS_DEFINE=	MYSQL POSTGRESQL SNORT SURICATA BRO SNORTSAM
26
OPTIONS_DEFAULT=	no
27
28
BRO_DESC=	Depend on security/bro
29
MYSQL_DESC=	Enable MySql support
30
POSTGRESQL_DESC=	Enable PostgreSQL support
31
SNORT_DESC=	Depend on security/snort
32
SNORTSAM_DESC=	Enable Snortsam support
33
SURICATA_DESC=	Depend on security/suricata
34
35
.if defined(SLAVE)
36
OPTIONS_DEFINE+=	TCL
23
.endif
37
.endif
24
38
25
USE_RC_SUBR=	barnyard2
39
USE_RC_SUBR=	barnyard2
40
USE_GITHUB=	yes
26
GNU_CONFIGURE=	yes
41
GNU_CONFIGURE=	yes
27
SUB_FILES=	pkg-message
42
SUB_FILES=	pkg-message
28
43
29
PORTDOCS1=	README
44
PORTDOCS1=	README RELEASE.NOTES
30
PORTDOCS2=	INSTALL README.aruba README.database README.sguil
45
PORTDOCS2=	INSTALL README.aruba README.database README.sguil README.snortsam
31
PORTDOCS=	${PORTDOCS1} ${PORTDOCS2}
46
PORTDOCS3=	create_db2 create_mysql	create_postgresql SCHEMA_ACCESS	create_mssql create_oracle.sql
47
PORTDOCS=	${PORTDOCS1} ${PORTDOCS2} ${PORTDOCS3}
32
48
33
.include <bsd.port.pre.mk>
49
.include <bsd.port.pre.mk>
34
50
35
.if defined(WITH_MYSQL)
51
pre-configure:
52
	cd ${WRKSRC}; ${SH} autogen.sh
53
54
.if ${PORT_OPTIONS:MWITH_MYSQL}
36
USE_MYSQL=		yes
55
USE_MYSQL=		yes
37
CONFIGURE_ARGS+=	--with-mysql \
56
CONFIGURE_ARGS+=	--with-mysql \
38
			--with-mysql-includes=${LOCALBASE}/include/mysql \
57
			--with-mysql-includes=${LOCALBASE}/include/mysql \
39
			--with-mysql-libraries=${LOCALBASE}/lib/mysql
58
			--with-mysql-libraries=${LOCALBASE}/lib/mysql
40
SUB_LIST+=		MYSQL=" mysql"
59
SUB_LIST+=		MYSQL=" mysql"
41
.else
60
.else
61
CONFIGURE_ARGS+=	--without-mysql \
62
			--without-mysql-includes \
63
			--without-mysql-libraries
42
SUB_LIST+=		MYSQL=""
64
SUB_LIST+=		MYSQL=""
43
.endif
65
.endif
44
66
45
.if defined(WITH_POSTGRESQL)
67
.if $(PORT_OPTIONS:MWITH_POSTGRESQL)
46
USE_PGSQL=		yes
68
USE_PGSQL=		yes
47
CONFIGURE_ARGS+=	--with-postgresql
69
CONFIGURE_ARGS+=	--with-postgresql
48
SUB_LIST+=		PGSQL=" postgresql"
70
SUB_LIST+=		PGSQL=" postgresql"
49
.else
71
.else
72
CONFIGURE_ARGS+=	--without-postgresql
50
SUB_LIST+=		PGSQL=""
73
SUB_LIST+=		PGSQL=""
51
.endif
74
.endif
52
75
53
.if defined(WITH_SNORT)
76
.if $(PORT_OPTIONS:MWITH_SNORT)
54
RUN_DEPENDS+=		${LOCALBASE}/bin/snort:${PORTSDIR}/security/snort
77
RUN_DEPENDS+=		${LOCALBASE}/bin/snort:${PORTSDIR}/security/snort
55
.endif
78
.endif
56
79
57
.if defined(WITH_SURICATA)
80
.if $(PORT_OPTIONS:MWITH_SURICATA)
58
RUN_DEPENDS+=		${LOCALBASE}/bin/suricata:${PORTSDIR}/security/suricata
81
RUN_DEPENDS+=		${LOCALBASE}/bin/suricata:${PORTSDIR}/security/suricata
59
.endif
82
.endif
60
83
84
.if $(PORT_OPTIONS:MWITH_BRO)
85
RUN_DEPENDS+=		${LOCALBASE}bin/bro:${PORTSDIR}/security/bro
86
.endif
87
88
.if $(PORT_OPTIONS:MWITH_SNORTSAM)
89
RUN_DEPENDS+=		${LOCALBASE}bin/snortsnam:${PORTSDIR}/security/snortsam
90
.endif
91
61
.if defined(WITH_TCL)
92
.if defined(WITH_TCL)
62
USE_TCL=		yes
93
USE_TCL=		yes
63
CONFIGURE_ARGS+=	--with-tcl=${PREFIX}/lib/tcl8.4
94
CONFIGURE_ARGS+=	--with-tcl=${PREFIX}/lib/tcl8.4
64
LIB_DEPENDS+=		tcl84.1:${PORTSDIR}/lang/tcl84
95
LIB_DEPENDS+=		tcl84:${PORTSDIR}/lang/tcl84
96
.else
97
USE_TCL=		no
98
CONFIGURE_ARGS+=	--without-tcl
65
.endif
99
.endif
66
100
67
pre-install:
68
	${CHMOD} 744 ${WRKSRC}/install-sh
69
70
post-patch:
101
post-patch:
71
	@${REINPLACE_CMD} 's|/etc|${LOCALBASE}/etc|' \
102
	@${REINPLACE_CMD} 's|/etc|${LOCALBASE}/etc|' \
72
		${WRKSRC}/etc/barnyard2.conf
103
		${WRKSRC}/etc/barnyard2.conf
Lines 74-86 Link Here
74
post-install:
105
post-install:
75
106
76
.for f in barnyard2.conf
107
.for f in barnyard2.conf
77
	[ -f ${PREFIX}/etc/${f} ] || \
108
	${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample
78
	${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}
79
.endfor
109
.endfor
80
.if !defined(NOPORTDOCS)
110
.if !defined(NOPORTDOCS)
81
	@${MKDIR} ${DOCSDIR}
111
	@${MKDIR} ${DOCSDIR}
82
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS1} ${DOCSDIR}
112
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS1} ${DOCSDIR}
83
	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS2} ${DOCSDIR}
113
	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS2} ${DOCSDIR}
114
	cd ${WRKSRC}/schemas && ${INSTALL_DATA} ${PORTDOCS3} ${DOCSDIR}
84
.endif
115
.endif
85
116
86
	@${CAT} ${PKGMESSAGE}
117
	@${CAT} ${PKGMESSAGE}
(-)barnyard2/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (barnyard2-1.9.tar.gz) = 6bce0d5bd4a6fa2be2e5b1daaed1d6d0ec8e7f50b33bc1125125c8a9e78a5b0c
1
SHA256 (barnyard2-1.10.tar.gz) = 31d4e3745606489658bd411f74ffeb8a27573fdc08d0b51a6a71e1bf4dece8a2
2
SIZE (barnyard2-1.9.tar.gz) = 652879
2
SIZE (barnyard2-1.10.tar.gz) = 419781
(-)barnyard2/files/patch-configure (-190 lines)
Lines 1-190 Link Here
1
--- ./configure.orig	2010-12-26 23:39:18.000000000 +0100
2
+++ ./configure	2011-05-15 18:42:45.000000000 +0200
3
@@ -13610,93 +13610,6 @@
4
     fi
5
 fi
6
 
7
-# Checking for Tcl support (required by spo_sguil)
8
-
9
-# Check whether --with-tcl was given.
10
-if test "${with_tcl+set}" = set; then :
11
-  withval=$with_tcl;  with_tcl="$withval"
12
-else
13
-   with_tcl=no
14
-fi
15
-
16
-
17
-if test "$with_tcl" != "no"; then
18
-    # prioritise manual definition of the Tcl library.
19
-	if test -d "$with_tcl"; then
20
-		tclpath="$with_tcl"
21
-	else
22
-		# let tclsh tell us where it was installed (prefer new Tcl versions).
23
-		for ac_prog in tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0 tclsh
24
-do
25
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
26
-set dummy $ac_prog; ac_word=$2
27
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28
-$as_echo_n "checking for $ac_word... " >&6; }
29
-if test "${ac_cv_prog_TCLSH+set}" = set; then :
30
-  $as_echo_n "(cached) " >&6
31
-else
32
-  if test -n "$TCLSH"; then
33
-  ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test.
34
-else
35
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36
-for as_dir in $PATH
37
-do
38
-  IFS=$as_save_IFS
39
-  test -z "$as_dir" && as_dir=.
40
-    for ac_exec_ext in '' $ac_executable_extensions; do
41
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
42
-    ac_cv_prog_TCLSH="$ac_prog"
43
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44
-    break 2
45
-  fi
46
-done
47
-  done
48
-IFS=$as_save_IFS
49
-
50
-fi
51
-fi
52
-TCLSH=$ac_cv_prog_TCLSH
53
-if test -n "$TCLSH"; then
54
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
55
-$as_echo "$TCLSH" >&6; }
56
-else
57
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58
-$as_echo "no" >&6; }
59
-fi
60
-
61
-
62
-  test -n "$TCLSH" && break
63
-done
64
-
65
-	    if test "$TCLSH" != ""; then
66
-			tclpath=`echo 'puts [lindex $tcl_pkgPath 0]' | $TCLSH`
67
-		fi
68
-	fi
69
-
70
-	# check, if tclConfig.sh can be found in tclsh's installation directory.
71
-    if test ! -r $tclpath/tclConfig.sh; then
72
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
73
-	Can't find Tcl libraries.  Use --with-tcl to specify
74
-        the directory containing tclConfig.sh on your system.
75
-	Continuing build without Tcl support." >&5
76
-$as_echo "
77
-	Can't find Tcl libraries.  Use --with-tcl to specify
78
-        the directory containing tclConfig.sh on your system.
79
-	Continuing build without Tcl support." >&6; }
80
-    else
81
-	# source tclsh's configuration file and tell the user about the version.
82
-	. $tclpath/tclConfig.sh
83
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tcl version number" >&5
84
-$as_echo_n "checking for the tcl version number... " >&6; }
85
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&5
86
-$as_echo "$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&6; }
87
-        LIBS="$LIBS $TCL_LIBS $TCL_LIB_SPEC"
88
-	TCL_INCLUDE="$TCL_PREFIX/include/tcl$TCL_VERSION"
89
-	CPPFLAGS="$CPPFLAGS -I$TCL_INCLUDE -DENABLE_TCL";
90
-    fi
91
-fi
92
-
93
-
94
 # Check whether --with-mysql was given.
95
 if test "${with_mysql+set}" = set; then :
96
   withval=$with_mysql;  with_mysql="$withval"
97
@@ -14496,6 +14409,93 @@
98
   LIBS="${LIBS} -lbroccoli"
99
 fi
100
 
101
+# Checking for Tcl support (required by spo_sguil)
102
+
103
+# Check whether --with-tcl was given.
104
+if test "${with_tcl+set}" = set; then :
105
+  withval=$with_tcl;  with_tcl="$withval"
106
+else
107
+   with_tcl=no
108
+fi
109
+
110
+
111
+if test "$with_tcl" != "no"; then
112
+    # prioritise manual definition of the Tcl library.
113
+	if test -d "$with_tcl"; then
114
+		tclpath="$with_tcl"
115
+	else
116
+		# let tclsh tell us where it was installed (prefer new Tcl versions).
117
+		for ac_prog in tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0 tclsh
118
+do
119
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
120
+set dummy $ac_prog; ac_word=$2
121
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
122
+$as_echo_n "checking for $ac_word... " >&6; }
123
+if test "${ac_cv_prog_TCLSH+set}" = set; then :
124
+  $as_echo_n "(cached) " >&6
125
+else
126
+  if test -n "$TCLSH"; then
127
+  ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test.
128
+else
129
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
130
+for as_dir in $PATH
131
+do
132
+  IFS=$as_save_IFS
133
+  test -z "$as_dir" && as_dir=.
134
+    for ac_exec_ext in '' $ac_executable_extensions; do
135
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
136
+    ac_cv_prog_TCLSH="$ac_prog"
137
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
138
+    break 2
139
+  fi
140
+done
141
+  done
142
+IFS=$as_save_IFS
143
+
144
+fi
145
+fi
146
+TCLSH=$ac_cv_prog_TCLSH
147
+if test -n "$TCLSH"; then
148
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
149
+$as_echo "$TCLSH" >&6; }
150
+else
151
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
152
+$as_echo "no" >&6; }
153
+fi
154
+
155
+
156
+  test -n "$TCLSH" && break
157
+done
158
+
159
+	    if test "$TCLSH" != ""; then
160
+			tclpath=`echo 'puts [lindex $tcl_pkgPath 0]' | $TCLSH`
161
+		fi
162
+	fi
163
+
164
+	# check, if tclConfig.sh can be found in tclsh's installation directory.
165
+    if test ! -r $tclpath/tclConfig.sh; then
166
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
167
+	Can't find Tcl libraries.  Use --with-tcl to specify
168
+        the directory containing tclConfig.sh on your system.
169
+	Continuing build without Tcl support." >&5
170
+$as_echo "
171
+	Can't find Tcl libraries.  Use --with-tcl to specify
172
+        the directory containing tclConfig.sh on your system.
173
+	Continuing build without Tcl support." >&6; }
174
+    else
175
+	# source tclsh's configuration file and tell the user about the version.
176
+	. $tclpath/tclConfig.sh
177
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tcl version number" >&5
178
+$as_echo_n "checking for the tcl version number... " >&6; }
179
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&5
180
+$as_echo "$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&6; }
181
+        LIBS="$LIBS $TCL_LIBS $TCL_LIB_SPEC"
182
+	TCL_INCLUDE="$TCL_PREFIX/include/tcl$TCL_VERSION"
183
+	CPPFLAGS="$CPPFLAGS -I$TCL_INCLUDE -DENABLE_TCL";
184
+    fi
185
+fi
186
+
187
+
188
 # let's make some fixes..
189
 
190
 CFLAGS=`echo $CFLAGS | sed -e 's/-I\/usr\/include //g'`
(-)barnyard2/files/patch-etc-Makefile.in (-11 lines)
Lines 1-11 Link Here
1
--- etc/Makefile.in.orig	2010-07-04 13:17:33.000000000 -0400
2
+++ etc/Makefile.in	2010-07-04 13:18:42.000000000 -0400
3
@@ -249,7 +249,7 @@
4
 	done | $(am__base_list) | \
5
 	while read files; do \
6
 	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
7
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
8
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)/$$files-sample" || exit $$?; \
9
 	done
10
 
11
 uninstall-sysconfDATA:
(-)barnyard2/pkg-plist (-1 lines)
Lines 1-4 Link Here
1
bin/barnyard2
1
bin/barnyard2
2
@unexec if [ -f %D/etc/barnyard2.conf ] && cmp -s %D/etc/barnyard2.conf %D/etc/barnyard2.conf-sample; then rm -f %D/etc/barnyard2.conf; fi
2
@unexec if [ -f %D/etc/barnyard2.conf ] && cmp -s %D/etc/barnyard2.conf %D/etc/barnyard2.conf-sample; then rm -f %D/etc/barnyard2.conf; fi
3
etc/barnyard2.conf-sample
3
etc/barnyard2.conf-sample
4
@exec if [ ! -f %D/etc/barnyard2.conf ] ; then cp -p %D/%F %B/barnyard2.conf; fi

Return to bug 172456