unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: picnoir@alternativebit.fr
To: 71064@debbugs.gnu.org
Cc: Picnoir <picnoir@alternativebit.fr>
Subject: [bug#71064] [PATCH 0/7] Nsncd: Introduce package + nscd service update
Date: Sun, 19 May 2024 14:34:47 +0200	[thread overview]
Message-ID: <cover.1716121730.git.picnoir@alternativebit.fr> (raw)

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




             reply	other threads:[~2024-05-19 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19 12:34 picnoir [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1716121730.git.picnoir@alternativebit.fr \
    --to=picnoir@alternativebit.fr \
    --cc=71064@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).