Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494832 - net-analyzer/metasploit-4.8.2 - src_prepare(): bugs in hackery
Summary: net-analyzer/metasploit-4.8.2 - src_prepare(): bugs in hackery
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
Depends on: 424339
Blocks:
  Show dependency tree
 
Reported: 2013-12-20 14:59 UTC by Zhu Sha Zang
Modified: 2014-04-13 04:21 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhu Sha Zang 2013-12-20 14:59:29 UTC
A error occour during net-analyzer/metasploit-4.8.2 compilation when there isn't rake >= 10.0.0. 

>>> 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 'rake (>= 10.0.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'

>>> Failed to emerge net-analyzer/metasploit-4.8.2, Log file:

>>>  '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/build.log'
 * 
 * The following package has failed to build or install:
 * 
 *  (net-analyzer/metasploit-4.8.2::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/build.log'



Reproducible: Always

Steps to Reproduce:
1. emerge metasploit
Actual Results:  
>>> 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 'rake (>= 10.0.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'

>>> Failed to emerge net-analyzer/metasploit-4.8.2, Log file:

>>>  '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/build.log'
 * 
 * The following package has failed to build or install:
 * 
 *  (net-analyzer/metasploit-4.8.2::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/portage/net-analyzer/metasploit-4.8.2/temp/build.log'



 emerge --info                                                                                                                                                            12:56
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.17, 3.12.5-gentoo-asgard x86_64)
=================================================================
System uname: Linux-3.12.5-gentoo-asgard-x86_64-Intel-R-_Core-TM-_i5_CPU_M_460_@_2.53GHz-with-gentoo-2.2
KiB Mem:     3847036 total,    341704 free
KiB Swap:    3036248 total,   2790816 free
Timestamp of tree: Fri, 20 Dec 2013 14:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.1-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/local/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --keep-going=y --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pt_BR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="256-color 3dmouse R X Xaw3d a52 aac aacplus aalib acl acpi action_modeswitch addbookmarks additions adiummessagestyle adplug ads airplay alac alisp all_sfx alsa amd64 animation-rtl annotations ao apache2 apbs apng applet asf aspell ass assistant astrality athena atmo auto-hinter autoipd avahi avcodec avconv avformat avx background backgrounds bash-completion bashlogger battery bazaar berkdb bidi bineditor bittorrent bl blender blender-game bmp bookmarks branding bs2b bsf bufferevents bzip2 c++0x cairo caps captcha captchaforms cb cdr cdrdao cdrom cg chemistry chm cli clientinfo cmake collab color colorpicker compress compressed-lumas connectivity console consolekit contacts context contrast contrib corefonts cpuload cracklib creds cron crypt cryptsetup cscope css csv ctype cue curl cvs cxx daap dap darcs dbus dcc_video dds declarative designer designer-plugin desktopglobe detex development devhelp device-mapper dia dirac djvu dmx dnd docbook dot dri dts dv dvb dvbplayer dvbsetup dvd dvdnav dvdr dvi dvi2tty dvipdfm ebook ecap edd editor elbeem emf emotion emovix emulation enca enchant encode eolconv epydoc equalizer escreen espeak ethumb eve excel expat experimental extensions extra extra-algorithms extras faac faad facedetect fakevim fam farsight fastscroll fbcon fbcondecor ffmpeg filelog firefox firefox-bookmarks flac flash flickr fontconfig fontforge fonts foomaticdb fortran fortran2003 fpx freemail freenode freerdp freetds freetype ftp fuse g15 g3dvl gallium game-engine games gbm gcj gd gdbm geoip geonames gflags ggi gif git gkrellm glade glamor gles gles1 gles2 glew gmail gme gmp gnumeric gnuplot go google googledrive gpg gphoto2 gpl gpm gps gpsd gpssync gpu grammar graphics graphite graphviz gs gsf gsl gsm gsmloc gstreamer gtalk gtk gtk3 gtkhtml gtkspell gtkstyle gts gudev gui gzip gzip-el hbci hddtemp hdf5 hdri help hesiod highlight hipe hires-icons histman history holidays hostip hpcups hpijs hscolour html htmlreport http httpd httppower humanities hwdb ices iconv icoutils icq icu id3 id3tag ide idn image imaging imap imlib inkjar iostats iplsrc iproute2 iptables iptc ipv6 ipython irc isag jabber jack jadetex java javascript jbig jemalloc jingle jit joystick jpeg justify kate kdrive kerberos keymap kig-scripting kipi konqueror kpoll ladspa lame lapack laptop lastfm lastfmfingerprint lastfmradio latex lcms lensfun libass libffi libkms libnl libsamplerate libssh2 libtiger libv4l libv4l2 live lm_sensors lock logrotate lorcon lqr lua lua-cairo lua-imlib luajit luatex lxde lyx lzma lzo m17n-lib mac mad madde mail manual marble math mathml matplotlib matroska matrox mbox md5 md5sum mdnsresponder-compat meanwhile melt mempool-buddy mempool-chained mempool-fixed-bitmap mempool-pass-through mercurial messages metacontacts metis minizip mlib-update mms mmx mmxext mng moc modules mount mouse mozdom mozilla mozsha1 mp3 mp3tunes mp4 mpd mpeg mplayer mrim ms-bad-proposal mtp mudflap mule multilib multimedia multiprocess multislot multitarget multiuser musepack music musicbrainz mysql nano-syntax nas nat nat-pmp ncat ncurses ndiff neXt netbeans netlink netpbm network networkmonitor newmousefocus newnet nlpsolver nls nmap nmap-update nntp nominatim notebook nova nping npp nptl nsplugin nss ntfs numpy nut nvcontrol nvidia objc objc++ objc-gc ocr odk ofa offensive offlinehelp ofono ofx ogg ogg123 okteta okular omega oniguruma openal openct opendbx openexr openft opengl openid openinventor openipmi openmedia openmp openpgp openrc opensc opensm openssl opensslcrypt openstreetmap opensync openxml opera optimisememory optimization optimized-qmake origin oscar osd osdmenu osmesa oss otr ots ovftool pam pango passwordsave patented pcntl pda pdf pep8 perforce perl pgf phonehome php physfs plasma playdar player playlist playtools plazes plotutils plugins png pnm pogooglue policykit pop portmon posix postgres postproc postscript powersave ppds ppp prediction privacy privacylists private-headers privatestorage profiler profiling projectm pronounce ps psf pstoedit pstricks publishers publishsubscribe pvr pyflakes pygments pylint pyqt4 pyside python python3 pyx qalculate qdbm qimageblitz qmake qml qqwry qt-faststart qt3support qt4 quicklaunch quicktime quotes qwt radio raptor rar rcs rdesktop readline real realtime recode redeyes registration remotecontrol remoteosd replaygain resolver reviewboard rfc3779 romio rope rosprite rostersearch rpc rplay rss rtc rtf rtmp rtsp rubrica samba sasl sbsms scale0tilt scanfolder scanner schroedinger science scipy screensaver script scripts scripttools scrobbler sctp sdk sdl sdl-image sdl-sound sdlaudio sdlgfx seamless-hbars security semantic-desktop sensors session shared-dricore shine shorten shout sidebar sip skype slang slit smbclient smbsharemodes smbtav2 smi smime smp sms smtp sna sndfile sockets socks5 sound sourceview sox sparse speex spell sphinx sql sqlite sqlite3 sse sse2 sse3 sse4_1 ssh ssl ssse3 stars startup-notification stats stream stroke strong-optimization subversion svg svgtiny t1lib taglib talkfilters tcl tcpd tcpreplay tdb tellico templates tex tex4ht texmacs themes theora thesaurus thin-splines threads thunderbird tidy tiff timezone tint2conf tk toolame toolbar toolkit-scroll-bars tools tor tordns tproxy trace traits truetype tslib tta tweak-mode twitgin twitter twolame udev udisks udisks2 ukit unicode unique unlock-notify upcall upower urandom urlpicpreview urwid usb utilities utils uxa v4l v8 vaapi valgrind vamp vcd vcdx vdpau verse video view-captcha vim vim-pager vim-syntax visual vix vkontakte vlc vlm vmd vmware-tools vmware_guest_freebsd vmware_guest_linux vmware_guest_netware vmware_guest_solaris vmware_guest_winPre2k vmware_guest_windows vnc vocoder voice volpack vorbis vpx wallpapers wav waveout wavpack weather weather-metar weather-xoap webcam webgl webkit webm webp whiteboarding width wifi winbind wineappdb winpopup wireshark wma wma-fixed wmf word-perfect wordperfect wpd wpg wps wxwidgets wyfv x264 xanim xattr xbase xcap xchatdccserver xcomposite xdg xdmcp xetex xface xfs xft xgetdefault xhtml xim xindy xine xinerama xls xml xmldoclet xmlpatterns xmlreader xmlrpc xmlsec xmlwriter xmp xmpp xmppuriqueries xnest xorgmodule xosd xpm xps xrandr xrender xscreensaver xterm xv xvfb xvid yahoo yahoo-geo yandexnarod yaz youtube yuv4mpeg zephyr zero-penalty-hit ziffy zip zlib zsh-completion zvbi" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ricoh samsung spca50x" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DVB_CARDS="dibusb-usb1 dibusb-usb2 usb-dib0700" ELIBC="glibc" ENLIGHTENMENT_MODULES="access backlight battery clock comp conf-applications conf-dialogs conf-display conf-edgebindings conf-interaction conf-intl conf-keybindings conf-menus conf-paths conf-performance conf-randr conf-shelves conf-theme conf-window-manipulation conf-window-remembers connman cpufreq dropshadow everything fileman fileman-opinfo gadman ibar ibox illume2 mixer msgbus notification pager quickaccess shot start syscon systray tasks temperature tiling winlist wizard xkbswitch" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer nlpsolver scripting-beanshell scripting-javascript wiki-publisher" LINGUAS="pt_BR en en_GB de ru" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy java mobility profiler websvccommon javacard javafx" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby18 ruby19 ruby20" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="vesa vga v4l fbdev intel nvidia" XTABLES_ADDONS="account chaos condition delude dhcpmac fuzzy geoip iface ipmark ipp2p ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee checksum dnetmap echo gradm ipset4"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-20 18:49:21 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.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-20 19:47:08 UTC
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.
Comment 3 Zhu Sha Zang 2013-12-21 16:22:40 UTC
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'
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-22 22:50:06 UTC
(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
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-22 22:50:56 UTC
please show "emerge -vp metasploit pcaprub"
Comment 6 Zhu Sha Zang 2013-12-28 13:45:24 UTC
[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 ~]$
Comment 7 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-30 05:01:28 UTC
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.
Comment 8 Zhu Sha Zang 2013-12-30 21:55:16 UTC
eselect ruby list
Available Ruby profiles:
  [1]   ruby18 (with Rubygems) *
  [2]   ruby19 (with Rubygems)
  [3]   ruby20 (with Rubygems)

That is it.

Regards
Comment 9 Zhu Sha Zang 2013-12-30 22:27:27 UTC
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
Comment 10 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-31 19:33:59 UTC
thanks for the troubleshooting.

I'll see if I can detect that and bail out with a useful error.
Comment 11 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-31 21:59:46 UTC
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?
Comment 12 Hans de Graaff gentoo-dev 2014-01-01 08:27:17 UTC
(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.
Comment 13 Rick Farina (Zero_Chaos) gentoo-dev 2014-01-10 05:13:19 UTC
can you please eselect any ruby but ruby19 and test metasploit-9999?
Comment 14 Zhu Sha Zang 2014-01-12 23:38:03 UTC
Sorry my delay, but i was unable to unmask hardmasked. How can i do that?

Regards
Comment 15 Rick Farina (Zero_Chaos) gentoo-dev 2014-01-13 00:39:49 UTC
(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
Comment 16 jms 2014-01-24 02:19:50 UTC
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?
Comment 17 jospezial 2014-04-13 04:18:23 UTC
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
Comment 18 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-13 04:21:17 UTC
(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.