From 4c4874318a954ba7a8f341738f3dd2f74f1e2632 Mon Sep 17 00:00:00 2001 From: Rick Farina Date: Fri, 25 Apr 2014 16:48:54 +0000 Subject: updates for 9999, partial fixes for tests, fix for bug 508490 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key DD11F94A) --- net-analyzer/metasploit/ChangeLog | 6 ++- net-analyzer/metasploit/files/bug-8792.patch | 56 ++++++++++++++++++++++++++ net-analyzer/metasploit/metasploit-9999.ebuild | 20 +++++---- 3 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 net-analyzer/metasploit/files/bug-8792.patch (limited to 'net-analyzer/metasploit') diff --git a/net-analyzer/metasploit/ChangeLog b/net-analyzer/metasploit/ChangeLog index b7e7d5763f6a..e4c5e46e6abe 100644 --- a/net-analyzer/metasploit/ChangeLog +++ b/net-analyzer/metasploit/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/metasploit # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.90 2014/04/21 19:20:05 zerochaos Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.91 2014/04/25 16:48:54 zerochaos Exp $ + + 25 Apr 2014; Rick Farina +files/bug-8792.patch, + metasploit-9999.ebuild: + updates for 9999, partial fixes for tests, fix for bug 508490 *metasploit-4.9.2-r2 (21 Apr 2014) diff --git a/net-analyzer/metasploit/files/bug-8792.patch b/net-analyzer/metasploit/files/bug-8792.patch new file mode 100644 index 000000000000..9e37b3b6615d --- /dev/null +++ b/net-analyzer/metasploit/files/bug-8792.patch @@ -0,0 +1,56 @@ +diff --git a/spec/support/shared/contexts/msf/util/exe.rb b/spec/support/shared/contexts/msf/util/exe.rb +index e1372a6..c1b6ea5 100644 +--- a/spec/support/shared/contexts/msf/util/exe.rb ++++ b/spec/support/shared/contexts/msf/util/exe.rb +@@ -36,8 +36,8 @@ shared_context 'Msf::Util::Exe' do + { :format => "psh", :arch => "x86_64", :file_fp => /ASCII/ }, + { :format => "psh-net", :arch => "x86", :file_fp => /ASCII/ }, + { :format => "psh-net", :arch => "x86_64", :file_fp => /ASCII/ }, +- { :format => "war", :arch => "x86", :file_fp => /zip/i }, +- { :format => "war", :arch => "x86_64", :file_fp => /zip/i }, ++ { :format => "war", :arch => "x86", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "x86_64", :file_fp => /zip|jar/i }, + { :format => "msi", :arch => "x86", :file_fp => /(Composite Document)|(CDF V2 Document)/ }, + { :format => "msi", :arch => "x64", :file_fp => /(Composite Document)|(CDF V2 Document)/ }, + { :format => "msi", :arch => "x86_64", :file_fp => /(Composite Document)|(CDF V2 Document)/ }, +@@ -51,29 +51,29 @@ shared_context 'Msf::Util::Exe' do + { :format => "elf", :arch => "armle", :file_fp => /ELF 32.*ARM/ }, + { :format => "elf", :arch => "mipsbe", :file_fp => /ELF 32-bit MSB executable, MIPS/ }, + { :format => "elf", :arch => "mipsle", :file_fp => /ELF 32-bit LSB executable, MIPS/ }, +- { :format => "war", :arch => "x86", :file_fp => /zip/i }, +- { :format => "war", :arch => "x64", :file_fp => /zip/i }, +- { :format => "war", :arch => "armle", :file_fp => /zip/i }, +- { :format => "war", :arch => "mipsbe", :file_fp => /zip/i }, +- { :format => "war", :arch => "mipsle", :file_fp => /zip/i }, ++ { :format => "war", :arch => "x86", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "x64", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "armle", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "mipsbe", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "mipsle", :file_fp => /zip|jar/i }, + ], + "bsd" => [ + { :format => "elf", :arch => "x86", :file_fp => /ELF 32.*BSD/ }, +- { :format => "war", :arch => "x86", :file_fp => /zip/i }, ++ { :format => "war", :arch => "x86", :file_fp => /zip|jar/i }, + ], + "solaris" => [ + { :format => "elf", :arch => "x86", :file_fp => /ELF 32/ }, +- { :format => "war", :arch => "x86", :file_fp => /zip/i }, ++ { :format => "war", :arch => "x86", :file_fp => /zip|jar/i }, + ], + "osx" => [ + { :format => "macho", :arch => "x86", :file_fp => /Mach-O.*i386/ }, + { :format => "macho", :arch => "x64", :file_fp => /Mach-O 64/ }, + { :format => "macho", :arch => "armle", :file_fp => /Mach-O.*(acorn|arm)/ }, + { :format => "macho", :arch => "ppc", :file_fp => /Mach-O.*ppc/ }, +- { :format => "war", :arch => "x86", :file_fp => /zip/i }, +- { :format => "war", :arch => "x64", :file_fp => /zip/i }, +- { :format => "war", :arch => "armle", :file_fp => /zip/i }, +- { :format => "war", :arch => "ppc", :file_fp => /zip/i }, ++ { :format => "war", :arch => "x86", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "x64", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "armle", :file_fp => /zip|jar/i }, ++ { :format => "war", :arch => "ppc", :file_fp => /zip|jar/i }, + ], + } + diff --git a/net-analyzer/metasploit/metasploit-9999.ebuild b/net-analyzer/metasploit/metasploit-9999.ebuild index 299cdde1c9d2..5ffefc35af2b 100644 --- a/net-analyzer/metasploit/metasploit-9999.ebuild +++ b/net-analyzer/metasploit/metasploit-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-9999.ebuild,v 1.21 2014/04/21 18:57:45 zerochaos Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-9999.ebuild,v 1.22 2014/04/25 16:48:54 zerochaos Exp $ EAPI="5" @@ -71,7 +71,7 @@ COMMON_DEPEND="dev-db/postgresql-server net-analyzer/nmap" DEPEND+=" ${COMMON_DEPEND}" RDEPEND+=" ${COMMON_DEPEND} - >=app-admin/eselect-metasploit-0.10" + >=app-admin/eselect-metasploit-0.13" RESTRICT="strip" @@ -125,6 +125,7 @@ all_ruby_unpack() { all_ruby_prepare() { # add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs #epatch "${FILESDIR}/agix_psexec_pull-2657.patch" + epatch "${FILESDIR}/bug-8792.patch" epatch_user #unbundle johntheripper, at least it now defaults to running the system version @@ -143,12 +144,11 @@ all_ruby_prepare() { #The Gemfile contains real known deps #add our dep on upstream rb-readline instead of bundled one sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die + sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die #remove the bundled readline #https://github.com/rapid7/metasploit-framework/pull/3105 + #this PR was closed due to numerous changes to their local fork, almost entirely for non-linux rm lib/rbreadline.rb - #fix for bug #507816 while waiting on upstream to actually set their own deps right - sed -i "s#gem 'activesupport', '>= 3.0.0'#gem 'activesupport', '~> 3.2'#" Gemfile || die - sed -i "s#gem 'activerecord'#gem 'activerecord', '~> 3.2'#" Gemfile || die #now we edit the Gemfile based on use flags #even if we pass --without=blah bundler still calculates the deps and messes us up if ! use pcap; then @@ -204,13 +204,16 @@ each_ruby_prepare() { } each_ruby_test() { - #rake --trace spec || die + #review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox + # https://dev.metasploit.com/redmine/issues/8425 ${RUBY} -S rake db:create || die ${RUBY} -S rake db:migrate || die #we bogart msfupdate so no point in trying to test it rm spec/msfupdate_spec.rb || die + #we don't really want to be uploading to virustotal during the tests + rm spec/tools/virustotal_spec.rb RAILS_ENV=test MSF_DATABASE_CONFIG=config/database.yml ${RUBY} -S rake spec || die su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user" @@ -218,8 +221,9 @@ each_ruby_test() { each_ruby_install() { #Tests have already been run, we don't need this stuff - rm -rf spec - rm -rf test + rm -r spec + rm -r test + rm Gemfile.lock #I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple. # should be as simple as copying everything into the target... -- cgit v1.2.3-65-gdbad