(address . guix-patches@gnu.org)(name . Picnoir)(address . picnoir@alternativebit.fr)
From: Picnoir <picnoir@alternativebit.fr>
Hey Guix,
Some context first. Nscd is a daemon distributed through Glibc originally used
to cache the potentially expensive NSS requests. NSS modules are usually
distributed as shared libraries that are DL-opened at runtime by the programs
linked against glibc. This interface is unstable, Glibc advise to always build
the NSS modules with the same Glibc version the host system uses. This is
obviously an issue for us: a single system closure can contain programs built
against different Glibc versions.
In Guix, we're mis-using Nscd to provide a ABI compatibility layer to load NSS
modules for programs built against a different GLIBC version than the system
one. Nscd is set with a TTL to 0 to disable the caching feature of the
original tool. While this works fine most of the times, it sometimes still
caches failed domain names resolution. It happens quite often While switching
between wifi networks for instance.
Nsncd is a non-caching Nscd replacement. It was originally written
NixOS adopted this Nscd replacement last year. This migration solved the
unwanted caching issues there.
This patch introduces the Nsnncd package and modifies the current Nscd service
adding a flag to use Nsncd instead of Nscd. This flag is disabled by default.
Package-wise: I had to introduce a bunch of packages to please the Cargo
version resolver. I'm a upstream contributor, I can probably relax those later
on. I was a bit shy to bump rust-nix for all the packages, I just introduced a
new version of it.
Service-wise: I introduced a new flag in the Nscd service instead of creating
a new Nsncd service from scratch to keep the existing service dependency
graph. It does not make 100% sense because Nsncd does not share the same CLI
API with Nscd. Nsncd actually does not support any configuration file. ?
Picnoir (7):
gnu: Add rust-libc-0.2.153.
gnu: Add rust-nix-0.28.
gnu: Add rust-dns-lookup-2.
gnu: Add rust-temp-env-0.3.
gnu: Add rust-slog-async-2-8.
gnu: Add nsncd.
gnu: services: nscd: add Nsncd optional support.
gnu/packages/crates-io.scm | 112 +++++++++++++++++++++++++++++++++++++
gnu/packages/nss.scm | 44 +++++++++++++++
gnu/services/base.scm | 9 ++-
3 files changed, 163 insertions(+), 2 deletions(-)
base-commit: cf5f7a8bf9ca2288700fcf351bbca0fc341ec969
--
2.41.0