Summary: | net-analyzer/metasploit-4.8.2 - src_prepare(): bugs in hackery | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Zhu Sha Zang <zhushazang> |
Component: | Current packages | Assignee: | Rick Farina (Zero_Chaos) <zerochaos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ruby |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 424339 | ||
Bug Blocks: |
Description
Zhu Sha Zang
2013-12-20 14:59:29 UTC
I can't commit the fix right now do to some failure, but you will be able to build if you don't use the development or test use flag. upstream has declared rake10 a dep for both development and testing. so I've masked both flags until such time as we have rake10 in the tree. Now I face this: [root@asgard ~/exiv2]$ emerge metasploit 14:11 Calculating dependencies ... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) net-analyzer/metasploit-4.8.2 * framework-4.8.2.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking framework-4.8.2.tar.bz2 to /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work >>> Source unpacked in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work >>> Preparing source in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3 ... * Applying agix_psexec_pull-2657.patch ... [ ok ] Resolving dependencies... Could not find gem 'pcaprub (>= 0) ruby' in the gems available on this machine. * ERROR: net-analyzer/metasploit-4.8.2::gentoo failed (prepare phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_prepare * environment, line 2520: Called die * The specific snippet of code: * bundle install --local || die; * * If you need support, post the output of `emerge --info '=net-analyzer/metasploit-4.8.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-analyzer/metasploit-4.8.2::gentoo'`. * The complete build log is located at '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/environment'. * Working directory: '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3' * S: '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3' (In reply to Zhu Sha Zang from comment #3) > Now I face this: > > [root@asgard ~/exiv2]$ emerge metasploit > 14:11 > Calculating dependencies ... done! > > >>> Verifying ebuild manifests > Could not find gem 'pcaprub (>= 0) ruby' in the gems available on this > machine. What use flags are you using to build? Are you hiding "--nodeps" on your EMERGE_DEFAULT_OPTS or something? I can't make it fail here with or without pcap use flag on both 4.8.2 and 9999 please show "emerge -vp metasploit pcaprub" [root@asgard ~]$ emerge -vp metasploit pcaprub These are the packages that would be merged, in order: Calculating dependencies ... done! [ebuild R ] dev-ruby/pcaprub-0.11.3-r1 USE="-doc {-test}" RUBY_TARGETS="ruby19" 0 kB [ebuild N ] net-analyzer/metasploit-4.8.2:4.8 USE="java lorcon pcap (-development) {-test}" 0 kB Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 kB [root@asgard ~]$ I recently had another bug caused by ruby20 being set as active or installed or something (I'm not entirely sure since I masked it for being broken). Can you please report on what version of ruby is active and if ruby20 is installed? I'd love to get this to work properly but I can't currently replicate. eselect ruby list Available Ruby profiles: [1] ruby18 (with Rubygems) * [2] ruby19 (with Rubygems) [3] ruby20 (with Rubygems) That is it. Regards Hey, changing ruby to 19, compilation run til the end. >>> Emerging (25 of 25) net-analyzer/metasploit-4.8.2 * framework-4.8.2.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking framework-4.8.2.tar.bz2 to /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work >>> Source unpacked in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work >>> Preparing source in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3 ... * Applying agix_psexec_pull-2657.patch ... [ ok ] Resolving dependencies... Using i18n (0.6.9) Using multi_json (1.6.1) Using activesupport (3.2.16) Using builder (3.0.4) Using activemodel (3.2.16) Using arel (3.0.2) Using tzinfo (0.3.37) Using activerecord (3.2.16) Using json (1.8.1) Using metasploit_data_models (0.16.9) Using msgpack (0.5.7) Using network_interface (0.0.1) Using nokogiri (1.6.0) Using packetfu (1.1.9) Using pcaprub (0.11.3) Using pg (0.17.1) Using robots (0.10.1) Using bundler (1.3.5) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. The Gemfile's dependencies are satisfied >>> Source prepared. >>> Configuring source in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/work/msf3 ... >>> Source compiled. >>> Test phase [not enabled]: net-analyzer/metasploit-4.8.2 >>> Install metasploit-4.8.2 into /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/image/ category net-analyzer >>> Completed installing metasploit-4.8.2 into /var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/image/ ecompressdir: bzip2 -9 /usr/share/doc >>> Installing (25 of 25) net-analyzer/metasploit-4.8.2 Thank you thanks for the troubleshooting. I'll see if I can detect that and bail out with a useful error. ruby team: this package pretty much only works with ruby19, and requires ruby19 set active to install. is there anything I can do to make that work right, or am I just stuck? (In reply to Rick Farina (Zero_Chaos) from comment #11) > ruby team: > > this package pretty much only works with ruby19, and requires ruby19 set > active to install. > > is there anything I can do to make that work right, or am I just stuck? We are seeing this issue with more ruby packages, especially now that new ruby versions are coming out more frequently and consequently support for them is more spotty in the tree. Given that the eselected version is a runtime thing we can't solve this with dependencies, so I think the best we can do is a check in preinst to see if the eselected ruby is included in the versions in USE_RUBY for that package. That would at least provide a clear error at the start of emerge. can you please eselect any ruby but ruby19 and test metasploit-9999? Sorry my delay, but i was unable to unmask hardmasked. How can i do that? Regards (In reply to Zhu Sha Zang from comment #14) > Sorry my delay, but i was unable to unmask hardmasked. How can i do that? > > Regards ACCEPT_KEYWORDS="**" emerge metasploit -vat1 well I had the problem with [ebuild N ~] net-analyzer/metasploit-4.8.2:4.8 USE="java pcap (-development) -lorcon {-test}" 0 kB compiling lead to this * Applying agix_psexec_pull-2657.patch ... [ ok ] Resolving dependencies... Could not find gem 'pcaprub (>= 0) ruby' in the gems available on this machine. * ERROR: net-analyzer/metasploit-4.8.2::gentoo failed (prepare phase): checking the gem gem install pcaprub Fetching: pcaprub-0.11.3.gem (100%) Building native extensions. This could take a while... Successfully installed pcaprub-0.11.3 Parsing documentation for pcaprub-0.11.3 Before reporting this, could you check that the file you're documenting has proper syntax: /usr/bin/ruby18 -c ext/pcaprub/pcaprub.c RDoc is not a full Ruby parser and will fail when fed invalid ruby programs. The internal error was: (RegexpError) Stack overflow in regexp matcher: /.*((?>\/\*.*?\*\/\s+)) ([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(PCAPRUB)"/mx ERROR: While executing gem ... (RegexpError) Stack overflow in regexp matcher: /.*((?>\/\*.*?\*\/\s+)) ([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(PCAPRUB)"/mx and eix pcaprub [I] dev-ruby/pcaprub Available versions: (~)0.11.3-r1^t {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby19 ruby20 ruby21"} Installed versions: 0.11.3-r1^t(17:12:09 23/01/14)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby19 -ruby20 -ruby21") Homepage: https://rubygems.org/gems/pcaprub Description: Libpcap bindings for ruby compat found this this tread I had eselect ruby list Available Ruby profiles: [1] ruby18 (with Rubygems) * [2] ruby19 (with Rubygems) [3] ruby20 (with Rubygems) so I switch to ruby19 compiling again now I have * Applying agix_psexec_pull-2657.patch ... [ ok ] Resolving dependencies... Could not find gem 'packetfu (= 1.1.9) ruby' in the gems available on this machine. note that I have eix packetfu [I] dev-ruby/packetfu Available versions: ~1.1.9 (~)1.1.10 {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby19"} Installed versions: 1.1.10(17:12:20 23/01/14)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby19") Homepage: https://rubygems.org/gems/packetfu Description: A mid-level packet manipulation library I was previously told by portage that I will have to unmask some package in order to get metasploit-4.8.2 to compile and packetfu-1.1.10 was one of them. # required by net-analyzer/metasploit-4.8.2 # required by @selected # required by @world (argument) =dev-ruby/packetfu-1.1.10 ~amd64 ok let's try with ruby20 for fun * Applying agix_psexec_pull-2657.patch ... [ ok ] /usr/bin/bundle:8:in `load': cannot load such file -- /usr/lib64/ruby/gems/2.0.0/gems/bundler-1.3.5/bin/bundle (LoadError) from /usr/bin/bundle:8:in `<main>' uld not find gem 'packetfu (= 1.1.9) ruby' in the gems available on this machine. * ERROR: net-analyzer/metasploit-4.8.2::gentoo failed (prepare phase): So I finally got metasploit-4.8.2 to compile; eselect ruby set ruby19 and downgrading to packetfu-1.1.9 # required by net-analyzer/metasploit-4.8.2 # required by @selected # required by @world (argument) #=dev-ruby/packetfu-1.1.10 ~amd64 =dev-ruby/packetfu-1.1.9 ~amd64 but why portage told me that I should =dev-ruby/packetfu-1.1.10 ~amd64 before? jlgentoo ~ # eselect ruby list Available Ruby profiles: [1] ruby19 (with Rubygems) [2] ruby20 (with Rubygems) * [3] ruby21 (with Rubygems) jlgentoo ~ # eselect ruby set 1 Successfully switched to profile: ruby19 jlgentoo ~ # emerge -vaD metasploit These are the packages that would be merged, in order: Calculating dependencies \ ... done! [ebuild N ] net-analyzer/metasploit-4.9.2:4.9 USE="java pcap (-development) -lorcon -oracle {-test}" RUBY_TARGETS="ruby19" 0 kB Total: 1 package (1 new), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No] >>> Verifying ebuild manifests >>> Emerging (1 of 1) net-analyzer/metasploit-4.9.2::gentoo >>> Failed to emerge net-analyzer/metasploit-4.9.2, Log file: >>> '/var/tmp/portage/net-analyzer/metasploit-4.9.2/temp/build.log' >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.64, 0.20, 0.33 * Package: net-analyzer/metasploit-4.9.2 * Repository: gentoo * Maintainer: zerochaos@gentoo.org * USE: amd64 elibc_glibc java kernel_linux pcap ruby_targets_ruby19 userland_GNU * FEATURES: ccache preserve-libs sandbox userpriv usersandbox >>> Unpacking source... * Running unpack phase for all ... >>> Unpacking framework-4.9.2.tar.bz2 to /var/tmp/portage/net-analyzer/metasploit-4.9.2/work/all >>> Source unpacked in /var/tmp/portage/net-analyzer/metasploit-4.9.2/work >>> Preparing source in /var/tmp/portage/net-analyzer/metasploit-4.9.2/work ... * Running prepare phase for all ... * Running source copy phase for ruby19 ... * Running prepare phase for ruby19 ... Resolving dependencies... Using i18n (0.6.9) Using minitest (4.7.5) Using multi_json (1.9.2) Using atomic (1.1.16) Using thread_safe (0.3.1) Using tzinfo (0.3.38) Using activesupport (4.0.4) Using builder (3.1.4) Using activemodel (4.0.4) Using activerecord-deprecated_finders (1.0.3) Using arel (4.0.2) Using activerecord (4.0.4) Using bcrypt (3.1.7) Installing bcrypt-ruby (3.1.7) Bundler::GemNotFound: Could not find bcrypt-ruby-3.1.7.gem for installation An error occurred while installing bcrypt-ruby (3.1.7), and Bundler cannot continue. Make sure that `gem install bcrypt-ruby -v '3.1.7'` succeeds before bundling. * ERROR: net-analyzer/metasploit-4.9.2::gentoo failed (prepare phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_prepare * environment, line 4414: Called ruby-ng_src_prepare * environment, line 4192: Called _ruby_each_implementation 'each_ruby_prepare' * environment, line 698: Called _ruby_invoke_environment 'ruby19' 'each_ruby_prepare' * environment, line 750: Called each_ruby_prepare * environment, line 996: Called die * The specific snippet of code: * ${RUBY} -S bundle install --local || die; * * If you need support, post the output of `emerge --info '=net-analyzer/metasploit-4.9.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-analyzer/metasploit-4.9.2::gentoo'`. !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info =metasploit-4.9.2 * The complete build log is located at '/var/tmp/portage/net-analyzer/metasploit-4.9.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/metasploit-4.9.2/temp/environment'. * Working directory: '/var/tmp/portage/net-analyzer/metasploit-4.9.2/work/ruby19' * S: '/var/tmp/portage/net-analyzer/metasploit-4.9.2/work/ruby19/metasploit-4.9.2' * * The following package has failed to build or install: * * (net-analyzer/metasploit-4.9.2:4.9/4.9::gentoo, ebuild scheduled for merge), Log file: * '/var/tmp/portage/net-analyzer/metasploit-4.9.2/temp/build.log' * jlgentoo ~ # gem install bcrypt-ruby -v '3.1.7' ERROR: Could not find a valid gem 'bcrypt-ruby' (= 3.1.7) in any repository ERROR: Possible alternatives: bcrypt-ruby jlgentoo ~ # jlgentoo ~ # emerge -pv1 bcrypt-ruby These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-ruby/bcrypt-ruby-3.1.7 USE="{-test}" RUBY_TARGETS="ruby19 ruby20 (-ruby18)" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB (In reply to jospezial from comment #17) Please don't hijack old bugs with entirely unrelated issues. 4.9.2 is missing a dep, there are no bugs in the hackery. |