Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Use of /etc/machine-id causes test failure #100
I am wanting to enable the tests for our De[vu|bi]an package builds. I have been debugging the few failures (test-id128 [sd_id128_get_machine_app_specific], test-fs-util [chase_symlinks], test-process-util [mount MS_PRIVATE|MS_REC] and test-login [sd_seat_get_active]). They all seem to be related to the use of /etc/machine-id. This file is not present in debootstrap chroots and its presence cannot be relied upon for systems that have never been booted with systemd.
I have tried with dbus installed in the chroot and using /var/lib/dbus/machine-id and all the tests pass.
Would you consider this patch?
I see systemd has an environment variable to override the machine-id path, but that seems less attractive to me?
Well, the environment variable would not catch here, as this is one of (far too) many hard coded paths in systemd.
I would favour to do the default, and then add an "#if 1" block to check the dbus path if the default one failed. This way the change would not interfere with future updates when I migrate commits from systemd, as my migration tools can handle that
To be a bit more concrete:
That's what the idea would look like. The second example would be changed accordingly.
What do you say?