Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128538 - sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools
Summary: sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 444232 (view as bug list)
Depends on:
Blocks: 645024
  Show dependency tree
 
Reported: 2006-04-02 09:59 UTC by xiaokj
Modified: 2024-04-21 20:55 UTC (History)
11 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 xiaokj 2006-04-02 09:59:10 UTC
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.
Comment 1 SpanKY gentoo-dev 2006-04-02 12:16:24 UTC
except net-tools provides a hell of a lot more than just `hostname`
Comment 2 xiaokj 2006-04-03 01:30:57 UTC
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.
Comment 3 SpanKY gentoo-dev 2006-04-03 07:47:12 UTC
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
Comment 4 xiaokj 2006-04-03 09:56:41 UTC
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.
Comment 5 Alex Xu (Hello71) 2014-09-06 00:48:20 UTC
*** Bug 444232 has been marked as a duplicate of this bug. ***
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2014-09-06 02:12:54 UTC
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.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-09-17 06:13:18 UTC
(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
Comment 8 Mike Gilbert gentoo-dev 2014-09-17 23:14:40 UTC
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.
Comment 10 Dainius Masiliūnas 2016-09-28 22:11:50 UTC
Indeed, it would be nice if net-tools was no longer in @system, since iproute2 is there already.
Comment 11 Matt Turner gentoo-dev 2017-07-04 23:48:59 UTC
Can we try switching the defaults yet? It does seem like a good plan to remove net-tools from @system.
Comment 12 needle 2024-01-18 11:38:01 UTC
(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.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:13:45 UTC
(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).
Comment 14 Gabi Falk 2024-04-21 17:08:02 UTC
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
Comment 15 Cedric Sodhi 2024-04-21 17:29:33 UTC
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)?
Comment 16 Mike Gilbert gentoo-dev 2024-04-21 18:29:12 UTC
(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.
Comment 17 Gabi Falk 2024-04-21 20:55:58 UTC
(In reply to Mike Gilbert from comment #16)
Yes, but hostname from coreutils unfortunately doesn't support any flags.