* Mike Gabriel <[email protected]> [261112 21:06]:
Hi Chris, hi Elbrus, hi Roland,

On  Do 12 Nov 2026 16:50:59 CET, Roland Clobus wrote:

[...]

There has some discussion been going on due to testing migration failures of src:pkg debian-edu package because of problems like:

```
363s Creating group 'kvm' with GID 982.
363s Creating group 'render' with GID 981.
363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:18: Failed to resolve group 'kvm': Unknown group 363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:19: Failed to resolve group 'kvm': Unknown group 363s /usr/lib/tmpfiles.d/static-nodes-permissions.conf:20: Failed to resolve group 'kvm': Unknown group
```

I would like to bring up some findings Roland Clobus and I had that might be relevant.

TL;DR; does a package that uses the sysusers.d API of systemd need a Pre-Depends: on libnss-systemd???

But sysusers doesn't use libnss-systemd...


The failures we observed in CI (with debian-edu << 2.13.8, the current version has another breakage):

 - a postinst script of some package uses sysusers.d API from systemd to
   create a system user or group
 - and then later on in that postinst script, it tries to operate on that
   user or group (normally a chown on some folder or file)
 - we often then get an error message from that operation like the one
   quoted above, because the user (or group) that just got created does
   not yet exist on the system (or rather: it cannot yet be seen by the
   system).

A parallel observation we had is this:

 - package X configures a new user/group via sysusers.d API from systemd
 - package X want to use this user/group immediately (and fails)
 - further down in the output of APT (Configuring <package>...), we can
   see that libnss-systemd gets configured.
 - libnss-systemd uses dh-nss and ships debian/libnss-systemd.nss. dh-nss
   adds various #DEBHELPER# snippets to all (iirc) package scripts to
   manage "systemd" nss provider info to the entries user, group, shadow,
   gshadow in nsswitch.conf

The problem now is:

 - package X wants to operate on a user/group visible to the system
   via libnss-systemd
 - but: libnss-systemd is not yet configured (postinst)
 - that means: "systemd" entries are not yet in /etc/nsswitch.conf for
   user, group, shadow, gshadow when package X wants to use them
 - which means: the user/group is still invisible when package X wants
   to operate on them

I think these are unrelated problems, each of them deserves detailed debugging.
Relatedly there is dh bug #1070473.

C

Reply via email to