Add env variable for machine ID path
authorMartin Pitt <mpitt@debian.org>
Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)
committerMartin Pitt <mpitt@debian.org>
Sun, 27 Jan 2019 21:33:07 +0000 (21:33 +0000)
commit36c990cc99f817f9c2297bf5564620c127c62c07
tree78fc2ceebf07d0d093f0bb299ec8616a91f46d62
parentb3fcd820ac8c439db02854b2e4e46dace0d5aaff
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