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>
Thu, 20 Sep 2018 20:22:45 +0000 (21:22 +0100)
commit12f4be50e2d9b0be0cbb1da65d9434767e4f00c1
treed619e9e846ca0b4e5af453add6066b3f60fe8c77
parent6fa2698a54dbd0297a50822bb1947628a74b94be
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/issue instead which is from 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