Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142778 - net-analyzer/metasploit version bump to 3.0
Summary: net-analyzer/metasploit version bump to 3.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Netmon project
URL: http://sugar.metasploit.com/documents...
Whiteboard:
Keywords:
: 144352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-04 05:54 UTC by Michael Zanetta
Modified: 2008-02-25 16:11 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
metasploit-3.0_beta.ebuild (metasploit-3.0_beta.ebuild,1.51 KB, text/plain)
2006-08-04 05:55 UTC, Michael Zanetta
Details
metasploit-gentoo.patch (metasploit-gentoo.patch,4.99 KB, patch)
2006-08-04 05:56 UTC, Michael Zanetta
Details | Diff
MSF-1.1 (MSF-1.1,11.96 KB, text/plain)
2006-08-04 05:57 UTC, Michael Zanetta
Details
metasploit-3.0_beta.ebuild (metasploit-3.0_beta.ebuild,1.61 KB, text/plain)
2006-09-14 08:55 UTC, Michael Zanetta
Details
metasploit-gentoo.patch (metasploit-gentoo.patch,5.00 KB, patch)
2006-09-14 08:58 UTC, Michael Zanetta
Details | Diff
metasploit-3.0_beta2.ebuild (metasploit-3.0_beta2.ebuild,1.86 KB, text/plain)
2006-11-02 16:34 UTC, Michael Zanetta
Details
metasploit-3.0_beta3 ebuild (metasploit.tar.bz2,3.50 KB, application/octet-stream)
2007-01-10 01:36 UTC, Oleg Korsak
Details
metasploit-3.0_beta3.ebuild (metasploit.tar.bz2,3.52 KB, application/octet-stream)
2007-01-10 01:55 UTC, Oleg Korsak
Details
Updated metasplit ebuild (metasploit-3.0_beta3.ebuild,1.82 KB, text/plain)
2007-02-03 21:45 UTC, Jason Wever (RETIRED)
Details
Metasploit 3.0 eBuild (metasploit-3.0.ebuild.tar.bz2,1.68 KB, text/plain)
2007-03-30 14:23 UTC, deanx
Details
metasploit-3.0.ebuild (metasploit-3.0.ebuild,1.84 KB, text/plain)
2007-03-30 15:15 UTC, kristian meier
Details
metasploit3-gentoo.patch (metasploit3-gentoo.patch,4.04 KB, text/plain)
2007-03-30 15:19 UTC, kristian meier
Details
metasploit-3.0.ebuild (metasploit-3.0.ebuild,1.87 KB, text/plain)
2007-04-06 12:13 UTC, kristian meier
Details
files/msfweb3.confd (msfweb3.confd,273 bytes, text/plain)
2007-04-06 12:14 UTC, kristian meier
Details
files/msfweb3.initd (msfweb3.initd,434 bytes, text/plain)
2007-04-06 12:14 UTC, kristian meier
Details
metasploit-3.0.ebuild (metasploit-3.0.ebuild,1.87 KB, text/plain)
2007-04-06 12:22 UTC, kristian meier
Details
metasploit-3.0.ebuild (metasploit-3.0.ebuild,1.73 KB, text/plain)
2007-07-04 09:38 UTC, kristian meier
Details
metasploit3-gentoo.patch (metasploit3-gentoo.patch,4.04 KB, text/plain)
2007-07-04 09:39 UTC, kristian meier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zanetta 2006-08-04 05:54:57 UTC
Hi,

Please find attached an ebuild for metasploit framework v3 beta.
It might not work correctly but i thought it would be great to allow ppl testing it.

It's now ditributed under the metasploit framework license 1.1 that i'll attahc as well here.
Some pathing has been done for ruby to find it's libs.

Cheers
Comment 1 Michael Zanetta 2006-08-04 05:55:35 UTC
Created attachment 93408 [details]
metasploit-3.0_beta.ebuild
Comment 2 Michael Zanetta 2006-08-04 05:56:06 UTC
Created attachment 93409 [details, diff]
metasploit-gentoo.patch
Comment 3 Michael Zanetta 2006-08-04 05:57:34 UTC
Created attachment 93410 [details]
MSF-1.1

The new license
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2006-08-04 05:58:50 UTC
Please don't unnecessarily restrict bugs.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-08-18 14:46:49 UTC
*** Bug 144352 has been marked as a duplicate of this bug. ***
Comment 6 Stefano 2006-08-18 15:00:27 UTC
Wooops, my fault for the duplicate, I searched for "mtasploit"... (lame!)

Anyway, I'll repost my suggestion: since license changes, and almost all the infrastructure needed for the framework changed, it could make sense to make version 3.0 a separate ebuild and/or a slotted package...
Comment 7 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-08-21 06:08:16 UTC
Agree with the bump request.

Don't really care about the licence issue (the same package can have different licences for each ebuild)
Comment 8 Michael Zanetta 2006-09-14 08:55:54 UTC
Created attachment 96976 [details]
metasploit-3.0_beta.ebuild

I added the slot option and used it to name the symlink/lib dir acordingly

Feel free to comment it...
Comment 9 Michael Zanetta 2006-09-14 08:58:29 UTC
Created attachment 96977 [details, diff]
metasploit-gentoo.patch

Fixed the dir location
Comment 10 Michael Zanetta 2006-11-02 16:34:36 UTC
Created attachment 101102 [details]
metasploit-3.0_beta2.ebuild

Bump, added database deps, could probably be done better...
Comment 11 Cyrill Helg 2006-11-08 04:38:07 UTC
I get an error:

>>> Install metasploit-3.0_beta2 into /tmp/PORTAGE/var-tmp/portage/net-analyzer/metasploit-3.0_beta2/image/ category net-analyzer
cp: cannot stat `/usr/local/portage-overlays/personal/net-analyzer/metasploit/files/msfweb.initd': No such file or directory
Comment 12 Michael Zanetta 2006-11-08 11:11:59 UTC
(In reply to comment #11)
>`/usr/local/portage-overlays/personal/net-analyzer/metasploit/files/msfweb.initd':
> No such file or directory

You have to copy msfweb.confd and msfweb.initd from /usr/portage/net-analyzer/metasploit/files/ to your overlay.
Comment 13 Oleg Korsak 2007-01-08 14:00:02 UTC
any chance to see beta3 ebuilds? I have the only problem with just renaming beta2... -gentoo.patch is invalid for beta3 :(
Comment 14 Oleg Korsak 2007-01-10 01:36:42 UTC
Created attachment 106292 [details]
metasploit-3.0_beta3 ebuild

Ok. I got this one working :) I think somebody needs this too... ;)
Comment 15 Oleg Korsak 2007-01-10 01:55:07 UTC
Created attachment 106298 [details]
metasploit-3.0_beta3.ebuild

oooops... fixed init.d script ;)
Comment 16 Oleg Korsak 2007-01-10 12:45:20 UTC
(In reply to comment #15)
> Created an attachment (id=106298) [edit]
> metasploit-3.0_beta3.ebuild
> 
> oooops... fixed init.d script ;)
> 

ok... there is some problems starting /etc/init.d/msfweb3 start :( some paths are not found. I will check those problems someday. Feel free to help me too ;)
Comment 17 Jason Wever (RETIRED) gentoo-dev 2007-02-03 21:45:52 UTC
Created attachment 109046 [details]
Updated metasplit ebuild 

This is an updated ebuild for metasploit.  It makes sure rails is a dependency (which it wasn't before).  The init.d script needs some help if people desire to keep using start-stop-daemon. That's mostly due to that the fact that /usr/bin/msfweb3 launches the process that is actually the daemon, which has a totally separate PID from msfweb3 and msfweb3 doesn't kill it when it shuts down.

So all of the work is not done, but it's getting us somewhere.
Comment 18 GNUtoo 2007-03-18 23:26:10 UTC
 framework-3.0-beta-3-svn.tar.gz MD5 ;-) ...
 * framework-3.0-beta-3-svn.tar.gz RMD160 ;-) ...
 * framework-3.0-beta-3-svn.tar.gz SHA1 ;-) ...
 * framework-3.0-beta-3-svn.tar.gz SHA256 ;-) ...
 * framework-3.0-beta-3-svn.tar.gz size ;-) ...
 * checking ebuild checksums ;-) ...
 * checking auxfile checksums ;-) ...
 * checking miscfile checksums ;-) ...
 * checking framework-3.0-beta-3-svn.tar.gz ;-) ...
>>> Unpacking source...
>>> Unpacking framework-3.0-beta-3-svn.tar.gz to /var/tmp/portage/net-analyzer/metasploit-3.0_beta3/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/net-analyzer/metasploit-3.0_beta3/work/framework-3.0-beta-3 ...
 * Applying metasploit-gentoo.patch ...

 * Failed Patch: metasploit-gentoo.patch !
 *  ( /usr/overlay/net-analyzer/metasploit/files/metasploit-gentoo.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/net-analyzer/metasploit-3.0_beta3/temp/metasploit-gentoo.patch-24652.out


!!! ERROR: net-analyzer/metasploit-3.0_beta3 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 2971:   Called src_compile
  metasploit-3.0_beta3.ebuild, line 37:   Called epatch '/usr/overlay/net-analyzer/metasploit/files/metasploit-gentoo.patch'
  eutils.eclass, line 341:   Called die

!!! Failed Patch: metasploit-gentoo.patch!
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/net-analyzer/metasploit-3.0_beta3/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/overlay'

what should i do?
Comment 19 GNUtoo 2007-03-27 17:35:42 UTC
metasploit 3.0 is finally out
http://www.metasploit.org/
Comment 20 Stefan Behte (RETIRED) gentoo-dev Security 2007-03-28 22:42:41 UTC
http://metasploit.com/dev/trac/wiki/Metasploit3/InstallGentoo

"Installing Metasploit on Gentoo Linux

At this time, no Gentoo ebuild exists for Metasploit 3. In order to use the Metasploit Framework on Gentoo Linux, you will need to emerge the ruby and rubygems packages. Once these have been installed, use the "gem" command to install version 1.2.2 of rails (required for the msfweb interface).

 # emerge ruby
 # emerge rubygems
 # gem install -v=1.2.2 rails

If you would like to use the online update feature, you will need to emerge the "subversion" package as well. Once the pre-requisites have been installed, download the Unix tarball from Framework Website and extract it to the directory of your choice. If everything was installed correctly, execute the interface of your choice to get started (msfconsole, msfweb, etc)."
Comment 21 deanx 2007-03-30 14:23:10 UTC
Created attachment 114949 [details]
Metasploit 3.0 eBuild
Comment 22 kristian meier 2007-03-30 15:15:43 UTC
Created attachment 114958 [details]
metasploit-3.0.ebuild

sorry deanx I could open your file
Comment 23 kristian meier 2007-03-30 15:19:44 UTC
Created attachment 114964 [details]
metasploit3-gentoo.patch

the patch actually belongs into the upstream, since they do not handle relative symbolic links correctly.

this is actually modification of the metasploit-3.0_beta3.ebuild of this bug.

maybe deanx can post his ebuild and it is more mature than this, please use his than.
Comment 24 GNUtoo 2007-03-30 19:49:31 UTC
from the metasploit-3.0 ebuild

# emerge -av metasploit

These are the packages that would be merged, in order:

Calculating dependencies |

!!! Invalid or corrupt dependency specification:

invalid atom: 'ruby-libglade2'

('ebuild', '/', 'net-analyzer/metasploit-3.0', 'merge')

dev-lang/ruby dev-ruby/ruby-xlib gtk? (ruby-libglade2) sqlite2? ( dev-ruby/sqlite-ruby dev-ruby/activerecord ) sqlite3? ( dev-ruby/sqlite3-ruby dev-ruby/activerecord ) postgres? ( dev-ruby/ruby-postgres dev-ruby/activerecord )

This package can not be installed. Please notify the
'net-analyzer/metasploit-3.0' package maintainer about this problem.
Comment 25 GNUtoo 2007-03-30 20:02:45 UTC
in the 3.0 ebuild remplace ruby-libglade2 by dev-ruby/ruby-libglade2...
Comment 26 GNUtoo 2007-03-30 20:03:48 UTC
where are theses files?
	newinitd ${FILESDIR}/msfweb.initd msfweb${SLOT} || die "newinitd failed"
	newconfd ${FILESDIR}/msfweb.confd msfweb${SLOT} || die "newconfd failed"
Comment 27 kristian meier 2007-04-06 12:13:00 UTC
Created attachment 115561 [details]
metasploit-3.0.ebuild

fixed the dependency ruby-libglade2
Comment 28 kristian meier 2007-04-06 12:14:16 UTC
Created attachment 115562 [details]
files/msfweb3.confd

adjusted the one from version 2.x
Comment 29 kristian meier 2007-04-06 12:14:57 UTC
Created attachment 115564 [details]
files/msfweb3.initd

adjusted the one from version 2.x
Comment 30 kristian meier 2007-04-06 12:22:20 UTC
Created attachment 115566 [details]
metasploit-3.0.ebuild

fixed the version of the license from metasploit
Comment 31 Kanstantsin Shautsou 2007-04-18 19:00:45 UTC
metasploit # USE="-gtk" emerge  -av metasploit

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-ruby/ruby-xlib-0.6.15-r1  0 kB
[ebuild  NSf  ] net-analyzer/metasploit-3.0  USE="-gtk -postgres -sqlite2 -sqlite3" 0 kB [1]
Would you like to merge these packages? [Yes/No] y
..............................................................
window.c: В функции ‘xlib_window_copy_area’
window.c:338: предупреждение: pointer targets in passing argument 4 of ‘XGetGeometry’ differ in signedness
window.c:338: предупреждение: pointer targets in passing argument 5 of ‘XGetGeometry’ differ in signedness
window.c: В функции ‘xlib_window_get_y’
window.c: В функции ‘xlib_window_get_x’
window.c: В функции ‘xlib_window_get_width’
window.c: В функции ‘xlib_window_get_height’
window.c: В функции ‘xlib_window_get_border_width’
window.c: В функции ‘xlib_window_get_depth’
window.c: В функции ‘xlib_window_get_rect’
window.c: В функции ‘xlib_pixmap_write_xbm’

..............................................................
>>> Install ruby-xlib-0.6.15-r1 into /var/tmp/portage/dev-ruby/ruby-xlib-0.6.15-r1/image/ category dev-ruby
mkdir -p /var/tmp/portage/dev-ruby/ruby-xlib-0.6.15-r1/image//usr/lib/ruby/site_ruby/1.8/i686-linux
/bin/install -c -m 0755 xlib.so /var/tmp/portage/dev-ruby/ruby-xlib-0.6.15-r1/image//usr/lib/ruby/site_ruby/1.8/i686-linux
make: /bin/install: Команда не найдена
make: *** [/var/tmp/portage/dev-ruby/ruby-xlib-0.6.15-r1/image//usr/lib/ruby/site_ruby/1.8/i686-linux/xlib.so] Ошибка 127

!!! ERROR: dev-ruby/ruby-xlib-0.6.15-r1 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_install
  ebuild.sh, line 1060:   Called qa_call 'src_install'
  ebuild.sh, line 44:   Called src_install
  ruby-xlib-0.6.15-r1.ebuild, line 37:   Called ruby_src_install
  ruby.eclass, line 198:   Called ruby_einstall
  ruby.eclass, line 154:   Called die

!!! make install failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/dev-ruby/ruby-xlib-0.6.15-r1/temp/build.log'.


Comment 32 Pandor 2007-06-17 13:16:51 UTC
(In reply to comment #23)
> Created an attachment (id=114964) [edit]
> metasploit3-gentoo.patch
> 
> the patch actually belongs into the upstream, since they do not handle relative
> symbolic links correctly.
> 
> this is actually modification of the metasploit-3.0_beta3.ebuild of this bug.
> 
> maybe deanx can post his ebuild and it is more mature than this, please use his
> than.
> 

report metasploit bugs @ http://metasploit.com/dev/trac/newticket
Comment 33 Ryan Davis 2007-06-28 11:35:11 UTC
Ebuild works fine. I *did* have to make a symlink from /bin/install to /usr/bin/install, though.
Comment 34 genuesslichselbstsichererorangutan 2007-06-30 15:17:05 UTC
is there any reason why dev-ruby/rubygems and dev-ruby/rails not in RDEPEND?
Comment 35 kristian meier 2007-07-04 09:38:38 UTC
Created attachment 123857 [details]
metasploit-3.0.ebuild

OK, removed the ruby-xlib RDEPEND (please tell my if this was wrong). added a 'httpd' use flag for the rails application and added rails as RDEPEND here. 

but this rails stuff is tricky because msfweb needs rails-1.2.2 otherwise it does not work. so any idea how to deal with such a problem. for example I have rails-1.2.3 installed I do not want to downgrade rails just for metasploit.

I am sorry, I also realized that I do not have any idea how to prove that the list of RDEPENDs is minimal and sufficient. comments afor this are also welcome. here.
Comment 36 kristian meier 2007-07-04 09:39:37 UTC
Created attachment 123859 [details]
metasploit3-gentoo.patch

fixed typo3
Comment 37 genuesslichselbstsichererorangutan 2007-07-05 18:20:19 UTC
you can use rails-1.2.3
by replace
"RAILS_GEM_VERSION = '1.2.2' unless defined? RAILS_GEM_VERSION"
with
"RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION"
in /usr/lib/metasploit3/data/msfweb/config/enviroment.rb

for me it works.
Comment 38 Cédric Krier gentoo-dev 2007-09-09 11:57:08 UTC
Bump in cvs
Thanks
Comment 39 Peter Volkov (RETIRED) gentoo-dev 2008-01-30 14:05:14 UTC
Michael, could I ask you, why did you enabled FETCH restriction in ebuild?
Comment 40 Anton Bolshakov 2008-01-30 14:44:33 UTC
Good question.
The comment inside of the ebuild files says:
# Fetch restricted due to license acceptation
However, there is a license file in 
/usr/portage/licenses/MSF-1.2
It is still the same for the latest version 3.1.
It does mean gentoo users can use portage to download it, doesn't it?
Here is the direct link then:
http://sugar.metasploit.com/releases/framework-3.1.tar.gz
btw, version 3.1 is out.
Comment 41 Peter Volkov (RETIRED) gentoo-dev 2008-01-30 15:40:19 UTC
(In reply to comment #40)
Ok, I've mailed upstream to see what they say explicitly on this issue.

> btw, version 3.1 is out.

Yea, I've bumped it now.
Comment 42 Anton Bolshakov 2008-01-30 23:23:38 UTC
Please fix this small typo since we're here:

<       rm -Rf "${D}"/usr/lib/metasploit${SLOT}/documentation "${D}"/README
---
>
>       rm -Rf "${D}"/usr/lib/metasploit${SLOT}/documentation "${D}"/usr/lib/metasploit${SLOT}/README
Comment 43 Peter Volkov (RETIRED) gentoo-dev 2008-02-25 16:11:40 UTC
Thank you Anton. Now fixed that typo.