Add env variable for machine ID path
authorMartin Pitt <mpitt@debian.org>
Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)
committerAdrian Bunk <bunk@debian.org>
Thu, 30 Mar 2023 19:32:31 +0000 (20:32 +0100)
commit0db8654dcb4248725bc21e61e24a2e813082b012
tree92651081d7b93a29e8f2e864385395d3fed1d78d
parent35f666dbbf3fd97470bf01f1e8a380030e3c1bf2
Add env variable for machine ID path

During package build, in minimal chroots, or other systems which do not already
have an /etc/machine-id we get six test failures. Introduce a
$SYSTEMD_MACHINE_ID_PATH environment variable which can specify a location
other than /etc/machine-id, so that the unit tests are independent from the
environment.

Also adjust test-fs-util to not assume that /etc/machine-id exists. Use
/etc/passwd instead which is created by base-files.

Closes: #851445
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62344

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-env-variable-for-machine-ID-path.patch
src/libsystemd/sd-id128/sd-id128.c
src/test/test-fs-util.c