🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4758

Bug#1154179: Package creates /var/empty

#4758
From: aszlig
Date: Mon, 16 Nov 2026 17:40
31 lines
2587 bytes
Package: nix-setup-systemd
Version: 2.35.4+dfsg-1

Good morning :)

I just stumbled over the following command in postinst[1]:

  useradd --system \
    --comment "Nix build user $n" \
    --home-dir /var/empty \
    --gid nixbld --groups nixbld \
    --no-user-group \
    --shell "$(which nologin)" \
    nixbld$n

I believe this should be --no-create-home and use a --home-dir of /nonexistent.

According to <https://www.debian.org/doc/debian-policy/ch-opersys.html#non-existent-home-directories>:

> The canonical non-existent home directory is /nonexistent. Users who should
> not have a home directory should have their home directory set to this value.

On NixOS systems, /var/empty is generally guaranteed to be an empty and
immutable directory generally used for eg. setting up chroot/pivot_root, but I
believe on Debian systems /nonexistent should be used instead.

[1]: https://salsa.debian.org/debian/nix/-/blob/df63ca59eb0dce79a34aac6bde35bd5c81974327/debian/nix-setup-systemd.postinst#L27

Cheers,
-- 
aszlig
Technical Details
Message-ID: <O08Qp-cidc-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: aszlig <aszlig@nix.build>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1154179: Package creates /var/empty
Date: Mon, 16 Nov 2026 18:40:01 +0100
Message-ID: <O08Qp-cidc-5@gated-at.bofh.it>
X-Original-To: submit@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Nov 16 17:31:10 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: aszlig <aszlig@nix.build>, 1154179@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: jljusten@debian.org
X-Debian-Pr-Message: report 1154179
X-Debian-Pr-Package: nix-setup-systemd
X-Debian-Pr-Source: nix
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Greylist: delayed 593 seconds by postgrey-1.37 at buxtehude; Mon, 16 Nov 2026 17:29:16 UTC
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003021
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 31
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 16 Nov 2026 18:19:14 +0100
X-Original-Message-ID: <avs7Etrgoea_2aiQ@dnyarri>