WARNING: NEWBIE ALERT! ! I do not know if this belongs here, and I've searched. Please bear with me. As people start to migrate from net-tools (ifconfig, route and the likes) to iproute2, I think many will find it stupid to have to have net-tools in the system profile just for /bin/hostname. Moreover, /bin/hostname is a program from coreutils, and should rightly be installed as part of coreutils. Problem is, Gentoo's portage system seems to filter away /bin/hostname from coreutils and require net-tools to be installed for /bin/hostname. Thus, the logical path would be to return /bin/hostname to coreutils and create a virtual package for inet support that is supported by either net-tools or iproute2. Thank you.
except net-tools provides a hell of a lot more than just `hostname`
Dear all, Please do read my request. Of course I know net-tools provides much more than hostname. But right now, my system requires absolutely nothing in net-tools (ifconfig, arp and route are replaced by ip in iproute2). And anyway, hostname BELONGS to coreutils, NOT net-tools. Please return hostname to coreutils, and provide a virtual for net-tools to be replaced by iproute2. I simply do not wish to be bugged by system to install net-tools anymore. I do not need it at all, and I foresee that, in the future, many people will find net-tools (ifconfig, arp, route and friends) extra and space wasting. I'm not asking for removal of net-tools, but rather allowing something else to replace net-tools if people want to. Thanks you for your attention. I know I am a little long-winded. But after force installing hostname from coreutils (ebuild) and installing iproute2, I'm super irritated by system's dependancy for net-tools when I know I do not need it.
i dont recall any document saying who "owns" hostname if you dont want net-tools on your system, add it to /etc/portage/profile/package.provided net-tools cannot be removed from the default profile as it also provides the domainname binary which coreutils does not provide a replacement
Ok, I understand you. But its a shame that package.provided does not work. And also a shame because domainname is part of net-tools, not separate. Thank you.
*** Bug 444232 has been marked as a duplicate of this bug. ***
It may be time to reassess this. There has been a lot of talk about changes to @system, so I'm reopening this for a fresh lot at our options.
(In reply to Rick Farina (Zero_Chaos) from comment #6) > It may be time to reassess this. There has been a lot of talk about changes > to @system, so I'm reopening this for a fresh lot at our options. I second this. Looking at what other distributions are doing, is exactly this, move to hostname from coreutils
hostname from net-tools accepts a --file argument. coreutils does not. So it would not be a drop-in replacement. Probably not critical, but I wanted to point it out.
net-tools & coreutils both now have USE=hostname flags: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04 http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=766f18f974e1f035898802f70ddea3707d1292cf the default is still net-tools
Indeed, it would be nice if net-tools was no longer in @system, since iproute2 is there already.
Can we try switching the defaults yet? It does seem like a good plan to remove net-tools from @system.
(In reply to xiaokj from comment #0) > WARNING: NEWBIE ALERT! > > ! I do not know if this belongs here, and I've searched. Please bear with me. > > As people start to migrate from net-tools (ifconfig, route and the likes) to > iproute2, I think many will find it stupid to have to have net-tools in the > system profile just for /bin/hostname. > > Moreover, /bin/hostname is a program from coreutils, and should rightly be > installed as part of coreutils. [...] Hi, I have now this, on my system. net-tools is not installed anymore, and hostame is built from the coreutils package. ------ hostname --help Usage: hostname [NAME] or: hostname OPTION Print or set the hostname of the current system. --help display this help and exit --version output version information and exit GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Full documentation <https://www.gnu.org/software/coreutils/hostname> or available locally via: info '(coreutils) hostname invocation' ------ eix -I net-tools No matches found ------ net-tools is still part of the system package but I am running gentoo now using iproute2 only. no net-tools needed. I hope this helps speeding up closing this bug report.
(In reply to needle from comment #12) > I hope this helps speeding up closing this bug report. Unfortunately, not really. As discussed above, one issue is risking breakage when we change implementations for hostname (https://bugs.gentoo.org/128538#c8).
I looked into the usage of the hostname utility across other major distributions and found that none of them use the version provided by the coreutils suite: * Debian, Fedora, and OpenSUSE provide a separate hostname package built from the source, which seems to be derived from net-tools, maintained by Debian[1]; * Arch uses the hostname(1) provided by GNU inetutils[2]; * Alpine uses the hostname(1) provided by busybox. All these implementations support at least -s, -i, -d, -f, and -F options, while coreutils' one supports none of these options. That said, I think that switching to coreutils is the worst option. [1] https://tracker.debian.org/pkg/hostname [2] https://www.gnu.org/software/inetutils
I'm not very sure what this bug is about in the first place. "/bin/hostname should be installed from ..." is to say what? We do have hostname in all three, inetutils, net-tools and coreutils, in portage (although inetutils is currently in ~amd64). What is this bug trying to decide? Isn't it up to the sysadmin to choose where /bin/hostname is installed from? How is all this a reason for net-tools remaining in @system? Because we want to force the users to have a hostname binary? With options available, wouldn't that make it a candidate for app-alternatives (or virtual, whatever tolerates different CLI)?
(In reply to Cedric Sodhi from comment #15) This bug is really about what gets installed via @system by default. Ideally we want to keep that as compact as possible while still providing a useful base install. net-tools provides a bunch of other legacy networking tools that probably do not belong in a default Linux install in 2024. Replacing net-tools with inetutils would really just be trading one set of legacy tools for another. Having coreutils provide the necessary 'hostname' binary is an interesting option because we need coreutils regardless.
(In reply to Mike Gilbert from comment #16) Yes, but hostname from coreutils unfortunately doesn't support any flags.