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
Created attachment 93408 [details] metasploit-3.0_beta.ebuild
Created attachment 93409 [details, diff] metasploit-gentoo.patch
Created attachment 93410 [details] MSF-1.1 The new license
Please don't unnecessarily restrict bugs.
*** Bug 144352 has been marked as a duplicate of this bug. ***
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...
Agree with the bump request. Don't really care about the licence issue (the same package can have different licences for each ebuild)
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...
Created attachment 96977 [details, diff] metasploit-gentoo.patch Fixed the dir location
Created attachment 101102 [details] metasploit-3.0_beta2.ebuild Bump, added database deps, could probably be done better...
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
(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.
any chance to see beta3 ebuilds? I have the only problem with just renaming beta2... -gentoo.patch is invalid for beta3 :(
Created attachment 106292 [details] metasploit-3.0_beta3 ebuild Ok. I got this one working :) I think somebody needs this too... ;)
Created attachment 106298 [details] metasploit-3.0_beta3.ebuild oooops... fixed init.d script ;)
(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 ;)
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.
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?
metasploit 3.0 is finally out http://www.metasploit.org/
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)."
Created attachment 114949 [details] Metasploit 3.0 eBuild
Created attachment 114958 [details] metasploit-3.0.ebuild sorry deanx I could open your file
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.
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.
in the 3.0 ebuild remplace ruby-libglade2 by dev-ruby/ruby-libglade2...
where are theses files? newinitd ${FILESDIR}/msfweb.initd msfweb${SLOT} || die "newinitd failed" newconfd ${FILESDIR}/msfweb.confd msfweb${SLOT} || die "newconfd failed"
Created attachment 115561 [details] metasploit-3.0.ebuild fixed the dependency ruby-libglade2
Created attachment 115562 [details] files/msfweb3.confd adjusted the one from version 2.x
Created attachment 115564 [details] files/msfweb3.initd adjusted the one from version 2.x
Created attachment 115566 [details] metasploit-3.0.ebuild fixed the version of the license from metasploit
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'.
(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
Ebuild works fine. I *did* have to make a symlink from /bin/install to /usr/bin/install, though.
is there any reason why dev-ruby/rubygems and dev-ruby/rails not in RDEPEND?
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.
Created attachment 123859 [details] metasploit3-gentoo.patch fixed typo3
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.
Bump in cvs Thanks
Michael, could I ask you, why did you enabled FETCH restriction in ebuild?
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.
(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.
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
Thank you Anton. Now fixed that typo.