Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189149 - replace sys-apps/net-tools with sys-apps/iproute2 in system
Summary: replace sys-apps/net-tools with sys-apps/iproute2 in system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 522000 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-16 18:39 UTC by Dror Levin (RETIRED)
Modified: 2017-05-13 02:06 UTC (History)
8 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 Dror Levin (RETIRED) gentoo-dev 2007-08-16 18:39:56 UTC
iproute2 and net-tools provide the same functionality and so users should be able to choose which to use and not have the other installed.
net-tools is currently in the system profile, which prevents users from unmerging it even if iproute2 is installed although it is the default for baselayout.
I think a better approach would be to create a virtual package that would be satisfied with either iproute2 or net-tools, and that should be in system.

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-16 18:47:48 UTC
Eh? Could you explain how exactly does the below stuff provide "the same functionality"? It's not about ip vs ifconfig.

sys-apps/net-tools:

/bin/dnsdomainname -> hostname
/bin/domainname -> hostname
/bin/hostname
/bin/netstat
/bin/nisdomainname -> hostname
/bin/ypdomainname -> hostname
/sbin/arp
/sbin/ifconfig
/sbin/ipmaddr
/sbin/iptunnel
/sbin/mii-diag
/sbin/mii-tool
/sbin/nameif
/sbin/plipconfig
/sbin/rarp
/sbin/route
/sbin/slattach
/usr/sbin/alta-diag
/usr/sbin/diag-example
/usr/sbin/eepro100-diag
/usr/sbin/epic-diag
/usr/sbin/ether-wake
/usr/sbin/myson-diag
/usr/sbin/natsemi-diag
/usr/sbin/ne2k-pci-diag
/usr/sbin/ns820-diag
/usr/sbin/pci-config
/usr/sbin/pcnet-diag
/usr/sbin/rtl8139-diag
/usr/sbin/starfire-diag
/usr/sbin/tulip-diag
/usr/sbin/via-diag
/usr/sbin/vortex-diag
/usr/sbin/winbond-diag
/usr/sbin/yellowfin-diag

sys-apps/iproute2:

/sbin/ctstat
/sbin/genl
/sbin/ifcfg
/sbin/ifstat
/sbin/ip
/sbin/lnstat
/sbin/nstat
/sbin/routef
/sbin/routel
/sbin/rtacct
/sbin/rtmon
/sbin/rtpr
/sbin/rtstat
/sbin/ss
/sbin/tc
/usr/sbin/arpd
Comment 2 Dror Levin (RETIRED) gentoo-dev 2007-08-16 19:24:28 UTC
The reason net-tools is in system is that baselayout needs ifconfig for networking, and iproute2 satisfies that. Moreover, baselayout prefers iproute2 over ifconfig if it is installed.

The binaries are not all a package provides. the ip command in iproute2 replaces almost everything in net-tools.
examples:
ip addr = ifconfig
ip route = route
ip neigh = arp

Besides, even if iproute2 does not replace EVERYTHING in net-tools, it can still completely replace it as far as gentoo is concerned and so users should be able to remove net-tools and this bug still applies.
Comment 3 Dror Levin (RETIRED) gentoo-dev 2007-08-16 19:51:19 UTC
BTW, I just found out that /etc/init.d/hostname uses hostname from net-tools to set the machine hostname.
However, hostname also exists in coreutils but is removed in the ebuild for some reason.

I suppose a use flag could be introduced that will allow the user to choose whether he wants hostname from coreutils or from net-tools.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-08-16 19:57:03 UTC
I really don't see what kind of virtual are you requesting here; iproute2 provides routing/traffic control stuff, not any of the diagnostics and other utils. Stick it in package.provided if you can't live with the package. Requesting to have iproute2 installed by default and deprecating ifconfig usage makes then, the suggested virtual makes none.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-08-16 19:58:56 UTC
(In reply to comment #3)
> I suppose a use flag could be introduced that will allow the user to choose
> whether he wants hostname from coreutils or from net-tools.
 
Was already discussed in Bug 128538.
Comment 6 Dror Levin (RETIRED) gentoo-dev 2007-08-16 20:21:41 UTC
Ok, you are right. The virtual thingie was just an idea and as you pointed out, probably not a very sensible one.
Deprecating net-tools and replacing it with iproute2 makes much more sense.

Initially I thought that this could be done in 2 stages to ease the transition - first give people the option to choose for themselves, and then the change to the default install would be much easier. If the first step can be avoided this is even better :)
Comment 7 SpanKY gentoo-dev 2007-08-17 10:20:24 UTC
except coreutils + iproute2 still doesnt provide the critical binaries related to setting/querying hostnames/domainnames

that said, i think removing `ifconfig` from the default install is stupid ... forcing iproute2 by default for everyone sounds like a not too bad idea, but this needs to go through gentoo-dev mailing list, not bugzilla
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-09-04 03:07:37 UTC
*** Bug 522000 has been marked as a duplicate of this bug. ***
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-09-04 03:09:22 UTC
I've reopened this bug as the issue of net-tools vs iproute2 is better suited to this bug than to a releng bug about having iproute2 in stages.
I, for one, do use iproute2 so wouldn't mind having it in system.
Comment 10 Joshua Kinard gentoo-dev 2014-09-04 03:48:27 UTC
It doesn't look like iproute2 is a full replacement for net-tools, though.  I only did a cursory check, but /bin/netstat provides partially-broken sctp support via the -S flag (undocumented), while iproute2's "ss" utility only lists TCP (-t), UDP (-u), DCCP (-d), raw (-w), and Unix sockets (-x) as supported transports.

The fix for netstat's SCTP problems is in Fedora's copy of net-tools, but I haven't had the chance to figure out the specific bits we'd need for a patch.

netstat also handles UDPlite (-U), and supports the elder/esoteric protocols like --ax25, --x25, --ipx, --ddp, and others.  But, it appears netstat doesn't support DCCP.

Instead of replacing, why not just include both in @system?  It seems, at least for ss and netstat, that the two compliment each other right now.  Both offer functionality that the other doesn't.
Comment 11 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-09-04 09:59:11 UTC
I didn't mean to imply that we should drop net-tools or that iproute2 is a complete replacement.
I reopened the bug because I think we should track this issue here - even if, as Mike suggested, we discuss this issue in the dev ml.
Comment 12 William Hubbs gentoo-dev 2014-09-05 15:27:51 UTC
I don't see anything wrong with adding iproute2 to @system.
Should I just do it (tm) or should we have a discussion on -dev first?
Comment 13 Christian Ruppert (idl0r) gentoo-dev 2014-09-07 22:07:46 UTC
(In reply to William Hubbs from comment #12)
> I don't see anything wrong with adding iproute2 to @system.
> Should I just do it (tm) or should we have a discussion on -dev first?

Discussing that is not necessary. Please just add iproute to *any* install ISO, including the admin cd of course.
Comment 14 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-09-08 17:46:46 UTC
(In reply to Christian Ruppert (idl0r) from comment #13)
> (In reply to William Hubbs from comment #12)
> > I don't see anything wrong with adding iproute2 to @system.
> > Should I just do it (tm) or should we have a discussion on -dev first?
> 
> Discussing that is not necessary. Please just add iproute to *any* install
> ISO, including the admin cd of course.

$ /home/repositories/gentoo/releng $ grep iproute2 releases/weekly/specs/amd64/*stage*
releases/weekly/specs/amd64/installcd-stage1.spec:      sys-apps/iproute2
releases/weekly/specs/amd64/livecd-stage1.spec: sys-apps/iproute2
releases/weekly/specs/amd64/livedvd-stage1.spec:        sys-apps/iproute2

$ /home/repositories/gentoo/releng $ grep iproute2 releases/weekly/specs/amd64/hardened/*stage*
releases/weekly/specs/amd64/hardened/admincd-stage1-selinux.spec:       sys-apps/iproute2
releases/weekly/specs/amd64/hardened/admincd-stage1.spec:       sys-apps/iproute2

$ /home/repositories/gentoo/releng $ grep iproute2 releases/weekly/specs/x86/*stage*
releases/weekly/specs/x86/installcd-stage1.spec:        sys-apps/iproute2

$ /home/repositories/gentoo/releng $ grep iproute2 releases/weekly/specs/x86/hardened/*stage*
releases/weekly/specs/x86/hardened/admincd-stage1.spec: sys-apps/iproute2
releases/weekly/specs/x86/hardened/installcd-stage1.spec:       sys-apps/iproute2


The installcd/admincd have included iproute2 for a very long time.
Some have been using the bug to get net-tools replaced by iproute2 in the system profile. Others, like me, have been arguing about adding iproute2 to the system profile.
Comment 15 SpanKY gentoo-dev 2014-09-11 08:01:10 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #9)

add it to @system and let's be done
Comment 16 William Hubbs gentoo-dev 2015-01-05 19:06:47 UTC
This has been added to @system.
Comment 17 miklosh 2015-01-20 16:24:51 UTC
(In reply to William Hubbs from comment #16)
> This has been added to @system.
Please take away is from there, it should be optional, not for all by default!
Comment 18 SpanKY gentoo-dev 2015-04-04 22:13:51 UTC
(In reply to miklosh from comment #17)

we require a set of tools to configure the network, hence requiring iproute2 in @system makes sense.  if you want a system that doesn't support networking, that's extremely uncommon, and you can create your own profile.