Post APjcWOaME2eDoQ9qWO by flokli@im-in.space
 (DIR) More posts by flokli@im-in.space
 (DIR) Post #APjcWOaME2eDoQ9qWO by flokli@im-in.space
       2022-11-18T17:18:25Z
       
       0 likes, 1 repeats
       
       Describing how @Ninjatrappeur and I extended nsncd to support host lookups, and how this helps NixOS and nix-built binaries on non-NixOS: https://flokli.de/posts/2022-11-18-nsncd/
       
 (DIR) Post #APjkheZNw4uSCna9MO by Ninjatrappeur@social.alternativebit.fr
       2022-11-18T18:50:34.400619Z
       
       0 likes, 0 repeats
       
       @flokli ^ #nixos
       
 (DIR) Post #APktgjzHOvQ3SpIGem by civodul@toot.aquilenet.fr
       2022-11-18T20:47:33Z
       
       1 likes, 0 repeats
       
       @flokli @Ninjatrappeur  Interesting work!nscd works well (surprisingly well?) on Guix AFAIK, even with caching enabled; things like NetworkManager restart it when switching networks.(I personally wouldn’t take nscd as a black box that either works or doesn’t, and write more code in the latter case.  I think fixing bugs is more widely beneficial.  :-))
       
 (DIR) Post #APktgkZnDActI4NQZM by Ninjatrappeur@social.alternativebit.fr
       2022-11-19T08:05:52.233023Z
       
       0 likes, 1 repeats
       
       @civodul @flokli We did not take nscd as a black box. We actually deeply dive into it to specify the socket wire format.First, there's no such thing as "no cache" in the daemon codebase. Nscd is basically dumping its cache to the socket. IE. when using it with a TTL=0, nscd is basically (sometimes) discarding its cache, filling it again before dumping it to the wire. Refactoring this would be pretty much a full rewrite of the daemon codebase.Secondly, the daemon (and client to some extent) code base is pretty much insane. Full of wack pointer arithmetic and questionable architectural decisions. For instance, for the getai operation, compare https://sourceware.org/git/?p=glibc.git;a=blob;f=nscd/nscd_getai.c;h=8e4650ebaedc6d79bd5ccda6721551b0227dbbb5;hb=HEAD with the nsncd 20 lines implementation: https://github.com/nix-community/nsncd/blob/host-lookups/src/handlers.rs#L123. Maintainance-wise, it's pretty clear to me that Nsncd is the way to go. I'm personally not so sure we should use the two-sigma repo as an upstream: they require a CLA. We might need to fork it to provide a "true" FOSS experience to the future contributors. But that's another question, out of scope for now: our work currently still live in the nix-community cla-free fork---------------------------I know you're concerned with this being written in Rust for bootstrapping reasons, but as Efraim and Maxim recently pointed out, it's really a matter of some already existing amazing, hard work (<3) on the Guix side and ~3h worth of CI for every version bump. https://lists.gnu.org/archive/html/guix-devel/2022-10/msg00218.html. I don't think it should be a blocker here.
       
 (DIR) Post #APktgsIMVrR9EKHcVk by civodul@toot.aquilenet.fr
       2022-11-18T20:50:24Z
       
       1 likes, 0 repeats
       
       @flokli @Ninjatrappeur  The crucial part will be to ensure fellow glibc hackers keep nscd client code in libc, which will take some effort given the initial reception…https://sourceware.org/pipermail/libc-alpha/2022-February/136741.html
       
 (DIR) Post #APktgvxEuKuwZyQo8u by civodul@toot.aquilenet.fr
       2022-11-18T21:22:37Z
       
       1 likes, 0 repeats
       
       @Ninjatrappeur @flokli  Specifically I just realized that NetworkManager uses openresolv, which is the one doing “herd restart nscd” when conditions change.
       
 (DIR) Post #APktjs2rtlYrK8SsBU by Ninjatrappeur@social.alternativebit.fr
       2022-11-19T08:06:33.945295Z
       
       0 likes, 0 repeats
       
       @civodul  Yes, 100% agree.@flokli is currently drafting a follow-up email.