From 77a018a54bf4f9c6a6fc1c9b6632e328fbad400a Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Mon, 26 May 2008 08:51:12 +0000 Subject: [PATCH] - Update to 0.7 - Add more RUN_DEPENDS and corresponding KNOBs - New MASTER_SITES PR: ports/123996 Submitted by: cherry AT trombik.org (maintainer) --- security/nsm-console/Makefile | 54 +++--- security/nsm-console/distinfo | 6 +- .../nsm-console/files/patch-lib-nsm_consle.rb | 18 -- security/nsm-console/files/patch-nsm | 42 +++-- security/nsm-console/pkg-descr | 2 +- security/nsm-console/pkg-plist | 161 ------------------ 6 files changed, 68 insertions(+), 215 deletions(-) delete mode 100644 security/nsm-console/files/patch-lib-nsm_consle.rb diff --git a/security/nsm-console/Makefile b/security/nsm-console/Makefile index 2f099c76b426..ca38932768ef 100644 --- a/security/nsm-console/Makefile +++ b/security/nsm-console/Makefile @@ -6,9 +6,9 @@ # PORTNAME= nsm-console -PORTVERSION= 0.3 +PORTVERSION= 0.7 CATEGORIES= security -MASTER_SITES= http://navi.eight7.org/~hinmanm/files/ +MASTER_SITES= http://writequit.org/projects/nsm-console/files/ MAINTAINER= cherry@trombik.org COMMENT= A framework for performing analysis on packat capture files @@ -28,17 +28,11 @@ OPTIONS= TSHARK "Install tshark" on \ PADS "Install pads" on \ FL0P "Install fl0p" on \ CHAOSREADER "Install chaosreader" on \ - ARGUS "Install argus" on -NSM_LIBFILES= command_manager.rb \ - command_manager.rb \ - commands.rb \ - encodelib.rb \ - history.rb \ - logging.rb \ - nsm_category.rb \ - nsm_console.rb \ - nsm_helper.rb \ - nsm_module.rb + ARGUS "Install argus" on \ + TCPICK "Install tcpick" on \ + TCPTRACE "Install tcptrace" on \ + FOREMOST "Install foremost" on \ + CHAOSREADER "Install chaosreader" on NSM_DOC= CHANGELOG TODO .include @@ -81,21 +75,39 @@ RUN_DEPENDS+= ${LOCALBASE}/bin/fl0p:${PORTSDIR}/security/fl0p RUN_DEPENDS+= ${LOCALBASE}/bin/chaosreader:${PORTSDIR}/security/chaosreader .endif .if defined(WITH_ARGUS) -RUN_DEPENDS+= ${LOCALBASE}/bin/ra:${PORTSDIR}/net-mgmt/argus-clients \ - ${LOCALBASE}/sbin/argus:${PORTSDIR}/net-mgmt/argus +RUN_DEPENDS+= ${LOCALBASE}/bin/ra:${PORTSDIR}/net-mgmt/argus3-clients \ + ${LOCALBASE}/sbin/argus:${PORTSDIR}/net-mgmt/argus3 +.endif +.if defined(WITH_TCPICK) +RUN_DEPENDS+= ${LOCALBASE}/bin/tcpick:${PORTSDIR}/net/tcpick +.endif +.if defined(WITH_TCPTRACE) +RUN_DEPENDS+= ${LOCALBASE}/bin/tcptrace:${PORTSDIR}/net/tcptrace +.endif +.if defined(WITH_FOREMOST) +RUN_DEPENDS+= ${LOCALBASE}/bin/foremost:${PORTSDIR}/sysutils/foremost +.endif +.if defined(WITH_CHAOSREADER) +RUN_DEPENDS+= ${LOCALBASE}/bin/chaosreader:${PORTSDIR}/security/chaosreader .endif post-patch: ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/nsm do-install: - ${MKDIR} ${RUBY_SITELIBDIR}/${PORTNAME} -.for F in ${NSM_LIBFILES} - ${INSTALL_DATA} ${WRKSRC}/lib/${F} ${RUBY_SITELIBDIR}/${PORTNAME} -.endfor + @${MKDIR} ${RUBY_SITELIBDIR}/${PORTNAME} + @( cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${RUBY_SITELIBDIR}/${PORTNAME} ) + @${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \ + ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \ + ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} .for D in modules - cd ${WRKSRC} && ${FIND} ${D} -type d -exec ${MKDIR} ${DATADIR}/{} ";" - cd ${WRKSRC} && ${FIND} ${D} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} ";" + @${MKDIR} ${DATADIR}/${D} + @( cd ${WRKSRC}/${D} && ${COPYTREE_SHARE} . ${DATADIR}/${D} ) + @${FIND} ${DATADIR} -type f | \ + ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${FIND} ${DATADIR} -type d | ${SORT} -r | \ + ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} .endfor ${INSTALL_SCRIPT} ${WRKSRC}/nsm ${PREFIX}/bin .if !defined(NOPORTDOCS) diff --git a/security/nsm-console/distinfo b/security/nsm-console/distinfo index a9b5c711f29a..498a054d0232 100644 --- a/security/nsm-console/distinfo +++ b/security/nsm-console/distinfo @@ -1,3 +1,3 @@ -MD5 (nsm-console-0.3.tar.gz) = d97885eaadc51de2308acac8f5c279a4 -SHA256 (nsm-console-0.3.tar.gz) = 2e012f9eb38749edb8f1f8441ed34c1814682ae765acc0ce382e1f82d3e0455d -SIZE (nsm-console-0.3.tar.gz) = 415384 +MD5 (nsm-console-0.7.tar.gz) = 6db1a7f7fefe2c84f93b129cc3851ecb +SHA256 (nsm-console-0.7.tar.gz) = 36cc2efe466d47b0a4eaa53169e9e63fb1a4dc2938f2ceac10176274674a4908 +SIZE (nsm-console-0.7.tar.gz) = 539019 diff --git a/security/nsm-console/files/patch-lib-nsm_consle.rb b/security/nsm-console/files/patch-lib-nsm_consle.rb deleted file mode 100644 index 69276d7d268c..000000000000 --- a/security/nsm-console/files/patch-lib-nsm_consle.rb +++ /dev/null @@ -1,18 +0,0 @@ ---- lib/nsm_console.rb.orig 2008-01-15 20:23:34.000000000 +0900 -+++ lib/nsm_console.rb 2008-01-15 20:24:32.000000000 +0900 -@@ -15,7 +15,7 @@ - load_categories($moduledir) - - ## Initialize logging -- logfilename = "logs/nsm-log." -+ logfilename = ENV["HOME"] + "/logs/nsm-log." - logfilename.concat(Time.now.year.to_s) - logfilename.concat(Time.now.month.to_s) - logfilename.concat(Time.now.day.to_s) -@@ -81,4 +81,4 @@ - - start_shell() - end --end -\ No newline at end of file -+end diff --git a/security/nsm-console/files/patch-nsm b/security/nsm-console/files/patch-nsm index c331f3fa47f1..ac7a677dd15b 100644 --- a/security/nsm-console/files/patch-nsm +++ b/security/nsm-console/files/patch-nsm @@ -1,6 +1,6 @@ ---- nsm.orig 2008-01-09 07:20:10.000000000 +0900 -+++ nsm 2008-01-15 20:05:17.000000000 +0900 -@@ -12,8 +12,8 @@ +--- nsm.orig 2008-03-31 13:23:21.000000000 +0900 ++++ nsm 2008-05-26 13:57:04.000000000 +0900 +@@ -24,8 +24,8 @@ include Readline ## Require commands @@ -11,25 +11,45 @@ ## Required for tab completion $tabstrings = CommandManager.get_commands_as_array() -@@ -23,16 +23,16 @@ - Readline.completion_proc = lambda{|s| $tabstrings.find_all{|elm| elm =~ /#{s}/}} +@@ -70,32 +70,32 @@ ## Require nsm console specific files + # Logging -require 'lib/logging' --require 'lib/history' --require 'lib/nsm_module' --require 'lib/nsm_category' --require 'lib/nsm_helper' --require 'lib/nsm_console' --require 'lib/encodelib' +require 'nsm-console/logging' + # The history module +-require 'lib/history' +require 'nsm-console/history' + # Module loading, options and running +-require 'lib/nsm_module' +require 'nsm-console/nsm_module' + # Module category function +-require 'lib/nsm_category' +require 'nsm-console/nsm_category' + # Helper methods (mostly for commands) +-require 'lib/nsm_helper' +require 'nsm-console/nsm_helper' + # Alias functions +-require 'lib/nsm_alias' ++require 'nsm-console/nsm_alias' + # Main shell functions +-require 'lib/nsm_console' +require 'nsm-console/nsm_console' + # Library for encoding and decoding +-require 'lib/encodelib' +require 'nsm-console/encodelib' + # Library for print and dump +-require 'lib/pcaplib' ++require 'nsm-console/pcaplib' + # Scholar's pcap library so libpcap isn't supported +-require 'lib/pcapparser' ++require 'nsm-console/pcapparser' + # Terminal color definitions +-require 'lib/colors' ++require 'nsm-console/colors' + + ## Defaults for variables ## Default module directory -$moduledir = "modules" +$moduledir = "%%DATADIR%%/modules" diff --git a/security/nsm-console/pkg-descr b/security/nsm-console/pkg-descr index fbc887e54152..4c10a4d4bfe2 100644 --- a/security/nsm-console/pkg-descr +++ b/security/nsm-console/pkg-descr @@ -1,4 +1,4 @@ NSM Console (Network Security Monitoring Console) is a framework for performing analysis on packat capture files. -WWW: http://thnetos.wordpress.com/nsm-console/ +WWW: http://writequit.org/projects/nsm-console/ diff --git a/security/nsm-console/pkg-plist b/security/nsm-console/pkg-plist index 9aba7ab86d67..ea6490c29d57 100644 --- a/security/nsm-console/pkg-plist +++ b/security/nsm-console/pkg-plist @@ -1,168 +1,7 @@ @comment $FreeBSD$ bin/nsm -%%RUBY_SITELIBDIR%%/nsm-console/commands.rb -%%RUBY_SITELIBDIR%%/nsm-console/encodelib.rb -%%RUBY_SITELIBDIR%%/nsm-console/history.rb -%%RUBY_SITELIBDIR%%/nsm-console/logging.rb -%%RUBY_SITELIBDIR%%/nsm-console/nsm_category.rb -%%RUBY_SITELIBDIR%%/nsm-console/nsm_console.rb -%%RUBY_SITELIBDIR%%/nsm-console/nsm_helper.rb -%%RUBY_SITELIBDIR%%/nsm-console/nsm_module.rb -%%RUBY_SITELIBDIR%%/nsm-console/command_manager.rb -%%DATADIR%%/modules/aimsnarf.module/aimsnarf -%%DATADIR%%/modules/aimsnarf.module/defaults -%%DATADIR%%/modules/aimsnarf.module/description -%%DATADIR%%/modules/aimsnarf.module/info -%%DATADIR%%/modules/argus-basic.module/argus-basic -%%DATADIR%%/modules/argus-basic.module/defaults -%%DATADIR%%/modules/argus-basic.module/description -%%DATADIR%%/modules/argus-basic.module/info -%%DATADIR%%/modules/bro-ids.module/bro-ids -%%DATADIR%%/modules/bro-ids.module/bro.cfg -%%DATADIR%%/modules/bro-ids.module/defaults -%%DATADIR%%/modules/bro-ids.module/description -%%DATADIR%%/modules/bro-ids.module/info -%%DATADIR%%/modules/capinfos.module/capinfos -%%DATADIR%%/modules/capinfos.module/defaults -%%DATADIR%%/modules/capinfos.module/description -%%DATADIR%%/modules/capinfos.module/info -%%DATADIR%%/modules/categories/flow -%%DATADIR%%/modules/categories/forensics -%%DATADIR%%/modules/categories/nsm -%%DATADIR%%/modules/categories/statistics -%%DATADIR%%/modules/chaosreader.module/chaosreader -%%DATADIR%%/modules/chaosreader.module/defaults -%%DATADIR%%/modules/chaosreader.module/description -%%DATADIR%%/modules/chaosreader.module/info -%%DATADIR%%/modules/fl0p.module/defaults -%%DATADIR%%/modules/fl0p.module/description -%%DATADIR%%/modules/fl0p.module/fl0p -%%DATADIR%%/modules/fl0p.module/info -%%DATADIR%%/modules/hash.module/defaults -%%DATADIR%%/modules/hash.module/description -%%DATADIR%%/modules/hash.module/hash -%%DATADIR%%/modules/hash.module/info -%%DATADIR%%/modules/honeysnap.module/defaults -%%DATADIR%%/modules/honeysnap.module/description -%%DATADIR%%/modules/honeysnap.module/honeysnap -%%DATADIR%%/modules/honeysnap.module/honeysnap.cfg -%%DATADIR%%/modules/honeysnap.module/info -%%DATADIR%%/modules/iploc.module/defaults -%%DATADIR%%/modules/iploc.module/description -%%DATADIR%%/modules/iploc.module/info -%%DATADIR%%/modules/iploc.module/iploc -%%DATADIR%%/modules/ngrep.module/description -%%DATADIR%%/modules/ngrep.module/info -%%DATADIR%%/modules/ngrep.module/ngrep -%%DATADIR%%/modules/p0f.module/defaults -%%DATADIR%%/modules/p0f.module/description -%%DATADIR%%/modules/p0f.module/info -%%DATADIR%%/modules/p0f.module/p0f -%%DATADIR%%/modules/pads.module/defaults -%%DATADIR%%/modules/pads.module/description -%%DATADIR%%/modules/pads.module/info -%%DATADIR%%/modules/pads.module/pads -%%DATADIR%%/modules/snort.module/rules/bleeding-attack_response.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-botcc-BLOCK.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-botcc.excluded -%%DATADIR%%/modules/snort.module/rules/bleeding-botcc.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-compromised-BLOCK.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-compromised.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-dos.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-drop-BLOCK.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-drop.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-dshield-BLOCK.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-dshield.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-exploit.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-game.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-inappropriate.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-malware.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-p2p.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-policy.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-rbn-BLOCK.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-rbn.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-scan.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-sid-msg.map -%%DATADIR%%/modules/snort.module/rules/bleeding-virus.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-voip.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-web.rules -%%DATADIR%%/modules/snort.module/rules/bleeding-web_sql_injection.rules -%%DATADIR%%/modules/snort.module/rules/bleeding.conf -%%DATADIR%%/modules/snort.module/rules/bleeding.rules -%%DATADIR%%/modules/snort.module/rules/community-bot.rules -%%DATADIR%%/modules/snort.module/rules/community-deleted.rules -%%DATADIR%%/modules/snort.module/rules/community-dos.rules -%%DATADIR%%/modules/snort.module/rules/community-ftp.rules -%%DATADIR%%/modules/snort.module/rules/community-exploit.rules -%%DATADIR%%/modules/snort.module/rules/community-game.rules -%%DATADIR%%/modules/snort.module/rules/community-icmp.rules -%%DATADIR%%/modules/snort.module/rules/community-imap.rules -%%DATADIR%%/modules/snort.module/rules/community-inappropriate.rules -%%DATADIR%%/modules/snort.module/rules/community-mail-client.rules -%%DATADIR%%/modules/snort.module/rules/community-misc.rules -%%DATADIR%%/modules/snort.module/rules/community-nntp.rules -%%DATADIR%%/modules/snort.module/rules/community-oracle.rules -%%DATADIR%%/modules/snort.module/rules/community-policy.rules -%%DATADIR%%/modules/snort.module/rules/community-sip.rules -%%DATADIR%%/modules/snort.module/rules/community-smtp.rules -%%DATADIR%%/modules/snort.module/rules/community-sql-injection.rules -%%DATADIR%%/modules/snort.module/rules/community-virus.rules -%%DATADIR%%/modules/snort.module/rules/community-web-attacks.rules -%%DATADIR%%/modules/snort.module/rules/community-web-cgi.rules -%%DATADIR%%/modules/snort.module/rules/community-web-client.rules -%%DATADIR%%/modules/snort.module/rules/community-web-dos.rules -%%DATADIR%%/modules/snort.module/rules/community-web-iis.rules -%%DATADIR%%/modules/snort.module/rules/community-web-misc.rules -%%DATADIR%%/modules/snort.module/rules/community-web-php.rules -%%DATADIR%%/modules/snort.module/rules/LICENSE -%%DATADIR%%/modules/snort.module/classification.config -%%DATADIR%%/modules/snort.module/defaults -%%DATADIR%%/modules/snort.module/description -%%DATADIR%%/modules/snort.module/info -%%DATADIR%%/modules/snort.module/reference.config -%%DATADIR%%/modules/snort.module/snort -%%DATADIR%%/modules/snort.module/snort.conf -%%DATADIR%%/modules/snort.module/unicode.map -%%DATADIR%%/modules/tcpdstat.module/defaults -%%DATADIR%%/modules/tcpdstat.module/description -%%DATADIR%%/modules/tcpdstat.module/info -%%DATADIR%%/modules/tcpdstat.module/tcpdstat -%%DATADIR%%/modules/tcpflow.module/defaults -%%DATADIR%%/modules/tcpflow.module/description -%%DATADIR%%/modules/tcpflow.module/info -%%DATADIR%%/modules/tcpflow.module/tcpflow -%%DATADIR%%/modules/tcpxtract.module/defaults -%%DATADIR%%/modules/tcpxtract.module/description -%%DATADIR%%/modules/tcpxtract.module/info -%%DATADIR%%/modules/tcpxtract.module/tcpxtract -%%DATADIR%%/modules/tcpxtract.module/tcpxtract.conf -%%DATADIR%%/modules/tshark.module/defaults -%%DATADIR%%/modules/tshark.module/description -%%DATADIR%%/modules/tshark.module/info -%%DATADIR%%/modules/tshark.module/tshark -%%DATADIR%%/modules/README %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrmtry %%DATADIR%%/modules/tshark.module -@dirrmtry %%DATADIR%%/modules/tcpxtract.module -@dirrmtry %%DATADIR%%/modules/tcpflow.module -@dirrmtry %%DATADIR%%/modules/tcpdstat.module -@dirrmtry %%DATADIR%%/modules/snort.module/rules -@dirrmtry %%DATADIR%%/modules/snort.module -@dirrmtry %%DATADIR%%/modules/pads.module -@dirrmtry %%DATADIR%%/modules/p0f.module -@dirrmtry %%DATADIR%%/modules/ngrep.module -@dirrmtry %%DATADIR%%/modules/iploc.module -@dirrmtry %%DATADIR%%/modules/honeysnap.module -@dirrmtry %%DATADIR%%/modules/hash.module -@dirrmtry %%DATADIR%%/modules/fl0p.module -@dirrmtry %%DATADIR%%/modules/chaosreader.module -@dirrmtry %%DATADIR%%/modules/categories -@dirrmtry %%DATADIR%%/modules/capinfos.module -@dirrmtry %%DATADIR%%/modules/bro-ids.module -@dirrmtry %%DATADIR%%/modules/argus-basic.module -@dirrmtry %%DATADIR%%/modules/aimsnarf.module -@dirrmtry %%DATADIR%%/modules @dirrmtry %%DATADIR%% @dirrmtry %%RUBY_SITELIBDIR%%/nsm-console