qyliss changed the topic of #spectrum to: A compartmentalized operating system | https://spectrum-os.org/ | Logs: https://logs.spectrum-os.org/spectrum/
rhysmd has quit [*.net *.split]
katrms[m] has quit [*.net *.split]
hiroshi[m] has quit [*.net *.split]
mx08 has quit [*.net *.split]
hexa- has quit [*.net *.split]
Ke has joined #spectrum
joe[m]1 has joined #spectrum
mx08 has joined #spectrum
rhysmd has joined #spectrum
hexa- has joined #spectrum
katrms[m] has joined #spectrum
hiroshi[m] has joined #spectrum
cole-h has quit [Ping timeout: 252 seconds]
pastbytes has quit [Quit: Leaving]
<qyliss> puck: in a VM with networking.hostName set but not networking.domain, inetutils hostname -f prints the value of networking.hostName
<qyliss> So I think it not working for you might be related to whatever you've done to remove networking.domain
<MichaelRaskin> writer
<MichaelRaskin> oops
<puck> qyliss: hrmm
<qyliss> (net_utils hostname does the wrong thing regardless of networking.domain)
<MichaelRaskin> oh
<qyliss> (this is with the fixed /etc/hosts file)
<qyliss> puck: lmao NixOS has a test for hostname, but it installs inetutils and uses its hostname implementation rather than the one that actually comes with NixOS, so it wouldn't actually catch this regression
<puck> :D
<qyliss> i hate everything about this
kenmacd[m] has quit [Quit: Idle for 30+ days]
<puck> qyliss: what does `hostname -f -v` output?
<qyliss> which hostname impl? with or without the fix?
<puck> actually i can just. test it out
<puck> qyliss: ah, so. what happens is net-tools hostname runs gethostname, then resolves that, which returns the *first* result for the /etc/hosts file as h_name, and the rest as aliases
<puck> (on ::1)
<puck> so for you that'd be .. h_name=`localhost', h_aliases=`atuin.qyliss.net', h_aliases=`atuin', i think
<qyliss> yeah, that's the behaviour I was trying to get
<qyliss> because that's what python expects
<qyliss> socket.getfqdn() returns the first alias IIRC
<puck> qyliss: it returns the first name with a period in it
<qyliss> what does? net-tools hostname?
<puck> yeah. that does the right thing, having the full domain as first entry makes socket.getfqdn work
<qyliss> there's a reason we didn't do that in nixpkgs
<qyliss> hang on
<puck> huh, this is weird and finicky, huh
<zgrep> (Completely unrelated, but let me compliment you on your fantastic choice of hostname.)
<qyliss> thank you :)
<qyliss> my other ones are boring and just named after the computer model
cleeyv has quit [Read error: Connection reset by peer]
<qyliss> > These are the first two entries and therefore gethostbyaddr() will
<qyliss> always resolve "127.0.0.1" and "::1" to "localhost".
<puck> hrm
<puck> but that would work even if it were aliased
cleeyv has joined #spectrum
<qyliss> wouldn't ::1 resolve to the fqdn in that case?
<puck> i set my first /etc/hosts line to "127.0.0.1 localhost foobar", and `host 127.0.0.1` still does the right thing
<puck> err, hold on this might be a fluke
<qyliss> you're proposing 127.0.0.1 foobar localhost, aren't you?
<puck> no, '127.0.0.1 localhost foobar' instead of "127.0.0.1 localhost\n127.0.0.1 foobar"
<qyliss> oh right
<qyliss> but we don't have that today
<qyliss> we have 127.0.0.1 localhost 127.0.0.2 foobar
<qyliss> which works fine
<puck> it could also be ::1, etc
<qyliss> the thing causing the problem is the one for ::1
<puck> qyliss: this also returns the first entry, the rest are the aliases
<puck> like, why would resolving ::1 ever return an alias primarily
<puck> the issue was that, before, they weren't the first entry in the file, so setting another entry to "localhost" would change your primary resolving thing
<puck> nixos doesn't have a concept of "primary" vs "alias" in networking.hosts, so you can't say "please have this be the primary entry"
<qyliss> so you're proposing ::1 atuin.qyliss.net atuin localhost ?
<puck> oh, right, the hostname -f issue as well. this is quite a puzzle
<qyliss> I kinda want to just switch to inetutils
<puck> i'd probably actually claim that net-tools hostname is wrong here, yeah
<qyliss> but that would be a lot of work
<puck> it's designed for a different thing
<qyliss> puck: could you explain why you feel that way in a comment on the PR?
jb55 has joined #spectrum
cole-h has joined #spectrum
<MichaelRaskin> About which tool is right: what's in /proc/sys/kernel/hostname in the first place?
cole-h has quit [Quit: Goodbye]
cole-h has joined #spectrum
<qyliss> this isn't about the kernel hostname
<qyliss> it's about inferring the FQDN from /etc/hosts