Date: Tue, 8 Jan 2013 20:03:54 +0000 (UTC) From: Paul Schmehl <pauls@utdallas.edu> To: FreeBSD-gnats-submit@freebsd.org Cc: kevlo@FreeBSD.org Subject: ports/175145: security/bro, fix port so it installs broctl (required) Message-ID: <20130108200354.DB60FDCA82A@buttercup4.utdallas.edu> Resent-Message-ID: <201301082010.r08KA0Ju050142@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 175145 >Category: ports >Synopsis: security/bro, fix port so it installs broctl (required) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 08 20:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Paul Schmehl >Release: FreeBSD 8.3-STABLE amd64 >Organization: The University of Texas at Dallas >Environment: System: FreeBSD hostname.utdallas.edu 8.3-STABLE FreeBSD 8.3-STABLE #2 r243378M: Wed Nov 21 22:16:38 UTC 2012 root@hostname.utdallas.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: security/bro, fix port so it installs broctl, which is required for proper operation add two new options; ipsumdump and google-perftools add PORTREVISION=1 >How-To-Repeat: >Fix: --- bro.diff begins here --- Index: Makefile =================================================================== --- Makefile (revision 310107) +++ Makefile (working copy) @@ -3,27 +3,39 @@ PORTNAME= bro PORTVERSION= 2.1 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.bro-ids.org/downloads/release/ MAINTAINER= kevlo@FreeBSD.org COMMENT= System for detecting network intruders in real-time -BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison \ +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ + bison:${PORTSDIR}/devel/bison \ swig:${PORTSDIR}/devel/swig13 LIB_DEPENDS= GeoIP:${PORTSDIR}/net/GeoIP USE_PERL5= yes +USE_PYTHON= yes USE_CMAKE= yes +CMAKE_ARGS= -DINSTALL_BROCTL:BOOL=ON \ + -DBRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc/bro CONFIGURE_WRKSRC= ${WRKSRC}/build BUILD_WRKSRC= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} +SUB_FILES= pkg-message +USE_LDCONFIG= yes -OPTIONS_DEFINE= IPV6 LBL_HF LBL_CF ASSERT BROCCOLI +OPTIONS_DEFINE= IPV6 LBL_HF LBL_CF ASSERT BROCCOLI GPERFTOOLS IPSUMDUMP OPTIONS_DEFAULT=IPV6 LBL_HF LBL_CF +.if defined(SLAVE) +OPTIONS_DEFAULT+= BROCCOLI +.endif LBL_HF_DESC= Address to hostname filter support LBL_CF_DESC= Unix time to formated time/date filter support BROCCOLI_DESC= Build support for libbroccoli communications +GPERFTOOLS_DESC= Use Perftools to improve memory & CPU usage +IPSUMDUMP_DESC= Enables traffic summaries OPTIONS_EXCLUDE=NLS DOCS .include <bsd.port.options.mk> @@ -49,6 +61,15 @@ RUN_DEPENDS+= cf:${PORTSDIR}/sysutils/lbl-cf .endif +.if ${PORT_OPTIONS:MPERFTOOLS} +RUN_DEPENDS+= pprof:${PORTSDIR}/devel/google-perftools +CMAKE_ARGS+= -DENABLE_PERFTOOLS:BOOL=ON +.endif + +.if ${PORT_OPTIONS:MIPSUMDUMP} +RUN_DEPENDS+= ipsumdump:${PORTSDIR}/net/ipsumdump +.endif + .if ${PORT_OPTIONS:MASSERT} CMAKE_ARGS+= -DENABLE_DEBUG:BOOL=ON .endif @@ -57,4 +78,13 @@ # avoid installing .in header file ${REINPLACE_CMD} -e '13d' ${WRKSRC}/aux/binpac/lib/CMakeLists.txt +pre-install: +.for i in broctl.cfg networks.cfg node.cfg + @if [ -f ${PREFIX}/etc/bro/${i} ]; then \ + ${CP} -p ${PREFIX}/etc/bro/${i} ${PREFIX}/etc/bro/${i}.example ; \ + fi +.endfor + + @${CAT} ${PKGMESSAGE} + .include <bsd.port.mk> Index: files/pkg-message.in =================================================================== --- files/pkg-message.in (revision 0) +++ files/pkg-message.in (working copy) @@ -0,0 +1,10 @@ +********************PLEASE NOTE!!!*************************** + +During deinstall of this package, the cfg files for broctl +are not deleted if you have edited them. Instead +the software will create a .example file instead and the +edited files will remain in place when you upgrade. If you +want to delete them, you have to delete them and the directory, +%%PREFIX%%/etc/bro manually. + +********************PLEASE NOTE!!!*************************** Index: pkg-plist =================================================================== --- pkg-plist (revision 310107) +++ pkg-plist (working copy) @@ -1,19 +1,56 @@ -@comment $FreeBSD$ bin/binpac bin/bro +bin/broccoli-config +bin/broctl +bin/capstats +bin/trace-summary +@unexec if cmp -s %D/etc/bro/broctl.cfg.example %D/etc/bro/broctl.cfg; then rm -f %D/etc/bro/broctl.cfg; fi +@unexec if [ -f %D/etc/bro/broctl.cfg.example ]; then rm %D/etc/bro/broctl.cfg.example; fi +@exec if [ ! -f %D/etc/bro/broctl.cfg ] ; then cp -p %D/%F %B/bro/broctl.cfg; fi +@unexec if cmp -s %D/etc/bro/networks.cfg.example %D/etc/bro/networks.cfg; then rm -f %D/etc/bro/networks.cfg; fi +@unexec if [ -f %D/etc/bro/networks.cfg.example ]; then rm %D/etc/bro/networks.cfg.example; fi +@exec if [ ! -f %D/etc/bro/networks.cfg ] ; then cp -p %D/%F %B/bro/networks.cfg; fi +@unexec if cmp -s %D/etc/bro/node.cfg.example %D/etc/bro/node.cfg; then rm -f %D/etc/bro/node.cfg; fi +@unexec if [ -f %D/etc/bro/node.cfg.example ]; then rm %D/etc/bro/node.cfg.example; fi +@exec if [ ! -f %D/etc/bro/node.cfg ] ; then cp -p %D/%F %B/bro/node.cfg; fi include/binpac.h include/binpac_analyzer.h include/binpac_buffer.h include/binpac_bytestring.h include/binpac_exception.h include/binpac_regex.h -%%BROCCOLI%%bin/broccoli-config -%%BROCCOLI%%include/broccoli.h -%%BROCCOLI%%lib/libbinpac.a -%%BROCCOLI%%lib/libbroccoli.a -%%BROCCOLI%%lib/libbroccoli.so -%%BROCCOLI%%lib/libbroccoli.so.5 -%%BROCCOLI%%lib/libbroccoli.so.5.1.0 +include/broccoli.h +lib/broctl/BroControl/__init__.py +lib/broctl/BroControl/config.py +lib/broctl/BroControl/config.pyc +lib/broctl/BroControl/control.py +lib/broctl/BroControl/cron.py +lib/broctl/BroControl/doc.py +lib/broctl/BroControl/doc.pyc +lib/broctl/BroControl/execute.py +lib/broctl/BroControl/execute.pyc +lib/broctl/BroControl/install.py +lib/broctl/BroControl/node.py +lib/broctl/BroControl/node.pyc +lib/broctl/BroControl/options.py +lib/broctl/BroControl/options.pyc +lib/broctl/BroControl/plugin.py +lib/broctl/BroControl/plugin.pyc +lib/broctl/BroControl/pluginreg.py +lib/broctl/BroControl/pluginreg.pyc +lib/broctl/BroControl/util.py +lib/broctl/BroControl/util.pyc +lib/broctl/plugins/TestPlugin.py +lib/broctl/plugins/lb_myricom.py +lib/broctl/plugins/lb_pf_ring.py +lib/broctl/plugins/ps.py +lib/libbinpac.a +lib/libbroccoli.a +lib/libbroccoli.so +lib/libbroccoli.so.5 +lib/libbroccoli.so.5.1.0 +lib/python/SubnetTree.py +lib/python/_SubnetTree.so %%DATADIR%%/base/bro.bif.bro %%DATADIR%%/base/const.bif.bro %%DATADIR%%/base/event.bif.bro @@ -126,6 +163,12 @@ %%DATADIR%%/base/utils/site.bro %%DATADIR%%/base/utils/strings.bro %%DATADIR%%/base/utils/thresholds.bro +%%DATADIR%%/broctl/__load__.bro +%%DATADIR%%/broctl/auto.bro +%%DATADIR%%/broctl/check.bro +%%DATADIR%%/broctl/main.bro +%%DATADIR%%/broctl/process-trace.bro +%%DATADIR%%/broctl/standalone.bro %%DATADIR%%/policy/frameworks/communication/listen.bro %%DATADIR%%/policy/frameworks/control/controllee.bro %%DATADIR%%/policy/frameworks/control/controller.bro @@ -185,6 +228,52 @@ %%DATADIR%%/site/local-proxy.bro %%DATADIR%%/site/local-worker.bro %%DATADIR%%/site/local.bro +%%DATADIR%%ctl/scripts/archive-log +%%DATADIR%%ctl/scripts/broctl-config.sh +%%DATADIR%%ctl/scripts/cflow-stats +%%DATADIR%%ctl/scripts/check-config +%%DATADIR%%ctl/scripts/crash-diag +%%DATADIR%%ctl/scripts/create-link-for-log +%%DATADIR%%ctl/scripts/delete-log +%%DATADIR%%ctl/scripts/expire-logs +%%DATADIR%%ctl/scripts/fmt-time +%%DATADIR%%ctl/scripts/get-prof-log +%%DATADIR%%ctl/scripts/helpers/cat-file +%%DATADIR%%ctl/scripts/helpers/check-pid +%%DATADIR%%ctl/scripts/helpers/df +%%DATADIR%%ctl/scripts/helpers/exists +%%DATADIR%%ctl/scripts/helpers/gdb-attach +%%DATADIR%%ctl/scripts/helpers/get-childs +%%DATADIR%%ctl/scripts/helpers/is-dir +%%DATADIR%%ctl/scripts/helpers/rmdir +%%DATADIR%%ctl/scripts/helpers/run-cmd +%%DATADIR%%ctl/scripts/helpers/start +%%DATADIR%%ctl/scripts/helpers/stop +%%DATADIR%%ctl/scripts/helpers/to-bytes.awk +%%DATADIR%%ctl/scripts/helpers/top +%%DATADIR%%ctl/scripts/is-alive +%%DATADIR%%ctl/scripts/local-interfaces +%%DATADIR%%ctl/scripts/mail-contents +%%DATADIR%%ctl/scripts/make-archive-name +%%DATADIR%%ctl/scripts/post-terminate +%%DATADIR%%ctl/scripts/postprocessors/summarize-connections +%%DATADIR%%ctl/scripts/remove-link-for-log +%%DATADIR%%ctl/scripts/remove-log +%%DATADIR%%ctl/scripts/run-bro +%%DATADIR%%ctl/scripts/run-bro-on-trace +%%DATADIR%%ctl/scripts/send-mail +%%DATADIR%%ctl/scripts/set-bro-path +%%DATADIR%%ctl/scripts/stat-ctime +%%DATADIR%%ctl/scripts/stats-to-csv +%%DATADIR%%ctl/scripts/update +%%DATADIR%%ctl/scripts/update-stats +@dirrm spool/tmp +@dirrm spool/scripts +@dirrm spool +@dirrm %%DATADIR%%ctl/scripts/postprocessors +@dirrm %%DATADIR%%ctl/scripts/helpers +@dirrm %%DATADIR%%ctl/scripts +@dirrm %%DATADIR%%ctl @dirrm %%DATADIR%%/site @dirrm %%DATADIR%%/policy/tuning/defaults @dirrm %%DATADIR%%/policy/tuning @@ -207,6 +296,7 @@ @dirrm %%DATADIR%%/policy/frameworks/communication @dirrm %%DATADIR%%/policy/frameworks @dirrm %%DATADIR%%/policy +@dirrm %%DATADIR%%/broctl @dirrm %%DATADIR%%/base/utils @dirrm %%DATADIR%%/base/protocols/syslog @dirrm %%DATADIR%%/base/protocols/ssl @@ -243,3 +333,8 @@ @dirrm %%DATADIR%%/base/frameworks @dirrm %%DATADIR%%/base @dirrm %%DATADIR%% +@dirrmtry logs +@dirrm lib/broctl/plugins +@dirrm lib/broctl/BroControl +@dirrm lib/broctl +@dirrmtry etc/bro --- bro.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130108200354.DB60FDCA82A>