[145498] trunk/dports/net/bro
khindenburg at macports.org
khindenburg at macports.org
Sun Feb 7 11:51:02 PST 2016
Revision: 145498
https://trac.macports.org/changeset/145498
Author: khindenburg at macports.org
Date: 2016-02-07 11:51:02 -0800 (Sun, 07 Feb 2016)
Log Message:
-----------
bro: update to 2.4.1
- change folder structure to macports #42856
- copy previous installs to new structure
- add startup item
- add extended notes
Modified Paths:
--------------
trunk/dports/net/bro/Portfile
Added Paths:
-----------
trunk/dports/net/bro/files/org.macports.bro.plist
Modified: trunk/dports/net/bro/Portfile
===================================================================
--- trunk/dports/net/bro/Portfile 2016-02-07 19:40:19 UTC (rev 145497)
+++ trunk/dports/net/bro/Portfile 2016-02-07 19:51:02 UTC (rev 145498)
@@ -4,7 +4,7 @@
PortSystem 1.0
name bro
-version 2.4
+version 2.4.1
categories net security
platforms darwin
maintainers gmail.com:tanawts openmaintainer
@@ -20,8 +20,8 @@
master_sites ${homepage}downloads/release/ \
${homepage}downloads/archive/
-checksums rmd160 9b26dd589c626e9318560d923a1305634d463514 \
- sha256 740c0d0b0bec279c2acef5e1b6b4d0016c57cd02a729f5e2924ae4a922e208b2
+checksums rmd160 d0de91e52d5ff4edd08dff3b913a4250ad43e03a \
+ sha256 d8b99673a5024630f6bae820c4f8c3ca9029f1167f9e5729c914c66e1fc7c8f6
depends_build port:cmake \
port:libgeoip \
@@ -38,20 +38,68 @@
port:readline \
port:zlib
-universal_variant no
+variant universal {}
-configure.args --enable-mobile-ipv6
+configure.cflags-append "${configure.cflags} [get_canonical_archflags cc]"
+configure.universal_args
+configure.args --enable-mobile-ipv6 --conf-files-dir=${prefix}/etc/bro
+
+post-patch {
+ reinplace "s|\${BroBase}/spool|\${BroBase}/var/spool/bro|" ${worksrcpath}/aux/broctl/BroControl/options.py
+ reinplace "s|\${BroBase}/logs|\${BroBase}/var/log/bro|" ${worksrcpath}/aux/broctl/BroControl/options.py
+ reinplace "s|\${PREFIX}/logs|\${PREFIX}/var/log/bro|" ${worksrcpath}/aux/broctl/CMakeLists.txt
+ reinplace "s|{BroBase}/logs|{BroBase}/var/log/bro|" ${worksrcpath}/aux/broctl/doc/broctl.rst
+ reinplace "s|\${PREFIX}/spool|\${PREFIX}/var/spool/bro|" ${worksrcpath}/aux/broctl/CMakeLists.txt
+ reinplace "s|{BroBase}/spool|{BroBase}/var/spool/bro|" ${worksrcpath}/aux/broctl/doc/broctl.rst
+}
+
post-destroot {
- move ${destroot}${prefix}/etc/broccoli.conf ${destroot}${prefix}/etc/broccoli.conf.dist
+ xinstall -d ${destroot}${prefix}/share/examples/${name}
+ move ${destroot}${prefix}/etc/bro/broccoli.conf ${destroot}${prefix}/share/examples/${name}/
+ move ${destroot}${prefix}/etc/bro/node.cfg ${destroot}${prefix}/share/examples/${name}/
+ move ${destroot}${prefix}/etc/bro/networks.cfg ${destroot}${prefix}/share/examples/${name}/
+ move ${destroot}${prefix}/etc/bro/broctl.cfg ${destroot}${prefix}/share/examples/${name}/
+ reinplace "s|${prefix}/spool|${prefix}/var/spool/bro|" ${destroot}${prefix}/share/examples/${name}/broctl.cfg
+ reinplace "s|${prefix}/logs|${prefix}/var/log/bro|" ${destroot}${prefix}/share/examples/${name}/broctl.cfg
+
+ reinplace "s|/usr/bin/python|${prefix}/bin/python2.7|" ${destroot}${prefix}/bin/broctl
+
+ reinplace "s| /usr/bin/env python|${prefix}/bin/python2.7|" ${destroot}${prefix}/bin/trace-summary
+
+ xinstall -d ${destroot}${prefix}/Library/LaunchDaemons/
+ copy ${filespath}/org.macports.bro.plist ${destroot}${prefix}/Library/LaunchDaemons/
+ reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/Library/LaunchDaemons/org.macports.bro.plist
+
+ xinstall -d ${destroot}${prefix}/etc/${name}
+ xinstall -d ${destroot}${prefix}/var/log/${name}
+ xinstall -d ${destroot}${prefix}/var/spool/${name}
+ destroot.keepdirs ${destroot}${prefix}/etc/${name} \
+ ${destroot}${prefix}/var/log/${name} \
+ ${destroot}${prefix}/var/spool/${name}
}
post-activate {
- if {![file exists ${prefix}/etc/broccoli.conf]} {
- copy ${prefix}/etc/broccoli.conf.dist ${prefix}/etc/broccoli.conf
+ if {![file exists ${prefix}/etc/bro/broccoli.conf]} {
+ copy ${prefix}/share/examples/${name}/broccoli.conf ${prefix}/etc/bro/broccoli.conf
}
+ if {![file exists ${prefix}/etc/bro/node.cfg]} {
+ copy ${prefix}/share/examples/${name}/node.cfg ${prefix}/etc/bro/node.cfg
+ }
+ if {![file exists ${prefix}/etc/bro/networks.cfg]} {
+ copy ${prefix}/share/examples/${name}/networks.cfg ${prefix}/etc/bro/networks.cfg
+ }
+ if {![file exists ${prefix}/etc/bro/broctl.cfg]} {
+ copy ${prefix}/share/examples/${name}/broctl.cfg ${prefix}/etc/bro/broctl.cfg
+ }
}
+startupitem.create yes
+startupitem.netchange yes
+startupitem.start "${prefix}/bin/broctl start"
+startupitem.stop "${prefix}/bin/broctl stop"
+startupitem.restart "${prefix}/bin/broctl restart"
+
# This doesn't work due to error: error: AF_UNIX path too long
# To manual test:
# sudo port build
@@ -62,11 +110,36 @@
#test.target all
#test.dir ${worksrcpath}/aux/btest/testing
-notes \
-"You'll need to set your BROHOME to ${prefix}/share/bro and your\
-BROPATH to ${prefix}/share/bro/site:${prefix}/share/bro/policy\
-to use the provided policies."
+notes "
+You'll need to set your BROHOME to ${prefix}/share/bro and your
+BROPATH to ${prefix}/share/bro/site:${prefix}/share/bro/policy
+to use the provided policies.
+Check online documentation to finish install
+http://www.bro.org/sphinx/quickstart/index.html
+
+1) review config: node.cfg, network.cfg, broctl.cfg
+ especially network interface, MailTo
+ Existing files have not been modified
+
+2) Run as root or with sudo
+ # broctl
+ \[BroControl\] > install
+ \[BroControl\] > start
+
+3) Use scheduled task for maintenance
+ # ln -s ${prefix}/Library/LaunchDaemons/org.macports.bro.plist /Library/LaunchDaemons/
+ # launchctl load -w /Library/LaunchDaemons/org.macports.bro.plist
+
+
+**** UPGRADING ****
+
+Paths have been changed to respect macports hierarchy
+${prefix}/etc -> ${prefix}/etc/bro
+${prefix}/spool -> ${prefix}/var/spool/bro
+${prefix}/logs -> ${prefix}/var/log/bro
+"
+
livecheck.type regex
livecheck.url ${homepage}download/
livecheck.regex ${name}-(\[0-9a-z.\]+)${extract.suffix}
Added: trunk/dports/net/bro/files/org.macports.bro.plist
===================================================================
(Binary files differ)
Property changes on: trunk/dports/net/bro/files/org.macports.bro.plist
___________________________________________________________________
Added: svn:mime-type
+ application/xml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160207/16c77c5f/attachment-0001.html>
More information about the macports-changes
mailing list