security/barnyard2, update port to version 0.10 Fix: Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas--k5fsjqmKDCeycObFPcOqdulYKQ5xuyEo10baqacBi3n0D8Zf Content-Type: text/plain; name="barnyard2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="barnyard2.diff" diff -Nar ../barnyard2/Makefile barnyard2/Makefile 9,10c9 < PORTVERSION=3D 1.9 < PORTREVISION=3D 2 --- PORTVERSION=3D 1.10 12d10 < MASTER_SITES=3D http://www.securixlive.com/download/barnyard2/ 15c13 < COMMENT=3D An output system for Snort or Suricata that parses unified2 fi= les --- COMMENT=3D An output system for security monitoring systems that parses uni= fied2 files 17,22c15,36 < OPTIONS=3D MYSQL "Enable MySQL support" on \ < POSTGRESQL "Enable PostgreSQL support" off \ < SNORT "Depend on security/snort" off \ < SURICATA "Depend on security/suricata" off < .if !defined(SLAVE) < OPTIONS+=3D TCL "Enable TCL support" off --- LICENSE?=3D GPLv2 LICENSE_FILE?=3D ${WRKSRC}/LICENSE GH_ACCOUNT=3D firnsy GH_PROJECT=3D barnyard2 GH_TAGNAME=3D v2-1.10 GH_COMMIT=3D 2f5d496 USE_GITHUB=3D yes MAKE_JOBS_UNSAFE=3D yes OPTIONS_DEFINE=3D MYSQL POSTGRESQL SNORT SURICATA BRO SNORTSAM OPTIONS_DEFAULT=3D no BRO_DESC=3D Depend on security/bro MYSQL_DESC=3D Enable MySql support POSTGRESQL_DESC=3D Enable PostgreSQL support SNORT_DESC=3D Depend on security/snort SNORTSAM_DESC=3D Enable Snortsam support SURICATA_DESC=3D Depend on security/suricata .if defined(SLAVE) OPTIONS_DEFINE+=3D TCL 25a40 USE_GITHUB=3D yes 29,31c44,47 < PORTDOCS1=3D README < PORTDOCS2=3D INSTALL README.aruba README.database README.sguil < PORTDOCS=3D ${PORTDOCS1} ${PORTDOCS2} --- PORTDOCS1=3D README RELEASE.NOTES PORTDOCS2=3D INSTALL README.aruba README.database README.sguil README.snort= sam PORTDOCS3=3D create_db2 create_mysql create_postgresql SCHEMA_ACCESS create= _mssql create_oracle.sql PORTDOCS=3D ${PORTDOCS1} ${PORTDOCS2} ${PORTDOCS3} 35c51,54 < .if defined(WITH_MYSQL) --- pre-configure: cd ${WRKSRC}; ${SH} autogen.sh .if ${PORT_OPTIONS:MWITH_MYSQL} 41a61,63 CONFIGURE_ARGS+=3D --without-mysql \ --without-mysql-includes \ --without-mysql-libraries 45c67 < .if defined(WITH_POSTGRESQL) --- .if $(PORT_OPTIONS:MWITH_POSTGRESQL) 49a72 CONFIGURE_ARGS+=3D --without-postgresql 53c76 < .if defined(WITH_SNORT) --- .if $(PORT_OPTIONS:MWITH_SNORT) 57c80 < .if defined(WITH_SURICATA) --- .if $(PORT_OPTIONS:MWITH_SURICATA) 60a84,91 .if $(PORT_OPTIONS:MWITH_BRO) RUN_DEPENDS+=3D ${LOCALBASE}bin/bro:${PORTSDIR}/security/bro .endif .if $(PORT_OPTIONS:MWITH_SNORTSAM) RUN_DEPENDS+=3D ${LOCALBASE}bin/snortsnam:${PORTSDIR}/security/snortsam .endif 64c95,98 < LIB_DEPENDS+=3D tcl84.1:${PORTSDIR}/lang/tcl84 --- LIB_DEPENDS+=3D tcl84:${PORTSDIR}/lang/tcl84 .else USE_TCL=3D no CONFIGURE_ARGS+=3D --without-tcl 67,69d100 < pre-install: < ${CHMOD} 744 ${WRKSRC}/install-sh < 77,78c108 < [ -f ${PREFIX}/etc/${f} ] || \ < ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f} --- ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample 83a114 cd ${WRKSRC}/schemas && ${INSTALL_DATA} ${PORTDOCS3} ${DOCSDIR} diff -Nar ../barnyard2/distinfo barnyard2/distinfo 1,2c1,2 < SHA256 (barnyard2-1.9.tar.gz) =3D 6bce0d5bd4a6fa2be2e5b1daaed1d6d0ec8e7f5= 0b33bc1125125c8a9e78a5b0c < SIZE (barnyard2-1.9.tar.gz) =3D 652879 --- SHA256 (barnyard2-1.10.tar.gz) =3D 31d4e3745606489658bd411f74ffeb8a27573fdc= 08d0b51a6a71e1bf4dece8a2 SIZE (barnyard2-1.10.tar.gz) =3D 419781 diff -Nar ../barnyard2/files/patch-configure barnyard2/files/patch-configur= e 1,190d0 < --- ./configure.orig 2010-12-26 23:39:18.000000000 +0100 < +++ ./configure 2011-05-15 18:42:45.000000000 +0200 < @@ -13610,93 +13610,6 @@ < fi < fi < < -# Checking for Tcl support (required by spo_sguil) < - < -# Check whether --with-tcl was given. < -if test "${with_tcl+set}" =3D set; then : < - withval=3D$with_tcl; with_tcl=3D"$withval" < -else < - with_tcl=3Dno < -fi < - < - < -if test "$with_tcl" !=3D "no"; then < - # prioritise manual definition of the Tcl library. < - if test -d "$with_tcl"; then < - tclpath=3D"$with_tcl" < - else < - # let tclsh tell us where it was installed (prefer new Tcl versions). < - for ac_prog in tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0 tclsh < -do < - # Extract the first word of "$ac_prog", so it can be a program name wi= th args. < -set dummy $ac_prog; ac_word=3D$2 < -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 < -$as_echo_n "checking for $ac_word... " >&6; } < -if test "${ac_cv_prog_TCLSH+set}" =3D set; then : < - $as_echo_n "(cached) " >&6 < -else < - if test -n "$TCLSH"; then < - ac_cv_prog_TCLSH=3D"$TCLSH" # Let the user override the test. < -else < -as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR < -for as_dir in $PATH < -do < - IFS=3D$as_save_IFS < - test -z "$as_dir" && as_dir=3D. < - for ac_exec_ext in '' $ac_executable_extensions; do < - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac= _word$ac_exec_ext"; }; then < - ac_cv_prog_TCLSH=3D"$ac_prog" < - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exe= c_ext" >&5 < - break 2 < - fi < -done < - done < -IFS=3D$as_save_IFS < - < -fi < -fi < -TCLSH=3D$ac_cv_prog_TCLSH < -if test -n "$TCLSH"; then < - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5 < -$as_echo "$TCLSH" >&6; } < -else < - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 < -$as_echo "no" >&6; } < -fi < - < - < - test -n "$TCLSH" && break < -done < - < - if test "$TCLSH" !=3D ""; then < - tclpath=3D`echo 'puts [lindex $tcl_pkgPath 0]' | $TCLSH` < - fi < - fi < - < - # check, if tclConfig.sh can be found in tclsh's installation directory= . < - if test ! -r $tclpath/tclConfig.sh; then < - { $as_echo "$as_me:${as_lineno-$LINENO}: result: < - Can't find Tcl libraries. Use --with-tcl to specify < - the directory containing tclConfig.sh on your system. < - Continuing build without Tcl support." >&5 < -$as_echo " < - Can't find Tcl libraries. Use --with-tcl to specify < - the directory containing tclConfig.sh on your system. < - Continuing build without Tcl support." >&6; } < - else < - # source tclsh's configuration file and tell the user about the version= . < - . $tclpath/tclConfig.sh < - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tcl version n= umber" >&5 < -$as_echo_n "checking for the tcl version number... " >&6; } < - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_VERSION, patchlev= el $TCL_PATCH_LEVEL" >&5 < -$as_echo "$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&6; } < - LIBS=3D"$LIBS $TCL_LIBS $TCL_LIB_SPEC" < - TCL_INCLUDE=3D"$TCL_PREFIX/include/tcl$TCL_VERSION" < - CPPFLAGS=3D"$CPPFLAGS -I$TCL_INCLUDE -DENABLE_TCL"; < - fi < -fi < - < - < # Check whether --with-mysql was given. < if test "${with_mysql+set}" =3D set; then : < withval=3D$with_mysql; with_mysql=3D"$withval" < @@ -14496,6 +14409,93 @@ < LIBS=3D"${LIBS} -lbroccoli" < fi < < +# Checking for Tcl support (required by spo_sguil) < + < +# Check whether --with-tcl was given. < +if test "${with_tcl+set}" =3D set; then : < + withval=3D$with_tcl; with_tcl=3D"$withval" < +else < + with_tcl=3Dno < +fi < + < + < +if test "$with_tcl" !=3D "no"; then < + # prioritise manual definition of the Tcl library. < + if test -d "$with_tcl"; then < + tclpath=3D"$with_tcl" < + else < + # let tclsh tell us where it was installed (prefer new Tcl versions). < + for ac_prog in tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0 tclsh < +do < + # Extract the first word of "$ac_prog", so it can be a program name wi= th args. < +set dummy $ac_prog; ac_word=3D$2 < +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 < +$as_echo_n "checking for $ac_word... " >&6; } < +if test "${ac_cv_prog_TCLSH+set}" =3D set; then : < + $as_echo_n "(cached) " >&6 < +else < + if test -n "$TCLSH"; then < + ac_cv_prog_TCLSH=3D"$TCLSH" # Let the user override the test. < +else < +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR < +for as_dir in $PATH < +do < + IFS=3D$as_save_IFS < + test -z "$as_dir" && as_dir=3D. < + for ac_exec_ext in '' $ac_executable_extensions; do < + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac= _word$ac_exec_ext"; }; then < + ac_cv_prog_TCLSH=3D"$ac_prog" < + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exe= c_ext" >&5 < + break 2 < + fi < +done < + done < +IFS=3D$as_save_IFS < + < +fi < +fi < +TCLSH=3D$ac_cv_prog_TCLSH < +if test -n "$TCLSH"; then < + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5 < +$as_echo "$TCLSH" >&6; } < +else < + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 < +$as_echo "no" >&6; } < +fi < + < + < + test -n "$TCLSH" && break < +done < + < + if test "$TCLSH" !=3D ""; then < + tclpath=3D`echo 'puts [lindex $tcl_pkgPath 0]' | $TCLSH` < + fi < + fi < + < + # check, if tclConfig.sh can be found in tclsh's installation directory= . < + if test ! -r $tclpath/tclConfig.sh; then < + { $as_echo "$as_me:${as_lineno-$LINENO}: result: < + Can't find Tcl libraries. Use --with-tcl to specify < + the directory containing tclConfig.sh on your system. < + Continuing build without Tcl support." >&5 < +$as_echo " < + Can't find Tcl libraries. Use --with-tcl to specify < + the directory containing tclConfig.sh on your system. < + Continuing build without Tcl support." >&6; } < + else < + # source tclsh's configuration file and tell the user about the version= . < + . $tclpath/tclConfig.sh < + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tcl version n= umber" >&5 < +$as_echo_n "checking for the tcl version number... " >&6; } < + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_VERSION, patchlev= el $TCL_PATCH_LEVEL" >&5 < +$as_echo "$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL" >&6; } < + LIBS=3D"$LIBS $TCL_LIBS $TCL_LIB_SPEC" < + TCL_INCLUDE=3D"$TCL_PREFIX/include/tcl$TCL_VERSION" < + CPPFLAGS=3D"$CPPFLAGS -I$TCL_INCLUDE -DENABLE_TCL"; < + fi < +fi < + < + < # let's make some fixes.. < < CFLAGS=3D`echo $CFLAGS | sed -e 's/-I\/usr\/include //g'` diff -Nar ../barnyard2/files/patch-etc-Makefile.in barnyard2/files/patch-et= c-Makefile.in 1,11d0 < --- etc/Makefile.in.orig 2010-07-04 13:17:33.000000000 -0400 < +++ etc/Makefile.in 2010-07-04 13:18:42.000000000 -0400 < @@ -249,7 +249,7 @@ < done | $(am__base_list) | \ < while read files; do \ < echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ < - $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ < + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)/$$files-sample" || e= xit $$?; \ < done < < uninstall-sysconfDATA: diff -Nar ../barnyard2/pkg-plist barnyard2/pkg-plist 4d3 < @exec if [ ! -f %D/etc/barnyard2.conf ] ; then cp -p %D/%F %B/barnyard2.c= onf; fi
Class Changed From-To: sw-bug->maintainer-update rescue from pending.
Responsible Changed From-To: gnats-admin->jhale I'll take it.
The patch seems corrupted. Can you please send a unified diff (diff -ruN) or an svn diff as a regular attachment?
State Changed From-To: open->feedback Awaiting new patch.
Hopefully this is better. Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas On 10/7/12 7:24 PM, "Jason E. Hale" <jhale@freebsd.org> wrote: >The patch seems corrupted. Can you please send a unified diff (diff >-ruN) or >an svn diff as a regular attachment?
State Changed From-To: feedback->open New patch received.
There were a few changes I had to make. Could you please review the attached patch? - Trimmed Makefile header - Shortened COMMENT to keep it less than 70 characters - Changed POSTGRESQL -> PGSQL to keep it consistent with other ports - Used USE_AUTOTOOLS framework for build so that the correct build dependencies are installed - Changed MAKE_JOBS_UNSAFE -> MAKE_JOBS_SAFE because the port seems to build fine with make jobs enabled on tinderbox and in my own tests - The items that were in PORTDOCS3 seem more like examples so I changed the installation location to EXAMPLESDIR - QATty was failing with the PGSQL option, fixed that - Changed TCL option to use whatever TCL version is installed rather than forcing TCL-8.4, especially since TCL-8.5 is the default - Changed the handling of the barnyard2.conf file - The barnyard2-sguil port needed updated to use the new options framework
--On October 11, 2012 6:34:59 AM -0500 "Jason E. Hale" <jhale@freebsd.org> wrote: > There were a few changes I had to make. Could you please review the > attached patch? > > - Trimmed Makefile header > - Shortened COMMENT to keep it less than 70 characters > - Changed POSTGRESQL -> PGSQL to keep it consistent with other ports > - Used USE_AUTOTOOLS framework for build so that the correct build > dependencies are installed > - Changed MAKE_JOBS_UNSAFE -> MAKE_JOBS_SAFE because the port seems to > build fine with make jobs enabled on tinderbox and in my own tests > - The items that were in PORTDOCS3 seem more like examples so I changed > the installation location to EXAMPLESDIR > - QATty was failing with the PGSQL option, fixed that > - Changed TCL option to use whatever TCL version is installed rather than > forcing TCL-8.4, especially since TCL-8.5 is the default > - Changed the handling of the barnyard2.conf file > - The barnyard2-sguil port needed updated to use the new options framework Thanks, Jason. I didn't realize that docs had moved into the OPTIONS framework as well. I was going to submit the barnyard2-sguil port update next, so thanks a lot for already taking care of that as well. I think moving the portdocs3 to examples is fine. Those are database schemas that would only apply if an option is selected. If you agree, I think this can be accepted into the ports structure, and I can start working on other ports that need to be updated. -- Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/infosecurity/
State Changed From-To: open->closed Committed. Thanks!