Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280772 - net-analyzer/nmap avoid bundeled libs (was should DEPEND on lua when it links to it)
Summary: net-analyzer/nmap avoid bundeled libs (was should DEPEND on lua when it links...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-08 15:42 UTC by goffrie
Modified: 2009-12-31 17:52 UTC (History)
4 users (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 goffrie 2009-08-08 15:42:51 UTC
net-analyzer/nmap has a "lua" USE flag, but it silently chooses either the system dev-lang/lua and a bundled lua depending on whether or not the system version is appropriate, without warning and without properly DEPENDing on dev-lang/lua when the system lua is used. This should be split into two separate USE-flags with proper dependencies, e.g. IUSE="lua internal-lua" DEPEND="lua? ( >=dev-lang/lua-5.1.3-r1[deprecated] )"

When it chooses system lua, this causes emerge --depclean to complain that there is a link-level dependency without a DEPEND. portage 2.1 won't handle this too well though, because it doesn't detect the .

Reproducible: Always

Steps to Reproduce:
1. USE='deprecated' emerge -1 >=dev-lang/lua-5.1.4-r1 && USE='lua' emerge nmap
2. emerge --depclean -p
3. 

Actual Results:  
Depclean wants to remove lua, but it is pulled in by nmap by a link-level dependency

Expected Results:  
Depclean doesn't want to remove lua because nmap DEPENDs on it
Comment 1 James Earl Spahlinger 2009-08-09 21:50:06 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue

Comment 2 goffrie 2009-08-10 15:24:19 UTC
emerge --info

Portage 2.2_rc36 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-zen1-31267-g06c0b82 x86_64)
=================================================================
System uname: Linux-2.6.30-zen1-31267-g06c0b82-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.0.1
Timestamp of tree: Thu, 06 Aug 2009 23:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1, 3.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8 -msse3 -floop-block -floop-strip-mine -floop-interchange"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=k8 -msse3 -floop-block -floop-strip-mine -floop-interchange"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_CA.utf8"
LC_ALL="en_CA.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
LINGUAS="en en_CA en_US"
MAKEOPTS="-j2"
PKGDIR="/var/cpackages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/overlays/crossdev /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/kde-testing /usr/portage/local/layman/devnull /usr/portage/local/layman/gnome /usr/portage/local/layman/qting-edge /usr/portage/local/layman/java-overlay /usr/portage/local/layman/sunrise /usr/portage/local/layman/perl-experimental /usr/portage/local/layman/x11 /usr/portage/local/overlays/local"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac acct acl acpi agg alsa amd amd64 apache2 automount avahi bash-completion bcmath berkdb branding bzip2 cairo caps cdda cddb cdparanoia cdr cdrom cgi cjk clamav clamd cleartype cli clisp console consolekit cracklib crypt cups dar64 dbus devil divx dri dv dvb dvd dvdr dvdread encode exif expat fat fbcon fbcondecor fbsplash ffmpeg firefox flac fortran ftp gd gdal gdbm gif gimp git glib glitz gmail gmp gmtfull gmtsuppl gmttria gnome gnome-keyring gnomecd gpac gpm gstreamer gtalk gtk gtkhtml gzip hal hddtemp html http httpd iconv ieee1394 immqt-bc ipod ipv6 irc isdnlog ithreads jabber java java6 javascript jfs jingle jpeg jpeg2k json kde kdrive kerberos kqemu lame ldap libnotify lzo mad matroska md5sum metric mime ming mmx mmxext mng mp2 mp3 mp4 mpeg mpeg2 mplayer msn mudflap multilib multiuser musepack mysql mysqli ncurses nepomuk nethack newspr nfs nfsexport nls nonfsv4 nptl nptlonly nsplugin ntfs ntlm offensive ogg openal openexr opengl openmp pam pcntl pcre pdf pdo perl php png policykit ppds pppd proj pulseaudio python qt-copy qt3support qt4 quicktime rar raw readline reflection reiser4 reiserfs rtc samba scanner scenarios scintilla sdl semantic-desktop server session shout smp soap sockets socks5 sourceview sox spamassassin speex spell spl sqlite sse sse2 ssl startup-notification subtitles svg sysfs tcpd tetex theora threads threadsafe tiff transparency transparent-proxy truetype unicode usb v4l v4l2 vcd vim vim-syntax vlm vnc vorbis webkit winbind wma wxwidgets wxwindows x264 xcomposite xetex xforms xfs xine xinetd xorg xprint xscreensaver xulrunner xv xvid yahoo zeroconf zip zippy zlib" ALSA_CARDS="atiixp usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks                   iec958 ioplug ladspa lfloat linear meter mulaw multi null plug                   rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="event" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA en_US" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Wormo (RETIRED) gentoo-dev 2009-08-20 07:12:39 UTC
Thanks for reporting this dependency issue, assigning to nmap maintainers.
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2009-09-26 10:40:37 UTC
Fixed in 5.0-r1.  Thanks for reporting the dependency problem.
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2009-09-26 19:22:43 UTC
Michal, please, don't use bundled libs if possible as such things tend to became security nightmare. The only thing was needed here - add proper DEPEND:
lua? ( >dev-lang/lua-5.1.4[deprecated] )

and add $(use_with {,lib}lua)  to econf (not tested).

Or do I miss anything?

btw, || die is redudant after econf()
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2009-09-26 22:08:46 UTC
(In reply to comment #5)
> Michal, please, don't use bundled libs if possible as such things tend to
> became security nightmare. The only thing was needed here - add proper DEPEND:
> lua? ( >dev-lang/lua-5.1.4[deprecated] )
> 
> and add $(use_with {,lib}lua)  to econf (not tested).

You're right of course.  I originally added the flag as I thought it would be possible to use it to decide the version of the library to link to for both liblua and libdnet.  This turned out not to be the case, as the system libdnet is incompatible with the one provided in nmap.

The system liblua is the same as the bundled one, so there is no value in having the bundled-libs USE flag.  This is now fixed in 5.00-r2.

> btw, || die is redudant after econf()

Fixed, thanks.

Comment 7 Alexander Veit 2009-12-31 11:34:28 UTC
Now emerge nmap fails:

emerge: there are no ebuilds built with USE flags to satisfy ">=dev-lang/lua-5.1.4-r1[deprecated]".
!!! One of the following packages is required to complete your request:
- dev-lang/lua-5.1.4-r4 (Change USE: +deprecated)
(dependency required by "net-analyzer/nmap-5.00-r2" [ebuild])
(dependency required by "nmap" [argument])


emerge --info:
Portage 2.1.6.13 (default/linux/x86/10.0/server, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r6-i686-VIA_Samuel_2-with-gentoo-1.12.13
Timestamp of tree: Thu, 31 Dec 2009 10:30:23 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.5.4-r3, 2.6.4
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=i586 -m3dnow -Os -pipe -fomit-frame-pointer -mmmx"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=i586 -m3dnow -Os -pipe -fomit-frame-pointer -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl alsa apache2 berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv imap ipv6 jpeg lua maildir modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline reflection sasl session snmp spl ssl svga sysfs tcpd unicode x86 xml zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias subversion" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-31 17:52:39 UTC
(In reply to comment #7)
> Now emerge nmap fails:
> 
> emerge: there are no ebuilds built with USE flags to satisfy
> ">=dev-lang/lua-5.1.4-r1[deprecated]".
> !!! One of the following packages is required to complete your request:
> - dev-lang/lua-5.1.4-r4 (Change USE: +deprecated)
> (dependency required by "net-analyzer/nmap-5.00-r2" [ebuild])
> (dependency required by "nmap" [argument])

That tells you clearly that you need to have USE=deprecated for dev-lang/lua. It's not related to this bug report or its solution at all. If you find a real issue with nmap/lua, then open a new bug report instead of polluting this one.