Bug #21095
closedPrefer `uname -n` over `hostname` in tests.
Description
It turns out that hostname
, while a defacto standard, is not actually a standard in any official sense. On Linux, it's distributed as part of the inettools
package, and while generally available on other platforms (BSD, Windows, MacOS), it isn't actually part of any standard.
The uname(1)
system call and uname(2)
command ARE standardised by POSIX and the Open Group, and are included in most base systems without the need to install extra packages (e.g. inettools
on Linux).
As such, I was requested by the Arch Linux Ruby maintainer, to prefer using uname -n
as they would like to drop the dependency on inettools
which has various issues; see https://gitlab.archlinux.org/archlinux/packaging/packages/inetutils/-/issues/2#note_211062 for more context and background.
I've been asked if this can be back ported to 3.3 and 3.4 and while it's not strictly a bug, it will reduce friction in the distribution channels, so I'd like to propose that we backport to 3.4 and if possible 3.3 too.