unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#71064] [PATCH 0/7] Nsncd: Introduce package + nscd service update
@ 2024-05-19 12:34 picnoir
  2024-05-19 12:46 ` [bug#71064] [PATCH 1/7] gnu: Add rust-libc-0.2.153 picnoir
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: picnoir @ 2024-05-19 12:34 UTC (permalink / raw)
  To: 71064; +Cc: Picnoir

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




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-03  4:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-19 12:34 [bug#71064] [PATCH 0/7] Nsncd: Introduce package + nscd service update picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 1/7] gnu: Add rust-libc-0.2.153 picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 2/7] gnu: Add rust-nix-0.28 picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 3/7] gnu: Add rust-dns-lookup-2 picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 4/7] gnu: Add rust-temp-env-0.3 picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 5/7] gnu: Add rust-slog-async-2-8 picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 6/7] gnu: Add nsncd picnoir
2024-05-19 12:46 ` [bug#71064] [PATCH 7/7] gnu: services: nscd: add Nsncd optional support picnoir
2024-06-02 18:55   ` Ludovic Courtès
2024-06-02 18:52 ` [bug#71064] [PATCH 0/7] Nsncd: Introduce package + nscd service update Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).