Add env variable for machine ID path
authorMartin Pitt <mpitt@debian.org>
Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 2 Apr 2019 19:29:26 +0000 (20:29 +0100)
commit99d01827b2450cc50dc68e00d3336fe48da7b749
tree92d51a9761b3901afa270d94c610e90f919a42d0
parent4a7af5b574df0a0f667bb95bd53a65c1af8d189b
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